aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/advancedDetector.cpp4
-rw-r--r--engines/advancedDetector.h4
-rw-r--r--engines/agi/agi.cpp4
-rw-r--r--engines/agi/agi.h4
-rw-r--r--engines/agi/checks.cpp4
-rw-r--r--engines/agi/console.cpp4
-rw-r--r--engines/agi/console.h4
-rw-r--r--engines/agi/cycle.cpp4
-rw-r--r--engines/agi/detection.cpp4
-rw-r--r--engines/agi/detection_tables.h5
-rw-r--r--engines/agi/font.h4
-rw-r--r--engines/agi/global.cpp4
-rw-r--r--engines/agi/graphics.cpp4
-rw-r--r--engines/agi/graphics.h4
-rw-r--r--engines/agi/id.cpp4
-rw-r--r--engines/agi/inv.cpp4
-rw-r--r--engines/agi/keyboard.cpp4
-rw-r--r--engines/agi/keyboard.h4
-rw-r--r--engines/agi/loader_v1.cpp4
-rw-r--r--engines/agi/loader_v2.cpp4
-rw-r--r--engines/agi/loader_v3.cpp4
-rw-r--r--engines/agi/logic.cpp4
-rw-r--r--engines/agi/logic.h4
-rw-r--r--engines/agi/lzw.cpp4
-rw-r--r--engines/agi/lzw.h4
-rw-r--r--engines/agi/menu.cpp4
-rw-r--r--engines/agi/menu.h4
-rw-r--r--engines/agi/motion.cpp4
-rw-r--r--engines/agi/objects.cpp4
-rw-r--r--engines/agi/op_cmd.cpp4
-rw-r--r--engines/agi/op_dbg.cpp4
-rw-r--r--engines/agi/op_test.cpp4
-rw-r--r--engines/agi/opcodes.cpp4
-rw-r--r--engines/agi/opcodes.h4
-rw-r--r--engines/agi/picture.cpp4
-rw-r--r--engines/agi/picture.h4
-rw-r--r--engines/agi/preagi.cpp4
-rw-r--r--engines/agi/preagi.h4
-rw-r--r--engines/agi/preagi_mickey.cpp4
-rw-r--r--engines/agi/preagi_mickey.h4
-rw-r--r--engines/agi/preagi_troll.cpp4
-rw-r--r--engines/agi/preagi_troll.h4
-rw-r--r--engines/agi/preagi_winnie.cpp4
-rw-r--r--engines/agi/preagi_winnie.h4
-rw-r--r--engines/agi/saveload.cpp4
-rw-r--r--engines/agi/sound.cpp4
-rw-r--r--engines/agi/sound.h4
-rw-r--r--engines/agi/sound_2gs.cpp4
-rw-r--r--engines/agi/sound_2gs.h4
-rw-r--r--engines/agi/sound_coco3.cpp4
-rw-r--r--engines/agi/sound_coco3.h4
-rw-r--r--engines/agi/sound_midi.cpp4
-rw-r--r--engines/agi/sound_midi.h4
-rw-r--r--engines/agi/sound_pcjr.cpp4
-rw-r--r--engines/agi/sound_pcjr.h4
-rw-r--r--engines/agi/sound_sarien.cpp4
-rw-r--r--engines/agi/sound_sarien.h4
-rw-r--r--engines/agi/sprite.cpp4
-rw-r--r--engines/agi/sprite.h4
-rw-r--r--engines/agi/text.cpp4
-rw-r--r--engines/agi/view.cpp4
-rw-r--r--engines/agi/view.h4
-rw-r--r--engines/agi/wagparser.cpp4
-rw-r--r--engines/agi/wagparser.h4
-rw-r--r--engines/agi/words.cpp4
-rw-r--r--engines/agos/agos.cpp7
-rw-r--r--engines/agos/agos.h28
-rw-r--r--engines/agos/animation.cpp6
-rw-r--r--engines/agos/animation.h4
-rw-r--r--engines/agos/charset-fontdata.cpp4
-rw-r--r--engines/agos/charset.cpp4
-rw-r--r--engines/agos/contain.cpp4
-rw-r--r--engines/agos/cursor.cpp4
-rw-r--r--engines/agos/debug.cpp41
-rw-r--r--engines/agos/debug.h224
-rw-r--r--engines/agos/debugger.cpp4
-rw-r--r--engines/agos/debugger.h4
-rw-r--r--engines/agos/detection.cpp4
-rw-r--r--engines/agos/detection_tables.h8
-rw-r--r--engines/agos/draw.cpp4
-rw-r--r--engines/agos/event.cpp22
-rw-r--r--engines/agos/feeble.cpp4
-rw-r--r--engines/agos/gfx.cpp4
-rw-r--r--engines/agos/icons.cpp4
-rw-r--r--engines/agos/input.cpp113
-rw-r--r--engines/agos/input_pn.cpp4
-rw-r--r--engines/agos/intern.h25
-rw-r--r--engines/agos/items.cpp4
-rw-r--r--engines/agos/menus.cpp4
-rw-r--r--engines/agos/midi.cpp8
-rw-r--r--engines/agos/midi.h4
-rw-r--r--engines/agos/midiparser_s1d.cpp4
-rw-r--r--engines/agos/oracle.cpp8
-rw-r--r--engines/agos/pn.cpp4
-rw-r--r--engines/agos/res.cpp19
-rw-r--r--engines/agos/res_ami.cpp4
-rw-r--r--engines/agos/res_snd.cpp4
-rw-r--r--engines/agos/rooms.cpp4
-rw-r--r--engines/agos/saveload.cpp74
-rw-r--r--engines/agos/script.cpp6
-rw-r--r--engines/agos/script_dp.cpp4
-rw-r--r--engines/agos/script_e1.cpp4
-rw-r--r--engines/agos/script_e2.cpp4
-rw-r--r--engines/agos/script_ff.cpp73
-rw-r--r--engines/agos/script_pn.cpp4
-rw-r--r--engines/agos/script_pp.cpp4
-rw-r--r--engines/agos/script_s1.cpp4
-rw-r--r--engines/agos/script_s2.cpp4
-rw-r--r--engines/agos/script_ww.cpp4
-rw-r--r--engines/agos/sound.cpp20
-rw-r--r--engines/agos/sound.h4
-rw-r--r--engines/agos/string.cpp4
-rw-r--r--engines/agos/string_pn.cpp4
-rw-r--r--engines/agos/subroutine.cpp4
-rw-r--r--engines/agos/verb.cpp19
-rw-r--r--engines/agos/verb_pn.cpp4
-rw-r--r--engines/agos/vga.cpp4
-rw-r--r--engines/agos/vga.h4
-rw-r--r--engines/agos/vga_e2.cpp4
-rw-r--r--engines/agos/vga_ff.cpp4
-rw-r--r--engines/agos/vga_pn.cpp4
-rw-r--r--engines/agos/vga_s1.cpp4
-rw-r--r--engines/agos/vga_s2.cpp4
-rw-r--r--engines/agos/vga_ww.cpp4
-rw-r--r--engines/agos/window.cpp4
-rw-r--r--engines/agos/zones.cpp6
-rw-r--r--engines/avalanche/animation.cpp26
-rw-r--r--engines/avalanche/animation.h9
-rw-r--r--engines/avalanche/avalanche.cpp46
-rw-r--r--engines/avalanche/avalanche.h29
-rw-r--r--engines/avalanche/avalot.cpp92
-rw-r--r--engines/avalanche/avalot.h6
-rw-r--r--engines/avalanche/background.cpp24
-rw-r--r--engines/avalanche/background.h8
-rw-r--r--engines/avalanche/clock.cpp40
-rw-r--r--engines/avalanche/clock.h40
-rw-r--r--engines/avalanche/closing.cpp4
-rw-r--r--engines/avalanche/closing.h4
-rw-r--r--engines/avalanche/console.cpp6
-rw-r--r--engines/avalanche/console.h6
-rw-r--r--engines/avalanche/detection.cpp6
-rw-r--r--engines/avalanche/dialogs.cpp40
-rw-r--r--engines/avalanche/dialogs.h6
-rw-r--r--engines/avalanche/dropdown.cpp (renamed from engines/avalanche/menu.cpp)152
-rw-r--r--engines/avalanche/dropdown.h (renamed from engines/avalanche/menu.h)30
-rw-r--r--engines/avalanche/enums.h13
-rw-r--r--engines/avalanche/ghostroom.cpp395
-rw-r--r--engines/avalanche/ghostroom.h88
-rw-r--r--engines/avalanche/graphics.cpp465
-rw-r--r--engines/avalanche/graphics.h64
-rw-r--r--engines/avalanche/help.cpp270
-rw-r--r--engines/avalanche/help.h65
-rw-r--r--engines/avalanche/highscore.cpp110
-rw-r--r--engines/avalanche/highscore.h59
-rw-r--r--engines/avalanche/mainmenu.cpp116
-rw-r--r--engines/avalanche/mainmenu.h55
-rw-r--r--engines/avalanche/module.mk10
-rw-r--r--engines/avalanche/nim.cpp16
-rw-r--r--engines/avalanche/nim.h6
-rw-r--r--engines/avalanche/parser.cpp48
-rw-r--r--engines/avalanche/parser.h14
-rw-r--r--engines/avalanche/pingo.cpp94
-rw-r--r--engines/avalanche/sequence.cpp4
-rw-r--r--engines/avalanche/sequence.h4
-rw-r--r--engines/avalanche/shootemup.cpp693
-rw-r--r--engines/avalanche/shootemup.h134
-rw-r--r--engines/avalanche/sound.cpp5
-rw-r--r--engines/avalanche/sound.h4
-rw-r--r--engines/avalanche/timer.cpp77
-rw-r--r--engines/avalanche/timer.h6
-rw-r--r--engines/bbvs/bbvs.cpp1392
-rw-r--r--engines/bbvs/bbvs.h423
-rw-r--r--engines/bbvs/configure.engine3
-rw-r--r--engines/bbvs/detection.cpp162
-rw-r--r--engines/bbvs/dialogs.cpp182
-rw-r--r--engines/bbvs/dialogs.h81
-rw-r--r--engines/bbvs/gamemodule.cpp500
-rw-r--r--engines/bbvs/gamemodule.h251
-rw-r--r--engines/bbvs/graphics.cpp141
-rw-r--r--engines/bbvs/graphics.h61
-rw-r--r--engines/bbvs/logic.cpp265
-rw-r--r--engines/bbvs/minigames/bbairguitar.cpp1198
-rw-r--r--engines/bbvs/minigames/bbairguitar.h148
-rw-r--r--engines/bbvs/minigames/bbairguitar_anims.cpp186
-rw-r--r--engines/bbvs/minigames/bbant.cpp1317
-rw-r--r--engines/bbvs/minigames/bbant.h173
-rw-r--r--engines/bbvs/minigames/bbant_anims.cpp757
-rw-r--r--engines/bbvs/minigames/bbloogie.cpp1353
-rw-r--r--engines/bbvs/minigames/bbloogie.h141
-rw-r--r--engines/bbvs/minigames/bbloogie_anims.cpp138
-rw-r--r--engines/bbvs/minigames/bbtennis.cpp1274
-rw-r--r--engines/bbvs/minigames/bbtennis.h134
-rw-r--r--engines/bbvs/minigames/bbtennis_anims.cpp142
-rw-r--r--engines/bbvs/minigames/minigame.cpp112
-rw-r--r--engines/bbvs/minigames/minigame.h82
-rw-r--r--engines/bbvs/module.mk32
-rw-r--r--engines/bbvs/saveload.cpp278
-rw-r--r--engines/bbvs/scene.cpp227
-rw-r--r--engines/bbvs/sound.cpp107
-rw-r--r--engines/bbvs/sound.h63
-rw-r--r--engines/bbvs/spritemodule.cpp112
-rw-r--r--engines/bbvs/spritemodule.h68
-rw-r--r--engines/bbvs/videoplayer.cpp82
-rw-r--r--engines/bbvs/walk.cpp464
-rw-r--r--engines/cge/bitmap.cpp5
-rw-r--r--engines/cge/bitmap.h4
-rw-r--r--engines/cge/cge.cpp117
-rw-r--r--engines/cge/cge.h42
-rw-r--r--engines/cge/cge_main.cpp50
-rw-r--r--engines/cge/cge_main.h4
-rw-r--r--engines/cge/console.cpp4
-rw-r--r--engines/cge/console.h4
-rw-r--r--engines/cge/detection.cpp61
-rw-r--r--engines/cge/events.cpp4
-rw-r--r--engines/cge/events.h4
-rw-r--r--engines/cge/fileio.cpp12
-rw-r--r--engines/cge/fileio.h8
-rw-r--r--engines/cge/game.cpp4
-rw-r--r--engines/cge/game.h4
-rw-r--r--engines/cge/general.h4
-rw-r--r--engines/cge/module.mk2
-rw-r--r--engines/cge/snail.cpp7
-rw-r--r--engines/cge/snail.h4
-rw-r--r--engines/cge/sound.cpp5
-rw-r--r--engines/cge/sound.h4
-rw-r--r--engines/cge/talk.cpp4
-rw-r--r--engines/cge/talk.h4
-rw-r--r--engines/cge/text.cpp4
-rw-r--r--engines/cge/text.h4
-rw-r--r--engines/cge/vga13h.cpp15
-rw-r--r--engines/cge/vga13h.h4
-rw-r--r--engines/cge/vmenu.cpp4
-rw-r--r--engines/cge/vmenu.h4
-rw-r--r--engines/cge/walk.cpp4
-rw-r--r--engines/cge/walk.h4
-rw-r--r--engines/cine/anim.cpp6
-rw-r--r--engines/cine/anim.h4
-rw-r--r--engines/cine/bg.cpp8
-rw-r--r--engines/cine/bg.h4
-rw-r--r--engines/cine/bg_list.cpp4
-rw-r--r--engines/cine/bg_list.h4
-rw-r--r--engines/cine/cine.cpp12
-rw-r--r--engines/cine/cine.h4
-rw-r--r--engines/cine/console.cpp4
-rw-r--r--engines/cine/console.h4
-rw-r--r--engines/cine/detection.cpp4
-rw-r--r--engines/cine/detection_tables.h4
-rw-r--r--engines/cine/gfx.cpp37
-rw-r--r--engines/cine/gfx.h4
-rw-r--r--engines/cine/main_loop.cpp6
-rw-r--r--engines/cine/main_loop.h4
-rw-r--r--engines/cine/msg.cpp4
-rw-r--r--engines/cine/msg.h4
-rw-r--r--engines/cine/object.cpp4
-rw-r--r--engines/cine/object.h4
-rw-r--r--engines/cine/pal.cpp8
-rw-r--r--engines/cine/pal.h4
-rw-r--r--engines/cine/part.cpp6
-rw-r--r--engines/cine/part.h4
-rw-r--r--engines/cine/prc.cpp4
-rw-r--r--engines/cine/prc.h4
-rw-r--r--engines/cine/rel.cpp4
-rw-r--r--engines/cine/rel.h4
-rw-r--r--engines/cine/saveload.cpp4
-rw-r--r--engines/cine/saveload.h4
-rw-r--r--engines/cine/script.h4
-rw-r--r--engines/cine/script_fw.cpp12
-rw-r--r--engines/cine/script_os.cpp4
-rw-r--r--engines/cine/sound.cpp6
-rw-r--r--engines/cine/sound.h4
-rw-r--r--engines/cine/texte.cpp4
-rw-r--r--engines/cine/texte.h4
-rw-r--r--engines/cine/unpack.cpp4
-rw-r--r--engines/cine/unpack.h4
-rw-r--r--engines/cine/various.cpp118
-rw-r--r--engines/cine/various.h6
-rw-r--r--engines/composer/composer.cpp4
-rw-r--r--engines/composer/composer.h4
-rw-r--r--engines/composer/console.cpp4
-rw-r--r--engines/composer/console.h4
-rw-r--r--engines/composer/detection.cpp8
-rw-r--r--engines/composer/graphics.cpp4
-rw-r--r--engines/composer/graphics.h4
-rw-r--r--engines/composer/resource.cpp4
-rw-r--r--engines/composer/resource.h4
-rw-r--r--engines/composer/scripting.cpp4
-rw-r--r--engines/cruise/actor.cpp4
-rw-r--r--engines/cruise/actor.h4
-rw-r--r--engines/cruise/background.cpp4
-rw-r--r--engines/cruise/background.h4
-rw-r--r--engines/cruise/backgroundIncrust.cpp4
-rw-r--r--engines/cruise/backgroundIncrust.h4
-rw-r--r--engines/cruise/cell.cpp4
-rw-r--r--engines/cruise/cell.h4
-rw-r--r--engines/cruise/cruise.cpp4
-rw-r--r--engines/cruise/cruise.h4
-rw-r--r--engines/cruise/cruise_main.cpp4
-rw-r--r--engines/cruise/cruise_main.h4
-rw-r--r--engines/cruise/ctp.cpp4
-rw-r--r--engines/cruise/ctp.h4
-rw-r--r--engines/cruise/dataLoader.cpp4
-rw-r--r--engines/cruise/dataLoader.h4
-rw-r--r--engines/cruise/debugger.cpp4
-rw-r--r--engines/cruise/debugger.h4
-rw-r--r--engines/cruise/decompiler.cpp4
-rw-r--r--engines/cruise/delphine-unpack.cpp4
-rw-r--r--engines/cruise/detection.cpp8
-rw-r--r--engines/cruise/font.cpp6
-rw-r--r--engines/cruise/font.h4
-rw-r--r--engines/cruise/function.cpp6
-rw-r--r--engines/cruise/function.h4
-rw-r--r--engines/cruise/gfxModule.cpp4
-rw-r--r--engines/cruise/gfxModule.h4
-rw-r--r--engines/cruise/linker.cpp4
-rw-r--r--engines/cruise/linker.h4
-rw-r--r--engines/cruise/mainDraw.cpp4
-rw-r--r--engines/cruise/mainDraw.h4
-rw-r--r--engines/cruise/menu.cpp4
-rw-r--r--engines/cruise/menu.h4
-rw-r--r--engines/cruise/mouse.cpp4
-rw-r--r--engines/cruise/mouse.h4
-rw-r--r--engines/cruise/object.cpp4
-rw-r--r--engines/cruise/object.h4
-rw-r--r--engines/cruise/overlay.cpp4
-rw-r--r--engines/cruise/overlay.h4
-rw-r--r--engines/cruise/perso.cpp4
-rw-r--r--engines/cruise/perso.h4
-rw-r--r--engines/cruise/polys.cpp4
-rw-r--r--engines/cruise/polys.h4
-rw-r--r--engines/cruise/saveload.cpp27
-rw-r--r--engines/cruise/saveload.h4
-rw-r--r--engines/cruise/script.cpp4
-rw-r--r--engines/cruise/script.h4
-rw-r--r--engines/cruise/sound.cpp4
-rw-r--r--engines/cruise/sound.h4
-rw-r--r--engines/cruise/stack.cpp4
-rw-r--r--engines/cruise/stack.h4
-rw-r--r--engines/cruise/staticres.cpp4
-rw-r--r--engines/cruise/staticres.h4
-rw-r--r--engines/cruise/various.cpp4
-rw-r--r--engines/cruise/various.h4
-rw-r--r--engines/cruise/vars.cpp5
-rw-r--r--engines/cruise/vars.h5
-rw-r--r--engines/cruise/volume.cpp4
-rw-r--r--engines/cruise/volume.h4
-rw-r--r--engines/dialogs.cpp1
-rw-r--r--engines/dialogs.h1
-rw-r--r--engines/draci/animation.cpp4
-rw-r--r--engines/draci/animation.h4
-rw-r--r--engines/draci/barchive.cpp4
-rw-r--r--engines/draci/barchive.h4
-rw-r--r--engines/draci/console.cpp4
-rw-r--r--engines/draci/console.h4
-rw-r--r--engines/draci/detection.cpp4
-rw-r--r--engines/draci/draci.cpp4
-rw-r--r--engines/draci/draci.h4
-rw-r--r--engines/draci/font.cpp4
-rw-r--r--engines/draci/font.h4
-rw-r--r--engines/draci/game.cpp59
-rw-r--r--engines/draci/game.h12
-rw-r--r--engines/draci/module.mk8
-rw-r--r--engines/draci/mouse.cpp4
-rw-r--r--engines/draci/mouse.h4
-rw-r--r--engines/draci/music.cpp4
-rw-r--r--engines/draci/music.h4
-rw-r--r--engines/draci/saveload.cpp11
-rw-r--r--engines/draci/saveload.h6
-rw-r--r--engines/draci/screen.cpp4
-rw-r--r--engines/draci/screen.h4
-rw-r--r--engines/draci/script.cpp25
-rw-r--r--engines/draci/script.h4
-rw-r--r--engines/draci/sound.cpp4
-rw-r--r--engines/draci/sound.h4
-rw-r--r--engines/draci/sprite.cpp4
-rw-r--r--engines/draci/sprite.h4
-rw-r--r--engines/draci/surface.cpp4
-rw-r--r--engines/draci/surface.h4
-rw-r--r--engines/draci/walking.cpp4
-rw-r--r--engines/draci/walking.h6
-rw-r--r--engines/drascula/actors.cpp4
-rw-r--r--engines/drascula/animation.cpp4
-rw-r--r--engines/drascula/console.cpp4
-rw-r--r--engines/drascula/console.h4
-rw-r--r--engines/drascula/converse.cpp4
-rw-r--r--engines/drascula/detection.cpp4
-rw-r--r--engines/drascula/drascula.cpp4
-rw-r--r--engines/drascula/drascula.h4
-rw-r--r--engines/drascula/graphics.cpp4
-rw-r--r--engines/drascula/interface.cpp4
-rw-r--r--engines/drascula/objects.cpp4
-rw-r--r--engines/drascula/palette.cpp4
-rw-r--r--engines/drascula/resource.cpp4
-rw-r--r--engines/drascula/rooms.cpp4
-rw-r--r--engines/drascula/saveload.cpp4
-rw-r--r--engines/drascula/sound.cpp4
-rw-r--r--engines/drascula/talk.cpp4
-rw-r--r--engines/dreamweb/backdrop.cpp4
-rw-r--r--engines/dreamweb/console.cpp4
-rw-r--r--engines/dreamweb/console.h4
-rw-r--r--engines/dreamweb/detection.cpp4
-rw-r--r--engines/dreamweb/detection_tables.h4
-rw-r--r--engines/dreamweb/dreamweb.cpp6
-rw-r--r--engines/dreamweb/dreamweb.h12
-rw-r--r--engines/dreamweb/keypad.cpp4
-rw-r--r--engines/dreamweb/monitor.cpp4
-rw-r--r--engines/dreamweb/mouse.cpp4
-rw-r--r--engines/dreamweb/newplace.cpp12
-rw-r--r--engines/dreamweb/object.cpp4
-rw-r--r--engines/dreamweb/pathfind.cpp4
-rw-r--r--engines/dreamweb/people.cpp4
-rw-r--r--engines/dreamweb/print.cpp4
-rw-r--r--engines/dreamweb/rain.cpp4
-rw-r--r--engines/dreamweb/saveload.cpp4
-rw-r--r--engines/dreamweb/sound.cpp4
-rw-r--r--engines/dreamweb/sound.h4
-rw-r--r--engines/dreamweb/sprite.cpp4
-rw-r--r--engines/dreamweb/structs.h4
-rw-r--r--engines/dreamweb/stubs.cpp10
-rw-r--r--engines/dreamweb/talk.cpp4
-rw-r--r--engines/dreamweb/titles.cpp4
-rw-r--r--engines/dreamweb/use.cpp8
-rw-r--r--engines/dreamweb/vgafades.cpp32
-rw-r--r--engines/dreamweb/vgagrafx.cpp10
-rw-r--r--engines/engine.cpp1
-rw-r--r--engines/engine.h1
-rw-r--r--engines/fullpipe/behavior.cpp14
-rw-r--r--engines/fullpipe/behavior.h4
-rw-r--r--engines/fullpipe/console.cpp4
-rw-r--r--engines/fullpipe/console.h4
-rw-r--r--engines/fullpipe/constants.h264
-rw-r--r--engines/fullpipe/detection.cpp4
-rw-r--r--engines/fullpipe/floaters.cpp4
-rw-r--r--engines/fullpipe/floaters.h4
-rw-r--r--engines/fullpipe/fullpipe.cpp29
-rw-r--r--engines/fullpipe/fullpipe.h43
-rw-r--r--engines/fullpipe/gameloader.cpp10
-rw-r--r--engines/fullpipe/gameloader.h4
-rw-r--r--engines/fullpipe/gfx.cpp24
-rw-r--r--engines/fullpipe/gfx.h4
-rw-r--r--engines/fullpipe/init.cpp6
-rw-r--r--engines/fullpipe/input.cpp37
-rw-r--r--engines/fullpipe/input.h4
-rw-r--r--engines/fullpipe/interaction.cpp17
-rw-r--r--engines/fullpipe/interaction.h4
-rw-r--r--engines/fullpipe/inventory.cpp41
-rw-r--r--engines/fullpipe/inventory.h6
-rw-r--r--engines/fullpipe/lift.cpp461
-rw-r--r--engines/fullpipe/messagehandlers.cpp72
-rw-r--r--engines/fullpipe/messages.cpp31
-rw-r--r--engines/fullpipe/messages.h7
-rw-r--r--engines/fullpipe/modal.cpp810
-rw-r--r--engines/fullpipe/modal.h122
-rw-r--r--engines/fullpipe/module.mk3
-rw-r--r--engines/fullpipe/motion.cpp524
-rw-r--r--engines/fullpipe/motion.h12
-rw-r--r--engines/fullpipe/objectnames.h12
-rw-r--r--engines/fullpipe/objects.h4
-rw-r--r--engines/fullpipe/scene.cpp8
-rw-r--r--engines/fullpipe/scene.h6
-rw-r--r--engines/fullpipe/scenes.cpp195
-rw-r--r--engines/fullpipe/scenes.h155
-rw-r--r--engines/fullpipe/scenes/scene01.cpp4
-rw-r--r--engines/fullpipe/scenes/scene02.cpp4
-rw-r--r--engines/fullpipe/scenes/scene03.cpp12
-rw-r--r--engines/fullpipe/scenes/scene04.cpp14
-rw-r--r--engines/fullpipe/scenes/scene05.cpp12
-rw-r--r--engines/fullpipe/scenes/scene06.cpp14
-rw-r--r--engines/fullpipe/scenes/scene07.cpp4
-rw-r--r--engines/fullpipe/scenes/scene08.cpp4
-rw-r--r--engines/fullpipe/scenes/scene09.cpp747
-rw-r--r--engines/fullpipe/scenes/scene10.cpp12
-rw-r--r--engines/fullpipe/scenes/scene11.cpp4
-rw-r--r--engines/fullpipe/scenes/scene12.cpp4
-rw-r--r--engines/fullpipe/scenes/scene13.cpp4
-rw-r--r--engines/fullpipe/scenes/scene14.cpp12
-rw-r--r--engines/fullpipe/scenes/scene15.cpp12
-rw-r--r--engines/fullpipe/scenes/scene16.cpp4
-rw-r--r--engines/fullpipe/scenes/scene17.cpp4
-rw-r--r--engines/fullpipe/scenes/scene18and19.cpp893
-rw-r--r--engines/fullpipe/scenes/scene20.cpp4
-rw-r--r--engines/fullpipe/scenes/scene21.cpp4
-rw-r--r--engines/fullpipe/scenes/scene22.cpp4
-rw-r--r--engines/fullpipe/scenes/scene23.cpp4
-rw-r--r--engines/fullpipe/scenes/scene24.cpp4
-rw-r--r--engines/fullpipe/scenes/scene25.cpp4
-rw-r--r--engines/fullpipe/scenes/scene26.cpp4
-rw-r--r--engines/fullpipe/scenes/scene27.cpp759
-rw-r--r--engines/fullpipe/scenes/scene28.cpp4
-rw-r--r--engines/fullpipe/scenes/scene29.cpp1125
-rw-r--r--engines/fullpipe/scenes/scene30.cpp12
-rw-r--r--engines/fullpipe/scenes/scene31.cpp4
-rw-r--r--engines/fullpipe/scenes/scene32.cpp12
-rw-r--r--engines/fullpipe/scenes/scene33.cpp4
-rw-r--r--engines/fullpipe/scenes/scene34.cpp14
-rw-r--r--engines/fullpipe/scenes/scene35.cpp12
-rw-r--r--engines/fullpipe/scenes/scene36.cpp4
-rw-r--r--engines/fullpipe/scenes/scene37.cpp4
-rw-r--r--engines/fullpipe/scenes/scene38.cpp14
-rw-r--r--engines/fullpipe/scenes/sceneDbg.cpp4
-rw-r--r--engines/fullpipe/scenes/sceneFinal.cpp4
-rw-r--r--engines/fullpipe/scenes/sceneIntro.cpp4
-rw-r--r--engines/fullpipe/sound.cpp313
-rw-r--r--engines/fullpipe/sound.h23
-rw-r--r--engines/fullpipe/stateloader.cpp4
-rw-r--r--engines/fullpipe/statics.cpp230
-rw-r--r--engines/fullpipe/statics.h9
-rw-r--r--engines/fullpipe/utils.cpp4
-rw-r--r--engines/fullpipe/utils.h4
-rw-r--r--engines/game.cpp4
-rw-r--r--engines/game.h4
-rw-r--r--engines/gob/anifile.cpp4
-rw-r--r--engines/gob/anifile.h4
-rw-r--r--engines/gob/aniobject.cpp4
-rw-r--r--engines/gob/aniobject.h4
-rw-r--r--engines/gob/backbuffer.cpp4
-rw-r--r--engines/gob/backbuffer.h4
-rw-r--r--engines/gob/cheater.cpp4
-rw-r--r--engines/gob/cheater.h4
-rw-r--r--engines/gob/cheater_geisha.cpp4
-rw-r--r--engines/gob/cmpfile.cpp4
-rw-r--r--engines/gob/cmpfile.h4
-rw-r--r--engines/gob/console.cpp4
-rw-r--r--engines/gob/console.h4
-rw-r--r--engines/gob/databases.cpp4
-rw-r--r--engines/gob/databases.h4
-rw-r--r--engines/gob/dataio.cpp4
-rw-r--r--engines/gob/dataio.h4
-rw-r--r--engines/gob/dbase.cpp4
-rw-r--r--engines/gob/dbase.h4
-rw-r--r--engines/gob/decfile.cpp4
-rw-r--r--engines/gob/decfile.h4
-rw-r--r--engines/gob/demos/batplayer.cpp4
-rw-r--r--engines/gob/demos/batplayer.h4
-rw-r--r--engines/gob/demos/demoplayer.cpp4
-rw-r--r--engines/gob/demos/demoplayer.h4
-rw-r--r--engines/gob/demos/scnplayer.cpp4
-rw-r--r--engines/gob/demos/scnplayer.h4
-rw-r--r--engines/gob/detection/detection.cpp4
-rw-r--r--engines/gob/detection/tables.h6
-rw-r--r--engines/gob/detection/tables_adi2.h4
-rw-r--r--engines/gob/detection/tables_adi4.h4
-rw-r--r--engines/gob/detection/tables_adibou.h4
-rw-r--r--engines/gob/detection/tables_ajworld.h4
-rw-r--r--engines/gob/detection/tables_bargon.h4
-rw-r--r--engines/gob/detection/tables_crousti.h45
-rw-r--r--engines/gob/detection/tables_dynasty.h4
-rw-r--r--engines/gob/detection/tables_fallback.h4
-rw-r--r--engines/gob/detection/tables_fascin.h4
-rw-r--r--engines/gob/detection/tables_geisha.h4
-rw-r--r--engines/gob/detection/tables_gob1.h4
-rw-r--r--engines/gob/detection/tables_gob2.h4
-rw-r--r--engines/gob/detection/tables_gob3.h4
-rw-r--r--engines/gob/detection/tables_inca2.h4
-rw-r--r--engines/gob/detection/tables_lit.h4
-rw-r--r--engines/gob/detection/tables_littlered.h4
-rw-r--r--engines/gob/detection/tables_onceupon.h4
-rw-r--r--engines/gob/detection/tables_playtoons.h4
-rw-r--r--engines/gob/detection/tables_urban.h4
-rw-r--r--engines/gob/detection/tables_ween.h4
-rw-r--r--engines/gob/detection/tables_woodruff.h4
-rw-r--r--engines/gob/draw.cpp9
-rw-r--r--engines/gob/draw.h5
-rw-r--r--engines/gob/draw_bargon.cpp4
-rw-r--r--engines/gob/draw_fascin.cpp8
-rw-r--r--engines/gob/draw_playtoons.cpp4
-rw-r--r--engines/gob/draw_v1.cpp4
-rw-r--r--engines/gob/draw_v2.cpp4
-rw-r--r--engines/gob/expression.cpp4
-rw-r--r--engines/gob/expression.h4
-rw-r--r--engines/gob/game.cpp4
-rw-r--r--engines/gob/game.h4
-rw-r--r--engines/gob/global.cpp4
-rw-r--r--engines/gob/global.h4
-rw-r--r--engines/gob/gob.cpp5
-rw-r--r--engines/gob/gob.h8
-rw-r--r--engines/gob/goblin.cpp4
-rw-r--r--engines/gob/goblin.h4
-rw-r--r--engines/gob/goblin_v1.cpp4
-rw-r--r--engines/gob/goblin_v2.cpp4
-rw-r--r--engines/gob/goblin_v3.cpp4
-rw-r--r--engines/gob/goblin_v4.cpp6
-rw-r--r--engines/gob/hotspots.cpp4
-rw-r--r--engines/gob/hotspots.h4
-rw-r--r--engines/gob/iniconfig.cpp4
-rw-r--r--engines/gob/iniconfig.h4
-rw-r--r--engines/gob/init.cpp4
-rw-r--r--engines/gob/init.h4
-rw-r--r--engines/gob/init_fascin.cpp4
-rw-r--r--engines/gob/init_geisha.cpp4
-rw-r--r--engines/gob/init_v1.cpp4
-rw-r--r--engines/gob/init_v2.cpp4
-rw-r--r--engines/gob/init_v3.cpp4
-rw-r--r--engines/gob/init_v4.cpp4
-rw-r--r--engines/gob/init_v6.cpp4
-rw-r--r--engines/gob/init_v7.cpp4
-rw-r--r--engines/gob/inter.cpp4
-rw-r--r--engines/gob/inter.h6
-rw-r--r--engines/gob/inter_bargon.cpp4
-rw-r--r--engines/gob/inter_fascin.cpp4
-rw-r--r--engines/gob/inter_geisha.cpp4
-rw-r--r--engines/gob/inter_inca2.cpp4
-rw-r--r--engines/gob/inter_littlered.cpp4
-rw-r--r--engines/gob/inter_playtoons.cpp4
-rw-r--r--engines/gob/inter_v1.cpp22
-rw-r--r--engines/gob/inter_v2.cpp187
-rw-r--r--engines/gob/inter_v3.cpp187
-rw-r--r--engines/gob/inter_v4.cpp4
-rw-r--r--engines/gob/inter_v5.cpp4
-rw-r--r--engines/gob/inter_v6.cpp4
-rw-r--r--engines/gob/inter_v7.cpp9
-rw-r--r--engines/gob/map.cpp4
-rw-r--r--engines/gob/map.h4
-rw-r--r--engines/gob/map_v1.cpp4
-rw-r--r--engines/gob/map_v2.cpp4
-rw-r--r--engines/gob/minigames/geisha/diving.cpp7
-rw-r--r--engines/gob/minigames/geisha/diving.h4
-rw-r--r--engines/gob/minigames/geisha/evilfish.cpp4
-rw-r--r--engines/gob/minigames/geisha/evilfish.h4
-rw-r--r--engines/gob/minigames/geisha/meter.cpp4
-rw-r--r--engines/gob/minigames/geisha/meter.h4
-rw-r--r--engines/gob/minigames/geisha/mouth.cpp4
-rw-r--r--engines/gob/minigames/geisha/mouth.h4
-rw-r--r--engines/gob/minigames/geisha/oko.cpp4
-rw-r--r--engines/gob/minigames/geisha/oko.h4
-rw-r--r--engines/gob/minigames/geisha/penetration.cpp7
-rw-r--r--engines/gob/minigames/geisha/penetration.h4
-rw-r--r--engines/gob/minigames/geisha/submarine.cpp4
-rw-r--r--engines/gob/minigames/geisha/submarine.h4
-rw-r--r--engines/gob/mult.cpp4
-rw-r--r--engines/gob/mult.h4
-rw-r--r--engines/gob/mult_v2.cpp4
-rw-r--r--engines/gob/palanim.cpp4
-rw-r--r--engines/gob/palanim.h4
-rw-r--r--engines/gob/pregob/gctfile.cpp4
-rw-r--r--engines/gob/pregob/gctfile.h4
-rw-r--r--engines/gob/pregob/onceupon/abracadabra.cpp4
-rw-r--r--engines/gob/pregob/onceupon/abracadabra.h4
-rw-r--r--engines/gob/pregob/onceupon/babayaga.cpp4
-rw-r--r--engines/gob/pregob/onceupon/babayaga.h4
-rw-r--r--engines/gob/pregob/onceupon/brokenstrings.h4
-rw-r--r--engines/gob/pregob/onceupon/chargenchild.cpp4
-rw-r--r--engines/gob/pregob/onceupon/chargenchild.h4
-rw-r--r--engines/gob/pregob/onceupon/onceupon.cpp4
-rw-r--r--engines/gob/pregob/onceupon/onceupon.h4
-rw-r--r--engines/gob/pregob/onceupon/palettes.h4
-rw-r--r--engines/gob/pregob/onceupon/parents.cpp4
-rw-r--r--engines/gob/pregob/onceupon/parents.h4
-rw-r--r--engines/gob/pregob/onceupon/stork.cpp4
-rw-r--r--engines/gob/pregob/onceupon/stork.h4
-rw-r--r--engines/gob/pregob/onceupon/title.cpp4
-rw-r--r--engines/gob/pregob/onceupon/title.h4
-rw-r--r--engines/gob/pregob/pregob.cpp4
-rw-r--r--engines/gob/pregob/pregob.h4
-rw-r--r--engines/gob/pregob/seqfile.cpp4
-rw-r--r--engines/gob/pregob/seqfile.h4
-rw-r--r--engines/gob/pregob/txtfile.cpp4
-rw-r--r--engines/gob/pregob/txtfile.h4
-rw-r--r--engines/gob/resources.cpp8
-rw-r--r--engines/gob/resources.h4
-rw-r--r--engines/gob/rxyfile.cpp4
-rw-r--r--engines/gob/rxyfile.h4
-rw-r--r--engines/gob/save/saveconverter.cpp4
-rw-r--r--engines/gob/save/saveconverter.h4
-rw-r--r--engines/gob/save/saveconverter_v2.cpp4
-rw-r--r--engines/gob/save/saveconverter_v3.cpp4
-rw-r--r--engines/gob/save/saveconverter_v4.cpp4
-rw-r--r--engines/gob/save/savefile.cpp4
-rw-r--r--engines/gob/save/savefile.h4
-rw-r--r--engines/gob/save/savehandler.cpp4
-rw-r--r--engines/gob/save/savehandler.h4
-rw-r--r--engines/gob/save/saveload.cpp4
-rw-r--r--engines/gob/save/saveload.h4
-rw-r--r--engines/gob/save/saveload_ajworld.cpp4
-rw-r--r--engines/gob/save/saveload_fascin.cpp4
-rw-r--r--engines/gob/save/saveload_geisha.cpp4
-rw-r--r--engines/gob/save/saveload_inca2.cpp4
-rw-r--r--engines/gob/save/saveload_playtoons.cpp4
-rw-r--r--engines/gob/save/saveload_v2.cpp4
-rw-r--r--engines/gob/save/saveload_v3.cpp4
-rw-r--r--engines/gob/save/saveload_v4.cpp4
-rw-r--r--engines/gob/save/saveload_v6.cpp4
-rw-r--r--engines/gob/save/saveload_v7.cpp4
-rw-r--r--engines/gob/scenery.cpp4
-rw-r--r--engines/gob/scenery.h4
-rw-r--r--engines/gob/scenery_v1.cpp4
-rw-r--r--engines/gob/scenery_v2.cpp4
-rw-r--r--engines/gob/script.cpp4
-rw-r--r--engines/gob/script.h4
-rw-r--r--engines/gob/sound/adlib.cpp4
-rw-r--r--engines/gob/sound/adlib.h4
-rw-r--r--engines/gob/sound/adlplayer.cpp4
-rw-r--r--engines/gob/sound/adlplayer.h4
-rw-r--r--engines/gob/sound/bgatmosphere.cpp4
-rw-r--r--engines/gob/sound/bgatmosphere.h4
-rw-r--r--engines/gob/sound/cdrom.cpp4
-rw-r--r--engines/gob/sound/cdrom.h4
-rw-r--r--engines/gob/sound/infogrames.cpp4
-rw-r--r--engines/gob/sound/infogrames.h4
-rw-r--r--engines/gob/sound/musplayer.cpp4
-rw-r--r--engines/gob/sound/musplayer.h4
-rw-r--r--engines/gob/sound/pcspeaker.cpp4
-rw-r--r--engines/gob/sound/pcspeaker.h4
-rw-r--r--engines/gob/sound/protracker.cpp4
-rw-r--r--engines/gob/sound/protracker.h4
-rw-r--r--engines/gob/sound/sound.cpp4
-rw-r--r--engines/gob/sound/sound.h4
-rw-r--r--engines/gob/sound/soundblaster.cpp4
-rw-r--r--engines/gob/sound/soundblaster.h4
-rw-r--r--engines/gob/sound/sounddesc.cpp4
-rw-r--r--engines/gob/sound/sounddesc.h4
-rw-r--r--engines/gob/sound/soundmixer.cpp4
-rw-r--r--engines/gob/sound/soundmixer.h4
-rw-r--r--engines/gob/surface.cpp9
-rw-r--r--engines/gob/surface.h4
-rw-r--r--engines/gob/totfile.cpp4
-rw-r--r--engines/gob/totfile.h4
-rw-r--r--engines/gob/util.cpp4
-rw-r--r--engines/gob/util.h4
-rw-r--r--engines/gob/variables.cpp4
-rw-r--r--engines/gob/variables.h4
-rw-r--r--engines/gob/video.cpp4
-rw-r--r--engines/gob/video.h4
-rw-r--r--engines/gob/video_v1.cpp4
-rw-r--r--engines/gob/video_v2.cpp4
-rw-r--r--engines/gob/video_v6.cpp4
-rw-r--r--engines/gob/videoplayer.cpp4
-rw-r--r--engines/gob/videoplayer.h4
-rw-r--r--engines/groovie/cell.cpp4
-rw-r--r--engines/groovie/cell.h4
-rw-r--r--engines/groovie/cursor.cpp4
-rw-r--r--engines/groovie/cursor.h4
-rw-r--r--engines/groovie/debug.cpp4
-rw-r--r--engines/groovie/debug.h4
-rw-r--r--engines/groovie/detection.cpp4
-rw-r--r--engines/groovie/detection.h4
-rw-r--r--engines/groovie/font.cpp4
-rw-r--r--engines/groovie/font.h4
-rw-r--r--engines/groovie/graphics.cpp4
-rw-r--r--engines/groovie/graphics.h4
-rw-r--r--engines/groovie/groovie.cpp4
-rw-r--r--engines/groovie/groovie.h4
-rw-r--r--engines/groovie/lzss.cpp4
-rw-r--r--engines/groovie/lzss.h4
-rw-r--r--engines/groovie/music.cpp4
-rw-r--r--engines/groovie/music.h4
-rw-r--r--engines/groovie/player.cpp4
-rw-r--r--engines/groovie/player.h4
-rw-r--r--engines/groovie/resource.cpp4
-rw-r--r--engines/groovie/resource.h4
-rw-r--r--engines/groovie/roq.cpp18
-rw-r--r--engines/groovie/roq.h6
-rw-r--r--engines/groovie/saveload.cpp4
-rw-r--r--engines/groovie/saveload.h4
-rw-r--r--engines/groovie/script.cpp4
-rw-r--r--engines/groovie/script.h4
-rw-r--r--engines/groovie/stuffit.cpp4
-rw-r--r--engines/groovie/stuffit.h4
-rw-r--r--engines/groovie/vdx.cpp4
-rw-r--r--engines/groovie/vdx.h4
-rw-r--r--engines/hopkins/anim.cpp7
-rw-r--r--engines/hopkins/anim.h4
-rw-r--r--engines/hopkins/computer.cpp16
-rw-r--r--engines/hopkins/computer.h4
-rw-r--r--engines/hopkins/debugger.cpp6
-rw-r--r--engines/hopkins/debugger.h6
-rw-r--r--engines/hopkins/detection.cpp36
-rw-r--r--engines/hopkins/detection_tables.h45
-rw-r--r--engines/hopkins/dialogs.cpp4
-rw-r--r--engines/hopkins/dialogs.h4
-rw-r--r--engines/hopkins/events.cpp4
-rw-r--r--engines/hopkins/events.h4
-rw-r--r--engines/hopkins/files.cpp20
-rw-r--r--engines/hopkins/files.h4
-rw-r--r--engines/hopkins/font.cpp4
-rw-r--r--engines/hopkins/font.h4
-rw-r--r--engines/hopkins/globals.cpp4
-rw-r--r--engines/hopkins/globals.h4
-rw-r--r--engines/hopkins/graphics.cpp14
-rw-r--r--engines/hopkins/graphics.h4
-rw-r--r--engines/hopkins/hopkins.cpp11
-rw-r--r--engines/hopkins/hopkins.h4
-rw-r--r--engines/hopkins/lines.cpp19
-rw-r--r--engines/hopkins/lines.h4
-rw-r--r--engines/hopkins/menu.cpp4
-rw-r--r--engines/hopkins/menu.h4
-rw-r--r--engines/hopkins/objects.cpp12
-rw-r--r--engines/hopkins/objects.h4
-rw-r--r--engines/hopkins/saveload.cpp4
-rw-r--r--engines/hopkins/saveload.h4
-rw-r--r--engines/hopkins/script.cpp4
-rw-r--r--engines/hopkins/script.h4
-rw-r--r--engines/hopkins/sound.cpp12
-rw-r--r--engines/hopkins/sound.h12
-rw-r--r--engines/hopkins/talk.cpp5
-rw-r--r--engines/hopkins/talk.h4
-rw-r--r--engines/hugo/console.cpp4
-rw-r--r--engines/hugo/console.h4
-rw-r--r--engines/hugo/detection.cpp11
-rw-r--r--engines/hugo/dialogs.cpp9
-rw-r--r--engines/hugo/dialogs.h4
-rw-r--r--engines/hugo/display.cpp4
-rw-r--r--engines/hugo/display.h4
-rw-r--r--engines/hugo/file.cpp9
-rw-r--r--engines/hugo/file.h4
-rw-r--r--engines/hugo/file_v1d.cpp4
-rw-r--r--engines/hugo/file_v1w.cpp4
-rw-r--r--engines/hugo/file_v2d.cpp4
-rw-r--r--engines/hugo/file_v2w.cpp4
-rw-r--r--engines/hugo/file_v3d.cpp4
-rw-r--r--engines/hugo/game.h4
-rw-r--r--engines/hugo/hugo.cpp4
-rw-r--r--engines/hugo/hugo.h4
-rw-r--r--engines/hugo/intro.cpp4
-rw-r--r--engines/hugo/intro.h4
-rw-r--r--engines/hugo/inventory.cpp4
-rw-r--r--engines/hugo/inventory.h4
-rw-r--r--engines/hugo/mouse.cpp13
-rw-r--r--engines/hugo/mouse.h4
-rw-r--r--engines/hugo/object.cpp16
-rw-r--r--engines/hugo/object.h4
-rw-r--r--engines/hugo/object_v1d.cpp4
-rw-r--r--engines/hugo/object_v1w.cpp4
-rw-r--r--engines/hugo/object_v2d.cpp4
-rw-r--r--engines/hugo/object_v3d.cpp4
-rw-r--r--engines/hugo/parser.cpp4
-rw-r--r--engines/hugo/parser.h4
-rw-r--r--engines/hugo/parser_v1d.cpp4
-rw-r--r--engines/hugo/parser_v1w.cpp4
-rw-r--r--engines/hugo/parser_v2d.cpp4
-rw-r--r--engines/hugo/parser_v3d.cpp4
-rw-r--r--engines/hugo/route.cpp8
-rw-r--r--engines/hugo/route.h4
-rw-r--r--engines/hugo/schedule.cpp18
-rw-r--r--engines/hugo/schedule.h4
-rw-r--r--engines/hugo/sound.cpp4
-rw-r--r--engines/hugo/sound.h4
-rw-r--r--engines/hugo/text.cpp10
-rw-r--r--engines/hugo/text.h4
-rw-r--r--engines/hugo/util.cpp4
-rw-r--r--engines/hugo/util.h4
-rw-r--r--engines/kyra/animator_hof.cpp4
-rw-r--r--engines/kyra/animator_lok.cpp4
-rw-r--r--engines/kyra/animator_lok.h4
-rw-r--r--engines/kyra/animator_mr.cpp4
-rw-r--r--engines/kyra/animator_tim.cpp4
-rw-r--r--engines/kyra/animator_v2.cpp4
-rw-r--r--engines/kyra/chargen.cpp4
-rw-r--r--engines/kyra/darkmoon.cpp4
-rw-r--r--engines/kyra/darkmoon.h4
-rw-r--r--engines/kyra/debugger.cpp4
-rw-r--r--engines/kyra/debugger.h4
-rw-r--r--engines/kyra/detection_tables.h1
-rw-r--r--engines/kyra/eob.cpp4
-rw-r--r--engines/kyra/eob.h4
-rw-r--r--engines/kyra/eobcommon.cpp4
-rw-r--r--engines/kyra/eobcommon.h4
-rw-r--r--engines/kyra/gui.cpp4
-rw-r--r--engines/kyra/gui.h4
-rw-r--r--engines/kyra/gui_eob.cpp4
-rw-r--r--engines/kyra/gui_eob.h4
-rw-r--r--engines/kyra/gui_hof.cpp6
-rw-r--r--engines/kyra/gui_hof.h4
-rw-r--r--engines/kyra/gui_lok.cpp4
-rw-r--r--engines/kyra/gui_lok.h4
-rw-r--r--engines/kyra/gui_lol.cpp4
-rw-r--r--engines/kyra/gui_lol.h4
-rw-r--r--engines/kyra/gui_mr.cpp4
-rw-r--r--engines/kyra/gui_mr.h4
-rw-r--r--engines/kyra/gui_rpg.cpp4
-rw-r--r--engines/kyra/gui_v1.cpp4
-rw-r--r--engines/kyra/gui_v1.h4
-rw-r--r--engines/kyra/gui_v2.cpp4
-rw-r--r--engines/kyra/gui_v2.h4
-rw-r--r--engines/kyra/item.h4
-rw-r--r--engines/kyra/items_eob.cpp4
-rw-r--r--engines/kyra/items_hof.cpp4
-rw-r--r--engines/kyra/items_lok.cpp4
-rw-r--r--engines/kyra/items_lol.cpp4
-rw-r--r--engines/kyra/items_mr.cpp4
-rw-r--r--engines/kyra/items_v2.cpp4
-rw-r--r--engines/kyra/kyra_hof.cpp4
-rw-r--r--engines/kyra/kyra_hof.h4
-rw-r--r--engines/kyra/kyra_lok.cpp4
-rw-r--r--engines/kyra/kyra_lok.h4
-rw-r--r--engines/kyra/kyra_mr.cpp4
-rw-r--r--engines/kyra/kyra_mr.h4
-rw-r--r--engines/kyra/kyra_rpg.cpp4
-rw-r--r--engines/kyra/kyra_rpg.h4
-rw-r--r--engines/kyra/kyra_v1.cpp4
-rw-r--r--engines/kyra/kyra_v1.h4
-rw-r--r--engines/kyra/kyra_v2.cpp4
-rw-r--r--engines/kyra/kyra_v2.h4
-rw-r--r--engines/kyra/lol.cpp4
-rw-r--r--engines/kyra/lol.h4
-rw-r--r--engines/kyra/magic_eob.cpp4
-rw-r--r--engines/kyra/resource.cpp4
-rw-r--r--engines/kyra/resource.h134
-rw-r--r--engines/kyra/resource_intern.cpp4
-rw-r--r--engines/kyra/resource_intern.h4
-rw-r--r--engines/kyra/saveload.cpp4
-rw-r--r--engines/kyra/saveload_eob.cpp4
-rw-r--r--engines/kyra/saveload_hof.cpp4
-rw-r--r--engines/kyra/saveload_lok.cpp4
-rw-r--r--engines/kyra/saveload_lol.cpp4
-rw-r--r--engines/kyra/saveload_mr.cpp4
-rw-r--r--engines/kyra/saveload_rpg.cpp4
-rw-r--r--engines/kyra/scene_eob.cpp4
-rw-r--r--engines/kyra/scene_hof.cpp4
-rw-r--r--engines/kyra/scene_lok.cpp4
-rw-r--r--engines/kyra/scene_lol.cpp29
-rw-r--r--engines/kyra/scene_mr.cpp4
-rw-r--r--engines/kyra/scene_rpg.cpp4
-rw-r--r--engines/kyra/scene_v1.cpp4
-rw-r--r--engines/kyra/scene_v2.cpp4
-rw-r--r--engines/kyra/screen.cpp4
-rw-r--r--engines/kyra/screen.h4
-rw-r--r--engines/kyra/screen_eob.cpp4
-rw-r--r--engines/kyra/screen_eob.h4
-rw-r--r--engines/kyra/screen_hof.cpp6
-rw-r--r--engines/kyra/screen_hof.h6
-rw-r--r--engines/kyra/screen_lok.cpp4
-rw-r--r--engines/kyra/screen_lok.h4
-rw-r--r--engines/kyra/screen_lol.cpp4
-rw-r--r--engines/kyra/screen_lol.h4
-rw-r--r--engines/kyra/screen_mr.cpp6
-rw-r--r--engines/kyra/screen_mr.h6
-rw-r--r--engines/kyra/screen_v2.cpp4
-rw-r--r--engines/kyra/screen_v2.h4
-rw-r--r--engines/kyra/script.cpp4
-rw-r--r--engines/kyra/script.h4
-rw-r--r--engines/kyra/script_eob.cpp4
-rw-r--r--engines/kyra/script_eob.h5
-rw-r--r--engines/kyra/script_hof.cpp4
-rw-r--r--engines/kyra/script_lok.cpp4
-rw-r--r--engines/kyra/script_lol.cpp4
-rw-r--r--engines/kyra/script_mr.cpp4
-rw-r--r--engines/kyra/script_tim.cpp4
-rw-r--r--engines/kyra/script_tim.h4
-rw-r--r--engines/kyra/script_v1.cpp4
-rw-r--r--engines/kyra/script_v2.cpp4
-rw-r--r--engines/kyra/seqplayer.cpp4
-rw-r--r--engines/kyra/seqplayer.h4
-rw-r--r--engines/kyra/sequences_darkmoon.cpp4
-rw-r--r--engines/kyra/sequences_eob.cpp4
-rw-r--r--engines/kyra/sequences_hof.cpp6
-rw-r--r--engines/kyra/sequences_hof.h4
-rw-r--r--engines/kyra/sequences_lok.cpp4
-rw-r--r--engines/kyra/sequences_lol.cpp4
-rw-r--r--engines/kyra/sequences_mr.cpp4
-rw-r--r--engines/kyra/sequences_v2.cpp4
-rw-r--r--engines/kyra/sound.cpp4
-rw-r--r--engines/kyra/sound_adlib.cpp8
-rw-r--r--engines/kyra/sound_amiga.cpp4
-rw-r--r--engines/kyra/sound_digital.cpp4
-rw-r--r--engines/kyra/sound_lok.cpp4
-rw-r--r--engines/kyra/sound_lol.cpp4
-rw-r--r--engines/kyra/sound_midi.cpp4
-rw-r--r--engines/kyra/sound_pcspk.cpp4
-rw-r--r--engines/kyra/sound_towns.cpp7
-rw-r--r--engines/kyra/sprites.cpp4
-rw-r--r--engines/kyra/sprites.h4
-rw-r--r--engines/kyra/sprites_eob.cpp4
-rw-r--r--engines/kyra/sprites_lol.cpp4
-rw-r--r--engines/kyra/sprites_rpg.cpp4
-rw-r--r--engines/kyra/staticres.cpp6
-rw-r--r--engines/kyra/staticres_eob.cpp9
-rw-r--r--engines/kyra/staticres_lol.cpp4
-rw-r--r--engines/kyra/staticres_rpg.cpp5
-rw-r--r--engines/kyra/text.cpp4
-rw-r--r--engines/kyra/text.h4
-rw-r--r--engines/kyra/text_hof.cpp4
-rw-r--r--engines/kyra/text_hof.h4
-rw-r--r--engines/kyra/text_lok.cpp4
-rw-r--r--engines/kyra/text_lol.cpp4
-rw-r--r--engines/kyra/text_lol.h4
-rw-r--r--engines/kyra/text_mr.cpp4
-rw-r--r--engines/kyra/text_mr.h4
-rw-r--r--engines/kyra/text_rpg.cpp5
-rw-r--r--engines/kyra/text_rpg.h6
-rw-r--r--engines/kyra/timer.cpp6
-rw-r--r--engines/kyra/timer.h6
-rw-r--r--engines/kyra/timer_eob.cpp6
-rw-r--r--engines/kyra/timer_hof.cpp6
-rw-r--r--engines/kyra/timer_lok.cpp6
-rw-r--r--engines/kyra/timer_lol.cpp6
-rw-r--r--engines/kyra/timer_mr.cpp6
-rw-r--r--engines/kyra/timer_rpg.cpp4
-rw-r--r--engines/kyra/util.cpp4
-rw-r--r--engines/kyra/util.h4
-rw-r--r--engines/kyra/vqa.cpp4
-rw-r--r--engines/kyra/vqa.h4
-rw-r--r--engines/kyra/wsamovie.cpp4
-rw-r--r--engines/kyra/wsamovie.h4
-rw-r--r--engines/lastexpress/data/animation.cpp6
-rw-r--r--engines/lastexpress/data/animation.h5
-rw-r--r--engines/lastexpress/data/archive.cpp4
-rw-r--r--engines/lastexpress/data/archive.h4
-rw-r--r--engines/lastexpress/data/background.cpp4
-rw-r--r--engines/lastexpress/data/background.h4
-rw-r--r--engines/lastexpress/data/cursor.cpp4
-rw-r--r--engines/lastexpress/data/cursor.h4
-rw-r--r--engines/lastexpress/data/font.cpp4
-rw-r--r--engines/lastexpress/data/font.h4
-rw-r--r--engines/lastexpress/data/scene.cpp4
-rw-r--r--engines/lastexpress/data/scene.h4
-rw-r--r--engines/lastexpress/data/sequence.cpp2
-rw-r--r--engines/lastexpress/data/sequence.h5
-rw-r--r--engines/lastexpress/data/snd.cpp4
-rw-r--r--engines/lastexpress/data/snd.h4
-rw-r--r--engines/lastexpress/data/subtitle.cpp4
-rw-r--r--engines/lastexpress/data/subtitle.h4
-rw-r--r--engines/lastexpress/debug.cpp4
-rw-r--r--engines/lastexpress/debug.h4
-rw-r--r--engines/lastexpress/detection.cpp4
-rw-r--r--engines/lastexpress/drawable.h4
-rw-r--r--engines/lastexpress/entities/abbot.cpp4
-rw-r--r--engines/lastexpress/entities/abbot.h4
-rw-r--r--engines/lastexpress/entities/alexei.cpp4
-rw-r--r--engines/lastexpress/entities/alexei.h4
-rw-r--r--engines/lastexpress/entities/alouan.cpp4
-rw-r--r--engines/lastexpress/entities/alouan.h4
-rw-r--r--engines/lastexpress/entities/anna.cpp6
-rw-r--r--engines/lastexpress/entities/anna.h4
-rw-r--r--engines/lastexpress/entities/august.cpp4
-rw-r--r--engines/lastexpress/entities/august.h4
-rw-r--r--engines/lastexpress/entities/boutarel.cpp4
-rw-r--r--engines/lastexpress/entities/boutarel.h4
-rw-r--r--engines/lastexpress/entities/chapters.cpp4
-rw-r--r--engines/lastexpress/entities/chapters.h4
-rw-r--r--engines/lastexpress/entities/cooks.cpp4
-rw-r--r--engines/lastexpress/entities/cooks.h4
-rw-r--r--engines/lastexpress/entities/coudert.cpp4
-rw-r--r--engines/lastexpress/entities/coudert.h4
-rw-r--r--engines/lastexpress/entities/entity.cpp4
-rw-r--r--engines/lastexpress/entities/entity.h4
-rw-r--r--engines/lastexpress/entities/entity39.cpp4
-rw-r--r--engines/lastexpress/entities/entity39.h4
-rw-r--r--engines/lastexpress/entities/entity_intern.h4
-rw-r--r--engines/lastexpress/entities/francois.cpp4
-rw-r--r--engines/lastexpress/entities/francois.h4
-rw-r--r--engines/lastexpress/entities/gendarmes.cpp4
-rw-r--r--engines/lastexpress/entities/gendarmes.h4
-rw-r--r--engines/lastexpress/entities/hadija.cpp4
-rw-r--r--engines/lastexpress/entities/hadija.h4
-rw-r--r--engines/lastexpress/entities/ivo.cpp4
-rw-r--r--engines/lastexpress/entities/ivo.h4
-rw-r--r--engines/lastexpress/entities/kahina.cpp4
-rw-r--r--engines/lastexpress/entities/kahina.h4
-rw-r--r--engines/lastexpress/entities/kronos.cpp4
-rw-r--r--engines/lastexpress/entities/kronos.h4
-rw-r--r--engines/lastexpress/entities/mahmud.cpp4
-rw-r--r--engines/lastexpress/entities/mahmud.h4
-rw-r--r--engines/lastexpress/entities/max.cpp4
-rw-r--r--engines/lastexpress/entities/max.h4
-rw-r--r--engines/lastexpress/entities/mertens.cpp4
-rw-r--r--engines/lastexpress/entities/mertens.h4
-rw-r--r--engines/lastexpress/entities/milos.cpp4
-rw-r--r--engines/lastexpress/entities/milos.h4
-rw-r--r--engines/lastexpress/entities/mmeboutarel.cpp4
-rw-r--r--engines/lastexpress/entities/mmeboutarel.h4
-rw-r--r--engines/lastexpress/entities/pascale.cpp4
-rw-r--r--engines/lastexpress/entities/pascale.h4
-rw-r--r--engines/lastexpress/entities/rebecca.cpp4
-rw-r--r--engines/lastexpress/entities/rebecca.h4
-rw-r--r--engines/lastexpress/entities/salko.cpp4
-rw-r--r--engines/lastexpress/entities/salko.h4
-rw-r--r--engines/lastexpress/entities/servers0.cpp4
-rw-r--r--engines/lastexpress/entities/servers0.h4
-rw-r--r--engines/lastexpress/entities/servers1.cpp4
-rw-r--r--engines/lastexpress/entities/servers1.h4
-rw-r--r--engines/lastexpress/entities/sophie.cpp4
-rw-r--r--engines/lastexpress/entities/sophie.h4
-rw-r--r--engines/lastexpress/entities/tables.cpp4
-rw-r--r--engines/lastexpress/entities/tables.h4
-rw-r--r--engines/lastexpress/entities/tatiana.cpp4
-rw-r--r--engines/lastexpress/entities/tatiana.h4
-rw-r--r--engines/lastexpress/entities/train.cpp4
-rw-r--r--engines/lastexpress/entities/train.h4
-rw-r--r--engines/lastexpress/entities/vassili.cpp4
-rw-r--r--engines/lastexpress/entities/vassili.h4
-rw-r--r--engines/lastexpress/entities/verges.cpp4
-rw-r--r--engines/lastexpress/entities/verges.h4
-rw-r--r--engines/lastexpress/entities/vesna.cpp4
-rw-r--r--engines/lastexpress/entities/vesna.h4
-rw-r--r--engines/lastexpress/entities/yasmin.cpp4
-rw-r--r--engines/lastexpress/entities/yasmin.h4
-rw-r--r--engines/lastexpress/eventhandler.h4
-rw-r--r--engines/lastexpress/fight/fight.cpp4
-rw-r--r--engines/lastexpress/fight/fight.h4
-rw-r--r--engines/lastexpress/fight/fighter.cpp4
-rw-r--r--engines/lastexpress/fight/fighter.h4
-rw-r--r--engines/lastexpress/fight/fighter_anna.cpp4
-rw-r--r--engines/lastexpress/fight/fighter_anna.h4
-rw-r--r--engines/lastexpress/fight/fighter_ivo.cpp4
-rw-r--r--engines/lastexpress/fight/fighter_ivo.h4
-rw-r--r--engines/lastexpress/fight/fighter_milos.cpp4
-rw-r--r--engines/lastexpress/fight/fighter_milos.h4
-rw-r--r--engines/lastexpress/fight/fighter_salko.cpp4
-rw-r--r--engines/lastexpress/fight/fighter_salko.h4
-rw-r--r--engines/lastexpress/fight/fighter_vesna.cpp4
-rw-r--r--engines/lastexpress/fight/fighter_vesna.h4
-rw-r--r--engines/lastexpress/game/action.cpp4
-rw-r--r--engines/lastexpress/game/action.h4
-rw-r--r--engines/lastexpress/game/beetle.cpp4
-rw-r--r--engines/lastexpress/game/beetle.h4
-rw-r--r--engines/lastexpress/game/entities.cpp4
-rw-r--r--engines/lastexpress/game/entities.h4
-rw-r--r--engines/lastexpress/game/inventory.cpp4
-rw-r--r--engines/lastexpress/game/inventory.h4
-rw-r--r--engines/lastexpress/game/logic.cpp4
-rw-r--r--engines/lastexpress/game/logic.h4
-rw-r--r--engines/lastexpress/game/object.cpp4
-rw-r--r--engines/lastexpress/game/object.h4
-rw-r--r--engines/lastexpress/game/savegame.cpp4
-rw-r--r--engines/lastexpress/game/savegame.h4
-rw-r--r--engines/lastexpress/game/savepoint.cpp4
-rw-r--r--engines/lastexpress/game/savepoint.h4
-rw-r--r--engines/lastexpress/game/state.cpp4
-rw-r--r--engines/lastexpress/game/state.h4
-rw-r--r--engines/lastexpress/graphics.cpp4
-rw-r--r--engines/lastexpress/graphics.h4
-rw-r--r--engines/lastexpress/helpers.h4
-rw-r--r--engines/lastexpress/lastexpress.cpp4
-rw-r--r--engines/lastexpress/lastexpress.h4
-rw-r--r--engines/lastexpress/menu/clock.cpp4
-rw-r--r--engines/lastexpress/menu/clock.h4
-rw-r--r--engines/lastexpress/menu/menu.cpp4
-rw-r--r--engines/lastexpress/menu/menu.h4
-rw-r--r--engines/lastexpress/menu/trainline.cpp4
-rw-r--r--engines/lastexpress/menu/trainline.h4
-rw-r--r--engines/lastexpress/resource.cpp4
-rw-r--r--engines/lastexpress/resource.h4
-rw-r--r--engines/lastexpress/shared.h4
-rw-r--r--engines/lastexpress/sound/entry.cpp4
-rw-r--r--engines/lastexpress/sound/entry.h4
-rw-r--r--engines/lastexpress/sound/queue.cpp4
-rw-r--r--engines/lastexpress/sound/queue.h4
-rw-r--r--engines/lastexpress/sound/sound.cpp4
-rw-r--r--engines/lastexpress/sound/sound.h4
-rw-r--r--engines/lure/animseq.cpp4
-rw-r--r--engines/lure/animseq.h4
-rw-r--r--engines/lure/debugger.cpp4
-rw-r--r--engines/lure/debugger.h4
-rw-r--r--engines/lure/decode.cpp4
-rw-r--r--engines/lure/decode.h4
-rw-r--r--engines/lure/detection.cpp4
-rw-r--r--engines/lure/disk.cpp4
-rw-r--r--engines/lure/disk.h4
-rw-r--r--engines/lure/events.cpp4
-rw-r--r--engines/lure/events.h4
-rw-r--r--engines/lure/fights.cpp4
-rw-r--r--engines/lure/fights.h4
-rw-r--r--engines/lure/game.cpp4
-rw-r--r--engines/lure/game.h4
-rw-r--r--engines/lure/hotspots.cpp4
-rw-r--r--engines/lure/hotspots.h4
-rw-r--r--engines/lure/intro.cpp4
-rw-r--r--engines/lure/intro.h4
-rw-r--r--engines/lure/lure.cpp4
-rw-r--r--engines/lure/lure.h4
-rw-r--r--engines/lure/luredefs.h4
-rw-r--r--engines/lure/memory.cpp4
-rw-r--r--engines/lure/memory.h4
-rw-r--r--engines/lure/menu.cpp6
-rw-r--r--engines/lure/menu.h4
-rw-r--r--engines/lure/palette.cpp4
-rw-r--r--engines/lure/palette.h4
-rw-r--r--engines/lure/res.cpp4
-rw-r--r--engines/lure/res.h4
-rw-r--r--engines/lure/res_struct.cpp4
-rw-r--r--engines/lure/res_struct.h4
-rw-r--r--engines/lure/room.cpp4
-rw-r--r--engines/lure/room.h4
-rw-r--r--engines/lure/screen.cpp4
-rw-r--r--engines/lure/screen.h4
-rw-r--r--engines/lure/scripts.cpp4
-rw-r--r--engines/lure/scripts.h4
-rw-r--r--engines/lure/sound.cpp4
-rw-r--r--engines/lure/sound.h4
-rw-r--r--engines/lure/strings.cpp4
-rw-r--r--engines/lure/strings.h4
-rw-r--r--engines/lure/surface.cpp4
-rw-r--r--engines/lure/surface.h4
-rw-r--r--engines/made/console.cpp4
-rw-r--r--engines/made/console.h4
-rw-r--r--engines/made/database.cpp4
-rw-r--r--engines/made/database.h4
-rw-r--r--engines/made/detection.cpp4
-rw-r--r--engines/made/graphics.cpp4
-rw-r--r--engines/made/graphics.h4
-rw-r--r--engines/made/made.cpp4
-rw-r--r--engines/made/made.h4
-rw-r--r--engines/made/music.cpp4
-rw-r--r--engines/made/music.h4
-rw-r--r--engines/made/pmvplayer.cpp4
-rw-r--r--engines/made/pmvplayer.h4
-rw-r--r--engines/made/redreader.cpp4
-rw-r--r--engines/made/redreader.h4
-rw-r--r--engines/made/resource.cpp4
-rw-r--r--engines/made/resource.h4
-rw-r--r--engines/made/screen.cpp4
-rw-r--r--engines/made/screen.h4
-rw-r--r--engines/made/screenfx.cpp4
-rw-r--r--engines/made/screenfx.h4
-rw-r--r--engines/made/script.cpp4
-rw-r--r--engines/made/script.h4
-rw-r--r--engines/made/scriptfuncs.cpp4
-rw-r--r--engines/made/scriptfuncs.h4
-rw-r--r--engines/made/sound.cpp4
-rw-r--r--engines/made/sound.h4
-rw-r--r--engines/metaengine.h1
-rw-r--r--engines/mohawk/bitmap.cpp8
-rw-r--r--engines/mohawk/bitmap.h4
-rw-r--r--engines/mohawk/console.cpp4
-rw-r--r--engines/mohawk/console.h4
-rw-r--r--engines/mohawk/cstime.cpp4
-rw-r--r--engines/mohawk/cstime.h4
-rw-r--r--engines/mohawk/cstime_cases.cpp4
-rw-r--r--engines/mohawk/cstime_cases.h4
-rw-r--r--engines/mohawk/cstime_game.cpp4
-rw-r--r--engines/mohawk/cstime_game.h4
-rw-r--r--engines/mohawk/cstime_graphics.cpp4
-rw-r--r--engines/mohawk/cstime_graphics.h4
-rw-r--r--engines/mohawk/cstime_ui.cpp4
-rw-r--r--engines/mohawk/cstime_ui.h4
-rw-r--r--engines/mohawk/cstime_view.cpp4
-rw-r--r--engines/mohawk/cstime_view.h4
-rw-r--r--engines/mohawk/cursors.cpp4
-rw-r--r--engines/mohawk/cursors.h4
-rw-r--r--engines/mohawk/detection.cpp4
-rw-r--r--engines/mohawk/detection_tables.h4
-rw-r--r--engines/mohawk/dialogs.cpp4
-rw-r--r--engines/mohawk/dialogs.h4
-rw-r--r--engines/mohawk/graphics.cpp4
-rw-r--r--engines/mohawk/graphics.h4
-rw-r--r--engines/mohawk/installer_archive.cpp4
-rw-r--r--engines/mohawk/installer_archive.h4
-rw-r--r--engines/mohawk/livingbooks.cpp4
-rw-r--r--engines/mohawk/livingbooks.h4
-rw-r--r--engines/mohawk/livingbooks_code.cpp4
-rw-r--r--engines/mohawk/livingbooks_code.h4
-rw-r--r--engines/mohawk/livingbooks_graphics.cpp4
-rw-r--r--engines/mohawk/livingbooks_graphics.h4
-rw-r--r--engines/mohawk/livingbooks_lbx.cpp4
-rw-r--r--engines/mohawk/livingbooks_lbx.h4
-rw-r--r--engines/mohawk/mohawk.cpp4
-rw-r--r--engines/mohawk/mohawk.h4
-rw-r--r--engines/mohawk/myst.cpp4
-rw-r--r--engines/mohawk/myst.h4
-rw-r--r--engines/mohawk/myst_areas.cpp4
-rw-r--r--engines/mohawk/myst_areas.h4
-rw-r--r--engines/mohawk/myst_graphics.cpp9
-rw-r--r--engines/mohawk/myst_graphics.h4
-rw-r--r--engines/mohawk/myst_scripts.cpp4
-rw-r--r--engines/mohawk/myst_scripts.h4
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp4
-rw-r--r--engines/mohawk/myst_stacks/channelwood.h4
-rw-r--r--engines/mohawk/myst_stacks/credits.cpp4
-rw-r--r--engines/mohawk/myst_stacks/credits.h4
-rw-r--r--engines/mohawk/myst_stacks/demo.cpp4
-rw-r--r--engines/mohawk/myst_stacks/demo.h4
-rw-r--r--engines/mohawk/myst_stacks/dni.cpp4
-rw-r--r--engines/mohawk/myst_stacks/dni.h4
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp4
-rw-r--r--engines/mohawk/myst_stacks/intro.h4
-rw-r--r--engines/mohawk/myst_stacks/makingof.cpp4
-rw-r--r--engines/mohawk/myst_stacks/makingof.h4
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp4
-rw-r--r--engines/mohawk/myst_stacks/mechanical.h4
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp4
-rw-r--r--engines/mohawk/myst_stacks/myst.h4
-rw-r--r--engines/mohawk/myst_stacks/preview.cpp4
-rw-r--r--engines/mohawk/myst_stacks/preview.h4
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp4
-rw-r--r--engines/mohawk/myst_stacks/selenitic.h4
-rw-r--r--engines/mohawk/myst_stacks/slides.cpp4
-rw-r--r--engines/mohawk/myst_stacks/slides.h4
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp4
-rw-r--r--engines/mohawk/myst_stacks/stoneship.h4
-rw-r--r--engines/mohawk/myst_state.cpp4
-rw-r--r--engines/mohawk/myst_state.h4
-rw-r--r--engines/mohawk/resource.cpp4
-rw-r--r--engines/mohawk/resource.h4
-rw-r--r--engines/mohawk/resource_cache.cpp4
-rw-r--r--engines/mohawk/resource_cache.h4
-rw-r--r--engines/mohawk/riven.cpp4
-rw-r--r--engines/mohawk/riven.h4
-rw-r--r--engines/mohawk/riven_external.cpp4
-rw-r--r--engines/mohawk/riven_external.h4
-rw-r--r--engines/mohawk/riven_graphics.cpp4
-rw-r--r--engines/mohawk/riven_graphics.h4
-rw-r--r--engines/mohawk/riven_saveload.cpp4
-rw-r--r--engines/mohawk/riven_saveload.h4
-rw-r--r--engines/mohawk/riven_scripts.cpp4
-rw-r--r--engines/mohawk/riven_scripts.h4
-rw-r--r--engines/mohawk/riven_vars.cpp4
-rw-r--r--engines/mohawk/sound.cpp4
-rw-r--r--engines/mohawk/sound.h4
-rw-r--r--engines/mohawk/video.cpp12
-rw-r--r--engines/mohawk/video.h6
-rw-r--r--engines/mohawk/view.cpp4
-rw-r--r--engines/mohawk/view.h4
-rw-r--r--engines/mortevielle/actions.cpp23
-rw-r--r--engines/mortevielle/debugger.cpp6
-rw-r--r--engines/mortevielle/debugger.h6
-rw-r--r--engines/mortevielle/detection.cpp6
-rw-r--r--engines/mortevielle/detection_tables.h4
-rw-r--r--engines/mortevielle/dialogs.cpp10
-rw-r--r--engines/mortevielle/dialogs.h6
-rw-r--r--engines/mortevielle/graphics.cpp6
-rw-r--r--engines/mortevielle/graphics.h6
-rw-r--r--engines/mortevielle/menu.cpp26
-rw-r--r--engines/mortevielle/menu.h6
-rw-r--r--engines/mortevielle/module.mk2
-rw-r--r--engines/mortevielle/mortevielle.cpp20
-rw-r--r--engines/mortevielle/mortevielle.h6
-rw-r--r--engines/mortevielle/mouse.cpp14
-rw-r--r--engines/mortevielle/mouse.h6
-rw-r--r--engines/mortevielle/outtext.cpp10
-rw-r--r--engines/mortevielle/outtext.h6
-rw-r--r--engines/mortevielle/saveload.cpp8
-rw-r--r--engines/mortevielle/saveload.h6
-rw-r--r--engines/mortevielle/sound.cpp13
-rw-r--r--engines/mortevielle/sound.h6
-rw-r--r--engines/mortevielle/utils.cpp8
-rw-r--r--engines/neverhood/background.cpp4
-rw-r--r--engines/neverhood/background.h4
-rw-r--r--engines/neverhood/blbarchive.cpp4
-rw-r--r--engines/neverhood/blbarchive.h4
-rw-r--r--engines/neverhood/console.cpp4
-rw-r--r--engines/neverhood/console.h4
-rw-r--r--engines/neverhood/detection.cpp4
-rw-r--r--engines/neverhood/diskplayerscene.cpp4
-rw-r--r--engines/neverhood/diskplayerscene.h4
-rw-r--r--engines/neverhood/entity.cpp4
-rw-r--r--engines/neverhood/entity.h4
-rw-r--r--engines/neverhood/gamemodule.cpp4
-rw-r--r--engines/neverhood/gamemodule.h4
-rw-r--r--engines/neverhood/gamevars.cpp4
-rw-r--r--engines/neverhood/gamevars.h4
-rw-r--r--engines/neverhood/graphics.cpp4
-rw-r--r--engines/neverhood/graphics.h4
-rw-r--r--engines/neverhood/klaymen.cpp4
-rw-r--r--engines/neverhood/klaymen.h4
-rw-r--r--engines/neverhood/menumodule.cpp4
-rw-r--r--engines/neverhood/menumodule.h4
-rw-r--r--engines/neverhood/messages.h4
-rw-r--r--engines/neverhood/microtiles.cpp5
-rw-r--r--engines/neverhood/microtiles.h5
-rw-r--r--engines/neverhood/module.cpp4
-rw-r--r--engines/neverhood/module.h4
-rw-r--r--engines/neverhood/modules/module1000.cpp12
-rw-r--r--engines/neverhood/modules/module1000.h6
-rw-r--r--engines/neverhood/modules/module1000_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1000_sprites.h4
-rw-r--r--engines/neverhood/modules/module1100.cpp6
-rw-r--r--engines/neverhood/modules/module1100.h4
-rw-r--r--engines/neverhood/modules/module1100_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1100_sprites.h4
-rw-r--r--engines/neverhood/modules/module1200.cpp4
-rw-r--r--engines/neverhood/modules/module1200.h4
-rw-r--r--engines/neverhood/modules/module1200_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1200_sprites.h4
-rw-r--r--engines/neverhood/modules/module1300.cpp8
-rw-r--r--engines/neverhood/modules/module1300.h4
-rw-r--r--engines/neverhood/modules/module1300_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1300_sprites.h4
-rw-r--r--engines/neverhood/modules/module1400.cpp4
-rw-r--r--engines/neverhood/modules/module1400.h4
-rw-r--r--engines/neverhood/modules/module1400_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1400_sprites.h4
-rw-r--r--engines/neverhood/modules/module1500.cpp4
-rw-r--r--engines/neverhood/modules/module1500.h4
-rw-r--r--engines/neverhood/modules/module1600.cpp4
-rw-r--r--engines/neverhood/modules/module1600.h4
-rw-r--r--engines/neverhood/modules/module1600_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1600_sprites.h4
-rw-r--r--engines/neverhood/modules/module1700.cpp4
-rw-r--r--engines/neverhood/modules/module1700.h4
-rw-r--r--engines/neverhood/modules/module1700_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1700_sprites.h4
-rw-r--r--engines/neverhood/modules/module1800.cpp4
-rw-r--r--engines/neverhood/modules/module1800.h4
-rw-r--r--engines/neverhood/modules/module1900.cpp4
-rw-r--r--engines/neverhood/modules/module1900.h4
-rw-r--r--engines/neverhood/modules/module1900_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module1900_sprites.h4
-rw-r--r--engines/neverhood/modules/module2000.cpp4
-rw-r--r--engines/neverhood/modules/module2000.h4
-rw-r--r--engines/neverhood/modules/module2000_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2000_sprites.h4
-rw-r--r--engines/neverhood/modules/module2100.cpp4
-rw-r--r--engines/neverhood/modules/module2100.h4
-rw-r--r--engines/neverhood/modules/module2100_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2100_sprites.h4
-rw-r--r--engines/neverhood/modules/module2200.cpp6
-rw-r--r--engines/neverhood/modules/module2200.h4
-rw-r--r--engines/neverhood/modules/module2200_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2200_sprites.h4
-rw-r--r--engines/neverhood/modules/module2300.cpp32
-rw-r--r--engines/neverhood/modules/module2300.h8
-rw-r--r--engines/neverhood/modules/module2400.cpp4
-rw-r--r--engines/neverhood/modules/module2400.h4
-rw-r--r--engines/neverhood/modules/module2400_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2400_sprites.h4
-rw-r--r--engines/neverhood/modules/module2500.cpp4
-rw-r--r--engines/neverhood/modules/module2500.h4
-rw-r--r--engines/neverhood/modules/module2500_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2500_sprites.h4
-rw-r--r--engines/neverhood/modules/module2600.cpp4
-rw-r--r--engines/neverhood/modules/module2600.h4
-rw-r--r--engines/neverhood/modules/module2600_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2600_sprites.h4
-rw-r--r--engines/neverhood/modules/module2700.cpp6
-rw-r--r--engines/neverhood/modules/module2700.h4
-rw-r--r--engines/neverhood/modules/module2700_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2700_sprites.h4
-rw-r--r--engines/neverhood/modules/module2800.cpp4
-rw-r--r--engines/neverhood/modules/module2800.h4
-rw-r--r--engines/neverhood/modules/module2800_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2800_sprites.h4
-rw-r--r--engines/neverhood/modules/module2900.cpp7
-rw-r--r--engines/neverhood/modules/module2900.h4
-rw-r--r--engines/neverhood/modules/module2900_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module2900_sprites.h4
-rw-r--r--engines/neverhood/modules/module3000.cpp53
-rw-r--r--engines/neverhood/modules/module3000.h8
-rw-r--r--engines/neverhood/modules/module3000_sprites.cpp4
-rw-r--r--engines/neverhood/modules/module3000_sprites.h4
-rw-r--r--engines/neverhood/mouse.cpp4
-rw-r--r--engines/neverhood/mouse.h4
-rw-r--r--engines/neverhood/navigationscene.cpp4
-rw-r--r--engines/neverhood/navigationscene.h4
-rw-r--r--engines/neverhood/neverhood.cpp4
-rw-r--r--engines/neverhood/neverhood.h4
-rw-r--r--engines/neverhood/palette.cpp4
-rw-r--r--engines/neverhood/palette.h4
-rw-r--r--engines/neverhood/resource.cpp4
-rw-r--r--engines/neverhood/resource.h4
-rw-r--r--engines/neverhood/resourceman.cpp4
-rw-r--r--engines/neverhood/resourceman.h4
-rw-r--r--engines/neverhood/saveload.cpp5
-rw-r--r--engines/neverhood/scene.cpp4
-rw-r--r--engines/neverhood/scene.h4
-rw-r--r--engines/neverhood/screen.cpp4
-rw-r--r--engines/neverhood/screen.h4
-rw-r--r--engines/neverhood/smackerplayer.cpp4
-rw-r--r--engines/neverhood/smackerplayer.h4
-rw-r--r--engines/neverhood/smackerscene.cpp4
-rw-r--r--engines/neverhood/smackerscene.h4
-rw-r--r--engines/neverhood/sound.cpp4
-rw-r--r--engines/neverhood/sound.h4
-rw-r--r--engines/neverhood/sprite.cpp4
-rw-r--r--engines/neverhood/sprite.h4
-rw-r--r--engines/neverhood/staticdata.cpp4
-rw-r--r--engines/neverhood/staticdata.h4
-rw-r--r--engines/obsolete.cpp4
-rw-r--r--engines/obsolete.h4
-rw-r--r--engines/parallaction/adlib.cpp4
-rw-r--r--engines/parallaction/balloons.cpp4
-rw-r--r--engines/parallaction/callables_br.cpp4
-rw-r--r--engines/parallaction/callables_ns.cpp4
-rw-r--r--engines/parallaction/debug.cpp4
-rw-r--r--engines/parallaction/detection.cpp4
-rw-r--r--engines/parallaction/dialogue.cpp4
-rw-r--r--engines/parallaction/disk.h4
-rw-r--r--engines/parallaction/disk_br.cpp14
-rw-r--r--engines/parallaction/disk_ns.cpp14
-rw-r--r--engines/parallaction/exec.cpp4
-rw-r--r--engines/parallaction/exec.h4
-rw-r--r--engines/parallaction/exec_br.cpp4
-rw-r--r--engines/parallaction/exec_ns.cpp4
-rw-r--r--engines/parallaction/font.cpp4
-rw-r--r--engines/parallaction/gfxbase.cpp4
-rw-r--r--engines/parallaction/graphics.cpp4
-rw-r--r--engines/parallaction/graphics.h4
-rw-r--r--engines/parallaction/gui.cpp4
-rw-r--r--engines/parallaction/gui.h4
-rw-r--r--engines/parallaction/gui_br.cpp4
-rw-r--r--engines/parallaction/gui_ns.cpp4
-rw-r--r--engines/parallaction/input.cpp4
-rw-r--r--engines/parallaction/input.h4
-rw-r--r--engines/parallaction/inventory.cpp4
-rw-r--r--engines/parallaction/inventory.h4
-rw-r--r--engines/parallaction/objects.cpp4
-rw-r--r--engines/parallaction/objects.h4
-rw-r--r--engines/parallaction/parallaction.cpp4
-rw-r--r--engines/parallaction/parallaction.h4
-rw-r--r--engines/parallaction/parallaction_br.cpp4
-rw-r--r--engines/parallaction/parallaction_ns.cpp4
-rw-r--r--engines/parallaction/parser.cpp4
-rw-r--r--engines/parallaction/parser.h4
-rw-r--r--engines/parallaction/parser_br.cpp4
-rw-r--r--engines/parallaction/parser_ns.cpp4
-rw-r--r--engines/parallaction/saveload.cpp4
-rw-r--r--engines/parallaction/saveload.h8
-rw-r--r--engines/parallaction/sound.h4
-rw-r--r--engines/parallaction/sound_br.cpp4
-rw-r--r--engines/parallaction/sound_ns.cpp4
-rw-r--r--engines/parallaction/staticres.cpp4
-rw-r--r--engines/parallaction/walk.cpp4
-rw-r--r--engines/parallaction/walk.h4
-rw-r--r--engines/pegasus/ai/ai_area.cpp2
-rw-r--r--engines/pegasus/cursor.cpp6
-rw-r--r--engines/pegasus/energymonitor.cpp1
-rw-r--r--engines/pegasus/fader.cpp1
-rw-r--r--engines/pegasus/input.cpp11
-rw-r--r--engines/pegasus/input.h2
-rw-r--r--engines/pegasus/interface.cpp8
-rw-r--r--engines/pegasus/items/inventorypicture.cpp1
-rw-r--r--engines/pegasus/items/item.cpp14
-rw-r--r--engines/pegasus/items/item.h7
-rw-r--r--engines/pegasus/items/itemlist.cpp5
-rw-r--r--engines/pegasus/items/itemlist.h1
-rw-r--r--engines/pegasus/menu.cpp2
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoria.cpp10
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp15
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoriabomb.h3
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp6
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoriamessages.h2
-rw-r--r--engines/pegasus/neighborhood/mars/mars.cpp20
-rw-r--r--engines/pegasus/neighborhood/neighborhood.cpp15
-rw-r--r--engines/pegasus/neighborhood/neighborhood.h2
-rw-r--r--engines/pegasus/neighborhood/norad/delta/globegame.cpp5
-rw-r--r--engines/pegasus/neighborhood/norad/delta/globegame.h2
-rw-r--r--engines/pegasus/neighborhood/norad/delta/noraddelta.cpp18
-rw-r--r--engines/pegasus/neighborhood/norad/delta/noraddelta.h3
-rw-r--r--engines/pegasus/neighborhood/tsa/fulltsa.cpp27
-rw-r--r--engines/pegasus/neighborhood/tsa/tinytsa.cpp23
-rw-r--r--engines/pegasus/neighborhood/wsc/wsc.cpp3
-rw-r--r--engines/pegasus/pegasus.cpp66
-rw-r--r--engines/pegasus/pegasus.h2
-rw-r--r--engines/pegasus/surface.cpp4
-rw-r--r--engines/queen/bankman.cpp4
-rw-r--r--engines/queen/bankman.h4
-rw-r--r--engines/queen/command.cpp4
-rw-r--r--engines/queen/command.h4
-rw-r--r--engines/queen/credits.cpp4
-rw-r--r--engines/queen/credits.h4
-rw-r--r--engines/queen/cutaway.cpp7
-rw-r--r--engines/queen/cutaway.h4
-rw-r--r--engines/queen/debug.cpp56
-rw-r--r--engines/queen/debug.h4
-rw-r--r--engines/queen/defs.h4
-rw-r--r--engines/queen/detection.cpp508
-rw-r--r--engines/queen/display.cpp13
-rw-r--r--engines/queen/display.h4
-rw-r--r--engines/queen/graphics.cpp8
-rw-r--r--engines/queen/graphics.h4
-rw-r--r--engines/queen/grid.cpp4
-rw-r--r--engines/queen/grid.h4
-rw-r--r--engines/queen/input.cpp4
-rw-r--r--engines/queen/input.h4
-rw-r--r--engines/queen/journal.cpp4
-rw-r--r--engines/queen/journal.h4
-rw-r--r--engines/queen/logic.cpp4
-rw-r--r--engines/queen/logic.h4
-rw-r--r--engines/queen/midiadlib.cpp4
-rw-r--r--engines/queen/module.mk1
-rw-r--r--engines/queen/music.cpp4
-rw-r--r--engines/queen/music.h4
-rw-r--r--engines/queen/musicdata.cpp4
-rw-r--r--engines/queen/queen.cpp187
-rw-r--r--engines/queen/queen.h4
-rw-r--r--engines/queen/resource.cpp4
-rw-r--r--engines/queen/resource.h4
-rw-r--r--engines/queen/restables.cpp4
-rw-r--r--engines/queen/sound.cpp4
-rw-r--r--engines/queen/sound.h4
-rw-r--r--engines/queen/state.cpp4
-rw-r--r--engines/queen/state.h4
-rw-r--r--engines/queen/structs.h4
-rw-r--r--engines/queen/talk.cpp7
-rw-r--r--engines/queen/talk.h4
-rw-r--r--engines/queen/walk.cpp4
-rw-r--r--engines/queen/walk.h4
-rw-r--r--engines/saga/actor.cpp4
-rw-r--r--engines/saga/actor.h4
-rw-r--r--engines/saga/actor_path.cpp4
-rw-r--r--engines/saga/actor_walk.cpp4
-rw-r--r--engines/saga/animation.cpp4
-rw-r--r--engines/saga/animation.h4
-rw-r--r--engines/saga/console.cpp4
-rw-r--r--engines/saga/console.h4
-rw-r--r--engines/saga/detection.cpp4
-rw-r--r--engines/saga/detection_tables.h4
-rw-r--r--engines/saga/displayinfo.h4
-rw-r--r--engines/saga/events.cpp4
-rw-r--r--engines/saga/events.h4
-rw-r--r--engines/saga/font.cpp4
-rw-r--r--engines/saga/font.h4
-rw-r--r--engines/saga/font_map.cpp4
-rw-r--r--engines/saga/gfx.cpp4
-rw-r--r--engines/saga/gfx.h4
-rw-r--r--engines/saga/image.cpp4
-rw-r--r--engines/saga/input.cpp4
-rw-r--r--engines/saga/interface.cpp4
-rw-r--r--engines/saga/interface.h4
-rw-r--r--engines/saga/introproc_ihnm.cpp4
-rw-r--r--engines/saga/introproc_ite.cpp4
-rw-r--r--engines/saga/introproc_saga2.cpp4
-rw-r--r--engines/saga/isomap.cpp4
-rw-r--r--engines/saga/isomap.h4
-rw-r--r--engines/saga/itedata.cpp4
-rw-r--r--engines/saga/itedata.h4
-rw-r--r--engines/saga/music.cpp4
-rw-r--r--engines/saga/music.h4
-rw-r--r--engines/saga/objectmap.cpp4
-rw-r--r--engines/saga/objectmap.h4
-rw-r--r--engines/saga/palanim.cpp4
-rw-r--r--engines/saga/palanim.h4
-rw-r--r--engines/saga/puzzle.cpp4
-rw-r--r--engines/saga/puzzle.h4
-rw-r--r--engines/saga/render.cpp4
-rw-r--r--engines/saga/render.h4
-rw-r--r--engines/saga/resource.cpp4
-rw-r--r--engines/saga/resource.h4
-rw-r--r--engines/saga/resource_hrs.cpp4
-rw-r--r--engines/saga/resource_res.cpp4
-rw-r--r--engines/saga/resource_rsc.cpp4
-rw-r--r--engines/saga/saga.cpp4
-rw-r--r--engines/saga/saga.h4
-rw-r--r--engines/saga/saveload.cpp4
-rw-r--r--engines/saga/scene.cpp8
-rw-r--r--engines/saga/scene.h4
-rw-r--r--engines/saga/script.cpp4
-rw-r--r--engines/saga/script.h4
-rw-r--r--engines/saga/sfuncs.cpp4
-rw-r--r--engines/saga/sfuncs_ihnm.cpp4
-rw-r--r--engines/saga/shorten.cpp4
-rw-r--r--engines/saga/shorten.h4
-rw-r--r--engines/saga/sndres.cpp4
-rw-r--r--engines/saga/sndres.h4
-rw-r--r--engines/saga/sound.cpp4
-rw-r--r--engines/saga/sound.h4
-rw-r--r--engines/saga/sprite.cpp4
-rw-r--r--engines/saga/sprite.h4
-rw-r--r--engines/saga/sthread.cpp4
-rw-r--r--engines/savestate.cpp4
-rw-r--r--engines/savestate.h4
-rw-r--r--engines/sci/console.cpp4
-rw-r--r--engines/sci/console.h4
-rw-r--r--engines/sci/debug.h4
-rw-r--r--engines/sci/decompressor.cpp4
-rw-r--r--engines/sci/decompressor.h4
-rw-r--r--engines/sci/detection.cpp4
-rw-r--r--engines/sci/detection_tables.h4
-rw-r--r--engines/sci/engine/features.cpp4
-rw-r--r--engines/sci/engine/features.h4
-rw-r--r--engines/sci/engine/file.cpp4
-rw-r--r--engines/sci/engine/file.h4
-rw-r--r--engines/sci/engine/gc.cpp4
-rw-r--r--engines/sci/engine/gc.h4
-rw-r--r--engines/sci/engine/kernel.cpp4
-rw-r--r--engines/sci/engine/kernel.h4
-rw-r--r--engines/sci/engine/kernel_tables.h8
-rw-r--r--engines/sci/engine/kevent.cpp4
-rw-r--r--engines/sci/engine/kfile.cpp27
-rw-r--r--engines/sci/engine/kgraphics.cpp4
-rw-r--r--engines/sci/engine/kgraphics32.cpp14
-rw-r--r--engines/sci/engine/klists.cpp4
-rw-r--r--engines/sci/engine/kmath.cpp4
-rw-r--r--engines/sci/engine/kmenu.cpp4
-rw-r--r--engines/sci/engine/kmisc.cpp4
-rw-r--r--engines/sci/engine/kmovement.cpp4
-rw-r--r--engines/sci/engine/kparse.cpp4
-rw-r--r--engines/sci/engine/kpathing.cpp4
-rw-r--r--engines/sci/engine/kscripts.cpp4
-rw-r--r--engines/sci/engine/ksound.cpp4
-rw-r--r--engines/sci/engine/kstring.cpp4
-rw-r--r--engines/sci/engine/kvideo.cpp4
-rw-r--r--engines/sci/engine/message.cpp4
-rw-r--r--engines/sci/engine/message.h4
-rw-r--r--engines/sci/engine/object.cpp4
-rw-r--r--engines/sci/engine/object.h4
-rw-r--r--engines/sci/engine/savegame.cpp23
-rw-r--r--engines/sci/engine/savegame.h4
-rw-r--r--engines/sci/engine/script.cpp4
-rw-r--r--engines/sci/engine/script.h4
-rw-r--r--engines/sci/engine/script_patches.cpp8
-rw-r--r--engines/sci/engine/script_patches.h4
-rw-r--r--engines/sci/engine/scriptdebug.cpp62
-rw-r--r--engines/sci/engine/seg_manager.cpp4
-rw-r--r--engines/sci/engine/seg_manager.h4
-rw-r--r--engines/sci/engine/segment.cpp4
-rw-r--r--engines/sci/engine/segment.h4
-rw-r--r--engines/sci/engine/selector.cpp4
-rw-r--r--engines/sci/engine/selector.h4
-rw-r--r--engines/sci/engine/state.cpp6
-rw-r--r--engines/sci/engine/state.h4
-rw-r--r--engines/sci/engine/static_selectors.cpp4
-rw-r--r--engines/sci/engine/vm.cpp4
-rw-r--r--engines/sci/engine/vm.h4
-rw-r--r--engines/sci/engine/vm_types.cpp41
-rw-r--r--engines/sci/engine/vm_types.h29
-rw-r--r--engines/sci/engine/workarounds.cpp9
-rw-r--r--engines/sci/engine/workarounds.h5
-rw-r--r--engines/sci/event.cpp4
-rw-r--r--engines/sci/event.h4
-rw-r--r--engines/sci/graphics/animate.cpp4
-rw-r--r--engines/sci/graphics/animate.h4
-rw-r--r--engines/sci/graphics/cache.cpp4
-rw-r--r--engines/sci/graphics/cache.h4
-rw-r--r--engines/sci/graphics/compare.cpp14
-rw-r--r--engines/sci/graphics/compare.h6
-rw-r--r--engines/sci/graphics/controls16.cpp4
-rw-r--r--engines/sci/graphics/controls16.h4
-rw-r--r--engines/sci/graphics/controls32.cpp4
-rw-r--r--engines/sci/graphics/controls32.h4
-rw-r--r--engines/sci/graphics/coordadjuster.cpp4
-rw-r--r--engines/sci/graphics/coordadjuster.h4
-rw-r--r--engines/sci/graphics/cursor.cpp4
-rw-r--r--engines/sci/graphics/cursor.h4
-rw-r--r--engines/sci/graphics/font.cpp4
-rw-r--r--engines/sci/graphics/font.h4
-rw-r--r--engines/sci/graphics/fontsjis.cpp4
-rw-r--r--engines/sci/graphics/fontsjis.h4
-rw-r--r--engines/sci/graphics/frameout.cpp4
-rw-r--r--engines/sci/graphics/frameout.h4
-rw-r--r--engines/sci/graphics/helpers.h4
-rw-r--r--engines/sci/graphics/maciconbar.cpp8
-rw-r--r--engines/sci/graphics/maciconbar.h4
-rw-r--r--engines/sci/graphics/menu.cpp4
-rw-r--r--engines/sci/graphics/menu.h4
-rw-r--r--engines/sci/graphics/paint.cpp4
-rw-r--r--engines/sci/graphics/paint.h4
-rw-r--r--engines/sci/graphics/paint16.cpp4
-rw-r--r--engines/sci/graphics/paint16.h4
-rw-r--r--engines/sci/graphics/paint32.cpp4
-rw-r--r--engines/sci/graphics/paint32.h4
-rw-r--r--engines/sci/graphics/palette.cpp4
-rw-r--r--engines/sci/graphics/palette.h4
-rw-r--r--engines/sci/graphics/picture.cpp4
-rw-r--r--engines/sci/graphics/picture.h4
-rw-r--r--engines/sci/graphics/portrait.cpp4
-rw-r--r--engines/sci/graphics/portrait.h4
-rw-r--r--engines/sci/graphics/ports.cpp4
-rw-r--r--engines/sci/graphics/ports.h4
-rw-r--r--engines/sci/graphics/screen.cpp4
-rw-r--r--engines/sci/graphics/screen.h4
-rw-r--r--engines/sci/graphics/text16.cpp4
-rw-r--r--engines/sci/graphics/text16.h4
-rw-r--r--engines/sci/graphics/text32.cpp4
-rw-r--r--engines/sci/graphics/text32.h4
-rw-r--r--engines/sci/graphics/transitions.cpp4
-rw-r--r--engines/sci/graphics/transitions.h4
-rw-r--r--engines/sci/graphics/view.cpp4
-rw-r--r--engines/sci/graphics/view.h4
-rw-r--r--engines/sci/parser/grammar.cpp4
-rw-r--r--engines/sci/parser/said.cpp4
-rw-r--r--engines/sci/parser/vocabulary.cpp11
-rw-r--r--engines/sci/parser/vocabulary.h4
-rw-r--r--engines/sci/resource.cpp13
-rw-r--r--engines/sci/resource.h4
-rw-r--r--engines/sci/resource_audio.cpp4
-rw-r--r--engines/sci/resource_intern.h4
-rw-r--r--engines/sci/sci.cpp11
-rw-r--r--engines/sci/sci.h4
-rw-r--r--engines/sci/sound/audio.cpp60
-rw-r--r--engines/sci/sound/audio.h6
-rw-r--r--engines/sci/sound/drivers/adlib.cpp4
-rw-r--r--engines/sci/sound/drivers/amigamac.cpp4
-rw-r--r--engines/sci/sound/drivers/cms.cpp4
-rw-r--r--engines/sci/sound/drivers/fb01.cpp4
-rw-r--r--engines/sci/sound/drivers/fmtowns.cpp4
-rw-r--r--engines/sci/sound/drivers/gm_names.h4
-rw-r--r--engines/sci/sound/drivers/map-mt32-to-gm.h4
-rw-r--r--engines/sci/sound/drivers/midi.cpp4
-rw-r--r--engines/sci/sound/drivers/mididriver.h4
-rw-r--r--engines/sci/sound/drivers/pcjr.cpp4
-rw-r--r--engines/sci/sound/midiparser_sci.cpp31
-rw-r--r--engines/sci/sound/midiparser_sci.h6
-rw-r--r--engines/sci/sound/music.cpp4
-rw-r--r--engines/sci/sound/music.h4
-rw-r--r--engines/sci/sound/soundcmd.cpp4
-rw-r--r--engines/sci/sound/soundcmd.h4
-rw-r--r--engines/sci/util.cpp4
-rw-r--r--engines/sci/util.h4
-rw-r--r--engines/sci/video/robot_decoder.cpp8
-rw-r--r--engines/sci/video/robot_decoder.h4
-rw-r--r--engines/sci/video/seq_decoder.cpp4
-rw-r--r--engines/sci/video/seq_decoder.h4
-rw-r--r--engines/scumm/actor.cpp4
-rw-r--r--engines/scumm/actor.h4
-rw-r--r--engines/scumm/actor_he.h4
-rw-r--r--engines/scumm/akos.cpp4
-rw-r--r--engines/scumm/akos.h4
-rw-r--r--engines/scumm/base-costume.cpp4
-rw-r--r--engines/scumm/base-costume.h4
-rw-r--r--engines/scumm/bomp.cpp3
-rw-r--r--engines/scumm/bomp.h3
-rw-r--r--engines/scumm/boxes.cpp4
-rw-r--r--engines/scumm/boxes.h4
-rw-r--r--engines/scumm/camera.cpp3
-rw-r--r--engines/scumm/charset-fontdata.cpp1
-rw-r--r--engines/scumm/charset.cpp1
-rw-r--r--engines/scumm/charset.h1
-rw-r--r--engines/scumm/costume.cpp4
-rw-r--r--engines/scumm/costume.h1
-rw-r--r--engines/scumm/cursor.cpp3
-rw-r--r--engines/scumm/debugger.cpp4
-rw-r--r--engines/scumm/debugger.h1
-rw-r--r--engines/scumm/detection.cpp4
-rw-r--r--engines/scumm/detection.h4
-rw-r--r--engines/scumm/detection_tables.h4
-rw-r--r--engines/scumm/dialogs.cpp1
-rw-r--r--engines/scumm/dialogs.h1
-rw-r--r--engines/scumm/gfx.cpp5
-rw-r--r--engines/scumm/gfx.h4
-rw-r--r--engines/scumm/gfxARM.s2
-rw-r--r--engines/scumm/gfx_towns.cpp3
-rw-r--r--engines/scumm/he/animation_he.cpp4
-rw-r--r--engines/scumm/he/animation_he.h4
-rw-r--r--engines/scumm/he/cup_player_he.cpp4
-rw-r--r--engines/scumm/he/cup_player_he.h4
-rw-r--r--engines/scumm/he/floodfill_he.cpp4
-rw-r--r--engines/scumm/he/floodfill_he.h4
-rw-r--r--engines/scumm/he/intern_he.h4
-rw-r--r--engines/scumm/he/logic/baseball2001.cpp4
-rw-r--r--engines/scumm/he/logic/basketball.cpp4
-rw-r--r--engines/scumm/he/logic/football.cpp4
-rw-r--r--engines/scumm/he/logic/funshop.cpp4
-rw-r--r--engines/scumm/he/logic/moonbase.cpp4
-rw-r--r--engines/scumm/he/logic/puttrace.cpp4
-rw-r--r--engines/scumm/he/logic/soccer.cpp6
-rw-r--r--engines/scumm/he/logic_he.cpp4
-rw-r--r--engines/scumm/he/logic_he.h4
-rw-r--r--engines/scumm/he/palette_he.cpp4
-rw-r--r--engines/scumm/he/resource_he.cpp4
-rw-r--r--engines/scumm/he/resource_he.h4
-rw-r--r--engines/scumm/he/script_v100he.cpp4
-rw-r--r--engines/scumm/he/script_v60he.cpp4
-rw-r--r--engines/scumm/he/script_v70he.cpp4
-rw-r--r--engines/scumm/he/script_v71he.cpp4
-rw-r--r--engines/scumm/he/script_v72he.cpp4
-rw-r--r--engines/scumm/he/script_v80he.cpp4
-rw-r--r--engines/scumm/he/script_v90he.cpp4
-rw-r--r--engines/scumm/he/sound_he.cpp4
-rw-r--r--engines/scumm/he/sound_he.h1
-rw-r--r--engines/scumm/he/sprite_he.cpp4
-rw-r--r--engines/scumm/he/sprite_he.h4
-rw-r--r--engines/scumm/he/wiz_he.cpp4
-rw-r--r--engines/scumm/he/wiz_he.h4
-rw-r--r--engines/scumm/imuse/imuse.cpp4
-rw-r--r--engines/scumm/imuse/imuse.h4
-rw-r--r--engines/scumm/imuse/imuse_internal.h1
-rw-r--r--engines/scumm/imuse/imuse_part.cpp4
-rw-r--r--engines/scumm/imuse/imuse_player.cpp1
-rw-r--r--engines/scumm/imuse/instrument.cpp1
-rw-r--r--engines/scumm/imuse/instrument.h1
-rw-r--r--engines/scumm/imuse/mac_m68k.cpp1
-rw-r--r--engines/scumm/imuse/mac_m68k.h1
-rw-r--r--engines/scumm/imuse/pcspk.cpp1
-rw-r--r--engines/scumm/imuse/pcspk.h1
-rw-r--r--engines/scumm/imuse/sysex.h1
-rw-r--r--engines/scumm/imuse/sysex_samnmax.cpp1
-rw-r--r--engines/scumm/imuse/sysex_scumm.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_music.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_script.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_tables.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_tables.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.h1
-rw-r--r--engines/scumm/input.cpp4
-rw-r--r--engines/scumm/insane/insane.cpp4
-rw-r--r--engines/scumm/insane/insane.h4
-rw-r--r--engines/scumm/insane/insane_ben.cpp4
-rw-r--r--engines/scumm/insane/insane_enemy.cpp4
-rw-r--r--engines/scumm/insane/insane_iact.cpp4
-rw-r--r--engines/scumm/insane/insane_scenes.cpp4
-rw-r--r--engines/scumm/midiparser_ro.cpp4
-rw-r--r--engines/scumm/music.h4
-rw-r--r--engines/scumm/nut_renderer.cpp1
-rw-r--r--engines/scumm/nut_renderer.h1
-rw-r--r--engines/scumm/object.cpp4
-rw-r--r--engines/scumm/object.h1
-rw-r--r--engines/scumm/palette.cpp3
-rw-r--r--engines/scumm/players/player_ad.cpp2
-rw-r--r--engines/scumm/players/player_apple2.cpp4
-rw-r--r--engines/scumm/players/player_apple2.h4
-rw-r--r--engines/scumm/players/player_mac.cpp4
-rw-r--r--engines/scumm/players/player_mac.h4
-rw-r--r--engines/scumm/players/player_mod.cpp4
-rw-r--r--engines/scumm/players/player_mod.h4
-rw-r--r--engines/scumm/players/player_nes.cpp6
-rw-r--r--engines/scumm/players/player_nes.h4
-rw-r--r--engines/scumm/players/player_pce.cpp4
-rw-r--r--engines/scumm/players/player_pce.h4
-rw-r--r--engines/scumm/players/player_sid.cpp4
-rw-r--r--engines/scumm/players/player_sid.h4
-rw-r--r--engines/scumm/players/player_towns.cpp4
-rw-r--r--engines/scumm/players/player_towns.h4
-rw-r--r--engines/scumm/players/player_v1.cpp4
-rw-r--r--engines/scumm/players/player_v1.h4
-rw-r--r--engines/scumm/players/player_v2.cpp4
-rw-r--r--engines/scumm/players/player_v2.h4
-rw-r--r--engines/scumm/players/player_v2a.cpp4
-rw-r--r--engines/scumm/players/player_v2a.h4
-rw-r--r--engines/scumm/players/player_v2base.cpp4
-rw-r--r--engines/scumm/players/player_v2base.h4
-rw-r--r--engines/scumm/players/player_v2cms.cpp4
-rw-r--r--engines/scumm/players/player_v2cms.h4
-rw-r--r--engines/scumm/players/player_v3a.cpp4
-rw-r--r--engines/scumm/players/player_v3a.h4
-rw-r--r--engines/scumm/players/player_v3m.cpp4
-rw-r--r--engines/scumm/players/player_v3m.h4
-rw-r--r--engines/scumm/players/player_v4a.cpp4
-rw-r--r--engines/scumm/players/player_v4a.h4
-rw-r--r--engines/scumm/players/player_v5m.cpp4
-rw-r--r--engines/scumm/players/player_v5m.h4
-rw-r--r--engines/scumm/proc3ARM.s17
-rw-r--r--engines/scumm/resource.cpp4
-rw-r--r--engines/scumm/resource.h1
-rw-r--r--engines/scumm/resource_v2.cpp4
-rw-r--r--engines/scumm/resource_v3.cpp4
-rw-r--r--engines/scumm/resource_v4.cpp4
-rw-r--r--engines/scumm/room.cpp4
-rw-r--r--engines/scumm/saveload.cpp41
-rw-r--r--engines/scumm/saveload.h4
-rw-r--r--engines/scumm/script.cpp4
-rw-r--r--engines/scumm/script.h4
-rw-r--r--engines/scumm/script_v0.cpp4
-rw-r--r--engines/scumm/script_v2.cpp4
-rw-r--r--engines/scumm/script_v3.cpp4
-rw-r--r--engines/scumm/script_v4.cpp4
-rw-r--r--engines/scumm/script_v5.cpp4
-rw-r--r--engines/scumm/script_v6.cpp4
-rw-r--r--engines/scumm/script_v8.cpp4
-rw-r--r--engines/scumm/scumm.cpp4
-rw-r--r--engines/scumm/scumm.h4
-rw-r--r--engines/scumm/scumm_v0.h4
-rw-r--r--engines/scumm/scumm_v2.h4
-rw-r--r--engines/scumm/scumm_v3.h4
-rw-r--r--engines/scumm/scumm_v4.h4
-rw-r--r--engines/scumm/scumm_v5.h4
-rw-r--r--engines/scumm/scumm_v6.h4
-rw-r--r--engines/scumm/scumm_v7.h4
-rw-r--r--engines/scumm/scumm_v8.h4
-rw-r--r--engines/scumm/smush/channel.cpp4
-rw-r--r--engines/scumm/smush/channel.h4
-rw-r--r--engines/scumm/smush/codec1.cpp4
-rw-r--r--engines/scumm/smush/codec37.cpp4
-rw-r--r--engines/scumm/smush/codec37.h4
-rw-r--r--engines/scumm/smush/codec47.cpp4
-rw-r--r--engines/scumm/smush/codec47.h4
-rw-r--r--engines/scumm/smush/codec47ARM.s1
-rw-r--r--engines/scumm/smush/imuse_channel.cpp4
-rw-r--r--engines/scumm/smush/saud_channel.cpp4
-rw-r--r--engines/scumm/smush/smush_font.cpp4
-rw-r--r--engines/scumm/smush/smush_font.h4
-rw-r--r--engines/scumm/smush/smush_mixer.cpp4
-rw-r--r--engines/scumm/smush/smush_mixer.h4
-rw-r--r--engines/scumm/smush/smush_player.cpp4
-rw-r--r--engines/scumm/smush/smush_player.h4
-rw-r--r--engines/scumm/sound.cpp4
-rw-r--r--engines/scumm/sound.h1
-rw-r--r--engines/scumm/string.cpp4
-rw-r--r--engines/scumm/vars.cpp4
-rw-r--r--engines/scumm/verbs.cpp4
-rw-r--r--engines/scumm/verbs.h1
-rw-r--r--engines/sky/autoroute.cpp4
-rw-r--r--engines/sky/autoroute.h4
-rw-r--r--engines/sky/control.cpp4
-rw-r--r--engines/sky/control.h4
-rw-r--r--engines/sky/debug.cpp33
-rw-r--r--engines/sky/detection.cpp4
-rw-r--r--engines/sky/disk.cpp4
-rw-r--r--engines/sky/disk.h4
-rw-r--r--engines/sky/grid.cpp4
-rw-r--r--engines/sky/grid.h4
-rw-r--r--engines/sky/hufftext.cpp4
-rw-r--r--engines/sky/intro.cpp4
-rw-r--r--engines/sky/intro.h4
-rw-r--r--engines/sky/logic.cpp4
-rw-r--r--engines/sky/logic.h4
-rw-r--r--engines/sky/mouse.cpp4
-rw-r--r--engines/sky/mouse.h4
-rw-r--r--engines/sky/music/adlibchannel.cpp4
-rw-r--r--engines/sky/music/adlibchannel.h4
-rw-r--r--engines/sky/music/adlibmusic.cpp4
-rw-r--r--engines/sky/music/adlibmusic.h4
-rw-r--r--engines/sky/music/gmchannel.cpp4
-rw-r--r--engines/sky/music/gmchannel.h4
-rw-r--r--engines/sky/music/gmmusic.cpp4
-rw-r--r--engines/sky/music/gmmusic.h4
-rw-r--r--engines/sky/music/mt32music.cpp4
-rw-r--r--engines/sky/music/mt32music.h4
-rw-r--r--engines/sky/music/musicbase.cpp4
-rw-r--r--engines/sky/music/musicbase.h4
-rw-r--r--engines/sky/rnc_deco.cpp4
-rw-r--r--engines/sky/rnc_deco.h4
-rw-r--r--engines/sky/screen.cpp4
-rw-r--r--engines/sky/screen.h4
-rw-r--r--engines/sky/sky.cpp4
-rw-r--r--engines/sky/sky.h4
-rw-r--r--engines/sky/skydefs.h4
-rw-r--r--engines/sky/sound.cpp4
-rw-r--r--engines/sky/sound.h4
-rw-r--r--engines/sky/struc.h4
-rw-r--r--engines/sky/text.cpp4
-rw-r--r--engines/sky/text.h4
-rw-r--r--engines/sword1/animation.cpp4
-rw-r--r--engines/sword1/animation.h4
-rw-r--r--engines/sword1/collision.h4
-rw-r--r--engines/sword1/console.cpp4
-rw-r--r--engines/sword1/console.h4
-rw-r--r--engines/sword1/control.cpp4
-rw-r--r--engines/sword1/control.h4
-rw-r--r--engines/sword1/debug.cpp4
-rw-r--r--engines/sword1/debug.h4
-rw-r--r--engines/sword1/detection.cpp4
-rw-r--r--engines/sword1/eventman.cpp4
-rw-r--r--engines/sword1/eventman.h4
-rw-r--r--engines/sword1/logic.cpp4
-rw-r--r--engines/sword1/logic.h4
-rw-r--r--engines/sword1/memman.cpp4
-rw-r--r--engines/sword1/memman.h4
-rw-r--r--engines/sword1/menu.cpp4
-rw-r--r--engines/sword1/menu.h4
-rw-r--r--engines/sword1/module.mk2
-rw-r--r--engines/sword1/mouse.cpp4
-rw-r--r--engines/sword1/mouse.h4
-rw-r--r--engines/sword1/music.cpp4
-rw-r--r--engines/sword1/music.h4
-rw-r--r--engines/sword1/object.h4
-rw-r--r--engines/sword1/objectman.cpp4
-rw-r--r--engines/sword1/objectman.h4
-rw-r--r--engines/sword1/resman.cpp4
-rw-r--r--engines/sword1/resman.h4
-rw-r--r--engines/sword1/router.cpp4
-rw-r--r--engines/sword1/router.h4
-rw-r--r--engines/sword1/screen.cpp4
-rw-r--r--engines/sword1/screen.h4
-rw-r--r--engines/sword1/sound.cpp4
-rw-r--r--engines/sword1/sound.h4
-rw-r--r--engines/sword1/staticres.cpp10
-rw-r--r--engines/sword1/sword1.cpp4
-rw-r--r--engines/sword1/sword1.h4
-rw-r--r--engines/sword1/sworddefs.h4
-rw-r--r--engines/sword1/swordres.h4
-rw-r--r--engines/sword1/text.cpp4
-rw-r--r--engines/sword1/text.h4
-rw-r--r--engines/sword25/console.cpp4
-rw-r--r--engines/sword25/console.h4
-rw-r--r--engines/sword25/detection.cpp4
-rw-r--r--engines/sword25/detection_tables.h4
-rw-r--r--engines/sword25/fmv/movieplayer.cpp4
-rw-r--r--engines/sword25/fmv/movieplayer.h4
-rw-r--r--engines/sword25/fmv/movieplayer_script.cpp4
-rw-r--r--engines/sword25/gfx/animation.cpp4
-rw-r--r--engines/sword25/gfx/animation.h4
-rw-r--r--engines/sword25/gfx/animationdescription.cpp4
-rw-r--r--engines/sword25/gfx/animationdescription.h4
-rw-r--r--engines/sword25/gfx/animationresource.cpp4
-rw-r--r--engines/sword25/gfx/animationresource.h4
-rw-r--r--engines/sword25/gfx/animationtemplate.cpp4
-rw-r--r--engines/sword25/gfx/animationtemplate.h4
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.cpp4
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.h4
-rw-r--r--engines/sword25/gfx/bitmap.cpp4
-rw-r--r--engines/sword25/gfx/bitmap.h4
-rw-r--r--engines/sword25/gfx/bitmapresource.h4
-rw-r--r--engines/sword25/gfx/dynamicbitmap.cpp4
-rw-r--r--engines/sword25/gfx/dynamicbitmap.h4
-rw-r--r--engines/sword25/gfx/fontresource.cpp4
-rw-r--r--engines/sword25/gfx/fontresource.h4
-rw-r--r--engines/sword25/gfx/graphicengine.cpp4
-rw-r--r--engines/sword25/gfx/graphicengine.h4
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp4
-rw-r--r--engines/sword25/gfx/image/art.cpp4
-rw-r--r--engines/sword25/gfx/image/art.h4
-rw-r--r--engines/sword25/gfx/image/image.h4
-rw-r--r--engines/sword25/gfx/image/imgloader.cpp8
-rw-r--r--engines/sword25/gfx/image/imgloader.h4
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp4
-rw-r--r--engines/sword25/gfx/image/renderedimage.h4
-rw-r--r--engines/sword25/gfx/image/swimage.cpp4
-rw-r--r--engines/sword25/gfx/image/swimage.h4
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp4
-rw-r--r--engines/sword25/gfx/image/vectorimage.h4
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.cpp4
-rw-r--r--engines/sword25/gfx/microtiles.cpp5
-rw-r--r--engines/sword25/gfx/microtiles.h5
-rw-r--r--engines/sword25/gfx/panel.cpp4
-rw-r--r--engines/sword25/gfx/panel.h4
-rw-r--r--engines/sword25/gfx/renderobject.cpp4
-rw-r--r--engines/sword25/gfx/renderobject.h4
-rw-r--r--engines/sword25/gfx/renderobjectmanager.cpp4
-rw-r--r--engines/sword25/gfx/renderobjectmanager.h4
-rw-r--r--engines/sword25/gfx/renderobjectptr.h4
-rw-r--r--engines/sword25/gfx/renderobjectregistry.h4
-rw-r--r--engines/sword25/gfx/rootrenderobject.h4
-rw-r--r--engines/sword25/gfx/screenshot.cpp4
-rw-r--r--engines/sword25/gfx/screenshot.h4
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp4
-rw-r--r--engines/sword25/gfx/staticbitmap.h4
-rw-r--r--engines/sword25/gfx/text.cpp4
-rw-r--r--engines/sword25/gfx/text.h4
-rw-r--r--engines/sword25/gfx/timedrenderobject.cpp4
-rw-r--r--engines/sword25/gfx/timedrenderobject.h4
-rw-r--r--engines/sword25/input/inputengine.cpp4
-rw-r--r--engines/sword25/input/inputengine.h4
-rw-r--r--engines/sword25/input/inputengine_script.cpp4
-rw-r--r--engines/sword25/kernel/common.h4
-rw-r--r--engines/sword25/kernel/filesystemutil.cpp4
-rw-r--r--engines/sword25/kernel/filesystemutil.h4
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.cpp4
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.h4
-rw-r--r--engines/sword25/kernel/kernel.cpp4
-rw-r--r--engines/sword25/kernel/kernel.h4
-rw-r--r--engines/sword25/kernel/kernel_script.cpp4
-rw-r--r--engines/sword25/kernel/objectregistry.h4
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.cpp4
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.h4
-rw-r--r--engines/sword25/kernel/persistable.h4
-rw-r--r--engines/sword25/kernel/persistenceblock.h4
-rw-r--r--engines/sword25/kernel/persistenceservice.cpp4
-rw-r--r--engines/sword25/kernel/persistenceservice.h4
-rw-r--r--engines/sword25/kernel/resmanager.cpp4
-rw-r--r--engines/sword25/kernel/resmanager.h4
-rw-r--r--engines/sword25/kernel/resource.cpp4
-rw-r--r--engines/sword25/kernel/resource.h4
-rw-r--r--engines/sword25/kernel/resservice.h4
-rw-r--r--engines/sword25/kernel/service.h4
-rw-r--r--engines/sword25/math/geometry.h4
-rw-r--r--engines/sword25/math/geometry_script.cpp4
-rw-r--r--engines/sword25/math/line.h4
-rw-r--r--engines/sword25/math/polygon.cpp4
-rw-r--r--engines/sword25/math/polygon.h4
-rw-r--r--engines/sword25/math/region.cpp4
-rw-r--r--engines/sword25/math/region.h4
-rw-r--r--engines/sword25/math/regionregistry.cpp4
-rw-r--r--engines/sword25/math/regionregistry.h4
-rw-r--r--engines/sword25/math/vertex.cpp4
-rw-r--r--engines/sword25/math/vertex.h4
-rw-r--r--engines/sword25/math/walkregion.cpp4
-rw-r--r--engines/sword25/math/walkregion.h4
-rw-r--r--engines/sword25/package/packagemanager.cpp4
-rw-r--r--engines/sword25/package/packagemanager.h4
-rw-r--r--engines/sword25/package/packagemanager_script.cpp4
-rw-r--r--engines/sword25/script/lua_extensions.cpp4
-rw-r--r--engines/sword25/script/luabindhelper.cpp4
-rw-r--r--engines/sword25/script/luabindhelper.h4
-rw-r--r--engines/sword25/script/luacallback.cpp4
-rw-r--r--engines/sword25/script/luacallback.h4
-rw-r--r--engines/sword25/script/luascript.cpp4
-rw-r--r--engines/sword25/script/luascript.h4
-rw-r--r--engines/sword25/script/script.h4
-rw-r--r--engines/sword25/sfx/soundengine.cpp4
-rw-r--r--engines/sword25/sfx/soundengine.h4
-rw-r--r--engines/sword25/sfx/soundengine_script.cpp4
-rw-r--r--engines/sword25/sword25.cpp4
-rw-r--r--engines/sword25/sword25.h4
-rw-r--r--engines/sword25/util/lua/scummvm_file.cpp4
-rw-r--r--engines/sword25/util/lua/scummvm_file.h4
-rw-r--r--engines/teenagent/actor.cpp1
-rw-r--r--engines/teenagent/actor.h1
-rw-r--r--engines/teenagent/animation.cpp1
-rw-r--r--engines/teenagent/animation.h1
-rw-r--r--engines/teenagent/callbacks.cpp3
-rw-r--r--engines/teenagent/console.cpp1
-rw-r--r--engines/teenagent/console.h1
-rw-r--r--engines/teenagent/detection.cpp5
-rw-r--r--engines/teenagent/dialog.cpp1
-rw-r--r--engines/teenagent/dialog.h1
-rw-r--r--engines/teenagent/font.cpp1
-rw-r--r--engines/teenagent/font.h1
-rw-r--r--engines/teenagent/inventory.cpp1
-rw-r--r--engines/teenagent/inventory.h1
-rw-r--r--engines/teenagent/music.cpp4
-rw-r--r--engines/teenagent/music.h4
-rw-r--r--engines/teenagent/objects.cpp1
-rw-r--r--engines/teenagent/objects.h1
-rw-r--r--engines/teenagent/pack.cpp1
-rw-r--r--engines/teenagent/pack.h1
-rw-r--r--engines/teenagent/resources.cpp1
-rw-r--r--engines/teenagent/resources.h3
-rw-r--r--engines/teenagent/scene.cpp1
-rw-r--r--engines/teenagent/scene.h1
-rw-r--r--engines/teenagent/segment.cpp1
-rw-r--r--engines/teenagent/segment.h1
-rw-r--r--engines/teenagent/surface.cpp1
-rw-r--r--engines/teenagent/surface.h1
-rw-r--r--engines/teenagent/surface_list.cpp1
-rw-r--r--engines/teenagent/surface_list.h1
-rw-r--r--engines/teenagent/teenagent.cpp1
-rw-r--r--engines/teenagent/teenagent.h1
-rw-r--r--engines/testbed/config-params.cpp1
-rw-r--r--engines/testbed/config-params.h1
-rw-r--r--engines/testbed/config.cpp1
-rw-r--r--engines/testbed/config.h1
-rw-r--r--engines/testbed/detection.cpp4
-rw-r--r--engines/testbed/events.cpp1
-rw-r--r--engines/testbed/events.h1
-rw-r--r--engines/testbed/fs.cpp1
-rw-r--r--engines/testbed/fs.h1
-rw-r--r--engines/testbed/graphics.cpp1
-rw-r--r--engines/testbed/graphics.h1
-rw-r--r--engines/testbed/midi.cpp1
-rw-r--r--engines/testbed/midi.h1
-rw-r--r--engines/testbed/misc.cpp1
-rw-r--r--engines/testbed/misc.h1
-rw-r--r--engines/testbed/savegame.cpp1
-rw-r--r--engines/testbed/savegame.h1
-rw-r--r--engines/testbed/sound.cpp1
-rw-r--r--engines/testbed/sound.h1
-rw-r--r--engines/testbed/template.h1
-rw-r--r--engines/testbed/testbed.cpp1
-rw-r--r--engines/testbed/testbed.h1
-rw-r--r--engines/testbed/testsuite.cpp1
-rw-r--r--engines/testbed/testsuite.h1
-rw-r--r--engines/tinsel/actors.cpp4
-rw-r--r--engines/tinsel/actors.h4
-rw-r--r--engines/tinsel/adpcm.cpp4
-rw-r--r--engines/tinsel/adpcm.h4
-rw-r--r--engines/tinsel/anim.cpp4
-rw-r--r--engines/tinsel/anim.h4
-rw-r--r--engines/tinsel/background.cpp4
-rw-r--r--engines/tinsel/background.h4
-rw-r--r--engines/tinsel/bg.cpp4
-rw-r--r--engines/tinsel/bmv.cpp4
-rw-r--r--engines/tinsel/bmv.h2
-rw-r--r--engines/tinsel/cliprect.cpp4
-rw-r--r--engines/tinsel/cliprect.h4
-rw-r--r--engines/tinsel/config.cpp4
-rw-r--r--engines/tinsel/config.h4
-rw-r--r--engines/tinsel/cursor.cpp4
-rw-r--r--engines/tinsel/cursor.h4
-rw-r--r--engines/tinsel/debugger.cpp4
-rw-r--r--engines/tinsel/debugger.h4
-rw-r--r--engines/tinsel/detection.cpp4
-rw-r--r--engines/tinsel/detection_tables.h4
-rw-r--r--engines/tinsel/dialogs.cpp4
-rw-r--r--engines/tinsel/dialogs.h4
-rw-r--r--engines/tinsel/drives.cpp4
-rw-r--r--engines/tinsel/drives.h4
-rw-r--r--engines/tinsel/dw.h4
-rw-r--r--engines/tinsel/effect.cpp4
-rw-r--r--engines/tinsel/events.cpp4
-rw-r--r--engines/tinsel/events.h4
-rw-r--r--engines/tinsel/faders.cpp4
-rw-r--r--engines/tinsel/faders.h4
-rw-r--r--engines/tinsel/film.h4
-rw-r--r--engines/tinsel/font.cpp4
-rw-r--r--engines/tinsel/font.h4
-rw-r--r--engines/tinsel/graphics.cpp4
-rw-r--r--engines/tinsel/graphics.h2
-rw-r--r--engines/tinsel/handle.cpp4
-rw-r--r--engines/tinsel/handle.h4
-rw-r--r--engines/tinsel/heapmem.cpp4
-rw-r--r--engines/tinsel/heapmem.h4
-rw-r--r--engines/tinsel/mareels.cpp4
-rw-r--r--engines/tinsel/mareels.h4
-rw-r--r--engines/tinsel/move.cpp4
-rw-r--r--engines/tinsel/move.h4
-rw-r--r--engines/tinsel/multiobj.cpp4
-rw-r--r--engines/tinsel/multiobj.h4
-rw-r--r--engines/tinsel/music.cpp4
-rw-r--r--engines/tinsel/music.h4
-rw-r--r--engines/tinsel/object.cpp4
-rw-r--r--engines/tinsel/object.h2
-rw-r--r--engines/tinsel/palette.cpp4
-rw-r--r--engines/tinsel/palette.h2
-rw-r--r--engines/tinsel/pcode.cpp4
-rw-r--r--engines/tinsel/pcode.h2
-rw-r--r--engines/tinsel/pdisplay.cpp4
-rw-r--r--engines/tinsel/pdisplay.h2
-rw-r--r--engines/tinsel/pid.h2
-rw-r--r--engines/tinsel/play.cpp4
-rw-r--r--engines/tinsel/play.h2
-rw-r--r--engines/tinsel/polygons.cpp4
-rw-r--r--engines/tinsel/polygons.h2
-rw-r--r--engines/tinsel/rince.cpp4
-rw-r--r--engines/tinsel/rince.h2
-rw-r--r--engines/tinsel/saveload.cpp4
-rw-r--r--engines/tinsel/savescn.cpp4
-rw-r--r--engines/tinsel/savescn.h2
-rw-r--r--engines/tinsel/scene.cpp4
-rw-r--r--engines/tinsel/scene.h2
-rw-r--r--engines/tinsel/sched.cpp4
-rw-r--r--engines/tinsel/sched.h2
-rw-r--r--engines/tinsel/scn.cpp4
-rw-r--r--engines/tinsel/scn.h2
-rw-r--r--engines/tinsel/scroll.cpp4
-rw-r--r--engines/tinsel/scroll.h2
-rw-r--r--engines/tinsel/sound.cpp4
-rw-r--r--engines/tinsel/sound.h4
-rw-r--r--engines/tinsel/strres.cpp4
-rw-r--r--engines/tinsel/strres.h4
-rw-r--r--engines/tinsel/sysvar.cpp4
-rw-r--r--engines/tinsel/sysvar.h4
-rw-r--r--engines/tinsel/text.cpp4
-rw-r--r--engines/tinsel/text.h4
-rw-r--r--engines/tinsel/timers.cpp4
-rw-r--r--engines/tinsel/timers.h4
-rw-r--r--engines/tinsel/tinlib.cpp4
-rw-r--r--engines/tinsel/tinlib.h4
-rw-r--r--engines/tinsel/tinsel.cpp4
-rw-r--r--engines/tinsel/tinsel.h4
-rw-r--r--engines/tinsel/token.cpp4
-rw-r--r--engines/tinsel/token.h4
-rw-r--r--engines/toltecs/animation.cpp5
-rw-r--r--engines/toltecs/animation.h5
-rw-r--r--engines/toltecs/console.cpp4
-rw-r--r--engines/toltecs/console.h4
-rw-r--r--engines/toltecs/detection.cpp7
-rw-r--r--engines/toltecs/menu.cpp17
-rw-r--r--engines/toltecs/menu.h5
-rw-r--r--engines/toltecs/microtiles.cpp14
-rw-r--r--engines/toltecs/microtiles.h5
-rw-r--r--engines/toltecs/movie.cpp5
-rw-r--r--engines/toltecs/movie.h5
-rw-r--r--engines/toltecs/music.cpp4
-rw-r--r--engines/toltecs/music.h4
-rw-r--r--engines/toltecs/palette.cpp9
-rw-r--r--engines/toltecs/palette.h5
-rw-r--r--engines/toltecs/render.cpp23
-rw-r--r--engines/toltecs/render.h5
-rw-r--r--engines/toltecs/resource.cpp5
-rw-r--r--engines/toltecs/resource.h5
-rw-r--r--engines/toltecs/saveload.cpp5
-rw-r--r--engines/toltecs/screen.cpp5
-rw-r--r--engines/toltecs/screen.h5
-rw-r--r--engines/toltecs/script.cpp5
-rw-r--r--engines/toltecs/script.h5
-rw-r--r--engines/toltecs/segmap.cpp5
-rw-r--r--engines/toltecs/segmap.h5
-rw-r--r--engines/toltecs/sound.cpp5
-rw-r--r--engines/toltecs/sound.h5
-rw-r--r--engines/toltecs/sprite.cpp5
-rw-r--r--engines/toltecs/toltecs.cpp5
-rw-r--r--engines/toltecs/toltecs.h5
-rw-r--r--engines/tony/custom.cpp5
-rw-r--r--engines/tony/custom.h4
-rw-r--r--engines/tony/debugger.cpp6
-rw-r--r--engines/tony/debugger.h6
-rw-r--r--engines/tony/detection.cpp9
-rw-r--r--engines/tony/detection_tables.h4
-rw-r--r--engines/tony/font.cpp4
-rw-r--r--engines/tony/font.h5
-rw-r--r--engines/tony/game.cpp9
-rw-r--r--engines/tony/game.h5
-rw-r--r--engines/tony/gfxcore.cpp13
-rw-r--r--engines/tony/gfxcore.h6
-rw-r--r--engines/tony/gfxengine.cpp13
-rw-r--r--engines/tony/gfxengine.h4
-rw-r--r--engines/tony/globals.cpp4
-rw-r--r--engines/tony/globals.h4
-rw-r--r--engines/tony/input.cpp4
-rw-r--r--engines/tony/input.h4
-rw-r--r--engines/tony/inventory.cpp11
-rw-r--r--engines/tony/inventory.h6
-rw-r--r--engines/tony/loc.cpp17
-rw-r--r--engines/tony/loc.h6
-rw-r--r--engines/tony/mpal/expr.cpp5
-rw-r--r--engines/tony/mpal/expr.h5
-rw-r--r--engines/tony/mpal/loadmpc.cpp9
-rw-r--r--engines/tony/mpal/loadmpc.h5
-rw-r--r--engines/tony/mpal/lzo.cpp386
-rw-r--r--engines/tony/mpal/lzo.h26
-rw-r--r--engines/tony/mpal/memory.cpp5
-rw-r--r--engines/tony/mpal/memory.h5
-rw-r--r--engines/tony/mpal/mpal.cpp20
-rw-r--r--engines/tony/mpal/mpal.h11
-rw-r--r--engines/tony/mpal/mpaldll.h5
-rw-r--r--engines/tony/mpal/mpalutils.cpp5
-rw-r--r--engines/tony/mpal/mpalutils.h5
-rw-r--r--engines/tony/resid.h4
-rw-r--r--engines/tony/sound.cpp4
-rw-r--r--engines/tony/sound.h4
-rw-r--r--engines/tony/tony.cpp4
-rw-r--r--engines/tony/tony.h4
-rw-r--r--engines/tony/tonychar.cpp4
-rw-r--r--engines/tony/tonychar.h4
-rw-r--r--engines/tony/utils.cpp4
-rw-r--r--engines/tony/utils.h4
-rw-r--r--engines/tony/window.cpp4
-rw-r--r--engines/tony/window.h4
-rw-r--r--engines/toon/anim.cpp4
-rw-r--r--engines/toon/anim.h4
-rw-r--r--engines/toon/audio.cpp4
-rw-r--r--engines/toon/audio.h4
-rw-r--r--engines/toon/character.cpp40
-rw-r--r--engines/toon/character.h40
-rw-r--r--engines/toon/console.cpp4
-rw-r--r--engines/toon/console.h4
-rw-r--r--engines/toon/conversation.cpp40
-rw-r--r--engines/toon/conversation.h40
-rw-r--r--engines/toon/detection.cpp7
-rw-r--r--engines/toon/drew.cpp4
-rw-r--r--engines/toon/drew.h40
-rw-r--r--engines/toon/flux.cpp40
-rw-r--r--engines/toon/flux.h40
-rw-r--r--engines/toon/font.cpp40
-rw-r--r--engines/toon/font.h40
-rw-r--r--engines/toon/hotspot.cpp40
-rw-r--r--engines/toon/hotspot.h40
-rw-r--r--engines/toon/movie.cpp40
-rw-r--r--engines/toon/movie.h40
-rw-r--r--engines/toon/path.cpp40
-rw-r--r--engines/toon/path.h40
-rw-r--r--engines/toon/picture.cpp45
-rw-r--r--engines/toon/picture.h40
-rw-r--r--engines/toon/resource.cpp40
-rw-r--r--engines/toon/resource.h40
-rw-r--r--engines/toon/script.cpp40
-rw-r--r--engines/toon/script.h40
-rw-r--r--engines/toon/script_func.cpp40
-rw-r--r--engines/toon/script_func.h40
-rw-r--r--engines/toon/state.cpp40
-rw-r--r--engines/toon/state.h40
-rw-r--r--engines/toon/text.cpp40
-rw-r--r--engines/toon/text.h40
-rw-r--r--engines/toon/tools.cpp40
-rw-r--r--engines/toon/tools.h40
-rw-r--r--engines/toon/toon.cpp69
-rw-r--r--engines/toon/toon.h40
-rw-r--r--engines/touche/console.cpp4
-rw-r--r--engines/touche/console.h4
-rw-r--r--engines/touche/detection.cpp4
-rw-r--r--engines/touche/graphics.cpp4
-rw-r--r--engines/touche/graphics.h4
-rw-r--r--engines/touche/menu.cpp14
-rw-r--r--engines/touche/midi.cpp4
-rw-r--r--engines/touche/midi.h4
-rw-r--r--engines/touche/opcodes.cpp4
-rw-r--r--engines/touche/resource.cpp4
-rw-r--r--engines/touche/saveload.cpp4
-rw-r--r--engines/touche/staticres.cpp4
-rw-r--r--engines/touche/touche.cpp8
-rw-r--r--engines/touche/touche.h4
-rw-r--r--engines/tsage/blue_force/blueforce_dialogs.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_dialogs.h6
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_logic.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes0.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes0.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes1.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes1.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes2.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes2.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes3.cpp8
-rw-r--r--engines/tsage/blue_force/blueforce_scenes3.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes4.cpp8
-rw-r--r--engines/tsage/blue_force/blueforce_scenes4.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes5.cpp8
-rw-r--r--engines/tsage/blue_force/blueforce_scenes5.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes6.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes6.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes7.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes7.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes8.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes8.h6
-rw-r--r--engines/tsage/blue_force/blueforce_scenes9.cpp8
-rw-r--r--engines/tsage/blue_force/blueforce_scenes9.h6
-rw-r--r--engines/tsage/blue_force/blueforce_speakers.cpp6
-rw-r--r--engines/tsage/blue_force/blueforce_speakers.h6
-rw-r--r--engines/tsage/converse.cpp11
-rw-r--r--engines/tsage/converse.h6
-rw-r--r--engines/tsage/core.cpp14
-rw-r--r--engines/tsage/core.h8
-rw-r--r--engines/tsage/debugger.cpp110
-rw-r--r--engines/tsage/debugger.h6
-rw-r--r--engines/tsage/detection.cpp26
-rw-r--r--engines/tsage/detection_tables.h6
-rw-r--r--engines/tsage/dialogs.cpp6
-rw-r--r--engines/tsage/dialogs.h6
-rw-r--r--engines/tsage/events.cpp6
-rw-r--r--engines/tsage/events.h8
-rw-r--r--engines/tsage/globals.cpp7
-rw-r--r--engines/tsage/globals.h6
-rw-r--r--engines/tsage/graphics.cpp13
-rw-r--r--engines/tsage/graphics.h6
-rw-r--r--engines/tsage/resources.cpp6
-rw-r--r--engines/tsage/resources.h6
-rw-r--r--engines/tsage/ringworld/ringworld_demo.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_demo.h6
-rw-r--r--engines/tsage/ringworld/ringworld_dialogs.cpp9
-rw-r--r--engines/tsage/ringworld/ringworld_dialogs.h6
-rw-r--r--engines/tsage/ringworld/ringworld_logic.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_logic.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes1.cpp8
-rw-r--r--engines/tsage/ringworld/ringworld_scenes1.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes10.cpp8
-rw-r--r--engines/tsage/ringworld/ringworld_scenes10.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes2.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes2.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes3.cpp10
-rw-r--r--engines/tsage/ringworld/ringworld_scenes3.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes4.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes4.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes5.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes5.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes6.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes6.h6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes8.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_scenes8.h6
-rw-r--r--engines/tsage/ringworld/ringworld_speakers.cpp6
-rw-r--r--engines/tsage/ringworld/ringworld_speakers.h6
-rw-r--r--engines/tsage/ringworld2/ringworld2_dialogs.cpp25
-rw-r--r--engines/tsage/ringworld2/ringworld2_dialogs.h6
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp33
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h9
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp154
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.h12
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp60
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.h6
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp10
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.h6
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp40
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.h6
-rw-r--r--engines/tsage/ringworld2/ringworld2_speakers.cpp6
-rw-r--r--engines/tsage/ringworld2/ringworld2_speakers.h6
-rw-r--r--engines/tsage/saveload.cpp46
-rw-r--r--engines/tsage/saveload.h18
-rw-r--r--engines/tsage/scenes.cpp7
-rw-r--r--engines/tsage/scenes.h6
-rw-r--r--engines/tsage/sound.cpp217
-rw-r--r--engines/tsage/sound.h11
-rw-r--r--engines/tsage/staticres.cpp4
-rw-r--r--engines/tsage/staticres.h4
-rw-r--r--engines/tsage/tsage.cpp6
-rw-r--r--engines/tsage/tsage.h6
-rw-r--r--engines/tsage/user_interface.cpp10
-rw-r--r--engines/tsage/user_interface.h6
-rw-r--r--engines/tucker/console.cpp6
-rw-r--r--engines/tucker/console.h4
-rw-r--r--engines/tucker/detection.cpp4
-rw-r--r--engines/tucker/graphics.cpp36
-rw-r--r--engines/tucker/graphics.h14
-rw-r--r--engines/tucker/locations.cpp1243
-rw-r--r--engines/tucker/resource.cpp235
-rw-r--r--engines/tucker/saveload.cpp8
-rw-r--r--engines/tucker/sequences.cpp34
-rw-r--r--engines/tucker/staticres.cpp4
-rw-r--r--engines/tucker/tucker.cpp893
-rw-r--r--engines/tucker/tucker.h268
-rw-r--r--engines/util.h1
-rw-r--r--engines/voyeur/animation.cpp501
-rw-r--r--engines/voyeur/animation.h195
-rw-r--r--engines/voyeur/configure.engine4
-rw-r--r--engines/voyeur/data.cpp371
-rw-r--r--engines/voyeur/data.h232
-rw-r--r--engines/voyeur/debugger.cpp175
-rw-r--r--engines/voyeur/debugger.h70
-rw-r--r--engines/voyeur/detection.cpp181
-rw-r--r--engines/voyeur/detection_tables.h (renamed from engines/avalanche/pingo.h)54
-rw-r--r--engines/voyeur/events.cpp613
-rw-r--r--engines/voyeur/events.h145
-rw-r--r--engines/voyeur/files.cpp1621
-rw-r--r--engines/voyeur/files.h619
-rw-r--r--engines/voyeur/files_threads.cpp1731
-rw-r--r--engines/voyeur/graphics.cpp1054
-rw-r--r--engines/voyeur/graphics.h119
-rw-r--r--engines/voyeur/module.mk23
-rw-r--r--engines/voyeur/sound.cpp85
-rw-r--r--engines/voyeur/sound.h55
-rw-r--r--engines/voyeur/staticres.cpp142
-rw-r--r--engines/voyeur/staticres.h63
-rw-r--r--engines/voyeur/voyeur.cpp921
-rw-r--r--engines/voyeur/voyeur.h320
-rw-r--r--engines/voyeur/voyeur_game.cpp1423
-rw-r--r--engines/wintermute/ad/ad_actor.cpp4
-rw-r--r--engines/wintermute/ad/ad_actor.h4
-rw-r--r--engines/wintermute/ad/ad_entity.cpp4
-rw-r--r--engines/wintermute/ad/ad_entity.h4
-rw-r--r--engines/wintermute/ad/ad_game.cpp4
-rw-r--r--engines/wintermute/ad/ad_game.h4
-rw-r--r--engines/wintermute/ad/ad_inventory.cpp4
-rw-r--r--engines/wintermute/ad/ad_inventory.h4
-rw-r--r--engines/wintermute/ad/ad_inventory_box.cpp4
-rw-r--r--engines/wintermute/ad/ad_inventory_box.h4
-rw-r--r--engines/wintermute/ad/ad_item.cpp4
-rw-r--r--engines/wintermute/ad/ad_item.h4
-rw-r--r--engines/wintermute/ad/ad_layer.cpp4
-rw-r--r--engines/wintermute/ad/ad_layer.h4
-rw-r--r--engines/wintermute/ad/ad_node_state.cpp4
-rw-r--r--engines/wintermute/ad/ad_node_state.h4
-rw-r--r--engines/wintermute/ad/ad_object.cpp4
-rw-r--r--engines/wintermute/ad/ad_object.h4
-rw-r--r--engines/wintermute/ad/ad_path.cpp4
-rw-r--r--engines/wintermute/ad/ad_path.h4
-rw-r--r--engines/wintermute/ad/ad_path_point.cpp4
-rw-r--r--engines/wintermute/ad/ad_path_point.h4
-rw-r--r--engines/wintermute/ad/ad_region.cpp4
-rw-r--r--engines/wintermute/ad/ad_region.h4
-rw-r--r--engines/wintermute/ad/ad_response.cpp4
-rw-r--r--engines/wintermute/ad/ad_response.h4
-rw-r--r--engines/wintermute/ad/ad_response_box.cpp4
-rw-r--r--engines/wintermute/ad/ad_response_box.h4
-rw-r--r--engines/wintermute/ad/ad_response_context.cpp4
-rw-r--r--engines/wintermute/ad/ad_response_context.h4
-rw-r--r--engines/wintermute/ad/ad_rot_level.cpp4
-rw-r--r--engines/wintermute/ad/ad_rot_level.h4
-rw-r--r--engines/wintermute/ad/ad_scale_level.cpp4
-rw-r--r--engines/wintermute/ad/ad_scale_level.h4
-rw-r--r--engines/wintermute/ad/ad_scene.cpp12
-rw-r--r--engines/wintermute/ad/ad_scene.h4
-rw-r--r--engines/wintermute/ad/ad_scene_node.cpp4
-rw-r--r--engines/wintermute/ad/ad_scene_node.h4
-rw-r--r--engines/wintermute/ad/ad_scene_state.cpp4
-rw-r--r--engines/wintermute/ad/ad_scene_state.h4
-rw-r--r--engines/wintermute/ad/ad_sentence.cpp4
-rw-r--r--engines/wintermute/ad/ad_sentence.h4
-rw-r--r--engines/wintermute/ad/ad_sprite_set.cpp4
-rw-r--r--engines/wintermute/ad/ad_sprite_set.h4
-rw-r--r--engines/wintermute/ad/ad_talk_def.cpp4
-rw-r--r--engines/wintermute/ad/ad_talk_def.h4
-rw-r--r--engines/wintermute/ad/ad_talk_holder.cpp4
-rw-r--r--engines/wintermute/ad/ad_talk_holder.h4
-rw-r--r--engines/wintermute/ad/ad_talk_node.cpp4
-rw-r--r--engines/wintermute/ad/ad_talk_node.h4
-rw-r--r--engines/wintermute/ad/ad_types.h4
-rw-r--r--engines/wintermute/ad/ad_waypoint_group.cpp4
-rw-r--r--engines/wintermute/ad/ad_waypoint_group.h4
-rw-r--r--engines/wintermute/base/base.cpp4
-rw-r--r--engines/wintermute/base/base.h4
-rw-r--r--engines/wintermute/base/base_active_rect.cpp4
-rw-r--r--engines/wintermute/base/base_active_rect.h4
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.cpp4
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.h4
-rw-r--r--engines/wintermute/base/base_engine.cpp4
-rw-r--r--engines/wintermute/base/base_engine.h4
-rw-r--r--engines/wintermute/base/base_fader.cpp4
-rw-r--r--engines/wintermute/base/base_fader.h4
-rw-r--r--engines/wintermute/base/base_file_manager.cpp4
-rw-r--r--engines/wintermute/base/base_file_manager.h4
-rw-r--r--engines/wintermute/base/base_frame.cpp4
-rw-r--r--engines/wintermute/base/base_frame.h4
-rw-r--r--engines/wintermute/base/base_game.cpp4
-rw-r--r--engines/wintermute/base/base_game.h4
-rw-r--r--engines/wintermute/base/base_game_music.cpp4
-rw-r--r--engines/wintermute/base/base_game_music.h4
-rw-r--r--engines/wintermute/base/base_game_settings.cpp4
-rw-r--r--engines/wintermute/base/base_game_settings.h4
-rw-r--r--engines/wintermute/base/base_keyboard_state.cpp4
-rw-r--r--engines/wintermute/base/base_keyboard_state.h4
-rw-r--r--engines/wintermute/base/base_named_object.cpp4
-rw-r--r--engines/wintermute/base/base_named_object.h4
-rw-r--r--engines/wintermute/base/base_object.cpp4
-rw-r--r--engines/wintermute/base/base_object.h4
-rw-r--r--engines/wintermute/base/base_parser.cpp4
-rw-r--r--engines/wintermute/base/base_parser.h4
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp8
-rw-r--r--engines/wintermute/base/base_persistence_manager.h4
-rw-r--r--engines/wintermute/base/base_point.cpp4
-rw-r--r--engines/wintermute/base/base_point.h4
-rw-r--r--engines/wintermute/base/base_quick_msg.cpp4
-rw-r--r--engines/wintermute/base/base_quick_msg.h4
-rw-r--r--engines/wintermute/base/base_region.cpp4
-rw-r--r--engines/wintermute/base/base_region.h4
-rw-r--r--engines/wintermute/base/base_script_holder.cpp4
-rw-r--r--engines/wintermute/base/base_script_holder.h4
-rw-r--r--engines/wintermute/base/base_scriptable.cpp4
-rw-r--r--engines/wintermute/base/base_scriptable.h4
-rw-r--r--engines/wintermute/base/base_sprite.cpp4
-rw-r--r--engines/wintermute/base/base_sprite.h4
-rw-r--r--engines/wintermute/base/base_string_table.cpp4
-rw-r--r--engines/wintermute/base/base_string_table.h4
-rw-r--r--engines/wintermute/base/base_sub_frame.cpp8
-rw-r--r--engines/wintermute/base/base_sub_frame.h4
-rw-r--r--engines/wintermute/base/base_surface_storage.cpp4
-rw-r--r--engines/wintermute/base/base_surface_storage.h4
-rw-r--r--engines/wintermute/base/base_transition_manager.cpp4
-rw-r--r--engines/wintermute/base/base_transition_manager.h4
-rw-r--r--engines/wintermute/base/base_viewport.cpp4
-rw-r--r--engines/wintermute/base/base_viewport.h4
-rw-r--r--engines/wintermute/base/file/base_disk_file.cpp4
-rw-r--r--engines/wintermute/base/file/base_disk_file.h4
-rw-r--r--engines/wintermute/base/file/base_file.cpp4
-rw-r--r--engines/wintermute/base/file/base_file.h4
-rw-r--r--engines/wintermute/base/file/base_file_entry.cpp4
-rw-r--r--engines/wintermute/base/file/base_file_entry.h4
-rw-r--r--engines/wintermute/base/file/base_package.cpp4
-rw-r--r--engines/wintermute/base/file/base_package.h4
-rw-r--r--engines/wintermute/base/file/base_save_thumb_file.cpp4
-rw-r--r--engines/wintermute/base/file/base_save_thumb_file.h4
-rw-r--r--engines/wintermute/base/file/dcpackage.h4
-rw-r--r--engines/wintermute/base/font/base_font.cpp4
-rw-r--r--engines/wintermute/base/font/base_font.h4
-rw-r--r--engines/wintermute/base/font/base_font_bitmap.cpp4
-rw-r--r--engines/wintermute/base/font/base_font_bitmap.h4
-rw-r--r--engines/wintermute/base/font/base_font_storage.cpp4
-rw-r--r--engines/wintermute/base/font/base_font_storage.h4
-rw-r--r--engines/wintermute/base/font/base_font_truetype.cpp23
-rw-r--r--engines/wintermute/base/font/base_font_truetype.h4
-rw-r--r--engines/wintermute/base/gfx/base_image.cpp24
-rw-r--r--engines/wintermute/base/gfx/base_image.h11
-rw-r--r--engines/wintermute/base/gfx/base_renderer.cpp4
-rw-r--r--engines/wintermute/base/gfx/base_renderer.h4
-rw-r--r--engines/wintermute/base/gfx/base_surface.cpp4
-rw-r--r--engines/wintermute/base/gfx/base_surface.h4
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp10
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h4
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp14
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.h4
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp8
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.h22
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp4
-rw-r--r--engines/wintermute/base/particles/part_emitter.h4
-rw-r--r--engines/wintermute/base/particles/part_force.cpp4
-rw-r--r--engines/wintermute/base/particles/part_force.h4
-rw-r--r--engines/wintermute/base/particles/part_particle.cpp4
-rw-r--r--engines/wintermute/base/particles/part_particle.h4
-rw-r--r--engines/wintermute/base/save_thumb_helper.cpp4
-rw-r--r--engines/wintermute/base/save_thumb_helper.h4
-rw-r--r--engines/wintermute/base/saveload.cpp4
-rw-r--r--engines/wintermute/base/saveload.h4
-rw-r--r--engines/wintermute/base/scriptables/dcscript.h4
-rw-r--r--engines/wintermute/base/scriptables/script.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script.h4
-rw-r--r--engines/wintermute/base/scriptables/script_engine.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_engine.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_array.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_array.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_date.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_date.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_math.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_math.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_mem_buffer.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_object.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_object.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_string.cpp8
-rw-r--r--engines/wintermute/base/scriptables/script_ext_string.h4
-rw-r--r--engines/wintermute/base/scriptables/script_stack.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_stack.h4
-rw-r--r--engines/wintermute/base/scriptables/script_value.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_value.h4
-rw-r--r--engines/wintermute/base/sound/base_sound.cpp4
-rw-r--r--engines/wintermute/base/sound/base_sound.h4
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp4
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.h4
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp4
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.h4
-rw-r--r--engines/wintermute/base/timer.cpp4
-rw-r--r--engines/wintermute/base/timer.h4
-rw-r--r--engines/wintermute/coll_templ.h4
-rw-r--r--engines/wintermute/dcgf.h4
-rw-r--r--engines/wintermute/dctypes.h4
-rw-r--r--engines/wintermute/debugger.cpp4
-rw-r--r--engines/wintermute/debugger.h4
-rw-r--r--engines/wintermute/detection.cpp12
-rw-r--r--engines/wintermute/detection_tables.h114
-rw-r--r--engines/wintermute/graphics/transform_struct.cpp76
-rw-r--r--engines/wintermute/graphics/transform_struct.h4
-rw-r--r--engines/wintermute/graphics/transform_tools.cpp4
-rw-r--r--engines/wintermute/graphics/transform_tools.h4
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp155
-rw-r--r--engines/wintermute/graphics/transparent_surface.h13
-rw-r--r--engines/wintermute/math/floatpoint.h4
-rw-r--r--engines/wintermute/math/math_util.cpp4
-rw-r--r--engines/wintermute/math/math_util.h4
-rw-r--r--engines/wintermute/math/matrix4.cpp4
-rw-r--r--engines/wintermute/math/matrix4.h4
-rw-r--r--engines/wintermute/math/rect32.h4
-rw-r--r--engines/wintermute/math/vector2.cpp4
-rw-r--r--engines/wintermute/math/vector2.h4
-rw-r--r--engines/wintermute/module.mk10
-rw-r--r--engines/wintermute/persistent.cpp4
-rw-r--r--engines/wintermute/persistent.h4
-rw-r--r--engines/wintermute/platform_osystem.cpp4
-rw-r--r--engines/wintermute/platform_osystem.h4
-rw-r--r--engines/wintermute/system/sys_class.cpp4
-rw-r--r--engines/wintermute/system/sys_class.h4
-rw-r--r--engines/wintermute/system/sys_class_registry.cpp4
-rw-r--r--engines/wintermute/system/sys_class_registry.h4
-rw-r--r--engines/wintermute/system/sys_instance.cpp4
-rw-r--r--engines/wintermute/system/sys_instance.h4
-rw-r--r--engines/wintermute/ui/ui_button.cpp4
-rw-r--r--engines/wintermute/ui/ui_button.h4
-rw-r--r--engines/wintermute/ui/ui_edit.cpp4
-rw-r--r--engines/wintermute/ui/ui_edit.h4
-rw-r--r--engines/wintermute/ui/ui_entity.cpp4
-rw-r--r--engines/wintermute/ui/ui_entity.h4
-rw-r--r--engines/wintermute/ui/ui_object.cpp4
-rw-r--r--engines/wintermute/ui/ui_object.h4
-rw-r--r--engines/wintermute/ui/ui_text.cpp4
-rw-r--r--engines/wintermute/ui/ui_text.h4
-rw-r--r--engines/wintermute/ui/ui_tiled_image.cpp4
-rw-r--r--engines/wintermute/ui/ui_tiled_image.h4
-rw-r--r--engines/wintermute/ui/ui_window.cpp4
-rw-r--r--engines/wintermute/ui/ui_window.h4
-rw-r--r--engines/wintermute/utils/path_util.cpp4
-rw-r--r--engines/wintermute/utils/path_util.h4
-rw-r--r--engines/wintermute/utils/string_util.cpp4
-rw-r--r--engines/wintermute/utils/string_util.h4
-rw-r--r--engines/wintermute/utils/utils.cpp4
-rw-r--r--engines/wintermute/utils/utils.h4
-rw-r--r--engines/wintermute/video/video_player.cpp4
-rw-r--r--engines/wintermute/video/video_player.h4
-rw-r--r--engines/wintermute/video/video_theora_player.cpp7
-rw-r--r--engines/wintermute/video/video_theora_player.h4
-rw-r--r--engines/wintermute/wintermute.cpp15
-rw-r--r--engines/wintermute/wintermute.h4
-rw-r--r--engines/wintermute/wintypes.h4
-rw-r--r--engines/zvision/animation/rlf_animation.cpp44
-rw-r--r--engines/zvision/animation/rlf_animation.h4
-rw-r--r--engines/zvision/archives/zfs_archive.cpp4
-rw-r--r--engines/zvision/archives/zfs_archive.h4
-rw-r--r--engines/zvision/core/console.cpp40
-rw-r--r--engines/zvision/core/console.h40
-rw-r--r--engines/zvision/core/events.cpp4
-rw-r--r--engines/zvision/core/menu.h4
-rw-r--r--engines/zvision/core/save_manager.cpp4
-rw-r--r--engines/zvision/core/save_manager.h6
-rw-r--r--engines/zvision/cursors/cursor.cpp44
-rw-r--r--engines/zvision/cursors/cursor.h6
-rw-r--r--engines/zvision/cursors/cursor_manager.cpp40
-rw-r--r--engines/zvision/cursors/cursor_manager.h6
-rw-r--r--engines/zvision/detection.cpp5
-rw-r--r--engines/zvision/detection.h40
-rw-r--r--engines/zvision/fonts/truetype_font.cpp11
-rw-r--r--engines/zvision/fonts/truetype_font.h16
-rw-r--r--engines/zvision/graphics/render_manager.cpp52
-rw-r--r--engines/zvision/graphics/render_manager.h20
-rw-r--r--engines/zvision/graphics/render_table.cpp50
-rw-r--r--engines/zvision/graphics/render_table.h4
-rw-r--r--engines/zvision/inventory/inventory_manager.h4
-rw-r--r--engines/zvision/module.mk10
-rw-r--r--engines/zvision/scripting/actions.cpp4
-rw-r--r--engines/zvision/scripting/actions.h4
-rw-r--r--engines/zvision/scripting/control.cpp4
-rw-r--r--engines/zvision/scripting/control.h6
-rw-r--r--engines/zvision/scripting/controls/animation_control.cpp6
-rw-r--r--engines/zvision/scripting/controls/animation_control.h4
-rw-r--r--engines/zvision/scripting/controls/input_control.cpp6
-rw-r--r--engines/zvision/scripting/controls/input_control.h4
-rw-r--r--engines/zvision/scripting/controls/lever_control.cpp4
-rw-r--r--engines/zvision/scripting/controls/lever_control.h4
-rw-r--r--engines/zvision/scripting/controls/push_toggle_control.cpp4
-rw-r--r--engines/zvision/scripting/controls/push_toggle_control.h4
-rw-r--r--engines/zvision/scripting/controls/timer_node.cpp4
-rw-r--r--engines/zvision/scripting/controls/timer_node.h4
-rw-r--r--engines/zvision/scripting/puzzle.h6
-rw-r--r--engines/zvision/scripting/scr_file_handling.cpp4
-rw-r--r--engines/zvision/scripting/script_manager.cpp40
-rw-r--r--engines/zvision/scripting/script_manager.h24
-rw-r--r--engines/zvision/sound/zork_raw.cpp14
-rw-r--r--engines/zvision/sound/zork_raw.h6
-rw-r--r--engines/zvision/strings/string_manager.cpp10
-rw-r--r--engines/zvision/strings/string_manager.h5
-rw-r--r--engines/zvision/subtitles/subtitles.h5
-rw-r--r--engines/zvision/utility/clock.cpp7
-rw-r--r--engines/zvision/utility/clock.h9
-rw-r--r--engines/zvision/utility/lzss_read_stream.cpp40
-rw-r--r--engines/zvision/utility/lzss_read_stream.h42
-rw-r--r--engines/zvision/utility/single_value_container.cpp4
-rw-r--r--engines/zvision/utility/single_value_container.h26
-rw-r--r--engines/zvision/utility/utility.cpp4
-rw-r--r--engines/zvision/utility/utility.h7
-rw-r--r--engines/zvision/video/video.cpp4
-rw-r--r--engines/zvision/video/zork_avi_decoder.cpp5
-rw-r--r--engines/zvision/video/zork_avi_decoder.h9
-rw-r--r--engines/zvision/zvision.cpp18
-rw-r--r--engines/zvision/zvision.h13
2866 files changed, 43490 insertions, 10606 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 40783a2407..fa23f5fa1a 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 376a59e471..ad551698f6 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 57561c00ee..6bdbabd33e 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 93a456b9a6..6256de05d2 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/checks.cpp b/engines/agi/checks.cpp
index 624476509e..e61146e901 100644
--- a/engines/agi/checks.cpp
+++ b/engines/agi/checks.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index b9a64bc572..5f222adf89 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/console.h b/engines/agi/console.h
index f8025e0562..6e86067373 100644
--- a/engines/agi/console.h
+++ b/engines/agi/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 702ca907d7..6b34605364 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 3f55117868..1d58900056 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index a7a3920df8..2d7fba3507 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -846,6 +846,7 @@ static const AGIGameDescription gameDescriptions[] = {
FANMADE("Time Quest (Demo v0.1)", "12e1a6f03ea4b8c5531acd0400b4ed8d"),
FANMADE("Time Quest (Demo v0.2)", "7b710608abc99e0861ac59b967bf3f6d"),
FANMADE_SVP("Time Quest", "90314f473d8317be5cd1f0306f139aea", 300, 0x2440, Common::kPlatformCoCo3),
+ FANMADE("Toby's World (Demo)", "3f8ebea0eb32303e65e2a6e8341c6741"),
FANMADE("Tonight The Shrieking Corpses Bleed (Demo v0.11)", "bcc57a7c8d563fa0c333107ae1c0a6e6"),
FANMADE("Tonight The Shrieking Corpses Bleed (v1.01)", "36b38f621b38e8d104aa0807302dc8c9"),
FANMADE("Turks' Quest - Heir to the Planet", "3d19254b737c8b218e5bc4580542b79a"),
diff --git a/engines/agi/font.h b/engines/agi/font.h
index c2516d3520..c77d8cf0c3 100644
--- a/engines/agi/font.h
+++ b/engines/agi/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/global.cpp b/engines/agi/global.cpp
index fdece0737e..7d55316d7b 100644
--- a/engines/agi/global.cpp
+++ b/engines/agi/global.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index 4bb3877f7d..34651c70b2 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h
index 037dacd8de..15668fbed3 100644
--- a/engines/agi/graphics.h
+++ b/engines/agi/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/id.cpp b/engines/agi/id.cpp
index dd370d4189..c35ff36488 100644
--- a/engines/agi/id.cpp
+++ b/engines/agi/id.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/inv.cpp b/engines/agi/inv.cpp
index a165a32b29..f1e4e5094b 100644
--- a/engines/agi/inv.cpp
+++ b/engines/agi/inv.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index b7e52f4dc3..0aa521bdc8 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/keyboard.h b/engines/agi/keyboard.h
index 665ee6a62c..89d6a89ce3 100644
--- a/engines/agi/keyboard.h
+++ b/engines/agi/keyboard.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/loader_v1.cpp b/engines/agi/loader_v1.cpp
index 3b862ed91f..404fb6ee0e 100644
--- a/engines/agi/loader_v1.cpp
+++ b/engines/agi/loader_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp
index 458927a3bc..787eeaa0c7 100644
--- a/engines/agi/loader_v2.cpp
+++ b/engines/agi/loader_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp
index 1dd00dc18e..fa135e5476 100644
--- a/engines/agi/loader_v3.cpp
+++ b/engines/agi/loader_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/logic.cpp b/engines/agi/logic.cpp
index 22798ba831..7429b117c8 100644
--- a/engines/agi/logic.cpp
+++ b/engines/agi/logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/logic.h b/engines/agi/logic.h
index 14137f01d2..a30a37bc47 100644
--- a/engines/agi/logic.h
+++ b/engines/agi/logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/lzw.cpp b/engines/agi/lzw.cpp
index a00281bd49..ba47c13543 100644
--- a/engines/agi/lzw.cpp
+++ b/engines/agi/lzw.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/lzw.h b/engines/agi/lzw.h
index c732491e8e..26db1bbf14 100644
--- a/engines/agi/lzw.h
+++ b/engines/agi/lzw.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index d23a5a2e27..008c208c82 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/menu.h b/engines/agi/menu.h
index 1d5828d78a..000973db23 100644
--- a/engines/agi/menu.h
+++ b/engines/agi/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/motion.cpp b/engines/agi/motion.cpp
index e4de232267..363291ac0b 100644
--- a/engines/agi/motion.cpp
+++ b/engines/agi/motion.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp
index 447cff2a3f..27cde61065 100644
--- a/engines/agi/objects.cpp
+++ b/engines/agi/objects.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 2366d97a82..662454f3c1 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/op_dbg.cpp b/engines/agi/op_dbg.cpp
index 87e235cf17..997da9db7d 100644
--- a/engines/agi/op_dbg.cpp
+++ b/engines/agi/op_dbg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp
index 18861a2190..9839f0ec90 100644
--- a/engines/agi/op_test.cpp
+++ b/engines/agi/op_test.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp
index d893e44c12..621fbb8e82 100644
--- a/engines/agi/opcodes.cpp
+++ b/engines/agi/opcodes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/opcodes.h b/engines/agi/opcodes.h
index 7f0f287550..6bd31c339a 100644
--- a/engines/agi/opcodes.h
+++ b/engines/agi/opcodes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index 47e40fb5f1..58dfb9db68 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/picture.h b/engines/agi/picture.h
index 45a95202e5..9ff1e742f4 100644
--- a/engines/agi/picture.h
+++ b/engines/agi/picture.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index 0b5afc7f8c..daadb5ffef 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h
index 5d50fb5af8..c2962b09b3 100644
--- a/engines/agi/preagi.h
+++ b/engines/agi/preagi.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index d0f6540651..561b56d199 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h
index 18b0593d78..55b3633c8c 100644
--- a/engines/agi/preagi_mickey.h
+++ b/engines/agi/preagi_mickey.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp
index 17d980dfd8..2889407c85 100644
--- a/engines/agi/preagi_troll.cpp
+++ b/engines/agi/preagi_troll.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi_troll.h b/engines/agi/preagi_troll.h
index c14a7872c2..41ddbea166 100644
--- a/engines/agi/preagi_troll.h
+++ b/engines/agi/preagi_troll.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 1be385be37..d5ae0b59a0 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h
index f34c80cec1..b5e8b8d10b 100644
--- a/engines/agi/preagi_winnie.h
+++ b/engines/agi/preagi_winnie.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index c449f076e7..41a7a943ff 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 56c7ebcb0b..8f678cbac9 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index f300af83a3..992feb1186 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index f088ad3a01..b940eed762 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h
index 12e7b7b951..8a1999c8eb 100644
--- a/engines/agi/sound_2gs.h
+++ b/engines/agi/sound_2gs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_coco3.cpp b/engines/agi/sound_coco3.cpp
index 64818e4e34..3cd79a1154 100644
--- a/engines/agi/sound_coco3.cpp
+++ b/engines/agi/sound_coco3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_coco3.h b/engines/agi/sound_coco3.h
index d24acf5cc5..078495b5ed 100644
--- a/engines/agi/sound_coco3.h
+++ b/engines/agi/sound_coco3.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index 24e3ca8fb7..35dc896789 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_midi.h b/engines/agi/sound_midi.h
index ac1b100b12..e026e26594 100644
--- a/engines/agi/sound_midi.h
+++ b/engines/agi/sound_midi.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index 5bffca5765..51b2d067a4 100644
--- a/engines/agi/sound_pcjr.cpp
+++ b/engines/agi/sound_pcjr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_pcjr.h b/engines/agi/sound_pcjr.h
index 1b4d1e9efb..7f84112345 100644
--- a/engines/agi/sound_pcjr.h
+++ b/engines/agi/sound_pcjr.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index 576801bc56..98479f3edc 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sound_sarien.h b/engines/agi/sound_sarien.h
index 04f274ca7d..1c4dbb7bca 100644
--- a/engines/agi/sound_sarien.h
+++ b/engines/agi/sound_sarien.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index ea2d329fb0..92f88d8fcb 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/sprite.h b/engines/agi/sprite.h
index 851c2438fb..549eb59832 100644
--- a/engines/agi/sprite.h
+++ b/engines/agi/sprite.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 4877be2647..eb48857bf2 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/view.cpp b/engines/agi/view.cpp
index 3f3686561e..6a274a1b73 100644
--- a/engines/agi/view.cpp
+++ b/engines/agi/view.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/view.h b/engines/agi/view.h
index 5cf59d7df5..b82fbe04d7 100644
--- a/engines/agi/view.h
+++ b/engines/agi/view.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 644ca7c103..0b49866531 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/wagparser.h b/engines/agi/wagparser.h
index 81cfecef1b..8f900c9ab8 100644
--- a/engines/agi/wagparser.h
+++ b/engines/agi/wagparser.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index f423995de8..ff9049fdc5 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 359a6f7289..7266c75474 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -510,6 +510,7 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
_saveLoadType = 0;
_saveLoadSlot = 0;
memset(_saveLoadName, 0, sizeof(_saveLoadName));
+ memset(_saveBuf, 0, sizeof(_saveBuf));
_saveGameNameLen = 0;
_saveLoadRowCurPos = 0;
@@ -550,7 +551,7 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
SearchMan.addSubDirectoryMatching(gameDataDir, "execute");
// Add default file directories for Amiga/Macintosh
- // verisons of Simon the Sorcerer 2
+ // versions of Simon the Sorcerer 2
SearchMan.addSubDirectoryMatching(gameDataDir, "voices");
// Add default file directories for Amiga & Macintosh
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 0b8e585f57..5e49fce5ff 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -584,6 +584,7 @@ protected:
byte _saveLoadType, _saveLoadSlot;
char _saveLoadName[108];
+ char _saveBuf[200];
Graphics::Surface *_backGroundBuf;
Graphics::Surface *_backBuf;
@@ -834,6 +835,9 @@ protected:
void displayBoxStars();
void invertBox(HitArea * ha, byte a, byte b, byte c, byte d);
+ virtual void handleMouseWheelUp();
+ virtual void handleMouseWheelDown();
+
virtual void initMouse();
virtual void handleMouseMoved();
virtual void drawMousePointer();
@@ -1706,10 +1710,13 @@ protected:
void setExitState(Item *i, uint16 n, uint16 d, uint16 s);
void setSRExit(Item *i, int n, int d, uint16 s);
- virtual void listSaveGames(char *dst);
+ virtual void handleMouseWheelUp();
+ virtual void handleMouseWheelDown();
+
+ virtual void listSaveGames();
virtual bool confirmOverWrite(WindowBlock *window);
virtual void userGame(bool load);
- virtual int userGameGetKey(bool *b, char *buf, uint maxChar);
+ virtual int userGameGetKey(bool *b, uint maxChar);
virtual Common::String genSaveName(int slot) const;
};
@@ -1829,6 +1836,9 @@ protected:
virtual void clearName();
+ virtual void handleMouseWheelUp();
+ virtual void handleMouseWheelDown();
+
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
virtual void initMouse();
@@ -1841,9 +1851,9 @@ protected:
virtual void playSpeech(uint16 speechId, uint16 vgaSpriteId);
- virtual void listSaveGames(char *dst);
+ virtual void listSaveGames();
virtual void userGame(bool load);
- virtual int userGameGetKey(bool *b, char *buf, uint maxChar);
+ virtual int userGameGetKey(bool *b, uint maxChar);
virtual void playMusic(uint16 music, uint16 track);
@@ -1927,6 +1937,7 @@ public:
void off_listSaveGames();
void off_checkCD();
void off_screenTextBox();
+ void off_b2Set();
void off_isAdjNoun();
void off_hyperLinkOn();
void off_hyperLinkOff();
@@ -1969,12 +1980,17 @@ protected:
virtual uint16 readUint16Wrapper(const void *src);
virtual uint32 readUint32Wrapper(const void *src);
+ void setLoyaltyRating(byte rating);
+
void playVideo(const char *filename, bool lastSceneUsed = false);
void stopInteractiveVideo();
virtual void drawImage(VC10_state *state);
void scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY);
+ virtual void handleMouseWheelUp();
+ virtual void handleMouseWheelDown();
+
void drawMousePart(int image, byte x, byte y);
virtual void initMouse();
virtual void drawMousePointer();
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index d438de049a..83682d567b 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -287,7 +287,7 @@ void MoviePlayerDXA::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) {
void MoviePlayerDXA::playVideo() {
// Most of the videos included in the Amiga version, reduced the
- // resoluton to 384 x 280, so require the screen to be cleared,
+ // resolution to 384 x 280, so require the screen to be cleared,
// before starting playing those videos.
if (getWidth() == 384 && getHeight() == 280) {
_vm->clearSurfaces();
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 9e31fced6d..86808cbc27 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp
index b6b90eefcc..ae31814e43 100644
--- a/engines/agos/charset-fontdata.cpp
+++ b/engines/agos/charset-fontdata.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp
index eca9728643..4d83a4ef1c 100644
--- a/engines/agos/charset.cpp
+++ b/engines/agos/charset.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/contain.cpp b/engines/agos/contain.cpp
index 173194d45e..0fab0a35f2 100644
--- a/engines/agos/contain.cpp
+++ b/engines/agos/contain.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 7c64d68048..65fdc9ec99 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index 841ac6bb1a..ad5bfb56f4 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -101,7 +101,7 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) {
}
case 'W':{
- int n = (int16)READ_BE_UINT16(p);
+ uint16 n = READ_BE_UINT16(p);
p += 2;
if (getGameType() == GType_PP) {
if (n >= 60000 && n < 62048)
@@ -222,14 +222,18 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) {
error("dumpVideoScript: Opcode %d out of range (%d)", opcode, _numVideoOpcodes);
}
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
+ if (getGameType() == GType_PP) {
+ strn = str = puzzlepack_videoOpcodeNameTable[opcode];
+ } else if (getGameType() == GType_FF) {
strn = str = feeblefiles_videoOpcodeNameTable[opcode];
} else if (getGameType() == GType_SIMON2) {
strn = str = simon2_videoOpcodeNameTable[opcode];
} else if (getGameType() == GType_SIMON1) {
strn = str = simon1_videoOpcodeNameTable[opcode];
- } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
+ } else if (getGameType() == GType_WW) {
strn = str = ww_videoOpcodeNameTable[opcode];
+ } else if (getGameType() == GType_ELVIRA2) {
+ strn = str = elvira2_videoOpcodeNameTable[opcode];
} else if (getGameType() == GType_ELVIRA1) {
strn = str = elvira1_videoOpcodeNameTable[opcode];
} else {
@@ -250,25 +254,39 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) {
case 'x':
debugN("\n");
return;
- case 'b':
+ case 'b': {
debugN("%d ", *src++);
break;
- case 'd':
+ }
+ case 'w': {
+ int16 v = (int16)readUint16Wrapper(src);
+ src += 2;
+ if (v < 0)
+ debugN("[%d] ", -v);
+ else
+ debugN("%d ", v);
+ break;
+ }
+ case 'd': {
debugN("%d ", (int16)readUint16Wrapper(src));
src += 2;
break;
- case 'v':
+ }
+ case 'v': {
debugN("[%d] ", readUint16Wrapper(src));
src += 2;
break;
- case 'i':
+ }
+ case 'i': {
debugN("%d ", (int16)readUint16Wrapper(src));
src += 2;
break;
- case 'j':
+ }
+ case 'j': {
debugN("-> ");
break;
- case 'q':
+ }
+ case 'q': {
while (readUint16Wrapper(src) != end) {
debugN("(%d,%d) ", readUint16Wrapper(src),
readUint16Wrapper(src + 2));
@@ -276,6 +294,7 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) {
}
src += 2;
break;
+ }
default:
error("dumpVideoScript: Invalid fmt string '%c' in decompile VGA", *str);
}
diff --git a/engines/agos/debug.h b/engines/agos/debug.h
index fe14ae4860..4d521de9b9 100644
--- a/engines/agos/debug.h
+++ b/engines/agos/debug.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2468,7 +2468,7 @@ const char *const elvira1_videoOpcodeNameTable[] = {
"dd|DELAY_IF_NOT_EQ",
};
-const char *const ww_videoOpcodeNameTable[] = {
+const char *const elvira2_videoOpcodeNameTable[] = {
/* 0 */
"x|RET",
"ddd|FADEOUT",
@@ -2485,7 +2485,7 @@ const char *const ww_videoOpcodeNameTable[] = {
"dddd|DRAW",
"d|ON_STOP",
/* 12 */
- "d|DELAY",
+ "w|DELAY",
"d|SET_SPRITE_OFFSET_X",
"d|SET_SPRITE_OFFSET_Y",
"d|SYNC",
@@ -2551,11 +2551,94 @@ const char *const ww_videoOpcodeNameTable[] = {
"|FASTFADEIN",
};
+const char *const ww_videoOpcodeNameTable[] = {
+ /* 0 */
+ "x|RET",
+ "ddd|FADEOUT",
+ "w|CALL",
+ "ddddd|NEW_SPRITE",
+ /* 4 */
+ "ddd|FADEIN",
+ "vdj|IF_EQUAL",
+ "dj|IF_OBJECT_HERE",
+ "dj|IF_OBJECT_NOT_HERE",
+ /* 8 */
+ "ddj|IF_OBJECT_IS_AT",
+ "ddj|IF_OBJECT_STATE_IS",
+ "dddd|DRAW",
+ "d|ON_STOP",
+ /* 12 */
+ "w|DELAY",
+ "d|SET_SPRITE_OFFSET_X",
+ "d|SET_SPRITE_OFFSET_Y",
+ "d|SYNC",
+ /* 16 */
+ "d|WAIT_SYNC",
+ "d|WAIT_END",
+ "i|JUMP_REL",
+ "|CHAIN_TO",
+ /* 20 */
+ "dd|SET_REPEAT",
+ "i|END_REPEAT",
+ "d|SET_PALETTE",
+ "d|SET_PRIORITY",
+ /* 24 */
+ "wiid|SET_SPRITE_XY",
+ "x|HALT_SPRITE",
+ "ddddd|SET_WINDOW",
+ "|RESET",
+ /* 28 */
+ "dddd|PLAY_SOUND",
+ "|STOP_ALL_SOUNDS",
+ "d|SET_FRAME_RATE",
+ "d|SET_WINDOW",
+ /* 32 */
+ "|SAVE_SCREEN",
+ "|MOUSE_ON",
+ "|MOUSE_OFF",
+ "dd|CLEAR_WINDOW",
+ /* 36 */
+ "dd|SET_WINDOW_IMAGE",
+ "dd|POKE_PALETTE",
+ "vj|IF_VAR_NOT_ZERO",
+ "vd|SET_VAR",
+ /* 40 */
+ "vd|ADD_VAR",
+ "vd|SUB_VAR",
+ "vd|DELAY_IF_NOT_EQ",
+ "dj|IF_BIT_SET",
+ /* 44 */
+ "dj|IF_BIT_CLEAR",
+ "dd|SET_WINDOW_PALETTE",
+ "d|SET_PALETTE_SLOT1",
+ "d|SET_PALETTE_SLOT2",
+ /* 48 */
+ "d|SET_PALETTE_SLOT3",
+ "d|SET_BIT",
+ "d|CLEAR_BIT",
+ "d|ENABLE_BOX",
+ /* 52 */
+ "d|PLAY_EFFECT",
+ "dd|DISSOLVE_IN",
+ "ddd|DISSOLVE_OUT",
+ "ddd|MOVE_BOX",
+ /* 56 */
+ "|FULL_SCREEN",
+ "|BLACK_PALETTE",
+ "|CHECK_CODE_WHEEL",
+ "j|IF_EGA",
+ /* 60 */
+ "d|STOP_ANIMATE",
+ "d|INTRO",
+ "|FASTFADEOUT",
+ "|FASTFADEIN",
+};
+
const char *const simon1_videoOpcodeNameTable[] = {
/* 0 */
"x|RET",
"ddd|FADEOUT",
- "d|CALL",
+ "w|CALL",
"ddddd|NEW_SPRITE",
/* 4 */
"ddd|FADEIN",
@@ -2568,7 +2651,7 @@ const char *const simon1_videoOpcodeNameTable[] = {
"ddddd|DRAW",
"|CLEAR_PATHFIND_ARRAY",
/* 12 */
- "d|DELAY",
+ "w|DELAY",
"d|SET_SPRITE_OFFSET_X",
"d|SET_SPRITE_OFFSET_Y",
"d|SYNC",
@@ -2583,7 +2666,7 @@ const char *const simon1_videoOpcodeNameTable[] = {
"dd|SET_PALETTE",
"d|SET_PRIORITY",
/* 24 */
- "diid|SET_SPRITE_XY",
+ "wiid|SET_SPRITE_XY",
"x|HALT_SPRITE",
"ddddd|SET_WINDOW",
"|RESET",
@@ -2629,7 +2712,7 @@ const char *const simon1_videoOpcodeNameTable[] = {
"j|IF_SPEECH",
/* 60 */
"d|STOP_ANIMATE",
- "ddd|MASK",
+ "wdd|MASK",
"|FASTFADEOUT",
"|FASTFADEIN",
};
@@ -2638,7 +2721,7 @@ const char *const simon2_videoOpcodeNameTable[] = {
/* 0 */
"x|RET",
"ddd|FADEOUT",
- "d|CALL",
+ "w|CALL",
"dddddd|NEW_SPRITE",
/* 4 */
"ddd|FADEIN",
@@ -2666,7 +2749,7 @@ const char *const simon2_videoOpcodeNameTable[] = {
"dd|SET_PALETTE",
"d|SET_PRIORITY",
/* 24 */
- "diib|SET_SPRITE_XY",
+ "wiib|SET_SPRITE_XY",
"x|HALT_SPRITE",
"ddddd|SET_WINDOW",
"|RESET",
@@ -2706,13 +2789,13 @@ const char *const simon2_videoOpcodeNameTable[] = {
"ddd|DUMMY_54",
"ddd|MOVE_BOX",
/* 56 */
- "i|WAIT_BIG",
+ "w|WAIT_BIG",
"|BLACK_PALETTE",
"ddd|SET_PRIORITIES",
"ddd|STOP_ANIMATIONS",
/* 60 */
"dd|STOP_ANIMATE",
- "ddd|MASK",
+ "wdd|MASK",
"|FASTFADEOUT",
"|FASTFADEIN",
/* 64 */
@@ -2735,7 +2818,7 @@ const char *const feeblefiles_videoOpcodeNameTable[] = {
/* 0 */
"x|RET",
"ddd|FADEOUT",
- "d|CALL",
+ "w|CALL",
"dddddd|NEW_SPRITE",
/* 4 */
"ddd|FADEIN",
@@ -2763,7 +2846,7 @@ const char *const feeblefiles_videoOpcodeNameTable[] = {
"dd|SET_PALETTE",
"d|SET_PRIORITY",
/* 24 */
- "diib|SET_SPRITE_XY",
+ "wiib|SET_SPRITE_XY",
"x|HALT_SPRITE",
"ddddd|SET_WINDOW",
"|RESET",
@@ -2803,7 +2886,116 @@ const char *const feeblefiles_videoOpcodeNameTable[] = {
"ddd|DUMMY_54",
"ddd|MOVE_BOX",
/* 56 */
- "i|WAIT_BIG",
+ "w|WAIT_BIG",
+ "|BLACK_PALETTE",
+ "ddd|SET_PRIORITIES",
+ "ddd|STOP_ANIMATIONS",
+ /* 60 */
+ "dd|STOP_ANIMATE",
+ "wdd|MASK",
+ "|FASTFADEOUT",
+ "|FASTFADEIN",
+ /* 64 */
+ "j|IF_SPEECH",
+ "|SLOW_FADE_IN",
+ "ddj|IF_VAR_EQUAL",
+ "ddj|IF_VAR_LE",
+ /* 68 */
+ "ddj|IF_VAR_GE",
+ "dd|PLAY_SEQ",
+ "dd|JOIN_SEQ",
+ "|IF_SEQ_WAITING",
+ /* 72 */
+ "dd|SEQUE",
+ "bb|SET_MARK",
+ "bb|CLEAR_MARK",
+ "dd|SETSCALE",
+ /* 76 */
+ "ddd|SETSCALEXOFFS",
+ "ddd|SETSCALEYOFFS",
+ "|COMPUTEXY",
+ "|COMPUTEPOSNUM",
+ /* 80 */
+ "wdd|SETOVERLAYIMAGE",
+ "dd|SETRANDOM",
+ "d|GETPATHVALUE",
+ "ddd|PLAYSOUNDLOOP",
+ "|STOPSOUNDLOOP",
+};
+
+const char *const puzzlepack_videoOpcodeNameTable[] = {
+ /* 0 */
+ "x|RET",
+ "ddd|FADEOUT",
+ "w|CALL",
+ "dddddd|NEW_SPRITE",
+ /* 4 */
+ "ddd|FADEIN",
+ "wdj|IF_EQUAL",
+ "dj|IF_OBJECT_HERE",
+ "dj|IF_OBJECT_NOT_HERE",
+ /* 8 */
+ "ddj|IF_OBJECT_IS_AT",
+ "ddj|IF_OBJECT_STATE_IS",
+ "ddddb|DRAW",
+ "|CLEAR_PATHFIND_ARRAY",
+ /* 12 */
+ "b|DELAY",
+ "d|SET_SPRITE_OFFSET_X",
+ "d|SET_SPRITE_OFFSET_Y",
+ "d|SYNC",
+ /* 16 */
+ "d|WAIT_SYNC",
+ "dq|SET_PATHFIND_ITEM",
+ "i|JUMP_REL",
+ "|CHAIN_TO",
+ /* 20 */
+ "dd|SET_REPEAT",
+ "i|END_REPEAT",
+ "dd|SET_PALETTE",
+ "d|SET_PRIORITY",
+ /* 24 */
+ "wiib|SET_SPRITE_XY",
+ "x|HALT_SPRITE",
+ "ddddd|SET_WINDOW",
+ "|RESET",
+ /* 28 */
+ "dddd|PLAY_SOUND",
+ "|STOP_ALL_SOUNDS",
+ "d|SET_FRAME_RATE",
+ "d|SET_WINDOW",
+ /* 32 */
+ "vv|COPY_VAR",
+ "|MOUSE_ON",
+ "|MOUSE_OFF",
+ "dd|CLEAR_WINDOW",
+ /* 36 */
+ "dd|SET_WINDOW_IMAGE",
+ "v|SET_SPRITE_OFFSET_Y",
+ "wj|IF_VAR_NOT_ZERO",
+ "wd|SET_VAR",
+ /* 40 */
+ "vd|ADD_VAR",
+ "vd|SUB_VAR",
+ "vd|DELAY_IF_NOT_EQ",
+ "dj|IF_BIT_SET",
+ /* 44 */
+ "dj|IF_BIT_CLEAR",
+ "v|SET_SPRITE_X",
+ "v|SET_SPRITE_Y",
+ "vv|ADD_VAR_F",
+ /* 48 */
+ "|COMPUTE_YOFS",
+ "d|SET_BIT",
+ "d|CLEAR_BIT",
+ "d|ENABLE_BOX",
+ /* 52 */
+ "ddd|PLAY_EFFECT",
+ "ddd|PAN_SFX",
+ "ddd|DUMMY_54",
+ "ddd|MOVE_BOX",
+ /* 56 */
+ "w|WAIT_BIG",
"|BLACK_PALETTE",
"ddd|SET_PRIORITIES",
"ddd|STOP_ANIMATIONS",
@@ -2833,7 +3025,7 @@ const char *const feeblefiles_videoOpcodeNameTable[] = {
"|COMPUTEXY",
"|COMPUTEPOSNUM",
/* 80 */
- "ddd|SETOVERLAYIMAGE",
+ "wdd|SETOVERLAYIMAGE",
"dd|SETRANDOM",
"d|GETPATHVALUE",
"ddd|PLAYSOUNDLOOP",
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index fc24c6d363..512137b685 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/debugger.h b/engines/agos/debugger.h
index 0ab992ebbe..caac6e2caf 100644
--- a/engines/agos/debugger.h
+++ b/engines/agos/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index b6d3c2f020..72a38a3645 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h
index 329af75d0c..77fc88c6bb 100644
--- a/engines/agos/detection_tables.h
+++ b/engines/agos/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2622,7 +2622,7 @@ static const AGOSGameDescription gameDescriptions[] = {
GType_FF,
GID_FEEBLEFILES,
- GF_OLD_BUNDLE | GF_TALKIE | GF_PACKED
+ GF_OLD_BUNDLE | GF_TALKIE | GF_PACKED | GF_BROKEN_FF_RATING
},
// The Feeble Files - English Windows 4CD
@@ -2645,7 +2645,7 @@ static const AGOSGameDescription gameDescriptions[] = {
GType_FF,
GID_FEEBLEFILES,
- GF_OLD_BUNDLE | GF_TALKIE
+ GF_OLD_BUNDLE | GF_TALKIE | GF_BROKEN_FF_RATING
},
// The Feeble Files - French Windows 4CD
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index d27aed29db..4ba9446eb2 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 65c7f7fd77..95bcc68234 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -468,6 +468,14 @@ void AGOSEngine::delay(uint amount) {
sprintf(_saveLoadName, "Quick %d", _saveLoadSlot);
_saveLoadType = (event.kbd.hasFlags(Common::KBD_ALT)) ? 1 : 2;
quickLoadOrSave();
+ } else if (event.kbd.hasFlags(Common::KBD_ALT)) {
+ if (event.kbd.keycode == Common::KEYCODE_u) {
+ dumpAllSubroutines();
+ } else if (event.kbd.keycode == Common::KEYCODE_i) {
+ dumpAllVgaImageFiles();
+ } else if (event.kbd.keycode == Common::KEYCODE_v) {
+ dumpAllVgaScriptFiles();
+ }
} else if (event.kbd.hasFlags(Common::KBD_CTRL)) {
if (event.kbd.keycode == Common::KEYCODE_a) {
GUI::Dialog *_aboutDialog;
@@ -477,10 +485,6 @@ void AGOSEngine::delay(uint amount) {
_fastMode = !_fastMode;
} else if (event.kbd.keycode == Common::KEYCODE_d) {
_debugger->attach();
- } else if (event.kbd.keycode == Common::KEYCODE_s) {
- dumpAllSubroutines();
- } else if (event.kbd.keycode == Common::KEYCODE_i) {
- dumpAllVgaImageFiles();
}
}
@@ -520,6 +524,12 @@ void AGOSEngine::delay(uint amount) {
case Common::EVENT_RTL:
case Common::EVENT_QUIT:
return;
+ case Common::EVENT_WHEELUP:
+ handleMouseWheelUp();
+ break;
+ case Common::EVENT_WHEELDOWN:
+ handleMouseWheelDown();
+ break;
default:
break;
}
diff --git a/engines/agos/feeble.cpp b/engines/agos/feeble.cpp
index a96caa9f8b..bfd11fa8ea 100644
--- a/engines/agos/feeble.cpp
+++ b/engines/agos/feeble.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 266fcc9796..6e97084811 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index 5647fece7e..2db2a52cbc 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index 24e5339420..8a4e87017a 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -416,6 +416,115 @@ void AGOSEngine::hitarea_stuff_helper_2() {
_runScriptReturn1 = false;
}
+#ifdef ENABLE_AGOS2
+void AGOSEngine_Feeble::handleMouseWheelUp() {
+ if (getGameType() == GType_PP || !(getBitFlag(99)))
+ return;
+
+ if (_mouse.x >= 128 && _mouse.x <= 515 && _mouse.y >= 102 && _mouse.y <= 206) {
+ oracleTextDown();
+ } else if (_mouse.x >= 172 && _mouse.x <= 469 && _mouse.y >= 287 && _mouse.y <= 382) {
+ HitArea *ha = findBox(0x7FFB);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ if (!isSpriteLoaded(21, 9) && !isSpriteLoaded(23, 9))
+ inventoryUp(ha->window);
+ }
+ }
+}
+
+void AGOSEngine_Feeble::handleMouseWheelDown() {
+ if (getGameType() == GType_PP || !(getBitFlag(99)))
+ return;
+
+ if (_mouse.x >= 128 && _mouse.x <= 515 && _mouse.y >= 102 && _mouse.y <= 206) {
+ oracleTextUp();
+ } else if (_mouse.x >= 172 && _mouse.x <= 469 && _mouse.y >= 287 && _mouse.y <= 382) {
+ HitArea *ha = findBox(0x7FFC);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ if (!isSpriteLoaded(21, 9) && !isSpriteLoaded(23, 9))
+ inventoryDown(ha->window);
+ }
+ }
+}
+#endif
+
+void AGOSEngine_Simon1::handleMouseWheelUp() {
+ HitArea *ha = findBox(206);
+ if (ha != NULL && (ha->flags & kBFBoxInUse) && !(ha->flags & kBFBoxDead)) {
+ if (_saveLoadRowCurPos != 1) {
+ if (_saveLoadRowCurPos < 7)
+ _saveLoadRowCurPos = 1;
+ else
+ _saveLoadRowCurPos -= 1;
+
+ _saveLoadEdit = false;
+ listSaveGames();
+ }
+ } else {
+ AGOSEngine::handleMouseWheelUp();
+ }
+}
+
+void AGOSEngine_Simon1::handleMouseWheelDown() {
+ HitArea *ha = findBox(207);
+ if (ha != NULL && (ha->flags & kBFBoxInUse) && !(ha->flags & kBFBoxDead)) {
+ if (_saveDialogFlag) {
+ _saveLoadRowCurPos += 1;
+ if (_saveLoadRowCurPos >= _numSaveGameRows)
+ _saveLoadRowCurPos = _numSaveGameRows;
+
+ _saveLoadEdit = false;
+ listSaveGames();
+ }
+ } else {
+ AGOSEngine::handleMouseWheelDown();
+ }
+}
+
+void AGOSEngine_Elvira2::handleMouseWheelUp() {
+ HitArea *ha = findBox(224);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ _saveGameNameLen = 0;
+
+ if (_saveLoadRowCurPos < 3)
+ _saveLoadRowCurPos = 1;
+ else
+ _saveLoadRowCurPos -= 3;
+
+ listSaveGames();
+ } else {
+ AGOSEngine::handleMouseWheelUp();
+ }
+}
+
+void AGOSEngine_Elvira2::handleMouseWheelDown() {
+ HitArea *ha = findBox(224);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ _saveGameNameLen = 0;
+ _saveLoadRowCurPos += 3;
+ if (_saveLoadRowCurPos >= _numSaveGameRows)
+ _saveLoadRowCurPos = 1;
+
+ listSaveGames();
+ } else {
+ AGOSEngine::handleMouseWheelDown();
+ }
+}
+
+void AGOSEngine::handleMouseWheelUp() {
+ HitArea *ha = findBox(0x7FFB);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ inventoryUp(ha->window);
+ }
+}
+
+void AGOSEngine::handleMouseWheelDown() {
+ HitArea *ha = findBox(0x7FFC);
+ if (ha != NULL && (ha->flags & kBFBoxInUse)) {
+ inventoryDown(ha->window);
+ }
+}
+
void AGOSEngine::permitInput() {
if (_mortalFlag)
return;
diff --git a/engines/agos/input_pn.cpp b/engines/agos/input_pn.cpp
index b3a44f2b2f..a852ef320b 100644
--- a/engines/agos/input_pn.cpp
+++ b/engines/agos/input_pn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/intern.h b/engines/agos/intern.h
index 773b9c15bd..3f5c8c519b 100644
--- a/engines/agos/intern.h
+++ b/engines/agos/intern.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -246,16 +246,17 @@ enum SubObjectFlags {
};
enum GameFeatures {
- GF_TALKIE = 1 << 0,
- GF_OLD_BUNDLE = 1 << 1,
- GF_CRUNCHED = 1 << 2,
- GF_CRUNCHED_GAMEPC = 1 << 3,
- GF_ZLIBCOMP = 1 << 4,
- GF_32COLOR = 1 << 5,
- GF_EGA = 1 << 6,
- GF_PLANAR = 1 << 7,
- GF_DEMO = 1 << 8,
- GF_PACKED = 1 << 9
+ GF_TALKIE = 1 << 0,
+ GF_OLD_BUNDLE = 1 << 1,
+ GF_CRUNCHED = 1 << 2,
+ GF_CRUNCHED_GAMEPC = 1 << 3,
+ GF_ZLIBCOMP = 1 << 4,
+ GF_32COLOR = 1 << 5,
+ GF_EGA = 1 << 6,
+ GF_PLANAR = 1 << 7,
+ GF_DEMO = 1 << 8,
+ GF_PACKED = 1 << 9,
+ GF_BROKEN_FF_RATING = 1 << 10
};
enum GameFileTypes {
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 3bb5a132ef..86abe403b4 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp
index 85c50e421b..77a37cb601 100644
--- a/engines/agos/menus.cpp
+++ b/engines/agos/menus.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index b3ade91107..392ee08ea1 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -235,6 +235,10 @@ void MidiPlayer::startTrack(int track) {
_music.parser = parser; // That plugs the power cord into the wall
} else if (_music.parser) {
if (!_music.parser->setTrack(track)) {
+ // The Roland MT32 music in Simon the Sorcerer 2
+ // is missing the extra tracks in many scenes,
+ // like the introduction sequence.
+ stop();
return;
}
_currentTrack = (byte)track;
diff --git a/engines/agos/midi.h b/engines/agos/midi.h
index 635e091906..3efadddc2f 100644
--- a/engines/agos/midi.h
+++ b/engines/agos/midi.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp
index bef7199a98..c2c08bf451 100644
--- a/engines/agos/midiparser_s1d.cpp
+++ b/engines/agos/midiparser_s1d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/oracle.cpp b/engines/agos/oracle.cpp
index 025a833b77..122f800e78 100644
--- a/engines/agos/oracle.cpp
+++ b/engines/agos/oracle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -180,7 +180,7 @@ void AGOSEngine_Feeble::oracleTextUp() {
if (_textWindow->scrollY > _oracleMaxScrollY) // For scroll up
_oracleMaxScrollY = _textWindow->scrollY;
- while (1) {
+ while (!shouldQuit()) {
if (_textWindow->scrollY == _oracleMaxScrollY)
break;
_textWindow->textRow = 105;
@@ -214,7 +214,7 @@ void AGOSEngine_Feeble::oracleTextDown() {
if (_textWindow->scrollY > _oracleMaxScrollY) // For scroll up
_oracleMaxScrollY = _textWindow->scrollY;
- while (1) {
+ while (!shouldQuit()) {
if (_textWindow->scrollY == 0)
break;
diff --git a/engines/agos/pn.cpp b/engines/agos/pn.cpp
index 667a5c3fc8..d94f180b00 100644
--- a/engines/agos/pn.cpp
+++ b/engines/agos/pn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 1c79a073e8..2631f7998e 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -802,7 +802,6 @@ void AGOSEngine::loadVGABeardFile(uint16 id) {
}
} else {
offs = _gameOffsetsPtr[id];
-
size = _gameOffsetsPtr[id + 1] - offs;
readGameFile(_vgaBufferPointers[11].vgaFile2, offs, size);
}
@@ -817,9 +816,9 @@ void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) {
if ((getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) &&
id == 2 && type == 2) {
- // WORKAROUND: For the exta long strings in foreign languages
+ // WORKAROUND: For the extra long strings in foreign languages
// Allocate more space for text to cope with foreign languages that use
- // up more space than english. I hope 6400 bytes are enough. This number
+ // up more space than English. I hope 6400 bytes are enough. This number
// is base on: 2 (lines) * 320 (screen width) * 10 (textheight) -- olki
extraBuffer += 6400;
}
@@ -911,8 +910,16 @@ void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) {
} else {
id = id * 2 + (type - 1);
offs = _gameOffsetsPtr[id];
-
dstSize = _gameOffsetsPtr[id + 1] - offs;
+
+ if (!dstSize) {
+ if (useError)
+ error("loadVGAVideoFile: Can't load id %d type %d", id, type);
+
+ _block = _blockEnd = NULL;
+ return;
+ }
+
dst = allocBlock(dstSize + extraBuffer);
readGameFile(dst, offs, dstSize);
}
diff --git a/engines/agos/res_ami.cpp b/engines/agos/res_ami.cpp
index 32adfa29e6..4b3d575142 100644
--- a/engines/agos/res_ami.cpp
+++ b/engines/agos/res_ami.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index 86d24e0b07..5d6ab60c8b 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp
index fb7b313e9c..6185653d42 100644
--- a/engines/agos/rooms.cpp
+++ b/engines/agos/rooms.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 8b133971de..5d5e2d7b03 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -37,9 +37,8 @@ namespace AGOS {
// FIXME: This code counts savegames, but callers in many cases assume
// that the return value + 1 indicates an empty slot.
int AGOSEngine::countSaveGames() {
- Common::InSaveFile *f = NULL;
Common::StringArray filenames;
- uint i = 1;
+ uint s, numSaveGames = 1;
int slotNum;
bool marks[256];
@@ -60,18 +59,13 @@ int AGOSEngine::countSaveGames() {
marks[slotNum] = true; //mark this slot as valid
}
- // FIXME: Why does this already try to actually open the savegames?
- // Historical accident?
- while (i < 256) {
- if (marks[i] &&
- (f = _saveFileMan->openForLoading(genSaveName(i)))) {
- i++;
- delete f;
- } else
- break;
+ // locate first empty slot
+ for (s = 1; s < 256; s++) {
+ if (marks[s])
+ numSaveGames++;
}
- return i;
+ return numSaveGames;
}
#ifdef ENABLE_AGOS2
@@ -296,7 +290,7 @@ void AGOSEngine::userGame(bool load) {
const char *message1;
int i = 0, numSaveGames;
char *name;
- char buf[10];
+ memset(_saveBuf, 0, sizeof(_saveBuf));
numSaveGames = countSaveGames();
@@ -325,8 +319,8 @@ restart:
for (; *message1; message1++)
windowPutChar(window, *message1);
- memset(buf, 0, 10);
- name = buf;
+ memset(_saveBuf, 0, 10);
+ name = _saveBuf;
_saveGameNameLen = 0;
while (!shouldQuit()) {
@@ -384,9 +378,10 @@ restart:
_gameStoppedClock = getTime() - saveTime + _gameStoppedClock;
}
-void AGOSEngine_Elvira2::listSaveGames(char *dst) {
+void AGOSEngine_Elvira2::listSaveGames() {
Common::InSaveFile *in;
uint y, slot;
+ char *dst = _saveBuf;
const uint8 num = (getGameType() == GType_WW) ? 3 : 4;
@@ -469,7 +464,7 @@ void AGOSEngine_Elvira2::userGame(bool load) {
int i, numSaveGames;
char *name;
bool b;
- char buf[200];
+ memset(_saveBuf, 0, sizeof(_saveBuf));
_saveOrLoad = load;
@@ -485,28 +480,28 @@ void AGOSEngine_Elvira2::userGame(bool load) {
const uint8 num = (getGameType() == GType_WW) ? 3 : 4;
- listSaveGames(buf);
+ listSaveGames();
if (!load) {
WindowBlock *window = _windowArray[num];
int16 slot = -1;
- name = buf + 192;
+ name = _saveBuf + 192;
while (!shouldQuit()) {
windowPutChar(window, 128);
_saveLoadEdit = true;
- i = userGameGetKey(&b, buf, 128);
+ i = userGameGetKey(&b, 128);
if (b) {
if (i <= 223) {
if (!confirmOverWrite(window)) {
- listSaveGames(buf);
+ listSaveGames();
continue;
}
- if (!saveGame(_saveLoadRowCurPos + i, buf + i * 8))
+ if (!saveGame(_saveLoadRowCurPos + i, _saveBuf + i * 8))
fileError(_windowArray[num], true);
}
@@ -518,7 +513,7 @@ void AGOSEngine_Elvira2::userGame(bool load) {
slot = matchSaveGame(name, numSaveGames);
if (slot >= 0) {
if (!confirmOverWrite(window)) {
- listSaveGames(buf);
+ listSaveGames();
continue;
}
}
@@ -540,11 +535,11 @@ void AGOSEngine_Elvira2::userGame(bool load) {
if (slot < 0)
slot = numSaveGames;
- if (!saveGame(slot, buf + 192))
+ if (!saveGame(slot, _saveBuf + 192))
fileError(_windowArray[num], true);
}
} else {
- i = userGameGetKey(&b, buf, 128);
+ i = userGameGetKey(&b, 128);
if (i != 225) {
if (!loadGame(genSaveName(_saveLoadRowCurPos + i)))
fileError(_windowArray[num], false);
@@ -560,7 +555,7 @@ get_out:;
restartAnimation();
}
-int AGOSEngine_Elvira2::userGameGetKey(bool *b, char *buf, uint maxChar) {
+int AGOSEngine_Elvira2::userGameGetKey(bool *b, uint maxChar) {
HitArea *ha;
*b = true;
@@ -588,7 +583,7 @@ int AGOSEngine_Elvira2::userGameGetKey(bool *b, char *buf, uint maxChar) {
if (_saveLoadRowCurPos >= _numSaveGameRows)
_saveLoadRowCurPos = 1;
- listSaveGames(buf);
+ listSaveGames();
} else if (ha->id < 224) {
return ha->id - 200;
}
@@ -597,9 +592,10 @@ int AGOSEngine_Elvira2::userGameGetKey(bool *b, char *buf, uint maxChar) {
return 225;
}
-void AGOSEngine_Simon1::listSaveGames(char *dst) {
+void AGOSEngine_Simon1::listSaveGames() {
Common::InSaveFile *in;
uint16 i, slot, lastSlot;
+ char *dst = _saveBuf;
disableFileBoxes();
@@ -681,7 +677,7 @@ void AGOSEngine_Simon1::userGame(bool load) {
WindowBlock *window;
char *name;
bool b;
- char buf[108];
+ memset(_saveBuf, 0, sizeof(_saveBuf));
int maxChar = (_language == Common::HE_ISR) ? 155: 128;
_saveOrLoad = load;
@@ -704,7 +700,7 @@ void AGOSEngine_Simon1::userGame(bool load) {
_saveLoadEdit = false;
restart:;
- i = userGameGetKey(&b, buf, maxChar);
+ i = userGameGetKey(&b, maxChar);
if (i == 205)
goto get_out;
@@ -730,7 +726,7 @@ restart:;
}
window->textLength = 3;
- name = buf + i * 18;
+ name = _saveBuf + i * 18;
// now process entire savegame name to get correct x offset for cursor
_saveGameNameLen = 0;
@@ -763,7 +759,7 @@ restart:;
_saveLoadEdit = true;
- i = userGameGetKey(&b, buf, maxChar);
+ i = userGameGetKey(&b, maxChar);
if (b) {
if (i == 205)
@@ -814,7 +810,7 @@ restart:;
}
}
- if (!saveGame(_saveLoadRowCurPos + result, buf + result * 18))
+ if (!saveGame(_saveLoadRowCurPos + result, _saveBuf + result * 18))
fileError(_windowArray[5], true);
} else {
if (!loadGame(genSaveName(_saveLoadRowCurPos + i)))
@@ -827,12 +823,12 @@ get_out:;
_gameStoppedClock = getTime() - saveTime + _gameStoppedClock;
}
-int AGOSEngine_Simon1::userGameGetKey(bool *b, char *buf, uint maxChar) {
+int AGOSEngine_Simon1::userGameGetKey(bool *b, uint maxChar) {
HitArea *ha;
*b = true;
if (!_saveLoadEdit) {
- listSaveGames(buf);
+ listSaveGames();
}
_keyPressed.reset();
@@ -861,7 +857,7 @@ int AGOSEngine_Simon1::userGameGetKey(bool *b, char *buf, uint maxChar) {
_saveLoadRowCurPos -= 6;
_saveLoadEdit = false;
- listSaveGames(buf);
+ listSaveGames();
}
} else if (ha->id == 207) {
if (_saveDialogFlag) {
@@ -870,7 +866,7 @@ int AGOSEngine_Simon1::userGameGetKey(bool *b, char *buf, uint maxChar) {
_saveLoadRowCurPos = _numSaveGameRows;
_saveLoadEdit = false;
- listSaveGames(buf);
+ listSaveGames();
}
} else if (ha->id < 214) {
return ha->id - 208;
diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp
index 1c36454278..6f809d9e2d 100644
--- a/engines/agos/script.cpp
+++ b/engines/agos/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -264,7 +264,7 @@ void AGOSEngine::o_add() {
uint var = getVarWrapper();
writeVariable(var, readVariable(var) + getVarOrWord());
- // WORKAROUND: The converation of the male in Vid-Phone Booth at Dave's Space Bar
+ // WORKAROUND: The conversation of the male in Vid-Phone Booth at Dave's Space Bar
// is based on variable 116, but stops due to a missing option (37).
if (getGameType() == GType_FF && _currentTable->id == 10538 && readVariable(116) == 37)
writeVariable(116, 38);
diff --git a/engines/agos/script_dp.cpp b/engines/agos/script_dp.cpp
index f51e15dc67..85ab308226 100644
--- a/engines/agos/script_dp.cpp
+++ b/engines/agos/script_dp.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_e1.cpp b/engines/agos/script_e1.cpp
index c7a2f5b0a2..a022335ebc 100644
--- a/engines/agos/script_e1.cpp
+++ b/engines/agos/script_e1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp
index 79a7e89a89..21b651ec12 100644
--- a/engines/agos/script_e2.cpp
+++ b/engines/agos/script_e2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index e2a4d0820f..e4fadcf360 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -243,7 +243,7 @@ void AGOSEngine_Feeble::setupOpcodes() {
/* 164 */
OPCODE(oe2_getDollar2),
OPCODE(off_isAdjNoun),
- OPCODE(oe2_b2Set),
+ OPCODE(off_b2Set),
OPCODE(oe2_b2Clear),
/* 168 */
OPCODE(oe2_b2Zero),
@@ -296,6 +296,39 @@ void AGOSEngine_Feeble::executeOpcode(int opcode) {
(this->*op) ();
}
+void AGOSEngine_Feeble::setLoyaltyRating(byte rating) {
+ // WORKAROUND: The 4CD version of The Feeble File is missing the parts
+ // of the script that set the loyalty rating. This approximates the
+ // script from the 2CD version. See bug #6525.
+
+ switch (rating) {
+ case 1:
+ // Kicking vending machine: Possibility of Undesirable Character Flaws
+ writeVariable(120, 1);
+ break;
+ case 2:
+ // Confessing: Confirmed Minor Character Flaws
+ writeVariable(120, 2);
+ break;
+ case 3:
+ // Being sent to Cygnus Alpha: Suspected Subversive Activity
+ writeVariable(120, 3);
+ break;
+ case 4:
+ // Escaping from Cygnus Alpha: Confirmed Subversive Activity
+ writeVariable(120, 4);
+ break;
+ case 5:
+ // Being brought before Filbert: Confirmed Treasonous Activity
+ writeVariable(120, 5);
+ break;
+ case 6:
+ // Arriving at rebel base: Freedom Fighters Operative
+ writeVariable(120, 6);
+ break;
+ }
+}
+
// -----------------------------------------------------------------------
// Feeble Files Opcodes
// -----------------------------------------------------------------------
@@ -467,6 +500,34 @@ void AGOSEngine_Feeble::off_isAdjNoun() {
setScriptCondition(false);
}
+void AGOSEngine_Feeble::off_b2Set() {
+ // 166: set bit2
+ uint bit = getVarOrByte();
+ _bitArrayTwo[bit / 16] |= (1 << (bit & 15));
+
+ if (getFeatures() & GF_BROKEN_FF_RATING) {
+ switch (bit) {
+ case 152:
+ setLoyaltyRating(1);
+ break;
+ case 153:
+ setLoyaltyRating(2);
+ break;
+ case 240:
+ setLoyaltyRating(3);
+ break;
+ case 251:
+ setLoyaltyRating(4);
+ break;
+ case 253:
+ setLoyaltyRating(6);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
void AGOSEngine_Feeble::off_hyperLinkOn() {
// 171: oracle hyperlink on
hyperLinkOn(getVarOrWord());
@@ -565,6 +626,12 @@ void AGOSEngine_Feeble::off_loadVideo() {
assert(_moviePlayer);
_moviePlayer->load();
+
+ if (getFeatures() & GF_BROKEN_FF_RATING) {
+ if (strcmp((const char *)filename, "Statue1.smk") == 0) {
+ setLoyaltyRating(5);
+ }
+ }
}
void AGOSEngine_Feeble::off_playVideo() {
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index e98cd2795a..60948db35a 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_pp.cpp b/engines/agos/script_pp.cpp
index 0a599506b5..799b26fbc6 100644
--- a/engines/agos/script_pp.cpp
+++ b/engines/agos/script_pp.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp
index 03aad7ebb9..ec3de9bf94 100644
--- a/engines/agos/script_s1.cpp
+++ b/engines/agos/script_s1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp
index c35771f8ec..44552ecd8a 100644
--- a/engines/agos/script_s2.cpp
+++ b/engines/agos/script_s2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/script_ww.cpp b/engines/agos/script_ww.cpp
index 873f258743..aff3229f8e 100644
--- a/engines/agos/script_ww.cpp
+++ b/engines/agos/script_ww.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index a6a731ab24..812f46504f 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -121,8 +121,14 @@ Common::SeekableReadStream *BaseSound::getSoundStream(uint sound) const {
int i = 1;
while (_offsets[sound + i] == _offsets[sound])
i++;
+ uint end;
+ if (_offsets[sound + i] > _offsets[sound]) {
+ end = _offsets[sound + i];
+ } else {
+ end = file->size();
+ }
- return new Common::SeekableSubReadStream(file, _offsets[sound], _offsets[sound + i], DisposeAfterUse::YES);
+ return new Common::SeekableSubReadStream(file, _offsets[sound], end, DisposeAfterUse::YES);
}
///////////////////////////////////////////////////////////////////////////////
@@ -190,7 +196,7 @@ bool LoopingAudioStream::endOfData() const {
#pragma mark -
static void convertVolume(int &vol) {
- // DirectSound was orginally used, which specifies volume
+ // DirectSound was originally used, which specifies volume
// and panning differently than ScummVM does, using a logarithmic scale
// rather than a linear one.
//
@@ -442,12 +448,16 @@ void Sound::loadVoiceFile(const GameSpecificSettings *gss) {
if (file.open("voices.idx")) {
int end = file.size();
_filenums = (uint16 *)malloc((end / 6 + 1) * 2);
- _offsets = (uint32 *)malloc((end / 6 + 1) * 4);
+ _offsets = (uint32 *)malloc((end / 6 + 1 + 1) * 4);
for (int i = 1; i <= end / 6; i++) {
_filenums[i] = file.readUint16BE();
_offsets[i] = file.readUint32BE();
}
+ // We need to add a terminator entry otherwise we get an out of
+ // bounds read when the offset table is accessed in
+ // BaseSound::getSoundStream.
+ _offsets[end / 6 + 1] = 0;
_hasVoiceFile = true;
return;
diff --git a/engines/agos/sound.h b/engines/agos/sound.h
index 8633fe2f70..5feb288b9d 100644
--- a/engines/agos/sound.h
+++ b/engines/agos/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index ee1b9df246..3eb0aca04d 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/string_pn.cpp b/engines/agos/string_pn.cpp
index 4d4e2be16a..7a364f3ea9 100644
--- a/engines/agos/string_pn.cpp
+++ b/engines/agos/string_pn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index 7a84a20808..39bc468dea 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index f5b57a01c8..fb3878381f 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -216,7 +216,14 @@ void AGOSEngine_Simon2::clearName() {
return;
}
- AGOSEngine_Simon1::clearName();
+ if (_currentVerbBox == _lastVerbOn)
+ return;
+
+ resetNameWindow();
+ _lastVerbOn = _currentVerbBox;
+
+ if (_currentVerbBox != NULL && !(_currentVerbBox->flags & kBFBoxDead))
+ printVerbOf(_currentVerbBox->id);
}
void AGOSEngine_Simon1::clearName() {
@@ -242,12 +249,18 @@ void AGOSEngine::clearName() {
resetNameWindow();
}
+static const byte convertVerbID[9] = {
+ 0, 1, 5, 11, 8, 7, 10, 3, 2
+};
+
void AGOSEngine::printVerbOf(uint hitarea_id) {
const char *txt;
const char * const *verb_names;
const char * const *verb_prep_names;
hitarea_id -= 101;
+ if (getGameType() == GType_SIMON2)
+ hitarea_id = convertVerbID[hitarea_id];
if (_showPreposition) {
switch (_language) {
diff --git a/engines/agos/verb_pn.cpp b/engines/agos/verb_pn.cpp
index 9dd0079b6d..53025822ba 100644
--- a/engines/agos/verb_pn.cpp
+++ b/engines/agos/verb_pn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index cc5ede5f2c..c656c0167a 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga.h b/engines/agos/vga.h
index 5a5764532e..30b3a3b77a 100644
--- a/engines/agos/vga.h
+++ b/engines/agos/vga.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp
index 4eb337c687..bc26058640 100644
--- a/engines/agos/vga_e2.cpp
+++ b/engines/agos/vga_e2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp
index c8c9673506..52e30699b0 100644
--- a/engines/agos/vga_ff.cpp
+++ b/engines/agos/vga_ff.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp
index b7f80ebf91..306c41c71c 100644
--- a/engines/agos/vga_pn.cpp
+++ b/engines/agos/vga_pn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index ef05063fc1..c5f0f7874d 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga_s2.cpp b/engines/agos/vga_s2.cpp
index e0780b491a..0c716d06c4 100644
--- a/engines/agos/vga_s2.cpp
+++ b/engines/agos/vga_s2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index ca93fa9fec..5bf8f84551 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp
index 892df92554..de0b768d02 100644
--- a/engines/agos/window.cpp
+++ b/engines/agos/window.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp
index 483b9949eb..1644213579 100644
--- a/engines/agos/zones.cpp
+++ b/engines/agos/zones.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -76,7 +76,7 @@ void AGOSEngine::loadZone(uint16 zoneNum, bool useError) {
return;
}
- // Loading order is important due to resource managment
+ // Loading order is important due to resource management
if (getPlatform() == Common::kPlatformAmiga && getGameType() == GType_WW &&
zoneTable[zoneNum] == 3) {
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 639abe99b3..451b4a1c68 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -764,7 +764,7 @@ void Animation::catacombMove(byte ped) {
spr1->init(5, true); // ...Load Geida.
appearPed(1, geidaPed(ped));
spr1->_callEachStepFl = true;
- spr1->_eachStepProc = kProcGeida;
+ spr1->_eachStepProc = kProcFollowAvvy;
}
}
@@ -815,10 +815,9 @@ void Animation::callSpecial(uint16 which) {
}
break;
case 4: // This is the ghost room link.
- _vm->fadeOut();
- _sprites[0]->turn(kDirRight); // you'll see this after we get back from bootstrap
+ _sprites[0]->turn(kDirRight); // You'll see this after we get back.
_vm->_timer->addTimer(1, Timer::kProcGhostRoomPhew, Timer::kReasonGhostRoomPhew);
- //_vm->_enid->backToBootstrap(3); TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then!
+ _vm->_ghostroom->run();
break;
case 5:
if (_vm->_friarWillTieYouUp) {
@@ -1122,7 +1121,7 @@ void Animation::spin(Direction dir, byte &tripnum) {
}
}
-void Animation::geidaProcs(byte tripnum) {
+void Animation::follow(byte tripnum) {
AnimationType *tripSpr = _sprites[tripnum];
AnimationType *avvy = _sprites[0];
@@ -1133,14 +1132,14 @@ void Animation::geidaProcs(byte tripnum) {
}
if (tripSpr->_y < (avvy->_y - 2)) {
- // Geida is further from the screen than Avvy.
+ // The following NPC is further from the screen than Avvy.
spin(kDirDown, tripnum);
tripSpr->_moveY = 1;
tripSpr->_moveX = 0;
takeAStep(tripnum);
return;
} else if (tripSpr->_y > (avvy->_y + 2)) {
- // Avvy is further from the screen than Geida.
+ // Avvy is further from the screen than the following NPC.
spin(kDirUp, tripnum);
tripSpr->_moveY = -1;
tripSpr->_moveX = 0;
@@ -1206,8 +1205,9 @@ void Animation::drawSprites() {
* @remarks Originally called 'trippancy_link'
*/
void Animation::animLink() {
- if (_vm->_menu->isActive() || _vm->_seeScroll)
+ if (_vm->_dropdown->isActive() || !_vm->_animationsEnabled)
return;
+
for (int16 i = 0; i < kSpriteNumbMax; i++) {
AnimationType *curSpr = _sprites[i];
if (curSpr->_quick && curSpr->_visible)
@@ -1236,8 +1236,8 @@ void Animation::animLink() {
case kProcGrabAvvy :
grabAvvy(i);
break;
- case kProcGeida :
- geidaProcs(i);
+ case kProcFollowAvvy :
+ follow(i);
break;
default:
break;
@@ -1330,7 +1330,7 @@ void Animation::handleMoveKey(const Common::Event &event) {
if (!_vm->_userMovesAvvy)
return;
- if (_vm->_menu->_activeMenuItem._activeNow)
+ if (_vm->_dropdown->_activeMenuItem._activeNow)
_vm->_parser->tryDropdown();
else {
switch (event.kbd.keycode) {
diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h
index aa4e6482a4..d1ee4a3ebd 100644
--- a/engines/avalanche/animation.h
+++ b/engines/avalanche/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -102,9 +102,8 @@ public:
kProcBackAndForth,
kProcFaceAvvy,
kProcArrow,
- kProcSpludwick, // Unused
kProcGrabAvvy,
- kProcGeida // Spludwick uses it as well for homing! TODO: Unify it with kProcSpludwick.
+ kProcFollowAvvy
};
AnimationType *_sprites[kSpriteNumbMax];
@@ -167,7 +166,7 @@ private:
// Movements for Homing NPCs: Spludwick and Geida.
void spin(Direction dir, byte &tripnum);
void takeAStep(byte &tripnum);
- void geidaProcs(byte tripnum);
+ void follow(byte tripnum);
void drawSprites();
};
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index a7e7be0ad3..6cfe4dfdb6 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -46,16 +46,18 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription *
_clock = nullptr;
_graphics = nullptr;
_parser = nullptr;
- _pingo = nullptr;
_dialogs = nullptr;
_background = nullptr;
_sequence = nullptr;
_timer = nullptr;
_animation = nullptr;
- _menu = nullptr;
+ _dropdown = nullptr;
_closing = nullptr;
_sound = nullptr;
_nim = nullptr;
+ _ghostroom = nullptr;
+ _help = nullptr;
+ _highscore = nullptr;
_platform = gd->desc.platform;
initVariables();
@@ -69,16 +71,18 @@ AvalancheEngine::~AvalancheEngine() {
delete _parser;
delete _clock;
- delete _pingo;
delete _dialogs;
delete _background;
delete _sequence;
delete _timer;
delete _animation;
- delete _menu;
+ delete _dropdown;
delete _closing;
delete _sound;
delete _nim;
+ delete _ghostroom;
+ delete _help;
+ delete _highscore;
for (int i = 0; i < 31; i++) {
for (int j = 0; j < 2; j++) {
@@ -140,7 +144,7 @@ void AvalancheEngine::initVariables() {
_letMeOut = false;
_thinks = 2;
_thinkThing = true;
- _seeScroll = false;
+ _animationsEnabled = true;
_currentMouse = 177;
_holdLeftMouse = false;
@@ -152,16 +156,18 @@ Common::ErrorCode AvalancheEngine::initialize() {
_parser = new Parser(this);
_clock = new Clock(this);
- _pingo = new Pingo(this);
_dialogs = new Dialogs(this);
_background = new Background(this);
_sequence = new Sequence(this);
_timer = new Timer(this);
_animation = new Animation(this);
- _menu = new Menu(this);
+ _dropdown = new DropDownMenu(this);
_closing = new Closing(this);
_sound = new SoundHandler(this);
_nim = new Nim(this);
+ _ghostroom = new GhostRoom(this);
+ _help = new Help(this);
+ _highscore = new HighScore(this);
_graphics->init();
_dialogs->init();
@@ -197,7 +203,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
sz.syncAsByte(_carryNum);
for (int i = 0; i < kObjectNum; i++)
sz.syncAsByte(_objects[i]);
- sz.syncAsSint16LE(_dnascore);
+ sz.syncAsSint16LE(_score);
sz.syncAsSint32LE(_money);
sz.syncAsByte(_room);
if (sz.isSaving())
@@ -273,9 +279,9 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
if (!_favoriteSong.empty())
_favoriteSong.clear();
- uint16 favourite_songSize = 0;
- sz.syncAsUint16LE(favourite_songSize);
- for (uint16 i = 0; i < favourite_songSize; i++) {
+ uint16 favoriteSongSize = 0;
+ sz.syncAsUint16LE(favoriteSongSize);
+ for (uint16 i = 0; i < favoriteSongSize; i++) {
sz.syncAsByte(actChr);
_favoriteSong += actChr;
}
@@ -333,8 +339,8 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
}
-bool AvalancheEngine::canSaveGameStateCurrently() { // TODO: Refine these!!!
- return (!_seeScroll && _alive);
+bool AvalancheEngine::canSaveGameStateCurrently() {
+ return (_animationsEnabled && _alive);
}
Common::Error AvalancheEngine::saveGameState(int slot, const Common::String &desc) {
@@ -378,8 +384,8 @@ Common::String AvalancheEngine::getSaveFileName(const int slot) {
return Common::String::format("%s.%03d", _targetName.c_str(), slot);
}
-bool AvalancheEngine::canLoadGameStateCurrently() { // TODO: Refine these!!!
- return (!_seeScroll);
+bool AvalancheEngine::canLoadGameStateCurrently() {
+ return (_animationsEnabled);
}
Common::Error AvalancheEngine::loadGameState(int slot) {
@@ -429,7 +435,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_isLoaded = true;
- _seeScroll = true; // This prevents display of the new sprites before the new picture is loaded.
+ _animationsEnabled = false;
if (_holdTheDawn) {
_holdTheDawn = false;
@@ -438,7 +444,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_background->release();
minorRedraw();
- _menu->setup();
+ _dropdown->setup();
setRoom(kPeopleAvalot, _room);
_alive = true;
refreshObjectList();
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index fe13fa8d9e..6eb5e675cc 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -32,17 +32,21 @@
#include "avalanche/graphics.h"
#include "avalanche/parser.h"
#include "avalanche/avalot.h"
-#include "avalanche/pingo.h"
#include "avalanche/dialogs.h"
#include "avalanche/background.h"
#include "avalanche/sequence.h"
#include "avalanche/timer.h"
#include "avalanche/animation.h"
-#include "avalanche/menu.h"
+#include "avalanche/dropdown.h"
#include "avalanche/closing.h"
#include "avalanche/sound.h"
#include "avalanche/nim.h"
#include "avalanche/clock.h"
+#include "avalanche/ghostroom.h"
+#include "avalanche/help.h"
+#include "avalanche/shootemup.h"
+#include "avalanche/mainmenu.h"
+#include "avalanche/highscore.h"
#include "common/serializer.h"
@@ -77,16 +81,18 @@ public:
Clock *_clock;
GraphicManager *_graphics;
Parser *_parser;
- Pingo *_pingo;
Dialogs *_dialogs;
Background *_background;
Sequence *_sequence;
Timer *_timer;
Animation *_animation;
- Menu *_menu;
+ DropDownMenu *_dropdown;
Closing *_closing;
SoundHandler *_sound;
Nim *_nim;
+ GhostRoom *_ghostroom;
+ Help *_help;
+ HighScore *_highscore;
OSystem *_system;
@@ -146,7 +152,7 @@ public:
// Former DNA structure
byte _carryNum; // How many objects you're carrying...
bool _objects[kObjectNum]; // ...and which ones they are.
- int16 _dnascore; // your score, of course
+ int16 _score; // your score, of course
int32 _money; // your current amount of dosh
Room _room; // your current room
bool _wonNim; // Have you *won* Nim? (That's harder.)
@@ -206,7 +212,7 @@ public:
bool _letMeOut;
byte _thinks;
bool _thinkThing;
- bool _seeScroll; // TODO: maybe this means we're interacting with the toolbar / a scroll?
+ bool _animationsEnabled; // If set to TRUE, it stops the animation system working. This prevents display of the new sprites before the new picture is loaded or during the display of a scroll. Original name: seescroll.
char _objectList[10];
// Called .free() for them in ~Gyro().
@@ -232,6 +238,7 @@ public:
bool _isLoaded; // Is it a loaded gamestate?
void callVerb(VerbCode id);
+ void loadBackground(byte num);
void loadRoom(byte num);
void thinkAbout(byte object, bool type); // Hey!!! Get it and put it!!!
void incScore(byte num); // Add on no. of points
@@ -244,9 +251,9 @@ public:
void gameOver();
uint16 bearing(byte whichPed); // Returns the bearing from ped 'whichped' to Avvy, in degrees.
- // There are two kinds of redraw: Major and Minor. Minor is what happens when you load a game, etc. Major redraws EVERYTHING.
+ // There are two kinds of redraw: Major and Minor. Minor is what happens when you load a game, etc.
+ // Major was replaced with GraphicManager::refreshScreen(), it redraws EVERYTHING.
void minorRedraw();
- void majorRedraw();
void spriteRun();
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 6648e8d961..c8f5599687 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -190,7 +190,6 @@ void AvalancheEngine::setup() {
_animation->resetAnims();
- drawToolbar();
_dialogs->setReadyLight(2);
fadeIn();
@@ -199,7 +198,11 @@ void AvalancheEngine::setup() {
_animation->_sprites[0]->_speedX = kWalk;
_animation->updateSpeed();
- _menu->init();
+ _dropdown->init();
+
+ _graphics->drawSoundLight(_sound->_soundFl);
+
+ drawToolbar();
int16 loadSlot = ConfMan.instance().getInt("save_slot");
if (loadSlot >= 0) {
@@ -208,10 +211,15 @@ void AvalancheEngine::setup() {
loadGame(loadSlot);
} else {
+ // We don't need the MainMenu during the whole game, only at the beginning of it.
+ MainMenu *mainmenu = new MainMenu(this);
+ mainmenu->run();
+ delete mainmenu;
+ if (_letMeOut)
+ return;
+
newGame();
- _soundFx = !_soundFx;
- fxToggle();
thinkAbout(kObjectMoney, kThing);
_dialogs->displayScrollChain('Q', 83); // Info on the game, etc.
@@ -221,13 +229,13 @@ void AvalancheEngine::setup() {
void AvalancheEngine::runAvalot() {
setup();
- do {
+ while (!_letMeOut && !shouldQuit()) {
uint32 beginLoop = _system->getMillis();
updateEvents(); // The event handler.
_clock->update();
- _menu->update();
+ _dropdown->update();
_background->update();
_animation->animLink();
checkClick();
@@ -239,9 +247,7 @@ void AvalancheEngine::runAvalot() {
uint32 delay = _system->getMillis() - beginLoop;
if (delay <= 55)
_system->delayMillis(55 - delay); // Replaces slowdown(); 55 comes from 18.2 Hz (B Flight).
- } while (!_letMeOut && !shouldQuit());
-
- warning("STUB: run()");
+ };
_closing->exitGame();
}
@@ -408,9 +414,7 @@ void AvalancheEngine::loadAlso(byte num) {
}
}
-void AvalancheEngine::loadRoom(byte num) {
- CursorMan.showMouse(false);
-
+void AvalancheEngine::loadBackground(byte num) {
Common::String filename = Common::String::format("place%d.avd", num);
Common::File file;
if (!file.open(filename))
@@ -432,9 +436,15 @@ void AvalancheEngine::loadRoom(byte num) {
_graphics->refreshBackground();
file.close();
+}
+
+void AvalancheEngine::loadRoom(byte num) {
+ CursorMan.showMouse(false);
+ loadBackground(num);
loadAlso(num);
- _background->load(num);
+ _background->loadSprites(num);
+
CursorMan.showMouse(true);
}
@@ -452,7 +462,7 @@ void AvalancheEngine::findPeople(byte room) {
void AvalancheEngine::exitRoom(byte x) {
_sound->stopSound();
_background->release();
- _seeScroll = true; // This stops the trippancy system working over the length of this procedure.
+ _animationsEnabled = false;
switch (x) {
case kRoomSpludwicks:
@@ -475,7 +485,7 @@ void AvalancheEngine::exitRoom(byte x) {
}
_interrogation = 0; // Leaving the room cancels all the questions automatically.
- _seeScroll = false; // Now it can work again!
+ _animationsEnabled = true;
_lastRoom = _room;
if (_room != kRoomMap)
@@ -488,7 +498,7 @@ void AvalancheEngine::exitRoom(byte x) {
* @remarks Originally called 'new_town'
*/
void AvalancheEngine::enterNewTown() {
- _menu->setup();
+ _dropdown->setup();
switch (_room) {
case kRoomOutsideNottsPub: // Entry into Nottingham.
@@ -522,11 +532,11 @@ void AvalancheEngine::putGeidaAt(byte whichPed, byte ped) {
spr1->init(5, false); // load Geida
_animation->appearPed(1, whichPed);
spr1->_callEachStepFl = true;
- spr1->_eachStepProc = Animation::kProcGeida;
+ spr1->_eachStepProc = Animation::kProcFollowAvvy;
}
void AvalancheEngine::enterRoom(Room roomId, byte ped) {
- _seeScroll = true; // This stops the trippancy system working over the length of this procedure.
+ _animationsEnabled = false;
findPeople(roomId);
_room = roomId;
@@ -607,7 +617,7 @@ void AvalancheEngine::enterRoom(Room roomId, byte ped) {
}
spr1->_callEachStepFl = true;
- spr1->_eachStepProc = Animation::kProcGeida;
+ spr1->_eachStepProc = Animation::kProcFollowAvvy;
} else
_whereIs[kPeopleSpludwick - 150] = kRoomNowhere;
break;
@@ -910,7 +920,7 @@ void AvalancheEngine::enterRoom(Room roomId, byte ped) {
break;
}
- _seeScroll = false; // Now it can work again!
+ _animationsEnabled = true;
}
void AvalancheEngine::thinkAbout(byte object, bool type) {
@@ -945,7 +955,7 @@ void AvalancheEngine::drawToolbar() {
}
void AvalancheEngine::drawScore() {
- uint16 score = _dnascore;
+ uint16 score = _score;
int8 numbers[3] = {0, 0, 0};
for (int i = 0; i < 2; i++) {
byte divisor = 1;
@@ -971,15 +981,14 @@ void AvalancheEngine::drawScore() {
void AvalancheEngine::incScore(byte num) {
for (int i = 1; i <= num; i++) {
- _dnascore++;
+ _score++;
if (_soundFx) {
for (int j = 1; j <= 97; j++)
- // Length os 2 is a guess, the original doesn't have a delay specified
- _sound->playNote(177 + _dnascore * 3, 2);
+ // Length of 2 is a guess, the original doesn't have a delay specified
+ _sound->playNote(177 + _score * 3, 2);
}
}
- warning("STUB: points()");
drawScore();
}
@@ -1104,7 +1113,7 @@ void AvalancheEngine::checkClick() {
_graphics->loadMouse(kCurIBeam); //I-beam
else if ((340 <= cursorPos.y) && (cursorPos.y <= 399))
_graphics->loadMouse(kCurScrewDriver); // screwdriver
- else if (!_menu->isActive()) { // Dropdown can handle its own pointers.
+ else if (!_dropdown->isActive()) { // Dropdown can handle its own pointers.
if (_holdLeftMouse) {
_graphics->loadMouse(kCurCrosshair); // Mark's crosshairs
guideAvvy(cursorPos); // Normally, if you click on the picture, you're guiding Avvy around.
@@ -1115,7 +1124,7 @@ void AvalancheEngine::checkClick() {
if (_holdLeftMouse) {
if ((0 <= cursorPos.y) && (cursorPos.y <= 21)) { // Click on the dropdown menu.
if (_dropsOk)
- _menu->update();
+ _dropdown->update();
} else if ((317 <= cursorPos.y) && (cursorPos.y <= 339)) { // Click on the command line.
_parser->_inputTextPos = (cursorPos.x - 23) / 8;
if (_parser->_inputTextPos > _parser->_inputText.size() + 1)
@@ -1155,7 +1164,7 @@ void AvalancheEngine::checkClick() {
_animation->_sprites[0]->_speedX = kRun;
_animation->updateSpeed();
} else if ((396 <= cursorPos.x) && (cursorPos.x <= 483))
- fxToggle();
+ _sound->toggleSound();
else if ((535 <= cursorPos.x) && (cursorPos.x <= 640))
_mouseText.insertChar(kControlNewLine, 0);
} else if (!_dropsOk)
@@ -1164,7 +1173,14 @@ void AvalancheEngine::checkClick() {
}
void AvalancheEngine::errorLed() {
- warning("STUB: errorled()");
+ _dialogs->setReadyLight(0);
+ _graphics->drawErrorLight(true);
+ for (int i = 177; i >= 1; i--) {
+ _sound->playNote(177 + (i * 177177) / 999, 1);
+ _system->delayMillis(1);
+ }
+ _graphics->drawErrorLight(false);
+ _dialogs->setReadyLight(2);
}
/**
@@ -1274,10 +1290,6 @@ void AvalancheEngine::minorRedraw() {
fadeIn();
}
-void AvalancheEngine::majorRedraw() {
- _graphics->refreshScreen();
-}
-
uint16 AvalancheEngine::bearing(byte whichPed) {
AnimationType *avvy = _animation->_sprites[0];
PedType *curPed = &_peds[whichPed];
@@ -1321,7 +1333,7 @@ void AvalancheEngine::resetVariables() {
for (int i = 0; i < kObjectNum; i++)
_objects[i] = false;
- _dnascore = 0;
+ _score = 0;
_money = 0;
_room = kRoomNowhere;
_saveNum = 0;
@@ -1394,7 +1406,7 @@ void AvalancheEngine::resetAllVariables() {
_animation->resetVariables();
_sequence->resetVariables();
_background->resetVariables();
- _menu->resetVariables();
+ _dropdown->resetVariables();
_timer->resetVariables();
}
@@ -1427,7 +1439,7 @@ void AvalancheEngine::newGame() {
_thinkThing = true;
_thinks = 2;
refreshObjectList();
- _seeScroll = false;
+ _animationsEnabled = true;
avvy->appear(300, 117, kDirRight); // Needed to initialize Avalot.
//for (gd = 0; gd <= 30; gd++) for (gm = 0; gm <= 1; gm++) also[gd][gm] = nil;
@@ -1445,7 +1457,7 @@ void AvalancheEngine::newGame() {
enterRoom(kRoomYours, 1);
avvy->_visible = false;
drawScore();
- _menu->setup();
+ _dropdown->setup();
_clock->update();
spriteRun();
}
diff --git a/engines/avalanche/avalot.h b/engines/avalanche/avalot.h
index 9afb4a7b63..04b945fd20 100644
--- a/engines/avalanche/avalot.h
+++ b/engines/avalanche/avalot.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/background.cpp b/engines/avalanche/background.cpp
index 5d168a20af..f1ba659a55 100644
--- a/engines/avalanche/background.cpp
+++ b/engines/avalanche/background.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -48,7 +48,7 @@ Background::~Background() {
* @remarks Originally called 'pics_link'
*/
void Background::update() {
- if (_vm->_menu->isActive())
+ if (_vm->_dropdown->isActive())
return; // No animation when the menus are up.
switch (_vm->_room) {
@@ -261,7 +261,7 @@ void Background::update() {
}
}
-void Background::load(byte number) {
+void Background::loadSprites(byte number) {
Common::File f;
_filename = _filename.format("chunk%d.avd", number);
if (!f.open(_filename))
@@ -279,24 +279,24 @@ void Background::load(byte number) {
sprite._type = (PictureType)(f.readByte());
sprite._x = f.readSint16LE();
sprite._y = f.readSint16LE();
- sprite._xl = f.readSint16LE();
- sprite._yl = f.readSint16LE();
+ sprite._width = f.readSint16LE();
+ sprite._height = f.readSint16LE();
sprite._size = f.readSint32LE();
bool natural = f.readByte();
bool memorize = f.readByte();
if (memorize) {
_sprites[i]._x = sprite._x;
- _sprites[i]._xl = sprite._xl;
+ _sprites[i]._width = sprite._width;
_sprites[i]._y = sprite._y;
- _sprites[i]._yl = sprite._yl;
+ _sprites[i]._height = sprite._height;
_sprites[i]._type = sprite._type;
if (natural)
_vm->_graphics->getNaturalPicture(_sprites[i]);
else {
_sprites[i]._size = sprite._size;
- _sprites[i]._picture = _vm->_graphics->loadPictureRaw(f, _sprites[i]._xl * 8, _sprites[i]._yl + 1);
+ _sprites[i]._picture = _vm->_graphics->loadPictureRaw(f, _sprites[i]._width * 8, _sprites[i]._height + 1);
}
} else
_sprites[i]._x = kOnDisk;
@@ -335,11 +335,11 @@ void Background::draw(int16 destX, int16 destY, byte sprId) {
sprite._type = (PictureType)(f.readByte());
sprite._x = f.readSint16LE();
sprite._y = f.readSint16LE();
- sprite._xl = f.readSint16LE();
- sprite._yl = f.readSint16LE();
+ sprite._width = f.readSint16LE();
+ sprite._height = f.readSint16LE();
sprite._size = f.readSint32LE();
f.skip(2); // Natural and Memorize are used in Load()
- sprite._picture = _vm->_graphics->loadPictureRaw(f, sprite._xl * 8, sprite._yl + 1);
+ sprite._picture = _vm->_graphics->loadPictureRaw(f, sprite._width * 8, sprite._height + 1);
if (destX < 0) {
destX = sprite._x * 8;
diff --git a/engines/avalanche/background.h b/engines/avalanche/background.h
index 34d7a9a2cc..e994d9eae9 100644
--- a/engines/avalanche/background.h
+++ b/engines/avalanche/background.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -40,7 +40,7 @@ enum PictureType {kEga, kBgi, kNaturalImage};
struct SpriteType {
PictureType _type;
int16 _x, _y;
- int16 _xl, _yl;
+ int16 _width, _height;
int32 _size;
Graphics::Surface _picture;
};
@@ -51,7 +51,7 @@ public:
~Background();
void update();
- void load(byte number);
+ void loadSprites(byte number);
void release();
// Setting the destination to negative coordinates means the picture should be drawn to it's original position.
diff --git a/engines/avalanche/clock.cpp b/engines/avalanche/clock.cpp
index 1c2c50c3bf..6d398d9921 100644
--- a/engines/avalanche/clock.cpp
+++ b/engines/avalanche/clock.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
/*
* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
diff --git a/engines/avalanche/clock.h b/engines/avalanche/clock.h
index 68e8e119f0..85ea508a80 100644
--- a/engines/avalanche/clock.h
+++ b/engines/avalanche/clock.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
/*
* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
diff --git a/engines/avalanche/closing.cpp b/engines/avalanche/closing.cpp
index 1cb2e84218..552b71b563 100644
--- a/engines/avalanche/closing.cpp
+++ b/engines/avalanche/closing.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/closing.h b/engines/avalanche/closing.h
index 25217e347e..6e65deb310 100644
--- a/engines/avalanche/closing.h
+++ b/engines/avalanche/closing.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/console.cpp b/engines/avalanche/console.cpp
index e4b52116e4..29ae5cf9c3 100644
--- a/engines/avalanche/console.cpp
+++ b/engines/avalanche/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/console.h b/engines/avalanche/console.h
index 166515d913..b5b5fb63fc 100644
--- a/engines/avalanche/console.h
+++ b/engines/avalanche/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/detection.cpp b/engines/avalanche/detection.cpp
index 5f4f03a78b..028f167e70 100644
--- a/engines/avalanche/detection.cpp
+++ b/engines/avalanche/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp
index 2174df3580..e843d17c5b 100644
--- a/engines/avalanche/dialogs.cpp
+++ b/engines/avalanche/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -93,6 +93,7 @@ void Dialogs::setReadyLight(byte state) {
if (_vm->_ledStatus == state)
return; // Already like that!
+ // TODO: Implement different patterns for green color.
Color color = kColorBlack;
switch (state) {
case 0:
@@ -104,9 +105,7 @@ void Dialogs::setReadyLight(byte state) {
color = kColorGreen;
break; // Hit a key
}
- warning("STUB: Dialogs::setReadyLight()");
-
- CursorMan.showMouse(false);
+
_vm->_graphics->drawReadyLight(color);
CursorMan.showMouse(true);
_vm->_ledStatus = state;
@@ -158,7 +157,7 @@ void Dialogs::scrollModeNormal() {
Common::String e = "(c) 1994";
setReadyLight(3);
- _vm->_seeScroll = true;
+ _vm->_animationsEnabled = false;
_vm->_graphics->loadMouse(kCurFletch);
_vm->_graphics->saveScreen();
@@ -175,7 +174,8 @@ void Dialogs::scrollModeNormal() {
(event.kbd.keycode == Common::KEYCODE_PLUS)))) {
escape = true;
break;
- }
+ } else if (event.type == Common::EVENT_KEYDOWN)
+ _vm->errorLed();
}
}
@@ -216,10 +216,8 @@ void Dialogs::scrollModeNormal() {
#endif
setReadyLight(0);
- _vm->_seeScroll = false;
+ _vm->_animationsEnabled = true;
_vm->_holdLeftMouse = false; // Used in Lucerna::checkclick().
-
- warning("STUB: Scrolls::scrollModeNormal()");
}
/**
@@ -290,7 +288,7 @@ bool Dialogs::theyMatch(TuneType &played) {
*/
void Dialogs::scrollModeMusic() {
setReadyLight(3);
- _vm->_seeScroll = true;
+ _vm->_animationsEnabled = false;
CursorMan.showMouse(false);
_vm->_graphics->loadMouse(kCurFletch);
@@ -299,7 +297,7 @@ void Dialogs::scrollModeMusic() {
played[i] = kPitchInvalid;
int8 lastOne = -1, thisOne = -1; // Invalid values.
- _vm->_seeScroll = true;
+ _vm->_animationsEnabled = false;
_vm->_graphics->saveScreen();
_vm->_graphics->showScroll();
@@ -363,6 +361,7 @@ void Dialogs::scrollModeMusic() {
value = 11;
break;
default:
+ error("cannot happen");
break;
}
@@ -392,7 +391,7 @@ void Dialogs::scrollModeMusic() {
_vm->_graphics->restoreScreen();
_vm->_graphics->removeBackup();
- _vm->_seeScroll = false;
+ _vm->_animationsEnabled = true;
CursorMan.showMouse(true);
}
@@ -455,7 +454,7 @@ void Dialogs::drawScroll(DialogFunctionType modeFunc) {
mx -= lx;
my -= ly + 2;
- bool centre = false;
+ bool center = false;
byte iconIndent = 0;
switch (_useIcon) {
@@ -481,11 +480,11 @@ void Dialogs::drawScroll(DialogFunctionType modeFunc) {
if (!_scroll[i].empty())
switch (_scroll[i][_scroll[i].size() - 1]) {
case kControlCenter:
- centre = true;
+ center = true;
_scroll[i].deleteLastChar();
break;
case kControlLeftJustified:
- centre = false;
+ center = false;
_scroll[i].deleteLastChar();
break;
case kControlQuestion:
@@ -497,7 +496,7 @@ void Dialogs::drawScroll(DialogFunctionType modeFunc) {
break;
}
- if (centre)
+ if (center)
say(320 - _scroll[i].size() * 4 + iconIndent, my, _scroll[i]);
else
say(mx + iconIndent, my, _scroll[i]);
@@ -645,9 +644,6 @@ void Dialogs::solidify(byte n) {
* 'calldriver' and 'display' by using Common::String instead of a private buffer.
*/
void Dialogs::displayText(Common::String text) {
-// bool was_virtual; // Was the mouse cursor virtual on entry to this proc?
- warning("STUB: Scrolls::calldrivers()");
-
_vm->_sound->stopSound();
setReadyLight(0);
@@ -822,6 +818,8 @@ void Dialogs::displayText(Common::String text) {
}
}
}
+
+ setReadyLight(2);
}
void Dialogs::setTalkPos(int16 x, int16 y) {
diff --git a/engines/avalanche/dialogs.h b/engines/avalanche/dialogs.h
index defd152db5..4b50a61732 100644
--- a/engines/avalanche/dialogs.h
+++ b/engines/avalanche/dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/menu.cpp b/engines/avalanche/dropdown.cpp
index c3fa709ee4..97adfc2581 100644
--- a/engines/avalanche/menu.cpp
+++ b/engines/avalanche/dropdown.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,42 +28,42 @@
/* Original name: DROPDOWN A customized version of Oopmenu (qv). */
#include "avalanche/avalanche.h"
-#include "avalanche/menu.h"
+#include "avalanche/dropdown.h"
namespace Avalanche {
-void HeadType::init(char trig, char altTrig, Common::String title, byte pos, MenuFunc setupFunc, MenuFunc chooseFunc, Menu *menu) {
+void HeadType::init(char trig, char altTrig, Common::String title, byte pos, MenuFunc setupFunc, MenuFunc chooseFunc, DropDownMenu *menu) {
_trigger = trig;
_altTrigger = altTrig;
_title = title;
_position = pos;
- _xpos = _position * _menu->kSpacing + _menu->kIndent;
- _xright = (_position + 1) * _menu->kSpacing + _menu->kIndent;
+ _xpos = _position * _dropdown->kSpacing + _dropdown->kIndent;
+ _xright = (_position + 1) * _dropdown->kSpacing + _dropdown->kIndent;
_setupFunc = setupFunc;
_chooseFunc = chooseFunc;
- _menu = menu;
+ _dropdown = menu;
}
void HeadType::draw() {
CursorMan.showMouse(false);
- _menu->drawMenuText(_xpos, 1, _trigger, _title, true, false);
+ _dropdown->drawMenuText(_xpos, 1, _trigger, _title, true, false);
CursorMan.showMouse(true);
}
void HeadType::highlight() {
CursorMan.showMouse(false);
- _menu->_vm->_sound->stopSound();
- _menu->drawMenuText(_xpos, 1, _trigger, _title, true, true);
+ _dropdown->_vm->_sound->stopSound();
+ _dropdown->drawMenuText(_xpos, 1, _trigger, _title, true, true);
- _menu->_activeMenuItem._left = _xpos;
- _menu->_activeMenuItem._activeNow = true;
- _menu->_activeMenuItem._activeNum = _position;
- _menu->_menuActive = true;
+ _dropdown->_activeMenuItem._left = _xpos;
+ _dropdown->_activeMenuItem._activeNow = true;
+ _dropdown->_activeMenuItem._activeNum = _position;
+ _dropdown->_menuActive = true;
// Force reload and redraw of cursor.
- _menu->_vm->_currentMouse = 177;
+ _dropdown->_vm->_currentMouse = 177;
}
@@ -73,12 +73,12 @@ bool HeadType::parseAltTrigger(char key) {
return false;
}
-void MenuItem::init(Menu *menu) {
- _menu = menu;
+void MenuItem::init(DropDownMenu *menu) {
+ _dropdown = menu;
_activeNow = false;
_activeNum = 1;
- _menu->_menuActive = false;
+ _dropdown->_menuActive = false;
}
void MenuItem::reset() {
@@ -113,8 +113,8 @@ void MenuItem::displayOption(byte y, bool highlit) {
else
backgroundColor = kColorLightgray;
- _menu->_vm->_graphics->drawMenuBlock((_flx1 + 1) * 8, 3 + (y + 1) * 10, (_flx2 + 1) * 8, 13 + (y + 1) * 10, backgroundColor);
- _menu->drawMenuText(_left, 4 + (y + 1) * 10, _options[y]._trigger, text, _options[y]._valid, highlit);
+ _dropdown->_vm->_graphics->drawMenuBlock((_flx1 + 1) * 8, 3 + (y + 1) * 10, (_flx2 + 1) * 8, 13 + (y + 1) * 10, backgroundColor);
+ _dropdown->drawMenuText(_left, 4 + (y + 1) * 10, _options[y]._trigger, text, _options[y]._valid, highlit);
}
void MenuItem::display() {
@@ -125,15 +125,15 @@ void MenuItem::display() {
_flx2 = _left + _width;
_fly = 15 + _optionNum * 10;
_activeNow = true;
- _menu->_menuActive = true;
+ _dropdown->_menuActive = true;
- _menu->_vm->_graphics->drawMenuItem((_flx1 + 1) * 8, 12, (_flx2 + 1) * 8, _fly);
+ _dropdown->_vm->_graphics->drawMenuItem((_flx1 + 1) * 8, 12, (_flx2 + 1) * 8, _fly);
displayOption(0, true);
for (int y = 1; y < _optionNum; y++)
displayOption(y, false);
- _menu->_vm->_currentMouse = 177;
+ _dropdown->_vm->_currentMouse = 177;
CursorMan.showMouse(true); // 4 = fletch
}
@@ -141,12 +141,12 @@ void MenuItem::display() {
void MenuItem::wipe() {
CursorMan.showMouse(false);
- _menu->drawMenuText(_menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._xpos, 1,
- _menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._trigger,
- _menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._title, true, false);
+ _dropdown->drawMenuText(_dropdown->_menuBar._menuItems[_dropdown->_activeMenuItem._activeNum]._xpos, 1,
+ _dropdown->_menuBar._menuItems[_dropdown->_activeMenuItem._activeNum]._trigger,
+ _dropdown->_menuBar._menuItems[_dropdown->_activeMenuItem._activeNum]._title, true, false);
_activeNow = false;
- _menu->_menuActive = false;
+ _dropdown->_menuActive = false;
_firstlix = false;
CursorMan.showMouse(true);
@@ -191,7 +191,7 @@ void MenuItem::select(byte which) {
if (_choiceNum > _optionNum)
_choiceNum = 0; // Off the top, I suppose.
- (_menu->*_menu->_menuBar._menuItems[_activeNum]._chooseFunc)();
+ (_dropdown->*_dropdown->_menuBar._menuItems[_activeNum]._chooseFunc)();
}
void MenuItem::parseKey(char c) {
@@ -204,34 +204,34 @@ void MenuItem::parseKey(char c) {
}
}
if (!found)
- _menu->_vm->_sound->blip();
+ _dropdown->_vm->_sound->blip();
}
MenuBar::MenuBar() {
_menuNum = 0;
- _menu = nullptr;
+ _dropdown = nullptr;
}
-void MenuBar::init(Menu *menu) {
- _menu = menu;
+void MenuBar::init(DropDownMenu *menu) {
+ _dropdown = menu;
_menuNum = 0;
}
void MenuBar::createMenuItem(char trig, Common::String title, char altTrig, MenuFunc setupFunc, MenuFunc chooseFunc) {
- _menuItems[_menuNum].init(trig, altTrig, title, _menuNum, setupFunc, chooseFunc, _menu);
+ _menuItems[_menuNum].init(trig, altTrig, title, _menuNum, setupFunc, chooseFunc, _dropdown);
_menuNum++;
}
void MenuBar::draw() {
- _menu->_vm->_graphics->drawMenuBar(kMenuBackgroundColor);
+ _dropdown->_vm->_graphics->drawMenuBar(kMenuBackgroundColor);
- byte savecp = _menu->_vm->_cp;
- _menu->_vm->_cp = 3;
+ byte savecp = _dropdown->_vm->_cp;
+ _dropdown->_vm->_cp = 3;
for (int i = 0; i < _menuNum; i++)
_menuItems[i].draw();
- _menu->_vm->_cp = savecp;
+ _dropdown->_vm->_cp = savecp;
}
void MenuBar::parseAltTrigger(char c) {
@@ -244,13 +244,13 @@ void MenuBar::parseAltTrigger(char c) {
}
void MenuBar::setupMenuItem(byte which) {
- if (_menu->_activeMenuItem._activeNow) {
- _menu->_activeMenuItem.wipe(); // Get rid of menu.
- if (_menu->_activeMenuItem._activeNum == _menuItems[which]._position)
+ if (_dropdown->_activeMenuItem._activeNow) {
+ _dropdown->_activeMenuItem.wipe(); // Get rid of menu.
+ if (_dropdown->_activeMenuItem._activeNum == _menuItems[which]._position)
return; // Clicked on own highlight.
}
_menuItems[which].highlight();
- (_menu->*_menuItems[which]._setupFunc)();
+ (_dropdown->*_menuItems[which]._setupFunc)();
}
void MenuBar::chooseMenuItem(int16 x) {
@@ -262,7 +262,7 @@ void MenuBar::chooseMenuItem(int16 x) {
}
}
-Menu::Menu(AvalancheEngine *vm) {
+DropDownMenu::DropDownMenu(AvalancheEngine *vm) {
_vm = vm;
_activeMenuItem.init(this);
_menuBar.init(this);
@@ -271,7 +271,7 @@ Menu::Menu(AvalancheEngine *vm) {
_lastPerson = kPeopleNone;
}
-void Menu::findWhatYouCanDoWithIt() {
+void DropDownMenu::findWhatYouCanDoWithIt() {
switch (_vm->_thinks) {
case kObjectWine:
case kObjectPotion:
@@ -299,7 +299,7 @@ void Menu::findWhatYouCanDoWithIt() {
}
}
-void Menu::drawMenuText(int16 x, int16 y, char trigger, Common::String text, bool valid, bool highlighted) {
+void DropDownMenu::drawMenuText(int16 x, int16 y, char trigger, Common::String text, bool valid, bool highlighted) {
Color fontColor;
Color backgroundColor;
if (highlighted) {
@@ -342,11 +342,11 @@ void Menu::drawMenuText(int16 x, int16 y, char trigger, Common::String text, boo
_vm->_graphics->refreshScreen();
}
-void Menu::bleep() {
+void DropDownMenu::bleep() {
_vm->_sound->playNote(177, 7);
}
-void Menu::parseKey(char r, char re) {
+void DropDownMenu::parseKey(char r, char re) {
#if 0
switch (r) {
case 0:
@@ -395,24 +395,24 @@ void Menu::parseKey(char r, char re) {
warning("STUB: Dropdown::parseKey()"); // To be implemented properly later! Don't remove the comment above!
}
-Common::String Menu::selectGender(byte x) {
+Common::String DropDownMenu::selectGender(byte x) {
if (x < 175)
return "im";
else
return "er";
}
-void Menu::setupMenuGame() {
+void DropDownMenu::setupMenuGame() {
_activeMenuItem.reset();
_activeMenuItem.setupOption("Help...", 'H', "f1", true);
- _activeMenuItem.setupOption("Boss Key", 'B', "alt-B", false);
- _activeMenuItem.setupOption("Untrash screen", 'U', "ctrl-f7", true);
+ _activeMenuItem.setupOption("Boss Key", 'B', "alt-B", true);
+ _activeMenuItem.setupOption("Untrash screen", 'U', "ctrl-f7", false);
_activeMenuItem.setupOption("Score and rank", 'S', "f9", true);
_activeMenuItem.setupOption("About Avvy...", 'A', "shift-f10", true);
_activeMenuItem.display();
}
-void Menu::setupMenuFile() {
+void DropDownMenu::setupMenuFile() {
_activeMenuItem.reset();
_activeMenuItem.setupOption("New game", 'N', "f4", true);
_activeMenuItem.setupOption("Load...", 'L', "^f3", true);
@@ -423,7 +423,7 @@ void Menu::setupMenuFile() {
_activeMenuItem.display();
}
-void Menu::setupMenuAction() {
+void DropDownMenu::setupMenuAction() {
_activeMenuItem.reset();
Common::String f5Does = _vm->f5Does();
@@ -449,7 +449,7 @@ void Menu::setupMenuAction() {
_activeMenuItem.display();
}
-void Menu::setupMenuPeople() {
+void DropDownMenu::setupMenuPeople() {
if (!people.empty())
people.clear();
@@ -465,7 +465,7 @@ void Menu::setupMenuPeople() {
_activeMenuItem.display();
}
-void Menu::setupMenuObjects() {
+void DropDownMenu::setupMenuObjects() {
_activeMenuItem.reset();
for (int i = 0; i < kObjectNum; i++) {
if (_vm->_objects[i])
@@ -474,7 +474,7 @@ void Menu::setupMenuObjects() {
_activeMenuItem.display();
}
-void Menu::setupMenuWith() {
+void DropDownMenu::setupMenuWith() {
_activeMenuItem.reset();
if (_vm->_thinkThing) {
@@ -531,7 +531,7 @@ void Menu::setupMenuWith() {
_activeMenuItem.display();
}
-void Menu::runMenuGame() {
+void DropDownMenu::runMenuGame() {
// Help, boss, untrash screen.
switch (_activeMenuItem._choiceNum) {
case 0:
@@ -541,7 +541,7 @@ void Menu::runMenuGame() {
_vm->callVerb(kVerbCodeBoss);
break;
case 2:
- _vm->majorRedraw();
+ _vm->_graphics->refreshScreen();
break;
case 3:
_vm->callVerb(kVerbCodeScore);
@@ -552,7 +552,7 @@ void Menu::runMenuGame() {
}
}
-void Menu::runMenuFile() {
+void DropDownMenu::runMenuFile() {
// New game, load, save, save as, DOS shell, about, quit.
switch (_activeMenuItem._choiceNum) {
case 0:
@@ -579,7 +579,7 @@ void Menu::runMenuFile() {
}
}
-void Menu::runMenuAction() {
+void DropDownMenu::runMenuAction() {
// Get up, pause game, open door, look, inventory, walk/run.
switch (_activeMenuItem._choiceNum) {
case 0: {
@@ -616,16 +616,16 @@ void Menu::runMenuAction() {
}
}
-void Menu::runMenuObjects() {
+void DropDownMenu::runMenuObjects() {
_vm->thinkAbout(_vm->_objectList[_activeMenuItem._choiceNum], AvalancheEngine::kThing);
}
-void Menu::runMenuPeople() {
+void DropDownMenu::runMenuPeople() {
_vm->thinkAbout(people[_activeMenuItem._choiceNum], AvalancheEngine::kPerson);
_lastPerson = (People)people[_activeMenuItem._choiceNum];
}
-void Menu::runMenuWith() {
+void DropDownMenu::runMenuWith() {
_vm->_parser->_thing = _vm->_thinks;
if (_vm->_thinkThing) {
@@ -664,21 +664,21 @@ void Menu::runMenuWith() {
_vm->callVerb((VerbCode)(byte)_verbStr[_activeMenuItem._choiceNum]);
}
-void Menu::setup() {
+void DropDownMenu::setup() {
_menuBar.init(this);
_activeMenuItem.init(this);
- _menuBar.createMenuItem('F', "File", '!', &Avalanche::Menu::setupMenuFile, &Avalanche::Menu::runMenuFile);
- _menuBar.createMenuItem('G', "Game", 34, &Avalanche::Menu::setupMenuGame, &Avalanche::Menu::runMenuGame);
- _menuBar.createMenuItem('A', "Action", 30, &Avalanche::Menu::setupMenuAction, &Avalanche::Menu::runMenuAction);
- _menuBar.createMenuItem('O', "Objects", 24, &Avalanche::Menu::setupMenuObjects, &Avalanche::Menu::runMenuObjects);
- _menuBar.createMenuItem('P', "People", 25, &Avalanche::Menu::setupMenuPeople, &Avalanche::Menu::runMenuPeople);
- _menuBar.createMenuItem('W', "With", 17, &Avalanche::Menu::setupMenuWith, &Avalanche::Menu::runMenuWith);
+ _menuBar.createMenuItem('F', "File", '!', &Avalanche::DropDownMenu::setupMenuFile, &Avalanche::DropDownMenu::runMenuFile);
+ _menuBar.createMenuItem('G', "Game", 34, &Avalanche::DropDownMenu::setupMenuGame, &Avalanche::DropDownMenu::runMenuGame);
+ _menuBar.createMenuItem('A', "Action", 30, &Avalanche::DropDownMenu::setupMenuAction, &Avalanche::DropDownMenu::runMenuAction);
+ _menuBar.createMenuItem('O', "Objects", 24, &Avalanche::DropDownMenu::setupMenuObjects, &Avalanche::DropDownMenu::runMenuObjects);
+ _menuBar.createMenuItem('P', "People", 25, &Avalanche::DropDownMenu::setupMenuPeople, &Avalanche::DropDownMenu::runMenuPeople);
+ _menuBar.createMenuItem('W', "With", 17, &Avalanche::DropDownMenu::setupMenuWith, &Avalanche::DropDownMenu::runMenuWith);
_menuBar.draw();
}
-void Menu::update() { // TODO: Optimize it ASAP!!! It really needs it...
+void DropDownMenu::update() {
_vm->_graphics->saveScreen();
Common::Point cursorPos = _vm->getMousePos();
@@ -769,7 +769,7 @@ void Menu::update() { // TODO: Optimize it ASAP!!! It really needs it...
_vm->_graphics->removeBackup();
}
-char Menu::getThingChar(byte which) {
+char DropDownMenu::getThingChar(byte which) {
static const char thingsChar[] = "WMBParCLguKeSnIohn"; // V=Vinegar
char result;
@@ -786,7 +786,7 @@ char Menu::getThingChar(byte which) {
return result;
}
-byte Menu::getNameChar(People whose) {
+byte DropDownMenu::getNameChar(People whose) {
static const char ladChar[] = "ASCDMTRwLfgeIyPu";
static const char lassChar[] = "kG\0xB1o";
@@ -798,7 +798,7 @@ byte Menu::getNameChar(People whose) {
error("getName() - Unexpected character id %d", (byte) whose);
}
-Common::String Menu::getThing(byte which) {
+Common::String DropDownMenu::getThing(byte which) {
static const char things[kObjectNum][20] = {
"Wine", "Money-bag", "Bodkin", "Potion", "Chastity belt",
"Crossbow bolt", "Crossbow", "Lute", "Pilgrim's badge", "Mushroom", "Key",
@@ -830,15 +830,15 @@ Common::String Menu::getThing(byte which) {
return result;
}
-bool Menu::isActive() {
+bool DropDownMenu::isActive() {
return _menuActive;
}
-void Menu::init() {
+void DropDownMenu::init() {
_menuActive = false;
}
-void Menu::resetVariables() {
+void DropDownMenu::resetVariables() {
_lastPerson = kPeoplePardon;
}
} // End of namespace Avalanche.
diff --git a/engines/avalanche/menu.h b/engines/avalanche/dropdown.h
index b7674fbb9d..417b775c3d 100644
--- a/engines/avalanche/menu.h
+++ b/engines/avalanche/dropdown.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -27,17 +27,17 @@
/* Original name: DROPDOWN A customized version of Oopmenu (qv). */
-#ifndef AVALANCHE_MENU_H
-#define AVALANCHE_MENU_H
+#ifndef AVALANCHE_DROPDOWN_H
+#define AVALANCHE_DROPDOWN_H
#include "common/str.h"
namespace Avalanche {
class AvalancheEngine;
-class Menu;
+class DropDownMenu;
-typedef void (Menu::*MenuFunc)();
+typedef void (DropDownMenu::*MenuFunc)();
static const Color kMenuBackgroundColor = kColorLightgray;
static const Color kMenuBorderColor = kColorBlack;
@@ -49,13 +49,13 @@ public:
int16 _xpos, _xright;
MenuFunc _setupFunc, _chooseFunc;
- void init(char trig, char alTtrig, Common::String title, byte pos, MenuFunc setupFunc, MenuFunc chooseFunc, Menu *menu);
+ void init(char trig, char alTtrig, Common::String title, byte pos, MenuFunc setupFunc, MenuFunc chooseFunc, DropDownMenu *menu);
void draw();
void highlight();
bool parseAltTrigger(char key);
private:
- Menu *_menu;
+ DropDownMenu *_dropdown;
};
struct OptionType {
@@ -75,7 +75,7 @@ public:
byte _activeNum; // And if so, which is it?
byte _choiceNum; // Your choice?
- void init(Menu *menu);
+ void init(DropDownMenu *menu);
void reset();
void setupOption(Common::String title, char trigger, Common::String shortcut, bool valid);
void display();
@@ -88,7 +88,7 @@ private:
byte _optionNum;
byte _highlightNum;
- Menu *_menu;
+ DropDownMenu *_dropdown;
void displayOption(byte y, bool highlit);
void moveHighlight(int8 inc);
@@ -103,20 +103,20 @@ public:
byte _menuNum;
MenuBar();
- void init(Menu *menu);
+ void init(DropDownMenu *menu);
void createMenuItem(char trig, Common::String title, char altTrig, MenuFunc setupFunc, MenuFunc chooseFunc);
void draw();
void chooseMenuItem(int16 x);
private:
- Menu *_menu;
+ DropDownMenu *_dropdown;
void setupMenuItem(byte which);
// CHECKME: Useless function
void parseAltTrigger(char c);
};
-class Menu {
+class DropDownMenu {
public:
friend class HeadType;
friend class MenuItem;
@@ -125,7 +125,7 @@ public:
MenuItem _activeMenuItem;
MenuBar _menuBar;
- Menu(AvalancheEngine *vm);
+ DropDownMenu(AvalancheEngine *vm);
void update();
void setup(); // Standard menu bar.
@@ -179,4 +179,4 @@ private:
} // End of namespace Avalanche.
-#endif // AVALANCHE_MENU_H
+#endif // AVALANCHE_DROPDOWN_H
diff --git a/engines/avalanche/enums.h b/engines/avalanche/enums.h
index 2b5db67609..0ba39321bc 100644
--- a/engines/avalanche/enums.h
+++ b/engines/avalanche/enums.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -29,6 +29,11 @@
#define AVALANCHE_ENUMS_H
namespace Avalanche {
+
+enum MonsterType { kMonsterTypeGhost, kMonsterTypeGlerk };
+
+enum Flavour { kFlavourEga, kFlavourBgi, kFlavourNatural, kFlavourTwo, kFlavourOne };
+
enum Color {
kColorBlack = 0, kColorBlue, kColorGreen, kColorCyan, kColorRed,
kColorMagenta = 5, kColorBrown, kColorLightgray, kColorDarkgray, kColorLightblue,
@@ -87,7 +92,7 @@ enum VerbCode {
enum MouseCursor {
kCurUpArrow = 0, kCurScrewDriver = 1, kCurRightArrow = 2, kCurFletch = 3, kCurWait = 4, kCurHand = 5,
- kCurCrosshair = 6, kCurIBeam = 7
+ kCurCrosshair = 6, kCurIBeam = 7, kCurHelp = 8
};
// Magic/portal constants:
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
new file mode 100644
index 0000000000..16c79fdee0
--- /dev/null
+++ b/engines/avalanche/ghostroom.cpp
@@ -0,0 +1,395 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike: Mark and Thomas Thurman.
+*/
+
+#include "avalanche/avalanche.h"
+#include "avalanche/ghostroom.h"
+
+#include "common/random.h"
+
+namespace Avalanche {
+
+const int8 GhostRoom::kAdjustment[5] = { 7, 0, 7, 7, 7 };
+const byte GhostRoom::kWaveOrder[5] = { 4, 0, 1, 2, 3 };
+const byte GhostRoom::kGlerkFade[26] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 0 };
+const byte GhostRoom::kGreldetFade[18] = { 0, 1, 2, 3, 4, 5, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0 };
+
+GhostRoom::GhostRoom(AvalancheEngine *vm) {
+ _vm = vm;
+
+ _glerkStage = 0;
+ _batX = 0;
+ _batY = 0;
+ _batCount = 0;
+ _aarghCount = 0;
+ _greldetX = _greldetY = 0;
+ _greldetCount = 0;
+ _redGreldet = false;
+ _wasLoaded = false;
+}
+
+GhostRoom::~GhostRoom() {
+ for (int i = 0; i < 2; i++)
+ _eyes[i].free();
+
+ _exclamation.free();
+
+ for (int i = 0; i < 3; i++)
+ _bat[i].free();
+
+ for (int i = 0; i < 6; i++)
+ _aargh[i].free();
+
+ for (int i = 0; i < 5; i++)
+ _greenEyes[i].free();
+
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < 6; j++)
+ _greldet[j][i].free();
+ }
+
+ if (_wasLoaded) {
+ for (int i = 0; i < 5; i++) {
+ for (int j = 0; j < 2; j++) {
+ for (int y = 0; y < 66; y++) {
+ delete[] _ghost[i][j][y];
+ }
+ delete[] _ghost[i][j];
+ }
+ delete[] _ghost[i];
+ }
+ delete[] _ghost;
+
+ for (int i = 0; i < 6; i++) {
+ for (int j = 0; j < 4; j++) {
+ for (int y = 0; y < 35; y++) {
+ delete[] _glerk[i][j][y];
+ }
+ delete[] _glerk[i][j];
+ }
+ delete[] _glerk[i];
+ }
+ delete[] _glerk;
+ }
+}
+
+void GhostRoom::wait(uint16 howLong) {
+ for (int i = 0; i < howLong; i++) {
+ Common::Event event;
+ _vm->getEvent(event);
+ if (event.type == Common::EVENT_KEYDOWN)
+ _vm->_sound->playNote(6177, 1);
+ _vm->_system->delayMillis(1);
+ }
+}
+
+void GhostRoom::doBat() {
+ _batCount++;
+
+ int8 dx = 0;
+ int8 iy = 0;
+ byte batImage = 0;
+ if ((_batCount % 2) == 1) {
+ if ((1 <= _batCount) && (_batCount <= 90)) {
+ dx = 2;
+ iy = 1;
+ batImage = 0;
+ } else if ((91 <= _batCount) && (_batCount <= 240)) {
+ dx = 1;
+ iy = 1;
+ batImage = 1;
+ } else if((241 <= _batCount) && (_batCount <= 260)) {
+ dx = 1;
+ iy = 4;
+ batImage = 2;
+ }
+
+ if ((_batCount == 91) || (_batCount == 241)) // When the bat changes, blank out the old one.
+ _vm->_graphics->drawFilledRectangle(Common::Rect(_batX + _bat[batImage].w, _batY, _batX + _bat[batImage - 1].w, _batY + _bat[batImage - 1].h), kColorBlack);
+
+ _vm->_graphics->drawFilledRectangle(Common::Rect(_batX, _batY, _batX + _bat[batImage].w, _batY + iy), kColorBlack);
+ _vm->_graphics->drawFilledRectangle(Common::Rect(_batX + _bat[batImage].w - dx, _batY, _batX + _bat[batImage].w, _batY + _bat[batImage].h), kColorBlack);
+
+ _batX -= dx;
+ _batY++;
+ _vm->_graphics->ghostDrawPicture(_bat[batImage], _batX, _batY);
+ }
+}
+
+void GhostRoom::bigGreenEyes(byte how) {
+ _vm->_graphics->ghostDrawPicture(_greenEyes[how], 330, 103);
+ _vm->_graphics->ghostDrawPicture(_greenEyes[how], 376, 103);
+ _vm->_graphics->refreshScreen();
+}
+
+ChunkBlock GhostRoom::readChunkBlock(Common::File &file) {
+ ChunkBlock cb;
+ cb._flavour = (Flavour)file.readByte();
+ cb._x = file.readSint16LE();
+ cb._y = file.readSint16LE();
+ cb._width = file.readSint16LE();
+ cb._height = file.readSint16LE();
+ cb._size = file.readSint32LE();
+ return cb;
+}
+
+void GhostRoom::loadPictures() {
+ Common::File file;
+
+ if (!file.open("spooky.avd"))
+ error("AVALANCHE: GhostRoom: File not found: spooky.avd");
+
+ file.seek(44);
+
+ // Initializing ghost's array.
+ _ghost = new byte***[5];
+ for (int i = 0; i < 5; i++) {
+ _ghost[i] = new byte**[2];
+ for (int j = 0; j < 2; j++) {
+ _ghost[i][j] = new byte*[66];
+ for (int y = 0; y < 66; y++) {
+ _ghost[i][j][y] = new byte[26];
+ for (int x = 0; x < 26; x++)
+ _ghost[i][j][y][x] = 0;
+ }
+ }
+ }
+
+ // Read in the pictures of the ghost.
+ for (int i = 0; i < 5; i++) {
+ ChunkBlock cb = readChunkBlock(file);
+ for (int j = 0; j < 2; j++) {
+ for (int y = 0; y <= cb._height; y++)
+ file.read(_ghost[i][j][y], cb._width / 8);
+ }
+ }
+
+ for (int i = 0; i < 2; i++)
+ _eyes[i] = _vm->_graphics->ghostLoadPicture(file, dummyCoord);
+
+ _exclamation = _vm->_graphics->ghostLoadPicture(file, dummyCoord);
+
+ // Actually this function not just loads, but also draws the images, but they are part of the background
+ // and they are need to be drawn only once.
+ _vm->_graphics->ghostDrawBackgroundItems(file);
+
+ for (int i = 0; i < 3; i++)
+ _bat[i] = _vm->_graphics->ghostLoadPicture(file, dummyCoord);
+
+ // Initializing glerk's array.
+ _glerk = new byte***[6];
+ for (int i = 0; i < 6; i++) {
+ _glerk[i] = new byte**[4];
+ for (int j = 0; j < 4; j++) {
+ _glerk[i][j] = new byte*[35];
+ for (int y = 0; y < 35; y++) {
+ _glerk[i][j][y] = new byte[9];
+ for (int x = 0; x < 9; x++)
+ _glerk[i][j][y][x] = 0;
+ }
+ }
+ }
+
+ // Read in the pictures of the "glerk".
+ for (int i = 0; i < 6; i++) {
+ ChunkBlock cb = readChunkBlock(file);
+ for (int j = 0; j < 4; j++) {
+ for (int y = 0; y <= cb._height; y++)
+ file.read(_glerk[i][j][y], cb._width / 8);
+ }
+ }
+
+ for (int i = 0; i < 6; i++)
+ _aargh[i] = _vm->_graphics->ghostLoadPicture(file, _aarghWhere[i]);
+
+ for (int i = 0; i < 5; i++)
+ _greenEyes[i] = _vm->_graphics->ghostLoadPicture(file, dummyCoord);
+
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < 6; j++)
+ _greldet[j][i] = _vm->_graphics->ghostLoadPicture(file, dummyCoord);
+ }
+
+ file.close();
+}
+
+void GhostRoom::run() {
+ CursorMan.showMouse(false);
+ _vm->_graphics->saveScreen();
+ _vm->fadeOut();
+ _vm->_graphics->blackOutScreen();
+ _vm->fadeIn();
+
+ // Only load the pictures if it's our first time walking into the room.
+ // After that we simply use the already loaded images.
+ if (!_wasLoaded) {
+ loadPictures();
+ _wasLoaded = true;
+ }
+
+ // Avvy walks over:
+ _glerkStage = 0;
+ _batX = 277;
+ _batY = 40;
+ _batCount = 0;
+
+ for (int x = 500; x >= 217; x--) {
+ // The floating eyeballs:
+ int xBound = x % 30;
+ if ((22 <= xBound) && (xBound <= 27)) {
+ if (xBound == 27)
+ _vm->_graphics->drawFilledRectangle(Common::Rect(x, 135, x + 17, 137), kColorBlack);
+ _vm->_graphics->ghostDrawPicture(_eyes[0], x, 136);
+ _vm->_graphics->drawDot(x + 16, 137, kColorBlack);
+ } else {
+ if (xBound == 21)
+ _vm->_graphics->drawFilledRectangle(Common::Rect(x, 137, x + 18, 139), kColorBlack);
+ _vm->_graphics->ghostDrawPicture(_eyes[0], x, 135);
+ _vm->_graphics->drawDot(x + 16, 136, kColorBlack); // Eyes would leave a trail 1 pixel high behind them.
+ }
+
+ // Plot the Glerk:
+ if ((x % 10) == 0) {
+ if (_glerkStage > 25)
+ break;
+
+ _vm->_graphics->ghostDrawMonster(_glerk[kGlerkFade[_glerkStage]], 456, 14, kMonsterTypeGlerk);
+ _glerkStage++;
+ }
+
+ doBat();
+
+ _vm->_graphics->refreshScreen();
+
+ wait(15);
+ }
+
+ // Blank out the Glerk's space.
+ _vm->_graphics->drawFilledRectangle(Common::Rect(456, 14, 531, 51), kColorBlack);
+ _vm->_graphics->refreshScreen();
+
+
+ // Here comes the descending ghost:
+ for (int y = -64; y <= 103; y++) {
+ _vm->_graphics->ghostDrawMonster(_ghost[1 + (abs(y / 7) % 2) * 3], 0, y, kMonsterTypeGhost);
+ if (y > 0)
+ _vm->_graphics->drawFilledRectangle(Common::Rect(0, y - 1, 26 * 8 + 1, y + 1), kColorBlack);
+ _vm->_graphics->refreshScreen();
+
+ wait(27);
+ }
+
+ // Then it waves:
+ _aarghCount = -15;
+
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 5; j++) {
+ _vm->_graphics->drawFilledRectangle(Common::Rect(0, 96, 26 * 8, 170), kColorBlack);
+ _vm->_graphics->ghostDrawMonster(_ghost[kWaveOrder[j]], 0, 96 + kAdjustment[j], kMonsterTypeGhost);
+
+ _aarghCount++;
+
+ if (_aarghCount >= 0) {
+ for (int k = 0; k <= _aarghCount; k++)
+ _vm->_graphics->ghostDrawPicture(_aargh[k], _aarghWhere[k].x, _aarghWhere[k].y);
+ }
+
+ _vm->_graphics->refreshScreen();
+
+ wait(177);
+ }
+ }
+
+ // The exclamation mark appears:
+ _vm->_graphics->ghostDrawPicture(_exclamation, 246, 127);
+ _vm->_graphics->refreshScreen();
+ wait(777);
+
+ // Erase "aargh":
+ _vm->_graphics->drawFilledRectangle(Common::Rect(172, 78, 348, 112), kColorBlack);
+ _vm->_graphics->refreshScreen();
+
+ for (int i = 4; i >= 0; i--) {
+ wait(377);
+ bigGreenEyes(i);
+ }
+
+ // Erase the exclamation mark:
+ _vm->_graphics->drawFilledRectangle(Common::Rect(246, 127, 252, 134), kColorBlack);
+ _vm->_graphics->refreshScreen();
+
+ // Avvy hurries back:
+ _glerkStage = 0;
+ _greldetCount = 18;
+ _redGreldet = false;
+
+ for (int x = 217; x <= 479; x++) {
+ // The floating eyeballs again:
+ int xBound = x % 30;
+ if ((22 <= xBound) && (xBound <= 27)) {
+ if (xBound == 22)
+ _vm->_graphics->drawFilledRectangle(Common::Rect(x + 22, 134, x + 39, 138), kColorBlack);
+ _vm->_graphics->ghostDrawPicture(_eyes[1], x + 23, 136);
+ _vm->_graphics->drawDot(x + 22, 137, kColorBlack);
+ } else {
+ if (xBound == 28)
+ _vm->_graphics->drawFilledRectangle(Common::Rect(x + 22, 135, x + 39, 139), kColorBlack);
+ _vm->_graphics->ghostDrawPicture(_eyes[1], x + 23, 135);
+ _vm->_graphics->drawDot(x + 22, 136, kColorBlack); // Eyes would leave a trail 1 pixel high behind them.
+ }
+
+ // Plot the Green Eyes:
+ if ((x % 53) == 5) {
+ bigGreenEyes(_glerkStage);
+ _glerkStage++;
+ }
+
+ // Plot the Greldet:
+ if (_greldetCount == 18) {
+ _greldetX = _vm->_rnd->getRandomNumber(599);
+ _greldetY = _vm->_rnd->getRandomNumber(79);
+ _greldetCount = 0;
+ _redGreldet = !_redGreldet;
+ }
+
+ _vm->_graphics->ghostDrawPicture(_greldet[kGreldetFade[_greldetCount]][_redGreldet], _greldetX, _greldetY);
+ _greldetCount++;
+
+ _vm->_graphics->refreshScreen();
+
+ wait(10);
+ }
+
+ CursorMan.showMouse(true);
+
+ _vm->fadeOut();
+ _vm->_graphics->restoreScreen();
+ _vm->_graphics->removeBackup();
+ _vm->_animation->animLink();
+ _vm->fadeIn();
+}
+
+} // End of namespace Avalanche
diff --git a/engines/avalanche/ghostroom.h b/engines/avalanche/ghostroom.h
new file mode 100644
index 0000000000..4c659128ce
--- /dev/null
+++ b/engines/avalanche/ghostroom.h
@@ -0,0 +1,88 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike: Mark and Thomas Thurman.
+*/
+
+#ifndef AVALANCHE_GHOSTROOM_H
+#define AVALANCHE_GHOSTROOM_H
+
+#include "common/scummsys.h"
+#include "graphics/surface.h"
+
+namespace Avalanche {
+class AvalancheEngine;
+
+struct ChunkBlock {
+ Flavour _flavour;
+ int16 _x, _y;
+ int16 _width, _height;
+ int32 _size;
+};
+
+class GhostRoom {
+public:
+ GhostRoom(AvalancheEngine *vm);
+ ~GhostRoom();
+
+ void run();
+ ChunkBlock readChunkBlock(Common::File &file);
+
+private:
+ AvalancheEngine *_vm;
+
+ static const int8 kAdjustment[5];
+ static const byte kWaveOrder[5];
+ static const byte kGlerkFade[26];
+ static const byte kGreldetFade[18];
+
+ Common::Point dummyCoord;
+ byte ****_ghost;// [5][2][66][26]
+ Graphics::Surface _eyes[2];
+ Graphics::Surface _exclamation;
+ Graphics::Surface _bat[3];
+ byte ****_glerk; // [6][4][35][9]
+ Graphics::Surface _aargh[6];
+ Common::Point _aarghWhere[6];
+ Graphics::Surface _greenEyes[5];
+ Graphics::Surface _greldet[6][2];
+
+ int16 _batX, _batY;
+ uint16 _batCount;
+ byte _glerkStage;
+ int8 _aarghCount;
+ int16 _greldetX, _greldetY;
+ byte _greldetCount;
+ bool _redGreldet;
+ bool _wasLoaded;
+
+ void loadPictures();
+ void wait(uint16 howLong);
+ void doBat();
+ void bigGreenEyes(byte how);
+};
+
+} // End of namespace Avalanche
+
+#endif // AVALANCHE_GHOSTROOM_H
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 82248f5087..513cd72c8c 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -198,7 +198,7 @@ void GraphicManager::drawToolbar() {
Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color) {
Common::Point endPoint;
- const float convfac = M_PI / 180.0;
+ const double convfac = M_PI / 180.0;
int32 xRadius = radius;
int32 yRadius = radius * kScreenWidth / (8 * kScreenHeight); // Just don't ask why...
@@ -281,6 +281,10 @@ Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16
return endPoint;
}
+void GraphicManager::drawDot(int x, int y, Color color) {
+ *(byte *)_surface.getBasePtr(x, y) = color;
+}
+
void GraphicManager::drawLine(int x1, int y1, int x2, int y2, int penX, int penY, Color color) {
_surface.drawThickLine(x1, y1, x2, y2, penX, penY, color);
}
@@ -348,6 +352,25 @@ void GraphicManager::drawNormalText(const Common::String text, FontType font, by
drawText(_surface, text, font, fontHeight, x, y, color);
}
+/**
+ * Draws text double the size of the normal.
+ */
+void GraphicManager::drawBigText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color) {
+ for (uint i = 0; i < text.size(); i++) {
+ for (int j = 0; j < fontHeight; j++) {
+ byte pixel = font[(byte)text[i]][j];
+ byte pixelBit = 0;
+ for (int bit = 0; bit < 16; bit++) {
+ if ((bit % 2) == 0)
+ pixelBit = (pixel >> (bit / 2)) & 1;
+ for (int k = 0; k < 2; k++)
+ if (pixelBit)
+ *(byte *)surface.getBasePtr(x + i * 16 + 16 - bit, y + j * 2 + k) = color;
+ }
+ }
+ }
+}
+
void GraphicManager::drawScrollText(const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color) {
drawText(_scrolls, text, font, fontHeight, x, y, color);
}
@@ -455,12 +478,16 @@ void GraphicManager::drawDebugLines() {
}
}
+void GraphicManager::drawRectangle(Common::Rect rect, Color color) {
+ _surface.frameRect(rect, color);
+}
+
void GraphicManager::drawFilledRectangle(Common::Rect rect, Color color) {
_surface.fillRect(rect, color);
}
-void GraphicManager::drawRectangle(Common::Rect rect, Color color) {
- _surface.frameRect(rect, color);
+void GraphicManager::blackOutScreen() {
+ _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 640, 200), kColorBlack);
}
void GraphicManager::nimLoad() {
@@ -500,6 +527,375 @@ void GraphicManager::nimFree() {
_nimLogo.free();
}
+void GraphicManager::ghostDrawMonster(byte ***picture, uint16 destX, int16 destY, MonsterType type) {
+ uint16 height = 0;
+ uint16 width = 0;
+ // Only for the Ghost:
+ const byte kPlaneToUse[4] = { 0, 0, 0, 1 };
+ int yStart = 0;
+
+ // Constants from the original code:
+ switch (type) {
+ case kMonsterTypeGhost:
+ height = 66;
+ width = 208; // 26 * 8
+
+ // We have to mess around with the coords and the sizes since
+ // the ghost isn't always placed fully on the screen.
+ if (destY < 0) {
+ yStart = abs(destY);
+ height -= yStart;
+ destY = 0;
+ }
+ break;
+ case kMonsterTypeGlerk:
+ height = 35;
+ width = 72; // 9 * 8
+ break;
+ default:
+ break;
+ }
+
+ Graphics::Surface monsterPicture;
+ monsterPicture.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+
+ for (int y = 0; y < height; y++) {
+ for (int plane = 0; plane < 4; plane++) {
+ for (uint16 x = 0; x < width / 8; x++) {
+ byte pixel = 0;
+
+ switch (type) {
+ case kMonsterTypeGhost:
+ pixel = picture[kPlaneToUse[plane]][y + yStart][x];
+ break;
+ case kMonsterTypeGlerk:
+ pixel = picture[plane][y][x];
+ break;
+ default:
+ break;
+ }
+
+ for (int bit = 0; bit < 8; bit++) {
+ byte pixelBit = (pixel >> bit) & 1;
+ *(byte *)monsterPicture.getBasePtr(x * 8 + 7 - bit, y) += (pixelBit << plane);
+ }
+ }
+ }
+ }
+
+ drawPicture(_surface, monsterPicture, destX, destY);
+
+ monsterPicture.free();
+}
+
+/**
+ * With the use of the second argument, it replaces get_meg_aargh as well.
+ * @remarks Originally called 'get_me' and was located in Ghostroom.
+ */
+Graphics::Surface GraphicManager::ghostLoadPicture(Common::File &file, Common::Point &coord) {
+ ChunkBlock cb = _vm->_ghostroom->readChunkBlock(file);
+
+ coord.x = cb._x;
+ coord.y = cb._y;
+
+ Graphics::Surface picture = loadPictureGraphic(file);
+
+ skipDifference(cb._size, picture, file);
+
+ return picture;
+}
+
+void GraphicManager::ghostDrawPicture(const Graphics::Surface &picture, uint16 destX, uint16 destY) {
+ drawPicture(_surface, picture, destX, destY);
+}
+
+/**
+ * Loads and puts 3 images (in this order: cobweb, Mark's signature, open door) into the background at the beginning of the ghostroom scene.
+ * @remarks Originally called 'plain_grab' and was located in Ghostroom. It was originally called 3 times. I unified these in one function, used a for cycle.
+ */
+void GraphicManager::ghostDrawBackgroundItems(Common::File &file) {
+ for (int num = 0; num < 3; num++) {
+ ChunkBlock cb = _vm->_ghostroom->readChunkBlock(file);
+
+ int width = cb._width;
+ int height = cb._height + 1;
+
+ Graphics::Surface picture;
+ picture.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+
+ // Load the picture according to it's type.
+ switch (cb._flavour) {
+ case kFlavourOne: // There is only one plane.
+ for (uint16 y = 0; y < height; y++) {
+ for (uint16 x = 0; x < width; x += 8) {
+ byte pixel = file.readByte();
+ for (int i = 0; i < 8; i++) {
+ byte pixelBit = (pixel >> i) & 1;
+ *(byte *)picture.getBasePtr(x + 7 - i, y) = (pixelBit << 3);
+ }
+ }
+ }
+ break;
+ case kFlavourEga:
+ picture = loadPictureRaw(file, width, height);
+ break;
+ default:
+ break;
+ }
+
+ drawPicture(_surface, picture, cb._x, cb._y);
+
+ picture.free();
+ }
+ refreshScreen();
+}
+
+/**
+* @remarks Originally called 'plot_button'
+*/
+void GraphicManager::helpDrawButton(int y, byte which) {
+ if (y > 200) {
+ _vm->_graphics->setBackgroundColor(kColorGreen);
+ _vm->_system->delayMillis(10);
+ _vm->_graphics->setBackgroundColor(kColorBlack);
+ return;
+ }
+
+ Common::File file;
+
+ if (!file.open("buttons.avd"))
+ error("AVALANCHE: Help: File not found: buttons.avd");
+
+ file.seek(which * 930); // 930 is the size of one button.
+
+ Graphics::Surface button = loadPictureGraphic(file);
+
+ int x = 0;
+ if (y == -177) {
+ x = 229;
+ y = 5;
+ }
+ else
+ x = 470;
+
+ _vm->_graphics->drawPicture(_surface, button, x, y);
+
+ button.free();
+ file.close();
+}
+
+/**
+ * @remarks Originally called 'light'
+ */
+void GraphicManager::helpDrawHighlight(byte which, Color color) {
+ if (which == 177) // Dummy value for "no button at all".
+ return;
+
+ which &= 31;
+ drawRectangle(Common::Rect(466, 38 + which * 27, 556, 63 + which * 27), color);
+}
+
+void GraphicManager::helpDrawBigText(const Common::String text, int16 x, int16 y, Color color) {
+ drawBigText(_surface, text, _vm->_font, 8, x, y, color);
+}
+
+/**
+ * @remarks Originally called 'titles'
+ */
+void GraphicManager::seuDrawTitle() {
+ Common::File file;
+
+ if (!file.open("shoot1.avd"))
+ error("AVALANCHE: ShootEmUp: File not found: shoot1.avd");
+
+ const uint16 width = 320;
+ const uint16 height = 200;
+
+ Graphics::Surface picture = loadPictureRaw(file, width, height);
+
+ Graphics::Surface doubledPicture;
+ doubledPicture.create(width * 2, height, Graphics::PixelFormat::createFormatCLUT8());
+
+ // These cycles are for doubling the picture's width.
+ for (int x = (width * 2) - 2 ; x >= 0; x -= 2) {
+ for (int y = 0; y < height; y++) {
+ *(byte *)doubledPicture.getBasePtr(x, y) = *(byte *)doubledPicture.getBasePtr(x + 1, y) = *(byte *)picture.getBasePtr(x / 2, y);
+ }
+ }
+
+ drawPicture(_surface, doubledPicture, 0, 0);
+ refreshScreen();
+
+ picture.free();
+ doubledPicture.free();
+
+ file.close();
+}
+
+void GraphicManager::seuLoad() {
+ Common::File file;
+
+ if (!file.open("notts.avd"))
+ error("AVALANCHE: ShootEmUp: File not found: notts.avd");
+
+ for (int i = 0; i < 99; i++) {
+ int size = file.readUint16LE();
+ _seuPictures[i] = loadPictureGraphic(file);
+ skipDifference(size, _seuPictures[i], file);
+ }
+
+ file.close();
+}
+
+void GraphicManager::seuFree() {
+ for (int i = 0; i < 99; i++)
+ _seuPictures[i].free();
+}
+
+/**
+ * @remarks Originally called 'display' and it also replaces 'display_const'
+ */
+void GraphicManager::seuDrawPicture(int x, int y, byte which) {
+ drawPicture(_surface, _seuPictures[which], x, y);
+}
+
+/**
+ * @remarks Originally called 'cameo_display'
+ */
+void GraphicManager::seuDrawCameo(int destX, int destY, byte w1, byte w2) {
+ // First we make the pixels of the previous sprite (cameo) blank:
+ uint16 maxX = _seuPictures[w2].w;
+ uint16 maxY = _seuPictures[w2].h;
+
+ if (destX + maxX > _surface.w)
+ maxX = _surface.w - destX;
+
+ if (destY + maxY > _surface.h)
+ maxY = _surface.h - destY;
+
+ for (uint16 y = 0; y < maxY; y++) {
+ for (uint16 x = 0; x < maxX; x++) {
+ if (*(const byte *)_seuPictures[w2].getBasePtr(x, y) != 0)
+ *(byte *)_surface.getBasePtr(x + destX, y + destY) = 0;
+ }
+ }
+
+ // Then we draw the desired sprite:
+ drawPicture(_surface, _seuPictures[w1], destX, destY);
+}
+
+uint16 GraphicManager::seuGetPicWidth(int which) {
+ return _seuPictures[which].w;
+}
+
+uint16 GraphicManager::seuGetPicHeight(int which) {
+ return _seuPictures[which].h;
+}
+
+void GraphicManager::menuRefreshScreen() {
+ g_system->copyRectToScreen(_menu.getPixels(), _menu.pitch, 0, 0, kScreenWidth, kMenuScreenHeight);
+ g_system->updateScreen();
+}
+
+void GraphicManager::menuInitialize() {
+ initGraphics(kScreenWidth, kMenuScreenHeight, true);
+ _menu.create(kScreenWidth, kMenuScreenHeight, Graphics::PixelFormat::createFormatCLUT8());
+}
+
+void GraphicManager::menuFree() {
+ _menu.free();
+}
+
+void GraphicManager::menuRestoreScreen() {
+ initGraphics(kScreenWidth, 2 * kScreenHeight, true);
+}
+
+void GraphicManager::menuLoadPictures() {
+ _menu.fillRect(Common::Rect(0, 0, kScreenWidth, kMenuScreenHeight), kColorBlack);
+
+ Common::File file;
+
+ if (!file.open("menu.avd"))
+ error("AVALANCHE: MainMenu: File not found: menu.avd");
+
+ int height = 33;
+ int width = 9 * 8;
+
+ for (int plane = 0; plane < 4; plane++) {
+ // The icons themselves:
+ int n = 0;
+ for (uint16 y = 70; y < 70 + height * 6; y++) {
+ for (uint16 x = 48; x < 48 + width; x += 8) {
+ if (n < 1773) { // Magic value deciphered from the original code.
+ byte pixel = file.readByte();
+ n++;
+ for (int i = 0; i < 8; i++) {
+ byte pixelBit = (pixel >> i) & 1;
+ *(byte *)_menu.getBasePtr(x + 7 - i, y) += (pixelBit << plane);
+ }
+ }
+ }
+ }
+ // The right borders of the menuboxes:
+ for (int a = 0; a < 33; a++) {
+ byte pixel = file.readByte();
+ for (int b = 0; b < 6; b++) {
+ for (int i = 0; i < 8; i++) {
+ byte pixelBit = (pixel >> i) & 1;
+ *(byte *)_menu.getBasePtr(584 + 7 - i, 70 + b * 33 + a) += (pixelBit << plane);
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < 6; i++) {
+ _menu.fillRect(Common::Rect(114, 73 + i * 33, 584, 100 + i * 33), kColorLightgray);
+ _menu.fillRect(Common::Rect(114, 70 + i * 33, 584, 73 + i * 33), kColorWhite);
+ _menu.fillRect(Common::Rect(114, 100 + i * 33, 584, 103 + i * 33), kColorDarkgray);
+ }
+
+ file.close();
+
+ // The title on the top of the screen:
+ if (!file.open("mainmenu.avd"))
+ error("AVALANCHE: MainMenu: File not found: mainmenu.avd");
+
+ Graphics::Surface title = loadPictureRaw(file, 640, 59);
+ drawPicture(_menu, title, 0, 0);
+ title.free();
+
+ file.close();
+}
+
+void GraphicManager::menuDrawBigText(FontType font, uint16 x, uint16 y, Common::String text, Color color) {
+ drawBigText(_menu, text, font, 14, x, y, color);
+}
+
+void GraphicManager::menuDrawIndicator(int x) { // TODO: Implement striped pattern for the indicator.
+ if (x > 0)
+ _menu.fillRect(Common::Rect(x - 1, 330, x, 337), kColorBlack);
+ _menu.fillRect(Common::Rect(x, 330, x + 1, 337), kColorWhite);
+ menuRefreshScreen();
+}
+
+/**
+ * This function is for skipping the difference between a stored 'size' value associated with a picture
+ * and the actual size of the pictures when reading them from files for Ghostroom and Shoot em' up.
+ * It's needed bacuse the original code loaded the pictures to arrays first and only used the useful parts
+ * of these arrays when drawing the images, but in the ScummVM version, we only read the
+ * useful parts from the files, so we have to skip these differences between readings.
+ */
+void GraphicManager::skipDifference(int size, const Graphics::Surface &picture, Common::File &file) {
+ int bytesPerRow = (picture.w / 8);
+ if ((picture.w % 8) > 0)
+ bytesPerRow += 1;
+ int loadedBytes = picture.h * bytesPerRow * 4 + 4;
+ // * 4 is for the four planes, + 4 is for the reading of the width and the height at loadPictureGraphic's beginning.
+
+ int bytesToSkip = size - loadedBytes;
+ file.skip(bytesToSkip);
+}
+
/**
* This function mimics Pascal's getimage().
*/
@@ -518,6 +914,8 @@ Graphics::Surface GraphicManager::loadPictureGraphic(Common::File &file) {
byte pixel = file.readByte();
for (int bit = 0; bit < 8; bit++) {
byte pixelBit = (pixel >> bit) & 1;
+ // If the picture's width is not a multiple of 8, and we get over the boundary with the 'x' cycle, pixelBit is surely == 0.
+ // Otherwise, it doesn't cause trouble, since addign 0 doesn't have an effect at all.
if (pixelBit != 0)
*(byte *)picture.getBasePtr(x + 7 - bit, y) += (pixelBit << plane);
}
@@ -552,23 +950,21 @@ Graphics::Surface GraphicManager::loadPictureRaw(Common::File &file, uint16 widt
return picture;
}
-Graphics::Surface GraphicManager::loadPictureSign(Common::File &file, int xl, int yl) {
+Graphics::Surface GraphicManager::loadPictureSign(Common::File &file, uint16 width, uint16 height) {
// I know it looks very similar to the other loadPicture methods, but in truth it's the combination of the two.
- uint16 width = xl * 8;
- uint16 height = yl;
+ width *= 8;
Graphics::Surface picture; // We make a Surface object for the picture itself.
picture.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
// Produce the picture. We read it in row-by-row, and every row has 4 planes.
- for (int yy = 0; yy < height; yy++) {
+ for (int y = 0; y < height; y++) {
for (int8 plane = 0; plane < 4; plane++) { // The planes are in the "right" order.
- for (uint16 xx = 0; xx < width; xx += 8) {
+ for (uint16 x = 0; x < width; x += 8) {
byte pixel = file.readByte();
for (int bit = 0; bit < 8; bit++) {
byte pixelBit = (pixel >> bit) & 1;
- if (pixelBit != 0)
- *(byte *)picture.getBasePtr(xx + 7 - bit, yy) += (pixelBit << plane);
+ *(byte *)picture.getBasePtr(x + 7 - bit, y) += (pixelBit << plane);
}
}
}
@@ -587,6 +983,19 @@ void GraphicManager::shiftScreen() {
_surface.drawLine(0, 0, _surface.w, 0, kColorBlack);
}
+void GraphicManager::drawWinningPic() {
+ Common::File file;
+
+ if (!file.open("finale.avd"))
+ error("AVALANCHE: Timer: File not found: finale.avd");
+
+ Graphics::Surface winning = loadPictureRaw(file, 640, 200);
+ drawPicture(_surface, winning, 0, 0);
+
+ winning.free();
+ file.close();
+}
+
void GraphicManager::clearAlso() {
_magics.fillRect(Common::Rect(0, 0, 640, 200), 0);
_magics.frameRect(Common::Rect(0, 45, 640, 161), 15);
@@ -674,7 +1083,27 @@ void GraphicManager::drawCursor(byte pos) {
}
void GraphicManager::drawReadyLight(Color color) {
- _surface.fillRect(Common::Rect(419, 195, 438, 197), color);
+ _surface.fillRect(Common::Rect(419, 195, 439, 198), color);
+ _scrolls.fillRect(Common::Rect(419, 195, 439, 198), color);
+}
+
+void GraphicManager::drawSoundLight(bool state) {
+ Color color = kColorBlack;
+ if (state)
+ color = kColorCyan;
+ else
+ color = kColorBlack;
+ _surface.fillRect(Common::Rect(419, 175, 439, 178), color);
+}
+
+void GraphicManager::drawErrorLight(bool state) {
+ Color color = kColorBlack;
+ if (state)
+ color = kColorRed;
+ else
+ color = kColorBlack;
+ _surface.fillRect(Common::Rect(419, 184, 439, 187), color);
+ refreshScreen();
}
/**
@@ -799,10 +1228,10 @@ void GraphicManager::showScroll() {
void GraphicManager::getNaturalPicture(SpriteType &sprite) {
sprite._type = kNaturalImage; // We simply read from the screen and later, in drawSprite() we draw it right back.
- sprite._size = sprite._xl * 8 * sprite._yl + 1;
- sprite._picture.create(sprite._xl * 8, sprite._yl + 1, Graphics::PixelFormat::createFormatCLUT8());
- for (uint16 y = 0; y < sprite._yl + 1; y++) {
- for (uint16 x = 0; x < sprite._xl * 8; x++)
+ sprite._size = sprite._width * 8 * sprite._height + 1;
+ sprite._picture.create(sprite._width * 8, sprite._height + 1, Graphics::PixelFormat::createFormatCLUT8());
+ for (uint16 y = 0; y < sprite._height + 1; y++) {
+ for (uint16 x = 0; x < sprite._width * 8; x++)
*(byte *)sprite._picture.getBasePtr(x, y) = *(byte *)_vm->_graphics->_surface.getBasePtr(sprite._x * 8 + x, sprite._y + y);
}
}
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index 636ae6fdf9..bd8fc6c8ff 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -38,6 +38,7 @@ namespace Avalanche {
class AvalancheEngine;
class AnimationType;
struct SpriteType;
+struct ChunkBlock;
typedef byte FontType[256][16];
typedef byte ManiType[2049];
@@ -58,6 +59,10 @@ public:
void loadDigits();
void loadMouse(byte which);
+ void drawRectangle(Common::Rect rect, Color color);
+ void drawFilledRectangle(Common::Rect rect, Color color);
+ void blackOutScreen();
+ void drawDot(int x, int y, Color color);
void drawLine(int x1, int y1, int x2, int y2, int penX, int penY, Color color);
Common::Point drawScreenArc(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color);
void drawPieSlice(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color);
@@ -79,8 +84,6 @@ public:
void drawDebugLines();
// For the mini-game "Nim".
- void drawFilledRectangle(Common::Rect rect, Color color);
- void drawRectangle(Common::Rect rect, Color color);
void nimLoad();
void nimDrawStone(int x, int y);
void nimDrawInitials();
@@ -90,6 +93,40 @@ public:
// Used in wobble()
void shiftScreen();
+ // Used in winning()
+ void drawWinningPic();
+
+ // Ghostroom's functions:
+ void ghostDrawMonster(byte ***picture, uint16 destX, int16 destY, MonsterType type);
+ Graphics::Surface ghostLoadPicture(Common::File &file, Common::Point &coord);
+ void ghostDrawPicture(const Graphics::Surface &picture, uint16 destX, uint16 destY);
+ void ghostDrawBackgroundItems(Common::File &file);
+
+ // Help's function:
+ void helpDrawButton(int y, byte which);
+ void helpDrawHighlight(byte which, Color color);
+ void helpDrawBigText(const Common::String text, int16 x, int16 y, Color color);
+
+ // Shoot em' up's functions:
+ void seuDrawTitle();
+ void seuLoad();
+ void seuFree();
+ void seuDrawPicture(int x, int y, byte which);
+ void seuDrawCameo(int destX, int destY, byte w1, byte w2);
+ uint16 seuGetPicWidth(int which);
+ uint16 seuGetPicHeight(int which);
+
+ // Main Menu's functions:
+ // The main menu uses a different screen height (350) from the game itself (200 * 2)
+ // so it needs it's own graphic functions on that matter.
+ void menuRefreshScreen();
+ void menuInitialize();
+ void menuFree();
+ void menuRestoreScreen();
+ void menuLoadPictures();
+ void menuDrawBigText(FontType font, uint16 x, uint16 y, Common::String text, Color color);
+ void menuDrawIndicator(int x);
+
void clearAlso();
void clearTextBar();
void setAlsoLine(int x1, int y1, int x2, int y2, Color color);
@@ -104,6 +141,8 @@ public:
void drawToolbar();
void drawCursor(byte pos);
void drawReadyLight(Color color);
+ void drawSoundLight(bool state);
+ void drawErrorLight(bool state);
void drawSign(Common::String name, int16 xl, int16 yl, int16 y);
void drawIcon(int16 x, int16 y, byte which);
void drawScreenLine(int16 x, int16 y, int16 x2, int16 y2, Color color);
@@ -128,6 +167,7 @@ private:
static const byte kEgaPaletteIndex[16];
static const byte kBackgroundHeight = 8 * 12080 / kScreenWidth; // With 640 width it's 151.
// The 8 = number of bits in a byte, and 12080 comes from Lucerna::load().
+ static const uint16 kMenuScreenHeight = 350;
Graphics::Surface _background;
Graphics::Surface _backup;
@@ -137,26 +177,32 @@ private:
Graphics::Surface _screen; // Only used in refreshScreen() to make it more optimized. (No recreation of it at every call of the function.)
Graphics::Surface _scrolls;
Graphics::Surface _surface;
+ Graphics::Surface _menu;
// For the mini-game "Nim".
- Graphics::Surface _nimStone;
+ Graphics::Surface _nimStone;
Graphics::Surface _nimInitials[3];
Graphics::Surface _nimLogo;
+ // For the mini-game "Shoot em' up".
+ Graphics::Surface _seuPictures[99];
+
byte _egaPalette[64][3];
AvalancheEngine *_vm;
+ void skipDifference(int size, const Graphics::Surface &picture, Common::File &file);
+
// Further information about these two: http://www.shikadi.net/moddingwiki/Raw_EGA_data
Graphics::Surface loadPictureGraphic(Common::File &file); // Reads Graphic-planar EGA data.
- Graphics::Surface loadPictureSign(Common::File &file, int xl, int yl); // Reads a tricky type of picture used for the "game over"/"about" scrolls and in the mini-game Nim.
-
+ Graphics::Surface loadPictureSign(Common::File &file, uint16 width, uint16 height); // Reads a tricky type of picture used for the "game over"/"about" scrolls and in the mini-game Nim.
+
void drawText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color);
+ void drawBigText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color);
void drawPicture(Graphics::Surface &target, const Graphics::Surface picture, uint16 destX, uint16 destY);
// Taken from Free Pascal's Procedure InternalEllipseDefault. Used to replace Pascal's procedure arc.
// Returns the end point of the arc. (Needed in Clock.)
- // TODO: Make it more accurate later.
Common::Point drawArc(Graphics::Surface &surface, int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color);
};
diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp
new file mode 100644
index 0000000000..9b077eb4fb
--- /dev/null
+++ b/engines/avalanche/help.cpp
@@ -0,0 +1,270 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
+*/
+
+/* Original name: HELPER The help system unit. */
+
+#include "avalanche/avalanche.h"
+#include "avalanche/help.h"
+
+#include "common/scummsys.h"
+
+namespace Avalanche {
+
+Help::Help(AvalancheEngine *vm) {
+ _vm = vm;
+
+ for (int i = 0; i < 10; i++) {
+ _buttons[i]._trigger = Common::KEYCODE_INVALID;
+ _buttons[i]._whither = 0;
+ }
+ _highlightWas = 0;
+ _buttonNum = 0;
+ _holdLeft = false;
+}
+
+/**
+ * Loads and draws the chosen page of the help.
+ * @remarks Originally called 'getme'
+ */
+void Help::switchPage(byte which) {
+ // Help icons are 80x20.
+
+ _highlightWas = 177; // Forget where the highlight was.
+
+ Common::File file;
+
+ if (!file.open("help.avd"))
+ error("AVALANCHE: Help: File not found: help.avd");
+
+ file.seek(which * 2);
+ uint16 offset = file.readUint16LE();
+ file.seek(offset);
+
+ Common::String title = getLine(file);
+
+ _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 640, 200), kColorBlue);
+ _vm->_graphics->drawFilledRectangle(Common::Rect(8, 40, 450, 200), kColorWhite);
+
+ byte index = file.readByte();
+ _vm->_graphics->helpDrawButton(-177, index);
+
+ // Plot the title:
+ _vm->_graphics->drawNormalText(title, _vm->_font, 8, 629 - 8 * title.size(), 26, kColorBlack);
+ _vm->_graphics->drawNormalText(title, _vm->_font, 8, 630 - 8 * title.size(), 25, kColorCyan);
+
+ _vm->_graphics->helpDrawBigText("help!", 549, 1, kColorBlack);
+ _vm->_graphics->helpDrawBigText("help!", 550, 0, kColorCyan);
+
+ byte y = 0;
+ do {
+ Common::String line = getLine(file);
+ if (!line.empty()) {
+ if (line.compareTo(Common::String('!')) == 0) // End of the help text is signalled with a '!'.
+ break;
+ if (line[0] == '\\') {
+ line.deleteChar(0);
+ _vm->_graphics->drawNormalText(line, _vm->_font, 8, 16, 41 + y * 10, kColorRed);
+ }
+ else
+ _vm->_graphics->drawNormalText(line, _vm->_font, 8, 16, 41 + y * 10, kColorBlack);
+ }
+ y++;
+ } while (true);
+
+ // We are now at the end of the text. Next we must read the icons:
+ y = 0;
+ _buttonNum = 0;
+ while (!file.eos()) {
+ int trigger = file.readByte();
+
+ if (trigger == 177)
+ break;
+ switch (trigger) {
+ case 254: // Escape
+ trigger = 27;
+ break;
+ case 214: // PageUp
+ trigger = 280;
+ break;
+ case 216: // PageDown
+ trigger = 281;
+ break;
+ default: // A - Z
+ // The characters are stored in the file in uppercase, but we need the lowercase versions for KeyCode:
+ trigger = tolower(trigger);
+ break;
+ }
+
+ _buttons[y]._trigger = Common::KeyCode(trigger);
+ index = file.readByte();
+ if (_buttons[y]._trigger != Common::KEYCODE_INVALID)
+ _vm->_graphics->helpDrawButton(13 + (y + 1) * 27, index);
+ _buttons[y]._whither = file.readByte(); // This is the position to jump to.
+
+ Common::String text = "";
+ switch (_buttons[y]._trigger) {
+ case Common::KEYCODE_ESCAPE:
+ text = Common::String("Esc");
+ break;
+ case Common::KEYCODE_PAGEUP:
+ text = Common::String(24);
+ break;
+ case Common::KEYCODE_PAGEDOWN:
+ text = Common::String(25);
+ break;
+ default:
+ text = Common::String(toupper(_buttons[y]._trigger));
+ break;
+ }
+
+ _vm->_graphics->helpDrawBigText(text, 589 - (text.size() * 8), 18 + (y + 1) * 27, kColorBlack);
+ _vm->_graphics->helpDrawBigText(text, 590 - (text.size() * 8), 17 + (y + 1) * 27, kColorCyan);
+
+ y++;
+ _buttonNum++;
+ }
+
+ _vm->_graphics->refreshScreen();
+
+ file.close();
+}
+
+Common::String Help::getLine(Common::File &file) {
+ Common::String line;
+ byte length = file.readByte();
+ for (int i = 0; i < length; i++) {
+ char c = file.readByte();
+ line += (c ^ 177);
+ }
+ return line;
+}
+
+bool Help::handleMouse(const Common::Event &event) {
+ Common::Point mousePos;
+ mousePos.x = event.mouse.x;
+ mousePos.y = event.mouse.y / 2;
+
+ int index = -1;
+
+ if (event.type == Common::EVENT_LBUTTONUP) { // Clicked *somewhere*...
+ _holdLeft = false;
+
+ if ((mousePos.x < 470) || (mousePos.x > 550) || (((mousePos.y - 13) % 27) > 20))
+ index = -1;
+ else // Clicked on a button.
+ index = ((mousePos.y - 13) / 27) - 1;
+ } else { // LBUTTONDOWN or MOUSEMOVE
+ int highlightIs = 0;
+
+ // Decide which button we are hovering the cursor over:
+ if ((mousePos.x > 470) && (mousePos.x <= 550) && (((mousePos.y - 13) % 27) <= 20)) { // No click, so highlight.
+ highlightIs = (mousePos.y - 13) / 27 - 1;
+ if ((highlightIs < 0) || (5 < highlightIs))
+ highlightIs = 177; // In case of silly values.
+ } else
+ highlightIs = 177;
+
+ Color highlightColor = kColorLightblue;
+ // If we clicked on a button or we are holding down the button, we have to highlight it with cyan:
+ if (((highlightIs != 177) && (event.type == Common::EVENT_LBUTTONDOWN)) || _holdLeft) {
+ _holdLeft = true;
+ highlightColor = kColorLightcyan;
+ }
+
+ // Erase the previous highlight only if it's needed:
+ if (_highlightWas != highlightIs)
+ _vm->_graphics->helpDrawHighlight(_highlightWas, kColorBlue);
+
+ // Highlight the current one with the proper color:
+ if ((highlightIs != 177) && (_buttons[highlightIs]._trigger != Common::KEYCODE_INVALID)) {
+ _highlightWas = highlightIs;
+ _vm->_graphics->helpDrawHighlight(highlightIs, highlightColor);
+ }
+ }
+
+ if ((index >= 0) && (_buttons[index]._trigger != Common::KEYCODE_INVALID)) {
+ if (_buttons[index]._trigger == Common::KEYCODE_ESCAPE)
+ return true;
+ else {
+ _vm->fadeOut();
+ switchPage(_buttons[index]._whither);
+ _vm->fadeIn();
+ return false;
+ }
+ }
+
+ return false;
+}
+
+bool Help::handleKeyboard(const Common::Event &event) {
+ if (event.kbd.keycode == Common::KEYCODE_ESCAPE)
+ return true;
+
+ for (int i = 0; i < _buttonNum; i++) {
+ if (_buttons[i]._trigger == event.kbd.keycode) {
+ _vm->fadeOut();
+ switchPage(_buttons[i]._whither);
+ _vm->fadeIn();
+ return false;
+ }
+ }
+
+ return false;
+}
+
+/**
+ * @remarks Originally called 'boot_help'
+ */
+void Help::run() {
+ _vm->_graphics->saveScreen();
+ _vm->fadeOut();
+ switchPage(0);
+ _vm->fadeIn();
+
+ _vm->_graphics->loadMouse(kCurHelp);
+
+ // Originally it was the body of 'continue_help':
+ bool close = false;
+ while (!_vm->shouldQuit() && !close) {
+ Common::Event event;
+ _vm->getEvent(event);
+ if (event.type == Common::EVENT_KEYDOWN)
+ close = handleKeyboard(event);
+ else if ((event.type == Common::EVENT_LBUTTONDOWN) || (event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_MOUSEMOVE))
+ close = handleMouse(event);
+
+ _vm->_graphics->refreshScreen();
+ }
+ // End of 'continue_help'.
+
+ _vm->fadeOut();
+ _vm->_graphics->restoreScreen();
+ _vm->_graphics->removeBackup();
+ _vm->fadeIn();
+}
+
+} // End of namespace Avalanche
diff --git a/engines/avalanche/help.h b/engines/avalanche/help.h
new file mode 100644
index 0000000000..7543d87047
--- /dev/null
+++ b/engines/avalanche/help.h
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
+*/
+
+/* Original name: HELPER The help system unit. */
+
+#ifndef AVALANCHE_HELP_H
+#define AVALANCHE_HELP_H
+
+namespace Avalanche {
+class AvalancheEngine;
+
+class Help {
+public:
+ Help(AvalancheEngine *vm);
+
+ void run();
+
+private:
+ struct Button {
+ Common::KeyCode _trigger;
+ byte _whither;
+ };
+
+ AvalancheEngine *_vm;
+
+ Button _buttons[10];
+ byte _highlightWas;
+ byte _buttonNum; // How many buttons do we have on the screen at the moment?
+ bool _holdLeft; // Is the left mouse button is still being held?
+
+ void switchPage(byte which);
+ Common::String getLine(Common::File &file); // It was a nested function in getMe().
+
+ // These two return true if we have to leave the Help:
+ bool handleMouse(const Common::Event &event);
+ bool handleKeyboard(const Common::Event &event);
+};
+
+} // End of namespace Avalanche
+
+#endif // AVALANCHE_HELP_H
diff --git a/engines/avalanche/highscore.cpp b/engines/avalanche/highscore.cpp
new file mode 100644
index 0000000000..5f47aeb894
--- /dev/null
+++ b/engines/avalanche/highscore.cpp
@@ -0,0 +1,110 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike: Mark and Thomas Thurman.
+*/
+
+#include "avalanche/avalanche.h"
+#include "avalanche/highscore.h"
+
+#include "common/savefile.h"
+
+namespace Avalanche {
+
+HighScore::HighScore(AvalancheEngine *vm) {
+ _vm = vm;
+}
+
+void HighScore::displayHighScores() {
+ warning("STUB: HighScore::displayHighScores(");
+}
+
+void HighScore::saveHighScores() {
+ int firstSmaller = 0;
+ while ((firstSmaller < 12) && (_data[firstSmaller]._score >= _vm->_score))
+ firstSmaller++;
+
+ if (firstSmaller < 12) {
+ // Shift all the lower scores down a space:
+ for (int i = firstSmaller; i < 11; i++)
+ _data[i + 1] = _data[i];
+ // Set the new high score:
+ _data[firstSmaller]._name = "Player"; // TODO: Come up with something for that. In the original it wasn't implemented at all...
+ _data[firstSmaller]._rank = _vm->_parser->rank();
+ _data[firstSmaller]._score = _vm->_score;
+ }
+
+ Common::OutSaveFile *f = g_system->getSavefileManager()->openForSaving("scores.avd");
+ if (!f) {
+ warning("Can't create file 'scores.avd', high scores are not saved.");
+ return;
+ }
+ Common::Serializer sz(NULL, f);
+ syncHighScores(sz);
+ f->finalize();
+ delete f;
+}
+
+void HighScore::loadHighScroes() {
+ Common::File file;
+ if (!file.exists("scores.avd")) {
+ produceDefaultHighScores();
+ } else {
+ Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading("scores.avd");
+ if (!f)
+ return;
+ Common::Serializer sz(f, NULL);
+ syncHighScores(sz);
+ delete f;
+ }
+}
+
+void HighScore::produceDefaultHighScores() {
+ for (int i = 0; i < 12; i++) {
+ _data[i]._score = 32 - (i + 1) * 2;
+ _data[i]._rank = "...";
+ }
+ _data[0]._name = "Mike";
+ _data[1]._name = "Liz";
+ _data[2]._name = "Thomas";
+ _data[3]._name = "Mark";
+ _data[4]._name = "Mandy";
+ _data[5]._name = "Andrew";
+ _data[6]._name = "Lucy Tryphena";
+ _data[7]._name = "Tammy the dog";
+ _data[8]._name = "Avaricius";
+ _data[9]._name = "Spellchick";
+ _data[10]._name = "Caddelli";
+ _data[11]._name = "Spludwick";
+}
+
+void HighScore::syncHighScores(Common::Serializer &sz) {
+ for (int i = 0; i < 12; i++) {
+ sz.syncString(_data[i]._name);
+ sz.syncAsUint16LE(_data[i]._score);
+ sz.syncString(_data[i]._rank);
+ }
+}
+
+} // End of namespace Avalanche
diff --git a/engines/avalanche/highscore.h b/engines/avalanche/highscore.h
new file mode 100644
index 0000000000..de7ec36ed5
--- /dev/null
+++ b/engines/avalanche/highscore.h
@@ -0,0 +1,59 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike: Mark and Thomas Thurman.
+*/
+
+#ifndef AVALANCHE_HIGHSCORE_H
+#define AVALANCHE_HIGHSCORE_H
+
+namespace Avalanche {
+class AvalancheEngine;
+
+struct HighScoreData {
+ Common::String _name;
+ uint16 _score;
+ Common::String _rank;
+};
+
+class HighScore {
+public:
+ HighScore(AvalancheEngine *vm);
+
+ void displayHighScores();
+ void saveHighScores();
+ void loadHighScroes();
+
+private:
+ AvalancheEngine *_vm;
+
+ HighScoreData _data[12];
+
+ void produceDefaultHighScores();
+ void syncHighScores(Common::Serializer &sz);
+};
+
+} // End of namespace Avalanche
+
+#endif // AVALANCHE_HIGHSCORE_H
diff --git a/engines/avalanche/mainmenu.cpp b/engines/avalanche/mainmenu.cpp
new file mode 100644
index 0000000000..543684556c
--- /dev/null
+++ b/engines/avalanche/mainmenu.cpp
@@ -0,0 +1,116 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
+*/
+
+#include "avalanche/avalanche.h"
+#include "avalanche/mainmenu.h"
+
+namespace Avalanche {
+
+MainMenu::MainMenu(AvalancheEngine *vm) {
+ _vm = vm;
+
+ _registrant = Common::String("");
+}
+
+void MainMenu::run() {
+ CursorMan.showMouse(false);
+ _vm->_graphics->menuInitialize();
+ _vm->_graphics->menuLoadPictures();
+ loadRegiInfo();
+ loadFont();
+
+ option(1, "Play the game.");
+ option(2, "Read the background.");
+ option(3, "Preview... perhaps...");
+ option(4, "View the documentation.");
+ option(5, "Registration info.");
+ option(6, "Exit back to DOS.");
+ centre(274, _registrant);
+ centre(301, "Make your choice, or wait for the demo.");
+
+ _vm->_graphics->menuRefreshScreen();
+
+ wait();
+}
+
+void MainMenu::loadFont() {
+ Common::File file;
+ if (!file.open("avalot.fnt"))
+ error("AVALANCHE: Scrolls: File not found: avalot.fnt");
+ for (int16 i = 0; i < 256; i++)
+ file.read(_font[i], 16);
+ file.close();
+}
+
+void MainMenu::loadRegiInfo() {
+ _registrant = "(Unregistered evaluation copy.)";
+ warning("STUB: MainMenu::loadRegiInfo()");
+}
+
+void MainMenu::option(byte which, Common::String what) {
+ _vm->_graphics->menuDrawBigText(_font, 127, 39 + which * 33, Common::String(which + 48) + ')', kColorBlack);
+ _vm->_graphics->menuDrawBigText(_font, 191, 39 + which * 33, what, kColorBlack);
+}
+
+void MainMenu::centre(int16 y, Common::String text) {
+ _vm->_graphics->menuDrawBigText(_font, 320 - text.size() * 8, y, text, kColorLightgray);
+}
+
+void MainMenu::wait() {
+ int x = 0;
+ while (!_vm->shouldQuit()) {
+ _vm->_graphics->menuDrawIndicator(x);
+ _vm->_system->delayMillis(40);
+ x++;
+ if (x == 641)
+ x = 0;
+ Common::Event event;
+ _vm->getEvent(event);
+ if (event.type == Common::EVENT_KEYDOWN) {
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_SPACE:
+ case Common::KEYCODE_RETURN:
+ case Common::KEYCODE_1: // Falltroughs are inteded.
+ // Play the game
+ _vm->_graphics->menuFree();
+ _vm->_graphics->menuRestoreScreen();
+ CursorMan.showMouse(true);
+ return;
+ case Common::KEYCODE_ESCAPE:
+ case Common::KEYCODE_6: // Falltroughs are inteded.
+ // Exit back to DOS
+ _vm->_letMeOut = true;
+ _vm->_graphics->menuFree();
+ return;
+ default:
+ break;
+ }
+ }
+ }
+}
+
+} // End of namespace Avalanche
diff --git a/engines/avalanche/mainmenu.h b/engines/avalanche/mainmenu.h
new file mode 100644
index 0000000000..e973e0ccf3
--- /dev/null
+++ b/engines/avalanche/mainmenu.h
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
+*/
+
+#ifndef AVALANCHE_MAINMENU_H
+#define AVALANCHE_MAINMENU_H
+
+namespace Avalanche {
+class AvalancheEngine;
+
+class MainMenu {
+public:
+ MainMenu(AvalancheEngine *vm);
+
+ void run();
+
+private:
+ AvalancheEngine *_vm;
+
+ Common::String _registrant;
+ FontType _font;
+
+ void loadFont();
+ void loadRegiInfo();
+ void option(byte which, Common::String what);
+ void centre(int16 y, Common::String text);
+ void wait();
+};
+
+} // End of namespace Avalanche
+
+#endif // AVALANCHE_MAINMENU_H
diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk
index 39ca94e3f8..29bc039b42 100644
--- a/engines/avalanche/module.mk
+++ b/engines/avalanche/module.mk
@@ -9,15 +9,19 @@ MODULE_OBJS = \
console.o \
detection.o \
graphics.o \
- menu.o \
+ dropdown.o \
parser.o \
- pingo.o \
dialogs.o \
sequence.o \
sound.o \
timer.o \
nim.o \
- clock.o
+ clock.o \
+ ghostroom.o \
+ help.o \
+ shootemup.o \
+ mainmenu.o \
+ highscore.o
# This module can be built as a plugin
ifeq ($(ENABLE_AVALANCHE), DYNAMIC_PLUGIN)
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index e4897a6d49..9457a5065b 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -152,7 +152,7 @@ void Nim::setup() {
_vm->fadeIn();
_vm->_graphics->nimLoad();
- _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 640, 200), kColorBlack);
+ _vm->_graphics->blackOutScreen();
// Upper left rectangle.
_vm->_graphics->drawRectangle(Common::Rect(10, 5, 381, 71), kColorRed);
_vm->_graphics->drawFilledRectangle(Common::Rect(11, 6, 380, 70), kColorBrown);
@@ -383,8 +383,8 @@ void Nim::takeSome() {
int x1 = 63 + (_stones[_row] - _number) * 64;
int y1 = 38 + 35 * (_row + 1);
- int x2 = 54 + _stones[_row] * 64;
- int y2 = 63 + 35 * (_row + 1);
+ int x2 = 55 + _stones[_row] * 64;
+ int y2 = 64 + 35 * (_row + 1);
_vm->_graphics->drawRectangle(Common::Rect(x1, y1, x2, y2), kColorBlue); // Draw the selection rectangle.
_vm->_graphics->refreshScreen();
@@ -396,8 +396,8 @@ void Nim::takeSome() {
_vm->_graphics->drawRectangle(Common::Rect(x1, y1, x2, y2), kColorBlack); // Erase the previous selection.
x1 = 63 + (_stones[_row] - _number) * 64;
y1 = 38 + 35 * (_row + 1);
- x2 = 54 + _stones[_row] * 64;
- y2 = 63 + 35 * (_row + 1);
+ x2 = 55 + _stones[_row] * 64;
+ y2 = 64 + 35 * (_row + 1);
_vm->_graphics->drawRectangle(Common::Rect(x1, y1, x2, y2), kColorBlue); // Draw the new one.
_vm->_graphics->refreshScreen();
}
diff --git a/engines/avalanche/nim.h b/engines/avalanche/nim.h
index 7e5f55e69f..3c2f0455cf 100644
--- a/engines/avalanche/nim.h
+++ b/engines/avalanche/nim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index b0524a0d7e..b152747ab0 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -381,8 +381,8 @@ void Parser::init() {
void Parser::handleInputText(const Common::Event &event) {
byte inChar = event.kbd.ascii;
warning("STUB: Parser::handleInputText()");
-// if (_vm->_menu->_activeMenuItem._activeNow) {
-// _vm->_menu->parseKey(inChar, _vm->_enhanced->extd);
+// if (_vm->_dropdown->_activeMenuItem._activeNow) {
+// _vm->_dropdown->parseKey(inChar, _vm->_enhanced->extd);
// } else {
if (_inputText.size() < 76) {
if ((inChar == '"') || (inChar == '`')) {
@@ -402,7 +402,7 @@ void Parser::handleInputText(const Common::Event &event) {
}
void Parser::handleBackspace() {
- if (_vm->_menu->_activeMenuItem._activeNow)
+ if (_vm->_dropdown->_activeMenuItem._activeNow)
return;
if (_inputTextPos > 0) {
@@ -416,7 +416,7 @@ void Parser::handleBackspace() {
}
void Parser::handleReturn() {
- if (_vm->_menu->_activeMenuItem._activeNow)
+ if (_vm->_dropdown->_activeMenuItem._activeNow)
tryDropdown();
else if (!_inputText.empty()) {
_inputTextBackup = _inputText;
@@ -468,7 +468,7 @@ void Parser::handleFunctionKey(const Common::Event &event) {
break;
case Common::KEYCODE_F7:
if (event.kbd.flags & Common::KBD_CTRL)
- _vm->majorRedraw();
+ _vm->_graphics->refreshScreen();
else
_vm->callVerb(kVerbCodeOpen);
break;
@@ -602,7 +602,7 @@ Common::String Parser::rank() {
};
for (int i = 0; i < 8; i++) {
- if ((_vm->_dnascore >= ranks[i]._score) && (_vm->_dnascore < ranks[i + 1]._score))
+ if ((_vm->_score >= ranks[i]._score) && (_vm->_score < ranks[i + 1]._score))
return Common::String(ranks[i]._title);
}
return "";
@@ -2021,8 +2021,7 @@ void Parser::doThat() {
break;
case 55:
if (_vm->_room == kRoomArgentPub)
- // play_nim();
- warning("STUB: Parser::doThat() - case kVerbCodeplay - play_nim()");
+ _vm->_nim->playNim();
else
_vm->_dialogs->displayText(kWhat);
break;
@@ -2043,8 +2042,7 @@ void Parser::doThat() {
}
break;
case kVerbCodeHelp:
- // boot_help();
- warning("STUB: Parser::doThat() - case kVerbCodehelp");
+ _vm->_help->run();
break;
case kVerbCodeLarrypass:
_vm->_dialogs->displayText("Wrong game!");
@@ -2053,8 +2051,7 @@ void Parser::doThat() {
_vm->_dialogs->displayText("Hello, Phaon!");
break;
case kVerbCodeBoss:
- // bosskey();
- warning("STUB: Parser::doThat() - case kVerbCodeboss");
+ bossKey();
break;
case kVerbCodePee:
if (_vm->getFlag('P')) {
@@ -2309,7 +2306,7 @@ void Parser::doThat() {
break;
case kVerbCodeScore: {
Common::String tmpStr = Common::String::format("Your score is %d,%c%cout of a possible 128.%c%c " \
- "This gives you a rank of %s.%c%c%s", _vm->_dnascore, kControlCenter, kControlNewLine, kControlNewLine,
+ "This gives you a rank of %s.%c%c%s", _vm->_score, kControlCenter, kControlNewLine, kControlNewLine,
kControlNewLine, rank().c_str(), kControlNewLine, kControlNewLine, totalTime().c_str());
_vm->_dialogs->displayText(tmpStr);
}
@@ -2427,6 +2424,25 @@ void Parser::doThat() {
}
}
+void Parser::bossKey() {
+ _vm->_graphics->saveScreen();
+ _vm->_graphics->blackOutScreen();
+ _vm->_graphics->loadMouse(kCurUpArrow);
+ _vm->loadBackground(98);
+ _vm->_graphics->drawNormalText("Graph/Histo/Draw/Sample: \"JANJUN93.GRA\": (W3-AB3)", _vm->_font, 8, 120, 169, kColorDarkgray);
+ _vm->_graphics->drawNormalText("Press any key or click the mouse to return.", _vm->_font, 8, 144, 182, kColorDarkgray);
+ _vm->_graphics->refreshScreen();
+ Common::Event event;
+ _vm->getEvent(event);
+ while ((!_vm->shouldQuit()) && (event.type != Common::EVENT_KEYDOWN) && (event.type != Common::EVENT_LBUTTONDOWN)){
+ _vm->getEvent(event);
+ _vm->_graphics->refreshScreen();
+ }
+ _vm->_graphics->restoreScreen();
+ _vm->_graphics->removeBackup();
+ _vm->loadBackground(_vm->_room);
+}
+
void Parser::verbOpt(byte verb, Common::String &answer, char &ansKey) {
// kVerbCodegive isn't dealt with by this procedure, but by ddm__with.
switch (verb) {
diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h
index 20066329e5..6133c41442 100644
--- a/engines/avalanche/parser.h
+++ b/engines/avalanche/parser.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -72,13 +72,11 @@ public:
byte _wearing; // what you're wearing
Parser(AvalancheEngine *vm);
-
void init();
void parse();
void doThat();
void verbOpt(byte verb, Common::String &answer, char &ansKey);
void drink();
-
void handleInputText(const Common::Event &event);
void handleBackspace();
void handleReturn();
@@ -89,7 +87,7 @@ public:
void tryDropdown();
int16 getPos(const Common::String &crit, const Common::String &src);
void doVerb(VerbCode id);
-
+ Common::String rank();
void resetVariables();
void synchronize(Common::Serializer &sz);
@@ -112,10 +110,7 @@ private:
byte wordNum(Common::String word);
void replace(Common::String oldChars, byte newChar);
-
- Common::String rank();
Common::String totalTime();
-
void clearWords();
void cheatParse(Common::String codes);
void stripPunctuation(Common::String &word);
@@ -146,6 +141,7 @@ private:
void playHarp();
void winSequence();
void wipeText();
+ void bossKey();
};
} // End of namespace Avalanche
diff --git a/engines/avalanche/pingo.cpp b/engines/avalanche/pingo.cpp
deleted file mode 100644
index 40467ab839..0000000000
--- a/engines/avalanche/pingo.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/*
- * This code is based on the original source code of Lord Avalot d'Argent version 1.3.
- * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
- */
-
-/* PINGO Full-screen sub-parts of the game. */
-
-#include "avalanche/avalanche.h"
-#include "avalanche/pingo.h"
-
-namespace Avalanche {
-
-Pingo::Pingo(AvalancheEngine *vm) {
- _vm = vm;
-}
-
-void Pingo::dPlot(int16 x, int16 y, Common::String z) {
- warning("STUB: Pingo::dPlot()");
-}
-
-void Pingo::bossKey() {
- warning("STUB: Pingo::bossKey()");
-}
-
-void Pingo::copy02() { // taken from Wobble (below)
- warning("STUB: Pingo::copy02()");
-}
-
-void Pingo::copy03() { // taken from Wobble (below)
- warning("STUB: Pingo::copy03()");
-}
-
-void Pingo::copyPage(byte frp, byte top) { // taken from Copy02 (above)
- warning("STUB: Pingo::copyPage()");
-}
-
-void Pingo::winningPic() {
- Common::File f;
- _vm->fadeOut();
-
- if (!f.open("finale.avd"))
- error("AVALANCHE: File not found: finale.avd");
-
-#if 0
- for (int bit = 0; bit <= 3; bit++) {
- port[0x3c4] = 2;
- port[0x3ce] = 4;
- port[0x3c5] = 1 << bit;
- port[0x3cf] = bit;
- blockread(f, mem[0xa000 * 0], 16000);
- }
-#endif
-
- f.close();
-
- warning("STUB: Pingo::winningPic()");
-
- _vm->fadeIn();
-
-#if 0
- do {
- _vm->check();
- } while (!(keypressed() || (mrelease > 0)));
- while (keypressed())
- char r = readkey();
- major_redraw();
-#endif
-
- warning("STUB: Pingo::winningPic()");
-}
-
-} // End of namespace Avalanche.
diff --git a/engines/avalanche/sequence.cpp b/engines/avalanche/sequence.cpp
index 3a60c4ec1d..d63532a457 100644
--- a/engines/avalanche/sequence.cpp
+++ b/engines/avalanche/sequence.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/sequence.h b/engines/avalanche/sequence.h
index d3c1b54963..8062118059 100644
--- a/engines/avalanche/sequence.h
+++ b/engines/avalanche/sequence.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
new file mode 100644
index 0000000000..cabd19d6f9
--- /dev/null
+++ b/engines/avalanche/shootemup.cpp
@@ -0,0 +1,693 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
+*/
+
+#include "avalanche/avalanche.h"
+#include "avalanche/shootemup.h"
+
+#include "common/random.h"
+
+namespace Avalanche {
+
+const byte ShootEmUp::kStocks = 27;
+const byte ShootEmUp::kAvvyShoots = 86;
+const byte ShootEmUp::kFacingRight = 87;
+const byte ShootEmUp::kFacingLeft = 93;
+const long int ShootEmUp::kFlag = -20047;
+const byte ShootEmUp::kFrameDelayMax = 2;
+const byte ShootEmUp::kAvvyY = 150;
+const byte ShootEmUp::kShooting[7] = { 86, 79, 80, 81, 80, 79, 86 };
+const byte ShootEmUp::kTimesASecond = 18;
+const byte ShootEmUp::kFlashTime = 20; // If flash_time is <= this, the word "time" will flash. Should be about 20.
+const byte ShootEmUp::kLeftMargin = 10;
+const int16 ShootEmUp::kRightMargin = 605;
+
+ShootEmUp::ShootEmUp(AvalancheEngine *vm) {
+ _vm = vm;
+
+ _time = 120;
+ for (int i = 0; i < 7; i++)
+ _stockStatus[i] = 0;
+ for (int i = 0; i < 99; i++) {
+ _sprites[i]._ix = 0;
+ _sprites[i]._iy = 0;
+ _sprites[i]._x = kFlag;
+ _sprites[i]._y = 0;
+ _sprites[i]._p = 0;
+ _sprites[i]._timeout = 0;
+ _sprites[i]._cameo = false;
+ _sprites[i]._cameoFrame = 0;
+ _sprites[i]._missile = false;
+ _sprites[i]._wipe = false;
+ }
+ _rectNum = 0;
+ _avvyWas = 320;
+ _avvyPos = 320;
+ _avvyAnim = 1;
+ _avvyFacing = kFacingLeft;
+ _altWasPressedBefore = false;
+ _throwNext = 73;
+ _firing = false;
+ for (int i = 0; i < 4; i++) {
+ _running[i]._x = kFlag;
+ _running[i]._y = 0;
+ _running[i]._frame = 0;
+ _running[i]._tooHigh = 0;
+ _running[i]._lowest = 0;
+ _running[i]._ix = 0;
+ _running[i]._iy = 0;
+ _running[i]._frameDelay = 0;
+ }
+ for (int i = 0; i < 7; i++)
+ _hasEscaped[i] = false;
+ _count321 = 255; // Counting down.
+ _howManyHaveEscaped = 0;
+ _escapeCount = 0;
+ _escaping = false;
+ _timeThisSecond = 0;
+ _cp = false;
+ _wasFacing = 0;
+ _score = 0;
+ _escapeStock = 0;
+ _gotOut = false;
+}
+
+uint16 ShootEmUp::run() {
+ CursorMan.showMouse(false);
+ _vm->_graphics->saveScreen();
+ _vm->fadeOut();
+ _vm->_graphics->seuDrawTitle();
+ _vm->fadeIn();
+
+ _vm->_graphics->seuLoad();
+
+ // Should we show the instructions?
+ while (!_vm->shouldQuit()) {
+ Common::Event event;
+ _vm->getEvent(event);
+ if (event.type == Common::EVENT_KEYDOWN) {
+ if ((event.kbd.keycode == Common::KEYCODE_i) || (event.kbd.keycode == Common::KEYCODE_F1))
+ instructions();
+ break; // We don't show the instructions and simply go on with the minigame if not I or F1 was pressed.
+ }
+ }
+
+ setup();
+
+ while ((_time != 0) && (!_vm->shouldQuit())) {
+ uint32 beginLoop = _vm->_system->getMillis();
+
+ blankIt();
+ hitPeople();
+ plotThem();
+ moveThem();
+ moveAvvy();
+ bumpFolk();
+ peopleRunning();
+ animate();
+ escapeCheck();
+ collisionCheck();
+ updateTime();
+ check321();
+ readKbd();
+
+ _cp = !_cp;
+
+ _vm->_graphics->refreshScreen();
+
+ uint32 delay = _vm->_system->getMillis() - beginLoop;
+ if (delay <= 55)
+ _vm->_system->delayMillis(55 - delay); // Replaces slowdown(); 55 comes from 18.2 Hz (B Flight).
+ };
+
+ _vm->fadeOut();
+ _vm->_graphics->restoreScreen();
+ _vm->_graphics->removeBackup();
+ _vm->fadeIn();
+ CursorMan.showMouse(true);
+
+ return _score;
+}
+
+bool ShootEmUp::overlap(uint16 a1x, uint16 a1y, uint16 a2x, uint16 a2y, uint16 b1x, uint16 b1y, uint16 b2x, uint16 b2y) {
+ // By De Morgan's law:
+ return (a2x >= b1x) && (b2x >= a1x) && (a2y >= b1y) && (b2y >= a1y);
+}
+
+byte ShootEmUp::getStockNumber(byte index) {
+ while (_hasEscaped[index]) {
+ index++;
+ if (index == 7)
+ index = 0;
+ }
+ return index;
+}
+
+void ShootEmUp::blankIt() {
+ for (int i = 0; i < _rectNum; i++)
+ _vm->_graphics->drawFilledRectangle(_rectangles[i], kColorBlack);
+ _rectNum = 0;
+}
+
+void ShootEmUp::moveThem() {
+ for (int i = 0; i < 99; i++) {
+ if (_sprites[i]._x != kFlag) {
+ _sprites[i]._x += _sprites[i]._ix;
+ _sprites[i]._y += _sprites[i]._iy;
+ }
+ }
+}
+
+void ShootEmUp::blank(Common::Rect rect) {
+ _rectangles[_rectNum++] = rect;
+}
+
+void ShootEmUp::plotThem() {
+ for (int i = 0; i < 99; i++) {
+ if (_sprites[i]._x != kFlag) {
+ if (_sprites[i]._cameo) {
+ _vm->_graphics->seuDrawCameo(_sprites[i]._x, _sprites[i]._y, _sprites[i]._p, _sprites[i]._cameoFrame);
+ if (!_cp) {
+ _sprites[i]._cameoFrame += 2;
+ _sprites[i]._p += 2;
+ }
+ } else
+ _vm->_graphics->seuDrawPicture(_sprites[i]._x, _sprites[i]._y, _sprites[i]._p);
+
+ if (_sprites[i]._wipe)
+ blank(Common::Rect(_sprites[i]._x, _sprites[i]._y, _sprites[i]._x + _vm->_graphics->seuGetPicWidth(_sprites[i]._p), _sprites[i]._y + _vm->_graphics->seuGetPicHeight(_sprites[i]._p)));
+
+ if (_sprites[i]._timeout > 0) {
+ _sprites[i]._timeout--;
+ if (_sprites[i]._timeout == 0)
+ _sprites[i]._x = kFlag;
+ }
+ }
+ }
+}
+
+void ShootEmUp::define(int16 x, int16 y, int8 p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe) {
+ for (int i = 0; i < 99; i++) {
+ if (_sprites[i]._x == kFlag) {
+ _sprites[i]._x = x;
+ _sprites[i]._y = y;
+ _sprites[i]._p = p;
+ _sprites[i]._ix = ix;
+ _sprites[i]._iy = iy;
+ _sprites[i]._timeout = time;
+ _sprites[i]._cameo = false;
+ _sprites[i]._missile = isAMissile;
+ _sprites[i]._wipe = doWeWipe;
+ return;
+ }
+ }
+}
+
+void ShootEmUp::defineCameo(int16 x, int16 y, int8 p, int16 time) {
+ for (int i = 0; i < 99; i++) {
+ if (_sprites[i]._x == kFlag) {
+ _sprites[i]._x = x;
+ _sprites[i]._y = y;
+ _sprites[i]._p = p;
+ _sprites[i]._ix = 0;
+ _sprites[i]._iy = 0;
+ _sprites[i]._timeout = time;
+ _sprites[i]._cameo = true;
+ _sprites[i]._cameoFrame = p + 1;
+ _sprites[i]._missile = false;
+ _sprites[i]._wipe = false;
+ return;
+ }
+ }
+}
+
+void ShootEmUp::showStock(byte index) {
+ if (_escaping && (index == _escapeStock)) {
+ _vm->_graphics->seuDrawPicture(index * 90 + 20, 30, kStocks + 2);
+ return;
+ }
+
+ if (_stockStatus[index] > 5)
+ return;
+
+ _vm->_graphics->seuDrawPicture(index * 90 + 20, 30, kStocks + _stockStatus[index]);
+ _stockStatus[index] = 1 - _stockStatus[index];
+}
+
+void ShootEmUp::drawNumber(int number, int size, int x) {
+ for (int i = 0; i < size - 1; i++) {
+ int divisor = 10;
+ for (int j = 0; j < size - 2 - i; j++)
+ divisor *= 10;
+ char value = number / divisor;
+ _vm->_graphics->seuDrawPicture(x + i * 10, 0, value);
+ number -= value * divisor;
+ }
+ _vm->_graphics->seuDrawPicture(x + (size - 1) * 10, 0, number % 10);
+}
+
+void ShootEmUp::showScore() {
+ drawNumber(_score, 5, 40);
+}
+
+void ShootEmUp::showTime() {
+ drawNumber(_time, 3, 140);
+}
+
+void ShootEmUp::gain(int8 howMuch) {
+ if ((_score + howMuch) < 0) // howMuch can be negative!
+ _score = 0;
+ else
+ _score += howMuch;
+
+ showScore();
+}
+
+void ShootEmUp::newEscape() {
+ _escapeCount = _vm->_rnd->getRandomNumber(17) * 20;
+ _escaping = false;
+}
+
+void ShootEmUp::nextPage() {
+ _vm->_graphics->drawNormalText("Press a key for next page >", _vm->_font, 8, 400, 190, kColorWhite);
+ _vm->_graphics->refreshScreen();
+
+ while (!_vm->shouldQuit()) {
+ Common::Event event;
+ _vm->getEvent(event);
+ if (event.type == Common::EVENT_KEYDOWN) {
+ break;
+ }
+ }
+
+ _vm->_graphics->blackOutScreen();
+}
+
+void ShootEmUp::instructions() {
+ _vm->_graphics->blackOutScreen();
+ _vm->_graphics->seuDrawPicture(25, 25, kFacingRight);
+ _vm->_graphics->drawNormalText("< Avvy, our hero, needs your help - you must move him around.", _vm->_font, 8, 60, 35, kColorWhite);
+ _vm->_graphics->drawNormalText("(He''s too terrified to move himself!)", _vm->_font, 8, 80, 45, kColorWhite);
+ _vm->_graphics->drawNormalText("Your task is to prevent the people in the stocks from escaping", _vm->_font, 8, 0, 75, kColorWhite);
+ _vm->_graphics->drawNormalText("by pelting them with rotten fruit, eggs and bread. The keys are:", _vm->_font, 8, 0, 85, kColorWhite);
+ _vm->_graphics->drawNormalText("LEFT SHIFT", _vm->_font, 8, 80, 115, kColorWhite);
+ _vm->_graphics->drawNormalText("Move left.", _vm->_font, 8, 200, 115, kColorWhite);
+ _vm->_graphics->drawNormalText("RIGHT SHIFT", _vm->_font, 8, 72, 135, kColorWhite);
+ _vm->_graphics->drawNormalText("Move right.", _vm->_font, 8, 200, 135, kColorWhite);
+ _vm->_graphics->drawNormalText("ALT", _vm->_font, 8, 136, 155, kColorWhite);
+ _vm->_graphics->drawNormalText("Throw something.", _vm->_font, 8, 200, 155, kColorWhite);
+
+ nextPage();
+
+ _vm->_graphics->seuDrawPicture(25, 35, kStocks);
+ _vm->_graphics->drawNormalText("This man is in the stocks. Your job is to stop him getting out.", _vm->_font, 8, 80, 35, kColorWhite);
+ _vm->_graphics->drawNormalText("UNFORTUNATELY... the locks on the stocks are loose, and every", _vm->_font, 8, 88, 45, kColorWhite);
+ _vm->_graphics->drawNormalText("so often, someone will discover this and try to get out.", _vm->_font, 8, 88, 55, kColorWhite);
+ _vm->_graphics->seuDrawPicture(25, 85, kStocks + 2);
+ _vm->_graphics->drawNormalText("< Someone who has found a way out!", _vm->_font, 8, 80, 85, kColorWhite);
+ _vm->_graphics->drawNormalText("You MUST IMMEDIATELY hit people smiling like this, or they", _vm->_font, 8, 88, 95, kColorWhite);
+ _vm->_graphics->drawNormalText("will disappear and lose you points.", _vm->_font, 8, 88, 105, kColorWhite);
+ _vm->_graphics->seuDrawPicture(25, 125, kStocks + 5);
+ _vm->_graphics->seuDrawPicture(25, 155, kStocks + 4);
+ _vm->_graphics->drawNormalText("< Oh dear!", _vm->_font, 8, 80, 125, kColorWhite);
+
+ nextPage();
+
+ _vm->_graphics->drawNormalText("Your task is made harder by:", _vm->_font, 8, 0, 35, kColorWhite);
+ _vm->_graphics->seuDrawPicture(25, 55, 48);
+ _vm->_graphics->drawNormalText("< Yokels. These people will run in front of you. If you hit", _vm->_font, 8, 60, 55, kColorWhite);
+ _vm->_graphics->drawNormalText("them, you will lose MORE points than you get hitting people", _vm->_font, 8, 68, 65, kColorWhite);
+ _vm->_graphics->drawNormalText("in the stocks. So BEWARE!", _vm->_font, 8, 68, 75, kColorWhite);
+ _vm->_graphics->drawNormalText("Good luck with the game!", _vm->_font, 8, 80, 125, kColorWhite);
+
+ nextPage();
+}
+
+void ShootEmUp::setup() {
+ _vm->_graphics->blackOutScreen();
+
+ newEscape();
+
+ for (int i = 0; i < 7; i++) {
+ _stockStatus[i] = _vm->_rnd->getRandomNumber(1);
+ showStock(i);
+ }
+
+ // Set up status line:
+ _vm->_graphics->seuDrawPicture(0, 0, 16); // Score:
+ showScore(); // Value of score (00000 here).
+ _vm->_graphics->seuDrawPicture(110, 0, 19); // Time:
+ showTime(); // Value of time.
+
+ _vm->_graphics->refreshScreen();
+
+ // From the original core cycle:
+ initRunner(20, 70, 48, 54, _vm->_rnd->getRandomNumber(4) + 1, _vm->_rnd->getRandomNumber(3) - 2);
+ initRunner(600, 70, 48, 54, _vm->_rnd->getRandomNumber(4) + 1, _vm->_rnd->getRandomNumber(3) - 2);
+ initRunner(600, 100, 61, 67, (-(int8)_vm->_rnd->getRandomNumber(4)) + 1, _vm->_rnd->getRandomNumber(3) - 2);
+ initRunner(20, 100, 61, 67, (-(int8)_vm->_rnd->getRandomNumber(4)) + 1, _vm->_rnd->getRandomNumber(3) - 2);
+}
+
+void ShootEmUp::initRunner(int16 x, int16 y, byte f1, byte f2, int8 ix, int8 iy) {
+ for (int i = 0; i < 4; i++) {
+ if (_running[i]._x == kFlag) {
+ _running[i]._x = x;
+ _running[i]._y = y;
+ _running[i]._frame = f1;
+ _running[i]._tooHigh = f2;
+ _running[i]._lowest = f1;
+ _running[i]._ix = ix;
+ _running[i]._iy = iy;
+ if ((ix == 0) && (iy == 0))
+ _running[i]._ix = 2; // To stop them running on the spot!
+ _running[i]._frameDelay = kFrameDelayMax;
+ return;
+ }
+ }
+}
+
+void ShootEmUp::moveAvvy() {
+ if (_avvyWas < _avvyPos)
+ _avvyFacing = kFacingRight;
+ else if (_avvyWas > _avvyPos)
+ _avvyFacing = kFacingLeft;
+
+ if (!_firing) {
+ if (_avvyWas == _avvyPos)
+ _avvyAnim = 1;
+ else {
+ _avvyAnim++;
+ if (_avvyAnim == 6)
+ _avvyAnim = 0;
+ }
+ }
+
+ if (_avvyFacing == kAvvyShoots)
+ define(_avvyPos, kAvvyY, kShooting[_avvyAnim], 0, 0, 1, false, true);
+ else
+ define(_avvyPos, kAvvyY, _avvyAnim + _avvyFacing, 0, 0, 1, false, true);
+
+ _avvyWas = _avvyPos;
+
+ if (_avvyFacing == kAvvyShoots) {
+ if (_avvyAnim == 6) {
+ _avvyFacing = _wasFacing;
+ _avvyAnim = 0;
+ _firing = false;
+ } else
+ _avvyAnim++;
+ }
+}
+
+void ShootEmUp::readKbd() {
+ Common::Event event;
+ _vm->getEvent(event);
+
+ if ((event.type == Common::EVENT_KEYUP) && ((event.kbd.keycode == Common::KEYCODE_LALT) || (event.kbd.keycode == Common::KEYCODE_RALT))) {
+ // Don't let the player fire continuously by holding down one of the ALT keys.
+ _altWasPressedBefore = false;
+ return;
+ }
+
+ if (_firing) // So you can't stack up shots while the shooting animation plays.
+ return;
+
+ if (event.type == Common::EVENT_KEYDOWN) {
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_LALT: // Alt was pressed - shoot!
+ case Common::KEYCODE_RALT: // Falltrough is intended.
+ if (_altWasPressedBefore || (_count321 != 0))
+ return;
+
+ _altWasPressedBefore = true;
+ _firing = true;
+ define(_avvyPos + 27, kAvvyY + 5, _throwNext, 0, -2, 53, true, true);
+ _throwNext++;
+ if (_throwNext == 79)
+ _throwNext = 73;
+ _avvyAnim = 0;
+ _wasFacing = _avvyFacing;
+ _avvyFacing = kAvvyShoots;
+ return;
+ case Common::KEYCODE_RSHIFT: // Right shift: move right.
+ _avvyPos += 5;
+ if (_avvyPos > kRightMargin)
+ _avvyPos = kRightMargin;
+ return;
+ case Common::KEYCODE_LSHIFT: // Left shift: move left.
+ _avvyPos -= 5;
+ if (_avvyPos < kLeftMargin)
+ _avvyPos = kLeftMargin;
+ return;
+ default:
+ break;
+ }
+ }
+}
+
+void ShootEmUp::animate() {
+ if (_vm->_rnd->getRandomNumber(9) == 1)
+ showStock(getStockNumber(_vm->_rnd->getRandomNumber(5)));
+ for (int i = 0; i < 7; i++) {
+ if (_stockStatus[i] > 5) {
+ _stockStatus[i]--;
+ if (_stockStatus[i] == 8) {
+ _stockStatus[i] = 0;
+ showStock(i);
+ }
+ }
+ }
+}
+
+void ShootEmUp::collisionCheck() {
+ for (int i = 0; i < 99; i++) {
+ if ((_sprites[i]._x != kFlag) && (_sprites[i]._missile) &&
+ (_sprites[i]._y < 60) && (_sprites[i]._timeout == 1)) {
+ int distFromSide = (_sprites[i]._x - 20) % 90;
+ int thisStock = (_sprites[i]._x - 20) / 90;
+ if ((!_hasEscaped[thisStock]) && (distFromSide > 17) && (distFromSide < 34)) {
+ _vm->_sound->playNote(999, 3);
+ _vm->_system->delayMillis(3);
+ define(_sprites[i]._x + 20, _sprites[i]._y, 25 + _vm->_rnd->getRandomNumber(1), 3, 1, 12, false, true); // Well done!
+ define(thisStock * 90 + 20, 30, 30, 0, 0, 7, false, false); // Face of man
+ defineCameo(thisStock * 90 + 20 + 10, 35, 40, 7); // Splat!
+ define(thisStock * 90 + 20 + 20, 50, 33 + _vm->_rnd->getRandomNumber(4), 0, 2, 9, false, true); // Oof!
+ _stockStatus[thisStock] = 17;
+ gain(3); // Score for hitting a face.
+
+ if (_escaping && (_escapeStock = thisStock)) { // Hit the escaper.
+ _vm->_sound->playNote(1777, 1);
+ _vm->_system->delayMillis(1);
+ gain(5); // Bonus for hitting escaper.
+ _escaping = false;
+ newEscape();
+ }
+ } else {
+ define(_sprites[i]._x, _sprites[i]._y, 82 + _vm->_rnd->getRandomNumber(2), 2, 2, 17, false, true); // Missed!
+ if ((!_hasEscaped[thisStock]) && (distFromSide > 3) && (distFromSide < 43)) {
+ define(thisStock * 90 + 20, 30, 29, 0, 0, 7, false, false); // Face of man
+ if (distFromSide > 35)
+ defineCameo(_sprites[i]._x - 27, 35, 40, 7); // Splat!
+ else
+ defineCameo(_sprites[i]._x - 7, 35, 40, 7);
+ _stockStatus[thisStock] = 17;
+ }
+ }
+ }
+ }
+}
+
+void ShootEmUp::turnAround(byte who, bool randomX) {
+ if (randomX) {
+ int8 ix = (_vm->_rnd->getRandomNumber(4) + 1);
+ if (_running[who]._ix > 0)
+ _running[who]._ix = -(ix);
+ else
+ _running[who]._ix = ix;
+ } else
+ _running[who]._ix = -(_running[who]._ix);
+
+ _running[who]._iy = -(_running[who]._iy);
+}
+
+void ShootEmUp::bumpFolk() {
+ for (int i = 0; i < 4; i++) {
+ if (_running[i]._x != kFlag) {
+ for (int j = i + 1; j < 4; j++) {
+ bool overlaps = overlap(_running[i]._x, _running[i]._y, _running[i]._x + 17, _running[i]._y + 24,
+ _running[j]._x, _running[j]._y, _running[j]._x + 17, _running[j]._y + 24);
+ if ((_running[i]._x != kFlag) && overlaps) {
+ turnAround(i, false); // Opp. directions.
+ turnAround(j, false);
+ }
+ }
+ }
+ }
+}
+
+void ShootEmUp::peopleRunning() {
+ if (_count321 != 0)
+ return;
+
+ for (int i = 0; i < 4; i++) {
+ if (_running[i]._x != kFlag) {
+ if (((_running[i]._y + _running[i]._iy) <= 53) || ((_running[i]._y + _running[i]._iy) >= 120))
+ _running[i]._iy = -(_running[i]._iy);
+
+ byte frame = 0;
+ if (_running[i]._ix < 0)
+ frame = _running[i]._frame - 1;
+ else
+ frame = _running[i]._frame + 6;
+ define(_running[i]._x, _running[i]._y, frame, 0, 0, 1, false, true);
+
+ if (_running[i]._frameDelay == 0) {
+ _running[i]._frame++;
+ if (_running[i]._frame == _running[i]._tooHigh)
+ _running[i]._frame = _running[i]._lowest;
+ _running[i]._frameDelay = kFrameDelayMax;
+ _running[i]._y += _running[i]._iy;
+ } else
+ _running[i]._frameDelay--;
+
+ if (((_running[i]._x + _running[i]._ix) <= 0) || ((_running[i]._x + _running[i]._ix) >= 620))
+ turnAround(i, true);
+
+ _running[i]._x += _running[i]._ix;
+ }
+ }
+}
+
+void ShootEmUp::updateTime() {
+ if (_count321 != 0)
+ return;
+
+ _timeThisSecond++;
+
+ if (_timeThisSecond < kTimesASecond)
+ return;
+
+ _time--;
+ showTime();
+ _timeThisSecond = 0;
+
+ if (_time <= kFlashTime) {
+ int timeMode = 0;
+ if ((_time % 2) == 1)
+ timeMode = 19; // Normal 'Time:'
+ else
+ timeMode = 85; // Flash 'Time:'
+
+ _vm->_graphics->seuDrawPicture(110, 0, timeMode);
+ }
+}
+
+void ShootEmUp::hitPeople() {
+ if (_count321 != 0)
+ return;
+
+ for (int i = 0; i < 99; i++) {
+ if ((_sprites[i]._missile) && (_sprites[i]._x != kFlag)) {
+ for (int j = 0; j < 4; j++) {
+
+ bool overlaps = overlap(_sprites[i]._x, _sprites[i]._y, _sprites[i]._x + 7, _sprites[i]._y + 10,
+ _running[j]._x, _running[j]._y, _running[j]._x + 17, _running[j]._y + 24);
+
+ if ((_running[j]._x != kFlag) && (overlaps)) {
+ _vm->_sound->playNote(7177, 1);
+ _sprites[i]._x = kFlag;
+ gain(-5);
+ define(_running[j]._x + 20, _running[j]._y + 3, 33 + _vm->_rnd->getRandomNumber(5), 1, 3, 9, false, true); // Oof!
+ define(_sprites[i]._x, _sprites[i]._y, 82, 1, 0, 17, false, true); // Oops!
+ }
+ }
+ }
+ }
+}
+
+void ShootEmUp::escapeCheck() {
+ if (_count321 != 0)
+ return;
+
+ if (_escapeCount > 0) {
+ _escapeCount--;
+ return;
+ }
+
+ // Escape_count = 0; now what ?
+
+ if (_escaping) {
+ if (_gotOut) {
+ newEscape();
+ _escaping = false;
+ _vm->_graphics->seuDrawPicture(_escapeStock * 90 + 20, 30, kStocks + 4);
+ } else {
+ _vm->_graphics->seuDrawPicture(_escapeStock * 90 + 20, 30, kStocks + 5);
+ _escapeCount = 20;
+ _gotOut = true;
+ define(_escapeStock * 90 + 20, 50, 24, 0, 2, 17, false, true); // Escaped!
+ gain(-10);
+ _hasEscaped[_escapeStock] = true;
+
+ _howManyHaveEscaped++;
+
+ if (_howManyHaveEscaped == 7) {
+ _vm->_graphics->seuDrawPicture(266, 90, 23);
+ _time = 0;
+ }
+ }
+ } else {
+ _escapeStock = getStockNumber(_vm->_rnd->getRandomNumber(6));
+ _escaping = true;
+ _gotOut = false;
+ _vm->_graphics->seuDrawPicture(_escapeStock * 90 + 20, 30, kStocks + 2); // Smiling!
+ _escapeCount = 200;
+ }
+}
+
+void ShootEmUp::check321() {
+ if (_count321 == 0)
+ return;
+
+ _count321--;
+
+ switch (_count321) {
+ case 84:
+ define(320, 60, 15, 2, 1, 94, false, true);
+ break;
+ case 169:
+ define(320, 60, 14, 0, 1, 94, false, true);
+ break;
+ case 254:
+ define(320, 60, 13, -2, 1, 94, false, true);
+ define(0, 100, 17, 2, 0, 254, false, true);
+ break;
+ default:
+ break;
+ }
+}
+
+} // End of namespace Avalanche
diff --git a/engines/avalanche/shootemup.h b/engines/avalanche/shootemup.h
new file mode 100644
index 0000000000..3cdcc1d5cd
--- /dev/null
+++ b/engines/avalanche/shootemup.h
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
+* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
+*/
+
+#ifndef AVALANCHE_SHOOTEMUP_H
+#define AVALANCHE_SHOOTEMUP_H
+
+namespace Avalanche {
+class AvalancheEngine;
+
+class ShootEmUp {
+public:
+ ShootEmUp(AvalancheEngine *vm);
+
+ uint16 run();
+
+private:
+ struct Sprite {
+ int8 _ix, _iy;
+ int16 _x, _y;
+ int8 _p;
+ int16 _timeout;
+ bool _cameo;
+ byte _cameoFrame;
+ bool _missile;
+ bool _wipe;
+ };
+
+ struct Runner {
+ int16 _x, _y;
+ byte _frame;
+ byte _tooHigh;
+ byte _lowest;
+ int8 _ix, _iy;
+ byte _frameDelay;
+ };
+
+ static const byte kStocks;
+ static const byte kAvvyShoots;
+ static const byte kFacingRight;
+ static const byte kFacingLeft;
+ static const long int kFlag;
+ static const byte kFrameDelayMax;
+ static const byte kAvvyY;
+ static const byte kShooting[7];
+ static const byte kTimesASecond;
+ static const byte kFlashTime;
+ static const byte kLeftMargin;
+ static const int16 kRightMargin;
+
+ AvalancheEngine *_vm;
+
+ uint16 _score;
+ byte _time;
+ byte _stockStatus[7];
+ Sprite _sprites[99];
+ byte _rectNum; // Original: 'rsize'
+ Common::Rect _rectangles[99];
+ uint16 _avvyWas;
+ uint16 _avvyPos;
+ byte _avvyAnim;
+ byte _avvyFacing;
+ bool _altWasPressedBefore;
+ byte _throwNext;
+ bool _firing;
+ Runner _running[4];
+ bool _hasEscaped[7];
+ byte _count321;
+ byte _howManyHaveEscaped;
+ uint16 _escapeCount;
+ bool _escaping;
+ byte _timeThisSecond;
+ bool _cp;
+ byte _wasFacing;
+ byte _escapeStock;
+ bool _gotOut;
+
+ bool overlap(uint16 a1x, uint16 a1y, uint16 a2x, uint16 a2y, uint16 b1x, uint16 b1y, uint16 b2x, uint16 b2y);
+ byte getStockNumber(byte index);
+ void blankIt();
+ void moveThem();
+ void blank(Common::Rect rect);
+ void plotThem();
+ void define(int16 x, int16 y, int8 p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe);
+ void defineCameo(int16 x, int16 y, int8 p, int16 time);
+ void showStock(byte index);
+ void drawNumber(int number, int size, int x);
+ void showScore();
+ void showTime();
+ void gain(int8 howMuch);
+ void newEscape();
+ void nextPage(); // Internal function of 'instructions' in the original.
+ void instructions();
+ void setup();
+ void initRunner(int16 xx, int16 yy, byte f1, byte f2, int8 ixx, int8 iyy);
+ void moveAvvy();
+ void readKbd();
+ void animate();
+ void collisionCheck();
+ void turnAround(byte who, bool randomX);
+ void bumpFolk();
+ void peopleRunning();
+ void updateTime();
+ void hitPeople();
+ void escapeCheck();
+ void check321();
+};
+
+} // End of namespace Avalanche
+
+#endif // AVALANCHE_SHOOTEMUP_H
diff --git a/engines/avalanche/sound.cpp b/engines/avalanche/sound.cpp
index c324df4713..0223bead48 100644
--- a/engines/avalanche/sound.cpp
+++ b/engines/avalanche/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -51,6 +51,7 @@ void SoundHandler::stopSound() {
*/
void SoundHandler::toggleSound() {
_soundFl = !_soundFl;
+ _vm->_graphics->drawSoundLight(_soundFl);
}
void SoundHandler::syncVolume() {
diff --git a/engines/avalanche/sound.h b/engines/avalanche/sound.h
index 25b6b267d3..a67016a206 100644
--- a/engines/avalanche/sound.h
+++ b/engines/avalanche/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp
index c8ea820c0e..a9753b3cce 100644
--- a/engines/avalanche/timer.cpp
+++ b/engines/avalanche/timer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -64,7 +64,7 @@ void Timer::addTimer(int32 duration, byte action, byte reason) {
* @remarks Originally called 'one_tick'
*/
void Timer::updateTimer() {
- if (_vm->_menu->isActive())
+ if (_vm->_dropdown->isActive())
return;
for (int i = 0; i < 7; i++) {
@@ -327,16 +327,17 @@ void Timer::hangAround2() {
_vm->_animation->_sprites[0]->remove();
spr->remove(); // Get rid of Robin Hood and Friar Tuck.
- addTimer(1, kProcAfterTheShootemup, kReasonHangingAround);
- // Immediately call the following proc (when you have a chance).
+ addTimer(1, kProcAfterTheShootemup, kReasonHangingAround); // Immediately call the following proc (when you have a chance).
_vm->_tiedUp = false;
- // _vm->_enid->backToBootstrap(1); Call the shoot-'em-up. TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then!
+ // We don't need the ShootEmUp during the whole game, it's only playable once.
+ ShootEmUp *shootemup = new ShootEmUp(_vm);
+ _shootEmUpScore = shootemup->run();
+ delete shootemup;
}
void Timer::afterTheShootemup() {
- // Only placed this here to replace the minigame. TODO: Remove it when the shoot em' up is implemented!
_vm->flipRoom(_vm->_room, 1);
_vm->_animation->_sprites[0]->init(0, true); // Avalot.
@@ -345,27 +346,15 @@ void Timer::afterTheShootemup() {
_vm->_objects[kObjectCrossbow - 1] = true;
_vm->refreshObjectList();
- // Same as the added line above: TODO: Remove it later!!!
- _vm->_dialogs->displayText(Common::String("P.S.: There should have been the mini-game called \"shoot em' up\", " \
- "but I haven't implemented it yet: you get the crossbow automatically.") + kControlNewLine + kControlNewLine + "Peter (uruk)");
-
-#if 0
- byte shootscore, gain;
-
- shootscore = mem[storage_seg * storage_ofs];
- gain = (shootscore + 5) / 10; // Rounding up.
-
- display(string("\6Your score was ") + strf(shootscore) + '.' + "\r\rYou gain (" +
- strf(shootscore) + " 0xF6 10) = " + strf(gain) + " points.");
+ byte gain = (_shootEmUpScore + 5) / 10; // Rounding up.
+ _vm->_dialogs->displayText(Common::String::format("%cYour score was %d.%c%cYou gain (%d \xf6 10) = %d points.", kControlItalic, _shootEmUpScore, kControlNewLine, kControlNewLine, _shootEmUpScore, gain));
if (gain > 20) {
- display("But we won't let you have more than 20 points!");
- points(20);
+ _vm->_dialogs->displayText("But we won't let you have more than 20 points!");
+ _vm->incScore(20);
} else
- points(gain);
-#endif
+ _vm->incScore(gain);
- warning("STUB: Timer::after_the_shootemup()");
_vm->_dialogs->displayScrollChain('Q', 70);
}
@@ -632,17 +621,39 @@ void Timer::arkataShouts() {
addTimer(160, kProcArkataShouts, kReasonArkataShouts);
}
+/**
+ * @remarks Contains the content of the function 'winning_pic', originally located in PINGO.
+ */
void Timer::winning() {
_vm->_dialogs->displayScrollChain('Q', 79);
- _vm->_pingo->winningPic();
- warning("STUB: Timer::winning()");
-#if 0
- do {
- _vm->checkclick();
- } while (!(_vm->mrelease == 0));
-#endif
- // TODO: To be implemented with Pingo::winningPic().
+ // This was originally located in winning_pic:
+ CursorMan.showMouse(false);
+ _vm->_graphics->saveScreen();
+ _vm->fadeOut();
+ _vm->_graphics->drawWinningPic();
+ _vm->_graphics->refreshScreen();
+ _vm->fadeIn();
+
+ // Waiting for a keypress or a left mouseclick:
+ Common::Event event;
+ bool escape = false;
+ while (!_vm->shouldQuit() && !escape) {
+ _vm->_graphics->refreshScreen();
+ while (_vm->getEvent(event)) {
+ if ((event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_KEYDOWN)) {
+ escape = true;
+ break;
+ }
+ }
+ }
+
+ _vm->fadeOut();
+ _vm->_graphics->restoreScreen();
+ _vm->_graphics->removeBackup();
+ _vm->fadeIn();
+ CursorMan.showMouse(true);
+ // winning_pic's end.
_vm->callVerb(kVerbCodeScore);
_vm->_dialogs->displayText(" T H E E N D ");
@@ -688,6 +699,8 @@ void Timer::resetVariables() {
_times[i]._action = 0;
_times[i]._reason = 0;
}
+
+ _shootEmUpScore = 0;
}
} // End of namespace Avalanche.
diff --git a/engines/avalanche/timer.h b/engines/avalanche/timer.h
index 9a91c4d24b..ad6ac0eae6 100644
--- a/engines/avalanche/timer.h
+++ b/engines/avalanche/timer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -170,7 +170,7 @@ public:
private:
AvalancheEngine *_vm;
-
+ byte _shootEmUpScore;
};
} // End of namespace Avalanche.
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp
new file mode 100644
index 0000000000..d2e13e525c
--- /dev/null
+++ b/engines/bbvs/bbvs.cpp
@@ -0,0 +1,1392 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/bbvs.h"
+#include "bbvs/dialogs.h"
+#include "bbvs/gamemodule.h"
+#include "bbvs/graphics.h"
+#include "bbvs/sound.h"
+#include "bbvs/spritemodule.h"
+#include "bbvs/minigames/minigame.h"
+#include "bbvs/minigames/bbairguitar.h"
+#include "bbvs/minigames/bbant.h"
+#include "bbvs/minigames/bbloogie.h"
+#include "bbvs/minigames/bbtennis.h"
+#include "bbvs/minigames/minigame.h"
+
+#include "audio/audiostream.h"
+#include "common/config-manager.h"
+#include "common/debug-channels.h"
+#include "common/error.h"
+#include "common/fs.h"
+#include "common/timer.h"
+#include "engines/util.h"
+#include "graphics/cursorman.h"
+#include "graphics/font.h"
+#include "graphics/fontman.h"
+#include "graphics/palette.h"
+#include "graphics/surface.h"
+
+namespace Bbvs {
+
+static const BBPoint kInventorySlotPositions[] = {
+ { 66, 191}, { 94, 217}, {192, 217}, {159, 213}, {228, 49},
+ {137, 49}, {168, 165}, {101, 55}, {177, 46}, {165, 165},
+ {202, 74}, {141, 53}, {164, 164}, {165, 78}, {167, 71},
+ {142, 188}, {171, 100}, {250, 216}, {200, 72}, {200, 72},
+ {101, 82}, { 67, 93}, {133, 87}, {123, 220}, {199, 129},
+ {188, 192}, {102, 82}, {188, 192}, { 99, 170}, { 68, 126},
+ {159, 130}, {102, 116}, {207, 157}, {130, 141}, {236, 100},
+ {102, 197}, {141, 186}, {200, 102}, {221, 220}, {222, 188},
+ {135, 93}, {134, 145}, { 96, 224}, {128, 224}, {160, 224},
+ {192, 224}, {224, 224}, {240, 224}, {256, 224}, { 0, 0}
+};
+
+static const BBRect kVerbRects[6] = {
+ {-32, -2, 19, 27}, {-33, -33, 19, 27}, { 12, -2, 19, 27},
+ { 13, -33, 19, 27}, {-10, 8, 19, 27}, {-11, -49, 19, 27}
+};
+
+static const byte kTurnTbl[] = {
+ 2, 6, 4, 0, 2, 6, 4, 0,
+ 3, 1, 5, 7, 0, 0, 0, 0
+};
+
+bool WalkArea::contains(const Common::Point &pt) const {
+ return Common::Rect(x, y, x + width, y + height).contains(pt);
+}
+
+BbvsEngine::BbvsEngine(OSystem *syst, const ADGameDescription *gd) :
+ Engine(syst), _gameDescription(gd) {
+
+ _random = new Common::RandomSource("bbvs");
+ _currActionCommandIndex = -1;
+ _buttheadObject = nullptr;
+ _beavisObject = nullptr;
+ _currCameraNum = 0;
+ _walkAreasCount = 0;
+ _walkInfosCount = 0;
+ _walkableRectsCount = 0;
+ _sourceWalkArea = nullptr;
+ _destWalkArea = nullptr;
+ _currWalkDistance = kMaxDistance;
+ _walkReachedDestArea = false;
+ _hasSnapshot = false;
+ _snapshot = nullptr;
+ _snapshotStream = nullptr;
+ _isSaveAllowed = false;
+
+ for (int i = 0; i < 80; i++) {
+ _walkAreas[i].x = 0;
+ _walkAreas[i].y = 0;
+ _walkAreas[i].width = 0;
+ _walkAreas[i].height = 0;
+ _walkAreas[i].checked = false;
+ _walkAreas[i].linksCount = 0;
+ for (int j = 0; j < 16; j++)
+ _walkAreas[i].links[j] = nullptr;
+ for (int j = 0; j < 32; j++) {
+ _walkAreas[i].linksD1[j] = nullptr;
+ _walkAreas[i].linksD2[j] = nullptr;
+ }
+ }
+
+ for (int i = 0; i < 256; i++) {
+ _walkInfoPtrs[i] = nullptr;
+ }
+
+ Engine::syncSoundSettings();
+
+}
+
+BbvsEngine::~BbvsEngine() {
+
+ delete _random;
+
+}
+
+void BbvsEngine::newGame() {
+ _currInventoryItem = -1;
+ _newSceneNum = 32;
+}
+
+void BbvsEngine::continueGameFromQuickSave() {
+ _bootSaveSlot = 0;
+}
+
+void BbvsEngine::setNewSceneNum(int newSceneNum) {
+ _newSceneNum = newSceneNum;
+}
+
+Common::Error BbvsEngine::run() {
+
+ _isSaveAllowed = false;
+ _hasSnapshot = false;
+
+ initGraphics(320, 240, false);
+
+ _screen = new Screen(_system);
+ _gameModule = new GameModule();
+ _spriteModule = new SpriteModule();
+ _sound = new SoundMan();
+
+ allocSnapshot();
+ memset(_easterEggInput, 0, sizeof(_easterEggInput));
+
+ _gameTicks = 0;
+ _playVideoNumber = 0;
+ _bootSaveSlot = -1;
+
+ memset(_inventoryItemStatus, 0, sizeof(_inventoryItemStatus));
+ memset(_gameVars, 0, sizeof(_gameVars));
+ memset(_sceneVisited, 0, sizeof(_sceneVisited));
+
+ _mouseX = 160;
+ _mouseY = 120;
+ _mouseButtons = 0;
+
+ _currVerbNum = kVerbLook;
+ _currInventoryItem = -1;
+ _currTalkObjectIndex = -1;
+ _currSceneNum = 0;
+ _newSceneNum = 31;
+
+ if (ConfMan.hasKey("save_slot"))
+ _bootSaveSlot = ConfMan.getInt("save_slot");
+
+ while (!shouldQuit()) {
+ updateEvents();
+ if (_currSceneNum < kMainMenu || _newSceneNum > 0 || _bootSaveSlot >= 0)
+ updateGame();
+ else if (_currSceneNum == kMainMenu)
+ runMainMenu();
+ else if (_currSceneNum == kCredits &&
+ (_mouseButtons & kAnyButtonClicked)) {
+ _mouseButtons &= ~kAnyButtonClicked;
+ _newSceneNum = kMainMenu;
+ }
+ if (_playVideoNumber > 0) {
+ playVideo(_playVideoNumber);
+ _playVideoNumber = 0;
+ }
+ }
+
+ writeContinueSavegame();
+
+ freeSnapshot();
+
+ delete _sound;
+ delete _spriteModule;
+ delete _gameModule;
+ delete _screen;
+
+ return Common::kNoError;
+}
+
+bool BbvsEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsRTL) ||
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime);
+}
+
+void BbvsEngine::updateEvents() {
+ Common::Event event;
+
+ while (_eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ _keyCode = event.kbd.keycode;
+ break;
+ case Common::EVENT_KEYUP:
+ checkEasterEgg(event.kbd.ascii);
+ _keyCode = Common::KEYCODE_INVALID;
+ break;
+ case Common::EVENT_MOUSEMOVE:
+ _mouseX = event.mouse.x;
+ _mouseY = event.mouse.y;
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ _mouseButtons |= kLeftButtonClicked;
+ _mouseButtons |= kLeftButtonDown;
+ break;
+ case Common::EVENT_LBUTTONUP:
+ _mouseButtons &= ~kLeftButtonDown;
+ break;
+ case Common::EVENT_RBUTTONDOWN:
+ _mouseButtons |= kRightButtonClicked;
+ _mouseButtons |= kRightButtonDown;
+ break;
+ case Common::EVENT_RBUTTONUP:
+ _mouseButtons &= ~kRightButtonDown;
+ break;
+ case Common::EVENT_QUIT:
+ quitGame();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+int BbvsEngine::getRandom(int max) {
+ return max == 0 ? 0 : _random->getRandomNumber(max - 1);
+}
+
+void BbvsEngine::drawDebugInfo() {
+#if 0
+ Graphics::Surface *s = _screen->_surface;
+ const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont);
+ for (int i = 0; i < _walkAreasCount; ++i) {
+ WalkArea *walkArea = &_walkAreas[i];
+ Common::Rect r(walkArea->x, walkArea->y, walkArea->x + walkArea->width, walkArea->y + walkArea->height);
+ s->frameRect(r, 255);
+ Common::String text = Common::String::format("%d", i);
+ font->drawString(s, text, r.left + 1, r.top + 1, 100, 11);
+ }
+#endif
+}
+
+void BbvsEngine::drawScreen() {
+ drawDebugInfo();
+ _screen->copyToScreen();
+}
+
+void BbvsEngine::updateGame() {
+ int inputTicks;
+
+ if (_gameTicks > 0) {
+ int currTicks = _system->getMillis();
+ inputTicks = (currTicks - _gameTicks) / 17;
+ _gameTicks = currTicks - (currTicks - _gameTicks) % 17;
+ } else {
+ inputTicks = 1;
+ _gameTicks = _system->getMillis();
+ }
+
+ if (inputTicks > 20) {
+ inputTicks = 20;
+ _gameTicks = _system->getMillis();
+ }
+
+ if (inputTicks == 0)
+ return;
+
+ if (_mouseX >= 320 || _mouseY >= 240) {
+ _mouseY = -1;
+ _mouseX = -1;
+ }
+
+ bool done;
+
+ do {
+ done = !update(_mouseX, _mouseY, _mouseButtons, _keyCode);
+ _mouseButtons &= ~kLeftButtonClicked;
+ _mouseButtons &= ~kRightButtonClicked;
+ _keyCode = Common::KEYCODE_INVALID;
+ } while (--inputTicks && _playVideoNumber == 0 && _gameTicks > 0 && !done);
+
+ if (!done && _playVideoNumber == 0 && _gameTicks > 0) {
+ DrawList drawList;
+ buildDrawList(drawList);
+ _screen->drawDrawList(drawList, _spriteModule);
+ drawScreen();
+ }
+
+ _system->delayMillis(10);
+
+}
+
+void BbvsEngine::updateBackgroundSounds() {
+ for (int i = 0; i < _gameModule->getSceneSoundsCount(); ++i) {
+ SceneSound *sceneSound = _gameModule->getSceneSound(i);
+ bool isActive = evalCondition(sceneSound->conditions);
+ debug(5, "bgSound(%d) isActive: %d; soundNum: %d", i, isActive, sceneSound->soundNum);
+ if (isActive && !_backgroundSoundsActive[i]) {
+ playSound(sceneSound->soundNum, true);
+ _backgroundSoundsActive[i] = 1;
+ } else if (!isActive && _backgroundSoundsActive[i]) {
+ stopSound(sceneSound->soundNum);
+ _backgroundSoundsActive[i] = 0;
+ }
+ }
+}
+
+bool BbvsEngine::update(int mouseX, int mouseY, uint mouseButtons, Common::KeyCode keyCode) {
+
+ if (_bootSaveSlot >= 0) {
+ loadGameState(_bootSaveSlot);
+ _gameTicks = 0;
+ _bootSaveSlot = -1;
+ return false;
+ }
+
+ if (_newSceneNum != 0) {
+ _gameTicks = 0;
+ return changeScene();
+ }
+
+ _mousePos.x = mouseX + _cameraPos.x;
+ _mousePos.y = mouseY + _cameraPos.y;
+
+ switch (_gameState) {
+
+ case kGSScene:
+ _isSaveAllowed = true;
+ saveSnapshot();
+ if (mouseButtons & kRightButtonDown) {
+ _verbPos = _mousePos;
+ if (_mousePos.x - _cameraPos.x < 33)
+ _verbPos.x = _cameraPos.x + 33;
+ if (_verbPos.x - _cameraPos.x > 287)
+ _verbPos.x = _cameraPos.x + 287;
+ if (_verbPos.y - _cameraPos.y < 51)
+ _verbPos.y = _cameraPos.y + 51;
+ if (_verbPos.y - _cameraPos.y > 208)
+ _verbPos.y = _cameraPos.y + 208;
+ _gameState = kGSVerbs;
+ } else {
+ switch (keyCode) {
+ case Common::KEYCODE_SPACE:
+ case Common::KEYCODE_i:
+ _inventoryButtonIndex = -1;
+ _gameState = kGSInventory;
+ return true;
+ case Common::KEYCODE_l:
+ _currVerbNum = kVerbLook;
+ break;
+ case Common::KEYCODE_t:
+ _currVerbNum = kVerbTalk;
+ break;
+ case Common::KEYCODE_u:
+ _currVerbNum = kVerbUse;
+ break;
+ case Common::KEYCODE_w:
+ _currVerbNum = kVerbWalk;
+ break;
+ default:
+ break;
+ }
+ updateScene(mouseButtons & kLeftButtonClicked);
+ updateCommon();
+ }
+ break;
+
+ case kGSInventory:
+ _isSaveAllowed = true;
+ saveSnapshot();
+ if (mouseButtons & kRightButtonClicked)
+ _currVerbNum = kVerbUse;
+ switch (keyCode) {
+ case Common::KEYCODE_SPACE:
+ case Common::KEYCODE_i:
+ _gameState = kGSScene;
+ stopSpeech();
+ return true;
+ case Common::KEYCODE_l:
+ _currVerbNum = kVerbLook;
+ break;
+ case Common::KEYCODE_u:
+ _currVerbNum = kVerbUse;
+ break;
+ default:
+ break;
+ }
+ updateInventory(mouseButtons & kLeftButtonClicked);
+ break;
+
+ case kGSVerbs:
+ _isSaveAllowed = false;
+ updateVerbs();
+ if (!(mouseButtons & kRightButtonDown)) {
+ if (_currVerbNum == kVerbShowInv) {
+ _inventoryButtonIndex = -1;
+ _gameState = kGSInventory;
+ } else {
+ _gameState = kGSScene;
+ }
+ }
+ break;
+
+ case kGSWait:
+ case kGSWaitDialog:
+ _isSaveAllowed = false;
+ _activeItemType = kITEmpty;
+ _activeItemIndex = 0;
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(9);
+ if (keyCode == Common::KEYCODE_ESCAPE)
+ skipCurrAction();
+ else
+ updateCommon();
+ break;
+
+ case kGSDialog:
+ _isSaveAllowed = true;
+ saveSnapshot();
+ updateDialog(mouseButtons & kLeftButtonClicked);
+ updateCommon();
+ break;
+
+ }
+
+ return true;
+}
+
+void BbvsEngine::buildDrawList(DrawList &drawList) {
+
+ if (_gameState == kGSInventory) {
+
+ // Inventory background
+ drawList.add(_gameModule->getGuiSpriteIndex(15), 0, 0, 0);
+
+ // Inventory button
+ if (_inventoryButtonIndex == 0)
+ drawList.add(_gameModule->getGuiSpriteIndex(18 + 0), 97, 13, 1);
+ else if (_inventoryButtonIndex == 1)
+ drawList.add(_gameModule->getGuiSpriteIndex(18 + 1), 135, 15, 1);
+ else if (_inventoryButtonIndex == 2)
+ drawList.add(_gameModule->getGuiSpriteIndex(18 + 2), 202, 13, 1);
+
+ // Inventory items
+ int currItem = -1;
+ if (_currVerbNum == kVerbInvItem)
+ currItem = _currInventoryItem;
+ for (int i = 0; i < 50; ++i)
+ if (_inventoryItemStatus[i] && currItem != i)
+ drawList.add(_gameModule->getInventoryItemSpriteIndex(i * 2), kInventorySlotPositions[i].x, kInventorySlotPositions[i].y, 1);
+
+ } else {
+
+ // Scene objects
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *sceneObject = &_sceneObjects[i];
+ Animation *anim = sceneObject->anim;
+ if (anim) {
+ drawList.add(anim->frameSpriteIndices[sceneObject->frameIndex],
+ (sceneObject->x >> 16) - _cameraPos.x, (sceneObject->y >> 16) - _cameraPos.y,
+ sceneObject->y >> 16);
+ }
+ }
+
+ // Background objects
+ for (int i = 0; i < _gameModule->getBgSpritesCount(); ++i)
+ drawList.add(_gameModule->getBgSpriteIndex(i), -_cameraPos.x, -_cameraPos.y, _gameModule->getBgSpritePriority(i));
+
+ if (_gameState == kGSVerbs) {
+ // Verbs icon background
+ for (int i = 0; i < 6; ++i) {
+ if (i != 4) {
+ int index = (i == _activeItemIndex) ? 17 : 16;
+ drawList.add(_gameModule->getGuiSpriteIndex(index), _verbPos.x + kVerbRects[i].x - _cameraPos.x,
+ _verbPos.y + kVerbRects[i].y - _cameraPos.y, 499);
+ }
+ }
+ // Verbs background
+ drawList.add(_gameModule->getGuiSpriteIndex(13), _verbPos.x - _cameraPos.x,
+ _verbPos.y - _cameraPos.y, 500);
+ // Selected inventory item
+ if (_currInventoryItem >= 0) {
+ drawList.add(_gameModule->getInventoryItemSpriteIndex(2 * _currInventoryItem), _verbPos.x - _cameraPos.x,
+ _verbPos.y - _cameraPos.y + 27, 500);
+ }
+ }
+
+ if (_gameState == kGSDialog) {
+ // Dialog background
+ drawList.add(_gameModule->getGuiSpriteIndex(14), 0, 0, 500);
+ // Dialog icons
+ int iconX = 16;
+ for (int i = 0; i < 50; ++i)
+ if (_dialogItemStatus[i]) {
+ drawList.add(_gameModule->getDialogItemSpriteIndex(i), iconX, 36, 501);
+ iconX += 32;
+ }
+ }
+
+ }
+
+ // Mouse cursor
+ if (_mouseCursorSpriteIndex > 0 && _mousePos.x >= 0)
+ drawList.add(_mouseCursorSpriteIndex, _mousePos.x - _cameraPos.x, _mousePos.y - _cameraPos.y, 1000);
+
+}
+
+void BbvsEngine::updateVerbs() {
+
+ _activeItemIndex = 99;
+
+ if (_mousePos.x < 0) {
+ _mouseCursorSpriteIndex = 0;
+ return;
+ }
+
+ for (int i = 0; i < 6; ++i) {
+ const BBRect &verbRect = kVerbRects[i];
+ const int16 x = _verbPos.x + verbRect.x;
+ const int16 y = _verbPos.y + verbRect.y;
+ if (Common::Rect(x, y, x + verbRect.width, y + verbRect.height).contains(_mousePos)) {
+ if (i != kVerbInvItem || _currInventoryItem >= 0) {
+ _currVerbNum = i;
+ _activeItemIndex = i;
+ }
+ break;
+ }
+ }
+
+ switch (_currVerbNum) {
+ case kVerbLook:
+ case kVerbUse:
+ case kVerbTalk:
+ case kVerbWalk:
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(2 * _currVerbNum);
+ break;
+ case kVerbInvItem:
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(2 * _currInventoryItem);
+ break;
+ case kVerbShowInv:
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(8);
+ break;
+ }
+
+}
+
+void BbvsEngine::updateDialog(bool clicked) {
+
+ if (_mousePos.x < 0) {
+ _mouseCursorSpriteIndex = 0;
+ _activeItemType = 0;
+ return;
+ }
+
+ if (_mousePos.y > 32) {
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(10);
+ _activeItemIndex = 0;
+ _activeItemType = kITEmpty;
+ if (clicked)
+ _gameState = kGSScene;
+ return;
+ }
+
+ int slotX = (_mousePos.x - _cameraPos.x) / 32;
+
+ if (slotX >= _dialogSlotCount) {
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(4);
+ _activeItemType = kITEmpty;
+ _activeItemIndex = 0;
+ return;
+ }
+
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(5);
+ _activeItemType = kITDialog;
+
+ // Find the selected dialog item index
+ for (int i = 0; i < 50 && slotX >= 0; ++i) {
+ if (_dialogItemStatus[i]) {
+ --slotX;
+ _activeItemIndex = i;
+ }
+ }
+
+ // Select the dialog item action if it was clicked
+ if (clicked) {
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ if (evalCondition(action->conditions)) {
+ _mouseCursorSpriteIndex = 0;
+ _gameState = kGSWaitDialog;
+ _currAction = action;
+ break;
+ }
+ }
+ }
+
+}
+
+void BbvsEngine::updateInventory(bool clicked) {
+
+ Common::Rect kInvButtonRects[3] = {
+ Common::Rect(97, 13, 97 + 20, 13 + 26),
+ Common::Rect(135, 15, 135 + 46, 15 + 25),
+ Common::Rect(202, 13, 202 + 20, 13 + 26)};
+
+ if (_mousePos.x < 0) {
+ _mouseCursorSpriteIndex = 0;
+ _activeItemType = 0;
+ return;
+ }
+
+ if (_currVerbNum != kVerbLook && _currVerbNum != kVerbUse && _currVerbNum != kVerbInvItem)
+ _currVerbNum = kVerbUse;
+
+ const int16 mx = _mousePos.x - _cameraPos.x;
+ const int16 my = _mousePos.y - _cameraPos.y;
+
+ // Check inventory exit left/right edge of screen
+ if (mx < 40 || mx > 280) {
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(10);
+ _activeItemIndex = 0;
+ _activeItemType = kITEmpty;
+ if (clicked) {
+ _gameState = kGSScene;
+ stopSpeech();
+ }
+ return;
+ }
+
+ // Check hovered/clicked inventory button
+ _inventoryButtonIndex = -1;
+ if (kInvButtonRects[0].contains(mx, my)) {
+ _inventoryButtonIndex = 0;
+ if (clicked)
+ _currVerbNum = kVerbLook;
+ } else if (kInvButtonRects[2].contains(mx, my)) {
+ _inventoryButtonIndex = 2;
+ if (clicked)
+ _currVerbNum = kVerbUse;
+ } else if (kInvButtonRects[1].contains(mx, my)) {
+ _inventoryButtonIndex = 1;
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(10);
+ _activeItemIndex = 0;
+ _activeItemType = kITEmpty;
+ if (clicked) {
+ _gameState = kGSScene;
+ stopSpeech();
+ }
+ return;
+ }
+
+ // Find hovered/clicked inventory item
+
+ int currItem = -1;
+
+ if (_currVerbNum == kVerbInvItem)
+ currItem = _currInventoryItem;
+
+ _activeItemType = kITEmpty;
+
+ for (int i = 0; i < 50; ++i) {
+ if (_inventoryItemStatus[i] && i != currItem) {
+ InventoryItemInfo *info = _gameModule->getInventoryItemInfo(i);
+ const int16 sx = kInventorySlotPositions[i].x + info->xOffs;
+ const int16 sy = kInventorySlotPositions[i].y + info->yOffs;
+ if (Common::Rect(sx, sy, sx + info->width, sy + info->height).contains(mx, my)) {
+ _activeItemType = kITInvItem;
+ _activeItemIndex = i;
+ break;
+ }
+ }
+ }
+
+ // Update mouse cursor and select inventory item if clicked
+
+ if (_activeItemType == kITInvItem) {
+ if (clicked) {
+ if (_currVerbNum == kVerbLook) {
+ stopSpeech();
+ playSpeech(_activeItemIndex + 10000);
+ } else if (_currVerbNum == kVerbUse) {
+ _currInventoryItem = _activeItemIndex;
+ _currVerbNum = kVerbInvItem;
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(2 * _activeItemIndex);
+ } else if (_currVerbNum == kVerbInvItem) {
+ if ((_currInventoryItem == 22 && _activeItemIndex == 39) ||
+ (_currInventoryItem == 39 && _activeItemIndex == 22)) {
+ _inventoryItemStatus[22] = 0;
+ _inventoryItemStatus[39] = 0;
+ _inventoryItemStatus[40] = 1;
+ _currVerbNum = kVerbInvItem;
+ _currInventoryItem = 40;
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(40);
+ }
+ if ((_currInventoryItem == 25 && _activeItemIndex == 26) ||
+ (_currInventoryItem == 26 && _activeItemIndex == 25)) {
+ _inventoryItemStatus[26] = 0;
+ _inventoryItemStatus[25] = 0;
+ _inventoryItemStatus[27] = 1;
+ _currVerbNum = kVerbInvItem;
+ _currInventoryItem = 27;
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(27);
+ }
+ }
+ } else {
+ if (_currVerbNum == kVerbLook)
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(1);
+ else if (_currVerbNum == kVerbUse)
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(3);
+ else if (_currVerbNum == kVerbInvItem)
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(2 * _currInventoryItem + 1);
+ }
+ } else {
+ if (_currVerbNum >= kVerbInvItem)
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(2 * _currInventoryItem);
+ else
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(2 * _currVerbNum);
+ }
+
+}
+
+void BbvsEngine::updateScene(bool clicked) {
+
+ if (_mousePos.x < 0) {
+ _mouseCursorSpriteIndex = 0;
+ _activeItemType = kITNone;
+ return;
+ }
+
+ int lastPriority = 0;
+
+ _activeItemType = kITEmpty;
+
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *sceneObject = &_sceneObjects[i];
+ if (sceneObject->anim) {
+ Common::Rect frameRect = sceneObject->anim->frameRects1[sceneObject->frameIndex];
+ const int objY = sceneObject->y >> 16;
+ frameRect.translate(sceneObject->x >> 16, objY);
+ if (lastPriority <= objY && frameRect.width() > 0 && frameRect.contains(_mousePos)) {
+ lastPriority = objY;
+ _activeItemIndex = i;
+ _activeItemType = KITSceneObject;
+ }
+ }
+ }
+
+ for (int i = 0; i < _gameModule->getBgObjectsCount(); ++i) {
+ BgObject *bgObject = _gameModule->getBgObject(i);
+ if (lastPriority <= bgObject->rect.bottom && bgObject->rect.contains(_mousePos)) {
+ lastPriority = bgObject->rect.bottom;
+ _activeItemIndex = i;
+ _activeItemType = kITBgObject;
+ }
+ }
+
+ if (_currVerbNum >= kVerbInvItem)
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(2 * _currInventoryItem);
+ else
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(2 * _currVerbNum);
+
+ bool checkMore = true;
+
+ if (_activeItemType == KITSceneObject || _activeItemType == kITBgObject) {
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ if (evalCondition(action->conditions)) {
+ checkMore = false;
+ if (clicked) {
+ _mouseCursorSpriteIndex = 0;
+ _gameState = kGSWait;
+ _currAction = action;
+ if (_currVerbNum == kVerbTalk)
+ _currTalkObjectIndex = _activeItemIndex;
+ if (_buttheadObject) {
+ _buttheadObject->walkDestPt.x = -1;
+ _buttheadObject->walkCount = 0;
+ }
+ } else {
+ if (_currVerbNum >= kVerbInvItem)
+ _mouseCursorSpriteIndex = _gameModule->getInventoryItemSpriteIndex(2 * _currInventoryItem + 1);
+ else
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(2 * _currVerbNum + 1);
+ }
+ break;
+ }
+ }
+ }
+
+ // Test scroll arrow left
+ if (checkMore && _buttheadObject && _buttheadObject->anim && _mousePos.x - _cameraPos.x < 16 && _currCameraNum > 0) {
+ --_currCameraNum;
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ if (evalCameraCondition(action->conditions, _currCameraNum + 1)) {
+ checkMore = false;
+ if (clicked) {
+ _mouseCursorSpriteIndex = 0;
+ _gameState = kGSWait;
+ _currAction = action;
+ _buttheadObject->walkDestPt.x = -1;
+ _buttheadObject->walkCount = 0;
+ } else {
+ _activeItemType = kITScroll;
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(12);
+ }
+ break;
+ }
+ }
+ ++_currCameraNum;
+ }
+
+ // Test scroll arrow right
+ if (checkMore && _buttheadObject && _buttheadObject->anim && _mousePos.x - _cameraPos.x >= 304 && _currCameraNum < 4) {
+ ++_currCameraNum;
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ if (evalCameraCondition(action->conditions, _currCameraNum - 1)) {
+ checkMore = false;
+ if (clicked) {
+ _mouseCursorSpriteIndex = 0;
+ _gameState = kGSWait;
+ _currAction = action;
+ _buttheadObject->walkDestPt.x = -1;
+ _buttheadObject->walkCount = 0;
+ } else {
+ _activeItemType = kITScroll;
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(11);
+ }
+ break;
+ }
+ }
+ --_currCameraNum;
+ }
+
+ if (checkMore && _buttheadObject && _buttheadObject->anim) {
+ _walkMousePos = _mousePos;
+
+ while (1) {
+ int foundIndex = -1;
+
+ for (int i = 0; i < _walkableRectsCount; ++i)
+ if (_walkableRects[i].contains(_walkMousePos)) {
+ foundIndex = i;
+ break;
+ }
+
+ if (foundIndex >= 0) {
+ if (_walkMousePos.y != _mousePos.y)
+ _walkMousePos.y = _walkableRects[foundIndex].top;
+ break;
+ } else {
+ _walkMousePos.y += 4;
+ if (_walkMousePos.y >= 240)
+ break;
+ }
+
+ }
+
+ if (_beavisObject->anim) {
+ Common::Rect frameRect = _beavisObject->anim->frameRects2[_beavisObject->frameIndex];
+ frameRect.translate(_beavisObject->x >> 16, (_beavisObject->y >> 16) + 1);
+ if (!frameRect.isEmpty() && frameRect.contains(_walkMousePos))
+ _walkMousePos.y = frameRect.bottom;
+ }
+
+ if (_walkMousePos.y < 240 && canButtheadWalkToDest(_walkMousePos)) {
+ if (clicked) {
+ _buttheadObject->walkDestPt = _walkMousePos;
+ _buttheadObject->walkCount = 0;
+ }
+ for (int i = 0; i < _gameModule->getSceneExitsCount(); ++i) {
+ SceneExit *sceneExit = _gameModule->getSceneExit(i);
+ if (sceneExit->rect.contains(_walkMousePos.x, _walkMousePos.y)) {
+ _activeItemIndex = i;
+ _activeItemType = kITSceneExit;
+ _mouseCursorSpriteIndex = _gameModule->getGuiSpriteIndex(10);
+ }
+ }
+ } else {
+ _walkMousePos.x = -1;
+ _walkMousePos.y = -1;
+ }
+
+ }
+
+}
+
+bool BbvsEngine::performActionCommand(ActionCommand *actionCommand) {
+ debug(5, "BbvsEngine::performActionCommand() cmd: %d", actionCommand->cmd);
+
+ switch (actionCommand->cmd) {
+
+ case kActionCmdStop:
+ stopSpeech();
+ return false;
+
+ case kActionCmdWalkObject:
+ {
+ SceneObject *sceneObject = &_sceneObjects[actionCommand->sceneObjectIndex];
+ debug(5, "[%s] walks from (%d, %d) to (%d, %d)", sceneObject->sceneObjectDef->name,
+ sceneObject->x >> 16, sceneObject->y >> 16, actionCommand->walkDest.x, actionCommand->walkDest.y);
+ walkObject(sceneObject, actionCommand->walkDest, actionCommand->param);
+ }
+ return true;
+
+ case kActionCmdMoveObject:
+ {
+ SceneObject *sceneObject = &_sceneObjects[actionCommand->sceneObjectIndex];
+ sceneObject->x = actionCommand->walkDest.x << 16;
+ sceneObject->y = actionCommand->walkDest.y << 16;
+ sceneObject->xIncr = 0;
+ sceneObject->yIncr = 0;
+ sceneObject->walkCount = 0;
+ }
+ return true;
+
+ case kActionCmdAnimObject:
+ {
+ SceneObject *sceneObject = &_sceneObjects[actionCommand->sceneObjectIndex];
+ if (actionCommand->param == 0) {
+ sceneObject->anim = 0;
+ sceneObject->animIndex = 0;
+ sceneObject->frameTicks = 0;
+ sceneObject->frameIndex = 0;
+ } else if (actionCommand->timeStamp != 0 || sceneObject->anim != _gameModule->getAnimation(actionCommand->param)) {
+ sceneObject->animIndex = actionCommand->param;
+ sceneObject->anim = _gameModule->getAnimation(actionCommand->param);
+ sceneObject->frameIndex = sceneObject->anim->frameCount - 1;
+ sceneObject->frameTicks = 1;
+ }
+ }
+ return true;
+
+ case kActionCmdSetCameraPos:
+ _currCameraNum = actionCommand->param;
+ _newCameraPos = _gameModule->getCameraInit(_currCameraNum)->cameraPos;
+ updateBackgroundSounds();
+ return true;
+
+ case kActionCmdPlaySpeech:
+ playSpeech(actionCommand->param);
+ return true;
+
+ case kActionCmdPlaySound:
+ playSound(actionCommand->param);
+ return true;
+
+ case kActionCmdStartBackgroundSound:
+ {
+ const uint soundIndex = _gameModule->getSceneSoundIndex(actionCommand->param);
+ if (!_backgroundSoundsActive[soundIndex]) {
+ _backgroundSoundsActive[soundIndex] = 1;
+ playSound(actionCommand->param, true);
+ }
+ }
+ return true;
+
+ case kActionCmdStopBackgroundSound:
+ {
+ const uint soundIndex = _gameModule->getSceneSoundIndex(actionCommand->param);
+ _backgroundSoundsActive[soundIndex] = 0;
+ stopSound(actionCommand->param);
+ }
+ return true;
+
+ default:
+ return true;
+
+ }
+
+}
+
+bool BbvsEngine::processCurrAction() {
+ bool actionsFinished = false;
+
+ if (_sceneObjectActions.size() == 0) {
+
+ for (uint i = 0; i < _currAction->actionCommands.size(); ++i) {
+ ActionCommand *actionCommand = &_currAction->actionCommands[i];
+ if (actionCommand->timeStamp != 0)
+ break;
+
+ if (actionCommand->cmd == kActionCmdMoveObject || actionCommand->cmd == kActionCmdAnimObject) {
+ SceneObjectAction *sceneObjectAction = 0;
+ // See if there's already an entry for the SceneObject
+ for (uint j = 0; j < _sceneObjectActions.size(); ++j)
+ if (_sceneObjectActions[j].sceneObjectIndex == actionCommand->sceneObjectIndex) {
+ sceneObjectAction = &_sceneObjectActions[j];
+ break;
+ }
+ // If not, add one
+ if (!sceneObjectAction) {
+ SceneObjectAction newSceneObjectAction;
+ newSceneObjectAction.sceneObjectIndex = actionCommand->sceneObjectIndex;
+ _sceneObjectActions.push_back(newSceneObjectAction);
+ sceneObjectAction = &_sceneObjectActions.back();
+ }
+ if (actionCommand->cmd == kActionCmdMoveObject) {
+ sceneObjectAction->walkDest = actionCommand->walkDest;
+ } else {
+ sceneObjectAction->animationIndex = actionCommand->param;
+ }
+ }
+
+ if (actionCommand->cmd == kActionCmdSetCameraPos) {
+ _currCameraNum = actionCommand->param;
+ _newCameraPos = _gameModule->getCameraInit(actionCommand->param)->cameraPos;
+ }
+
+ }
+
+ // Delete entries for SceneObjects without anim
+ for (uint i = 0; i < _sceneObjectActions.size();) {
+ if (!_sceneObjects[_sceneObjectActions[i].sceneObjectIndex].anim)
+ _sceneObjectActions.remove_at(i);
+ else
+ ++i;
+ }
+
+ // Prepare affected scene objects
+ for (uint i = 0; i < _sceneObjectActions.size(); ++i) {
+ _sceneObjects[_sceneObjectActions[i].sceneObjectIndex].walkCount = 0;
+ _sceneObjects[_sceneObjectActions[i].sceneObjectIndex].turnCount = 0;
+ }
+
+ }
+
+ actionsFinished = true;
+
+ // Update SceneObject actions (walk and turn)
+ for (uint i = 0; i < _sceneObjectActions.size(); ++i) {
+ SceneObjectAction *soAction = &_sceneObjectActions[i];
+ SceneObject *sceneObject = &_sceneObjects[soAction->sceneObjectIndex];
+ if (sceneObject->walkDestPt.x != -1) {
+ debug(5, "waiting for walk to finish");
+ actionsFinished = false;
+ } else if ((int16)(sceneObject->x >> 16) != soAction->walkDest.x || (int16)(sceneObject->y >> 16) != soAction->walkDest.y) {
+ debug(5, "starting to walk");
+ sceneObject->walkDestPt = soAction->walkDest;
+ actionsFinished = false;
+ } else if (sceneObject->walkCount == 0 && sceneObject->turnCount == 0) {
+ debug(5, "not walking");
+ for (int turnCount = 0; turnCount < 8; ++turnCount)
+ if (sceneObject->sceneObjectDef->animIndices[kWalkTurnTbl[turnCount]] == soAction->animationIndex && sceneObject->turnValue != turnCount) {
+ sceneObject->turnCount = turnCount | 0x80;
+ break;
+ }
+ }
+ if (sceneObject->turnCount)
+ actionsFinished = false;
+ }
+
+ if (actionsFinished)
+ _sceneObjectActions.clear();
+
+ return actionsFinished;
+}
+
+void BbvsEngine::skipCurrAction() {
+ ActionCommands &actionCommands = _currAction->actionCommands;
+ while (_currAction && _newSceneNum == 0)
+ updateCommon();
+ for (uint i = 0; i < actionCommands.size(); ++i)
+ if (actionCommands[i].cmd == kActionCmdPlaySound)
+ stopSound(actionCommands[i].param);
+ _system->delayMillis(250);
+ _gameTicks = 0;
+}
+
+void BbvsEngine::updateCommon() {
+
+ if (_currAction) {
+
+ bool doActionCommands = true;
+
+ if (_currActionCommandTimeStamp == 0) {
+ doActionCommands = processCurrAction();
+ _currActionCommandIndex = 0;
+ }
+
+ if (doActionCommands) {
+
+ ActionCommand *actionCommand = &_currAction->actionCommands[_currActionCommandIndex];
+
+ while (actionCommand->timeStamp == _currActionCommandTimeStamp &&
+ _currActionCommandIndex < (int)_currAction->actionCommands.size()) {
+ if (!performActionCommand(actionCommand)) {
+ _gameState = kGSScene;
+ evalActionResults(_currAction->results);
+ if (_gameState == kGSDialog)
+ updateDialogConditions();
+ _currAction = 0;
+ _currActionCommandTimeStamp = 0;
+ _currActionCommandIndex = -1;
+ updateSceneObjectsTurnValue();
+ updateWalkableRects();
+ break;
+ }
+ actionCommand = &_currAction->actionCommands[++_currActionCommandIndex];
+ }
+
+ if (_currAction) {
+ ++_currActionCommandTimeStamp;
+ } else {
+ _activeItemIndex = 0;
+ _mouseCursorSpriteIndex = 0;
+ _activeItemType = kITEmpty;
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ if (evalCondition(action->conditions)) {
+ _gameState = kGSWait;
+ _currAction = action;
+ }
+ }
+ }
+
+ }
+
+ }
+
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *sceneObject = &_sceneObjects[i];
+
+ if (sceneObject->walkDestPt.x != -1) {
+ if (sceneObject->walkCount == 0) {
+ debug(5, "[%s] needs to walk", sceneObject->sceneObjectDef->name);
+ startWalkObject(sceneObject);
+ if (sceneObject->walkCount == 0) {
+ debug(5, "no walk possible");
+ sceneObject->walkDestPt.x = -1;
+ sceneObject->walkDestPt.y = -1;
+ sceneObject->xIncr = 0;
+ sceneObject->yIncr = 0;
+ }
+ }
+ updateWalkObject(sceneObject);
+ }
+
+ if (sceneObject->walkCount > 0 && sceneObject->turnCount == 0) {
+ debug(5, "walk step, xIncr: %d, yIncr: %d", sceneObject->xIncr, sceneObject->yIncr);
+ sceneObject->x += sceneObject->xIncr;
+ sceneObject->y += sceneObject->yIncr;
+ --sceneObject->walkCount;
+ } else if (sceneObject->turnCount != 0) {
+ debug(5, "need turn, turnCount: %d", sceneObject->turnCount);
+ turnObject(sceneObject);
+ }
+
+ if (sceneObject == _buttheadObject && sceneObject->walkDestPt.x != -1) {
+ for (uint j = 0; j < _walkAreaActions.size(); ++j) {
+ if (_walkAreaActions[j] != _currAction && evalCondition(_walkAreaActions[j]->conditions)) {
+ _sceneObjectActions.clear();
+ _gameState = kGSWait;
+ _currAction = _walkAreaActions[j];
+ _currActionCommandTimeStamp = 0;
+ _currActionCommandIndex = -1;
+ for (int k = 0; k < _gameModule->getSceneObjectDefsCount(); ++k) {
+ SceneObject *sceneObject2 = &_sceneObjects[k];
+ sceneObject2->walkDestPt.x = -1;
+ sceneObject2->walkDestPt.y = -1;
+ sceneObject2->walkCount = 0;
+ }
+ break;
+ }
+ }
+ }
+
+ if (sceneObject->anim && --sceneObject->frameTicks == 0) {
+ if (++sceneObject->frameIndex >= sceneObject->anim->frameCount)
+ sceneObject->frameIndex = 0;
+ sceneObject->frameTicks = sceneObject->anim->frameTicks[sceneObject->frameIndex];
+ }
+
+ }
+
+ if (!_currAction && _buttheadObject) {
+ int16 buttheadX = _buttheadObject->x >> 16;
+ int16 buttheadY = _buttheadObject->y >> 16;
+ CameraInit *cameraInit = _gameModule->getCameraInit(_currCameraNum);
+ for (int i = 0; i < 8; ++i) {
+ if (cameraInit->rects[i].contains(buttheadX, buttheadY)) {
+ int newCameraNum = cameraInit->cameraLinks[i];
+ if (_currCameraNum != newCameraNum) {
+ int prevCameraNum = _currCameraNum;
+ _currCameraNum = newCameraNum;
+ _newCameraPos = _gameModule->getCameraInit(newCameraNum)->cameraPos;
+ for (int j = 0; j < _gameModule->getActionsCount(); ++j) {
+ Action *action = _gameModule->getAction(j);
+ if (evalCameraCondition(action->conditions, prevCameraNum)) {
+ _gameState = kGSWait;
+ _currAction = action;
+ _mouseCursorSpriteIndex = 0;
+ _buttheadObject->walkDestPt.x = -1;
+ _buttheadObject->walkCount = 0;
+ break;
+ }
+ }
+ updateBackgroundSounds();
+ }
+ }
+ }
+ }
+
+ if (_cameraPos.x < _newCameraPos.x)
+ ++_cameraPos.x;
+ if (_cameraPos.x > _newCameraPos.x)
+ --_cameraPos.x;
+ if (_cameraPos.y < _newCameraPos.y)
+ ++_cameraPos.y;
+ if (_cameraPos.y > _newCameraPos.y)
+ --_cameraPos.y;
+
+ // Check if Butthead is inside a scene exit
+ if (_newSceneNum == 0 && !_currAction && _buttheadObject) {
+ int16 buttheadX = _buttheadObject->x >> 16;
+ int16 buttheadY = _buttheadObject->y >> 16;
+ for (int i = 0; i < _gameModule->getSceneExitsCount(); ++i) {
+ SceneExit *sceneExit = _gameModule->getSceneExit(i);
+ if (sceneExit->rect.contains(buttheadX, buttheadY)) {
+ _newSceneNum = sceneExit->newModuleNum;
+ break;
+ }
+ }
+ }
+
+}
+
+void BbvsEngine::updateSceneObjectsTurnValue() {
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *sceneObject = &_sceneObjects[i];
+ sceneObject->turnValue = 0;
+ for (int j = 0; j < 12; ++j) {
+ if (sceneObject->sceneObjectDef->animIndices[j] == sceneObject->animIndex) {
+ sceneObject->turnValue = kTurnTbl[j];
+ break;
+ }
+ }
+ }
+}
+
+void BbvsEngine::updateDialogConditions() {
+ _dialogSlotCount = 0;
+ memset(_dialogItemStatus, 0, sizeof(_dialogItemStatus));
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ int slotIndex = evalDialogCondition(action->conditions);
+ if (slotIndex >= 0) {
+ _dialogItemStatus[slotIndex] = 1;
+ ++_dialogSlotCount;
+ }
+ }
+}
+
+void BbvsEngine::playSpeech(int soundNum) {
+ debug(5, "playSpeech(%0d)", soundNum);
+ Common::String sndFilename = Common::String::format("snd/snd%05d.aif", soundNum);
+ Common::File *fd = new Common::File();
+ fd->open(sndFilename);
+ Audio::AudioStream *audioStream = Audio::makeAIFFStream(fd, DisposeAfterUse::YES);
+ _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechSoundHandle, audioStream);
+
+}
+
+void BbvsEngine::stopSpeech() {
+ _mixer->stopHandle(_speechSoundHandle);
+}
+
+void BbvsEngine::playSound(uint soundNum, bool loop) {
+ debug(5, "playSound(%0d)", soundNum);
+ for (uint i = 0; i < _gameModule->getPreloadSoundsCount(); ++i)
+ if (_gameModule->getPreloadSound(i) == soundNum) {
+ _sound->playSound(i, loop);
+ break;
+ }
+}
+
+void BbvsEngine::stopSound(uint soundNum) {
+ for (uint i = 0; i < _gameModule->getPreloadSoundsCount(); ++i)
+ if (_gameModule->getPreloadSound(i) == soundNum) {
+ _sound->stopSound(i);
+ break;
+ }
+}
+
+void BbvsEngine::stopSounds() {
+ _sound->stopAllSounds();
+}
+
+bool BbvsEngine::runMinigame(int minigameNum) {
+ debug(0, "BbvsEngine::runMinigame() minigameNum: %d", minigameNum);
+
+ bool fromMainGame = _currSceneNum != kMainMenu;
+
+ _sound->unloadSounds();
+
+ Minigame *minigame = 0;
+
+ switch (minigameNum) {
+ case kMinigameBbLoogie:
+ minigame = new MinigameBbLoogie(this);
+ break;
+ case kMinigameBbTennis:
+ minigame = new MinigameBbTennis(this);
+ break;
+ case kMinigameBbAnt:
+ minigame = new MinigameBbAnt(this);
+ break;
+ case kMinigameBbAirGuitar:
+ minigame = new MinigameBbAirGuitar(this);
+ break;
+ default:
+ error("Incorrect minigame number %d", minigameNum);
+ break;
+ }
+
+ bool minigameResult = minigame->run(fromMainGame);
+
+ delete minigame;
+
+ // Check if the principal was hit with a megaloogie in the loogie minigame
+ if (minigameNum == 0 && minigameResult)
+ _gameVars[42] = 1;
+
+#if 0
+ //DEBUG Fake it :)
+ if (minigameNum == 0)
+ _gameVars[42] = 1;
+#endif
+
+ return true;
+}
+
+void BbvsEngine::runMainMenu() {
+ MainMenu *mainMenu = new MainMenu(this);
+ mainMenu->runModal();
+ delete mainMenu;
+}
+
+void BbvsEngine::checkEasterEgg(char key) {
+
+ static const char * const kEasterEggStrings[] = {
+ "BOIDUTS",
+ "YNNIF",
+ "SKCUS",
+ "NAMTAH"
+ };
+
+ static const int kEasterEggLengths[] = {
+ 7, 5, 5, 6
+ };
+
+ if (_currSceneNum == kCredits) {
+ memcpy(&_easterEggInput[1], &_easterEggInput[0], 6);
+ _easterEggInput[0] = key;
+ for (int i = 0; i < ARRAYSIZE(kEasterEggStrings); ++i) {
+ if (!scumm_strnicmp(kEasterEggStrings[i], _easterEggInput, kEasterEggLengths[i])) {
+ _easterEggInput[0] = 0;
+ _newSceneNum = 100 + i;
+ break;
+ }
+ }
+ }
+
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/bbvs.h b/engines/bbvs/bbvs.h
new file mode 100644
index 0000000000..6a9a13905c
--- /dev/null
+++ b/engines/bbvs/bbvs.h
@@ -0,0 +1,423 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_BBVS_H
+#define BBVS_BBVS_H
+
+#include "audio/mixer.h"
+#include "audio/decoders/aiff.h"
+#include "common/array.h"
+#include "common/events.h"
+#include "common/file.h"
+#include "common/memstream.h"
+#include "common/random.h"
+#include "common/str.h"
+#include "common/substream.h"
+#include "common/system.h"
+#include "common/winexe.h"
+#include "common/winexe_pe.h"
+#include "engines/engine.h"
+
+struct ADGameDescription;
+
+namespace Bbvs {
+
+class ActionCommands;
+struct Action;
+class GameModule;
+struct Condition;
+struct Conditions;
+struct ActionResult;
+struct ActionResults;
+struct ActionCommand;
+struct CameraInit;
+struct SceneObjectDef;
+struct SceneObjectInit;
+struct SceneExit;
+struct Animation;
+struct SceneSound;
+class DrawList;
+class SpriteModule;
+class Screen;
+class SoundMan;
+
+#define BBVS_SAVEGAME_VERSION 0
+
+enum {
+ kVerbLook = 0,
+ kVerbUse = 1,
+ kVerbTalk = 2,
+ kVerbWalk = 3,
+ kVerbInvItem = 4,
+ kVerbShowInv = 5
+};
+
+enum {
+ kITNone = 0,
+ kITEmpty = 1,
+ KITSceneObject = 2,
+ kITBgObject = 3,
+ kITDialog = 4,
+ kITScroll = 5,
+ kITSceneExit = 6,
+ kITInvItem = 7
+};
+
+enum {
+ kGSScene = 0,
+ kGSInventory = 1,
+ kGSVerbs = 2,
+ kGSWait = 3,
+ kGSDialog = 4,
+ kGSWaitDialog = 5
+};
+
+enum {
+ kActionCmdStop = 0,
+ kActionCmdWalkObject = 3,
+ kActionCmdMoveObject = 4,
+ kActionCmdAnimObject = 5,
+ kActionCmdSetCameraPos = 7,
+ kActionCmdPlaySpeech = 8,
+ kActionCmdPlaySound = 10,
+ kActionCmdStartBackgroundSound = 11,
+ kActionCmdStopBackgroundSound = 12
+};
+
+enum {
+ kCondUnused = 1,
+ kCondSceneObjectVerb = 2,
+ kCondBgObjectVerb = 3,
+ kCondSceneObjectInventory = 4,
+ kCondBgObjectInventory = 5,
+ kCondHasInventoryItem = 6,
+ kCondHasNotInventoryItem = 7,
+ kCondIsGameVar = 8,
+ kCondIsNotGameVar = 9,
+ kCondIsPrevSceneNum = 10,
+ kCondIsCurrTalkObject = 11,
+ kCondIsDialogItem = 12,
+ kCondIsCameraNum = 13,
+ kCondIsNotPrevSceneNum = 14,
+ kCondDialogItem0 = 15,
+ kCondIsButtheadAtBgObject = 16,
+ kCondIsNotSceneVisited = 17,
+ kCondIsSceneVisited = 18,
+ kCondIsCameraNumTransition = 19
+};
+
+enum {
+ kActResAddInventoryItem = 1,
+ kActResRemoveInventoryItem = 2,
+ kActResSetGameVar = 3,
+ kActResUnsetGameVar = 4,
+ kActResStartDialog = 5,
+ kActResChangeScene = 6
+};
+
+enum {
+ kLeftButtonClicked = 1,
+ kRightButtonClicked = 2,
+ kLeftButtonDown = 4,
+ kRightButtonDown = 8,
+ kAnyButtonClicked = kLeftButtonClicked | kRightButtonClicked,
+ kAnyButtonDown = kLeftButtonDown | kRightButtonDown
+};
+
+struct BBPoint {
+ int16 x, y;
+};
+
+struct BBRect {
+ int16 x, y, width, height;
+};
+
+struct BBPolygon {
+ const BBPoint *points;
+ int pointsCount;
+};
+
+struct Rect {
+ int16 left, top, right, bottom;
+};
+
+struct SceneObject {
+ uint32 x, y;
+ SceneObjectDef *sceneObjectDef;
+ Animation *anim;
+ int animIndex;
+ int frameIndex;
+ int frameTicks;
+ int walkCount;
+ int xIncr, yIncr;
+ int turnValue, turnCount, turnTicks;
+ Common::Point walkDestPt;
+ SceneObject() : sceneObjectDef(0), anim(0) {
+ }
+};
+
+struct SceneObjectAction {
+ int sceneObjectIndex;
+ int animationIndex;
+ Common::Point walkDest;
+};
+
+struct WalkInfo {
+ int16 x, y;
+ int delta;
+ int direction;
+ Common::Point midPt;
+ int walkAreaIndex;
+};
+
+struct WalkArea {
+ int16 x, y, width, height;
+ bool checked;
+ int linksCount;
+ WalkArea *links[16];
+ WalkInfo *linksD1[32];
+ WalkInfo *linksD2[32];
+ bool contains(const Common::Point &pt) const;
+};
+
+const int kSnapshotSize = 23072;
+const int kSceneObjectsCount = 64;
+const int kSceneSoundsCount = 8;
+const int kInventoryItemStatusCount = 50;
+const int kDialogItemStatusCount = 50;
+const int kGameVarsCount = 2000;
+const int kSceneVisitedCount = 64;
+
+const int kMainMenu = 44;
+const int kCredits = 45;
+
+const int kMaxDistance = 0xFFFFFF;
+static const int8 kWalkTurnTbl[] = {
+ 7, 9, 4, 8, 6, 10, 5, 11
+};
+
+class BbvsEngine : public Engine {
+protected:
+ Common::Error run();
+ virtual bool hasFeature(EngineFeature f) const;
+public:
+ BbvsEngine(OSystem *syst, const ADGameDescription *gd);
+ ~BbvsEngine();
+ void newGame();
+ void continueGameFromQuickSave();
+ void setNewSceneNum(int newSceneNum);
+ const Common::String getTargetName() { return _targetName; }
+private:
+ const ADGameDescription *_gameDescription;
+ Graphics::PixelFormat _pixelFormat;
+public:
+ Common::RandomSource *_random;
+
+ GameModule *_gameModule;
+ SpriteModule *_spriteModule;
+ SoundMan *_sound;
+
+ Screen *_screen;
+
+ int _bootSaveSlot;
+
+ int _mouseX, _mouseY;
+ uint _mouseButtons;
+ Common::KeyCode _keyCode;
+
+ int _mouseCursorSpriteIndex;
+
+ int _gameState;
+ int _gameTicks;
+
+ Common::Point _mousePos;
+ Common::Point _verbPos;
+ Common::Point _walkMousePos;
+
+ int _activeItemType;
+ int _activeItemIndex;
+ int _currTalkObjectIndex;
+
+ Common::Point _cameraPos, _newCameraPos;
+
+ int _newSceneNum, _prevSceneNum, _currSceneNum;
+ int _playVideoNumber;
+
+ int _dialogSlotCount;
+ byte _dialogItemStatus[kDialogItemStatusCount];
+
+ byte _gameVars[kGameVarsCount];
+ byte _sceneVisited[kSceneVisitedCount];
+
+ int _currVerbNum;
+
+ int _currInventoryItem;
+ byte _inventoryItemStatus[kInventoryItemStatusCount];
+ int _inventoryButtonIndex;
+
+ Action *_currAction;
+ uint32 _currActionCommandTimeStamp;
+ int _currActionCommandIndex;
+
+ Common::Array<Action*> _walkAreaActions;
+
+ SceneObject _sceneObjects[kSceneObjectsCount];
+ Common::Array<SceneObjectAction> _sceneObjectActions;
+
+ SceneObject *_buttheadObject, *_beavisObject;
+ int _currCameraNum;
+
+ byte _backgroundSoundsActive[kSceneSoundsCount];
+ Audio::SoundHandle _speechSoundHandle;
+
+ int _walkAreasCount;
+ WalkArea _walkAreas[80];
+ int _walkInfosCount;
+ WalkInfo _walkInfos[256];
+ int _walkableRectsCount;
+ Common::Rect _walkableRects[256];
+ Common::Rect _tempWalkableRects1[256];
+ Common::Rect _tempWalkableRects2[256];
+ WalkInfo *_walkInfoPtrs[256];
+
+ WalkArea *_sourceWalkArea, *_destWalkArea;
+ Common::Point _sourceWalkAreaPt, _destWalkAreaPt, _finalWalkPt;
+ int _currWalkDistance;
+ bool _walkReachedDestArea;
+
+ bool _hasSnapshot;
+ byte *_snapshot;
+ Common::SeekableMemoryWriteStream *_snapshotStream;
+
+ char _easterEggInput[7];
+
+ void updateEvents();
+ int getRandom(int max);
+
+ void drawDebugInfo();
+ void drawScreen();
+
+ void updateGame();
+
+ bool evalCondition(Conditions &conditions);
+ bool evalCameraCondition(Conditions &conditions, int value);
+ int evalDialogCondition(Conditions &conditions);
+ void evalActionResults(ActionResults &results);
+
+ void updateBackgroundSounds();
+
+ void loadScene(int sceneNum);
+ void initScene(bool sounds);
+ bool changeScene();
+ bool update(int mouseX, int mouseY, uint mouseButtons, Common::KeyCode keyCode);
+
+ void buildDrawList(DrawList &drawList);
+
+ void updateVerbs();
+ void updateDialog(bool clicked);
+ void updateInventory(bool clicked);
+ void updateScene(bool clicked);
+
+ bool performActionCommand(ActionCommand *actionCommand);
+ bool processCurrAction();
+ void skipCurrAction();
+
+ void updateCommon();
+
+ void updateWalkableRects();
+ void startWalkObject(SceneObject *sceneObject);
+ void updateWalkObject(SceneObject *sceneObject);
+ void walkObject(SceneObject *sceneObject, const Common::Point &destPt, int walkSpeed);
+ void turnObject(SceneObject *sceneObject);
+
+ int rectSubtract(const Common::Rect &rect1, const Common::Rect &rect2, Common::Rect *outRects);
+
+ WalkInfo *addWalkInfo(int16 x, int16 y, int delta, int direction, int16 midPtX, int16 midPtY, int walkAreaIndex);
+ void initWalkAreas(SceneObject *sceneObject);
+ WalkArea *getWalkAreaAtPos(const Common::Point &pt);
+ bool canButtheadWalkToDest(const Common::Point &destPt);
+ void canWalkToDest(WalkArea *walkArea, int infoCount);
+ bool walkTestLineWalkable(const Common::Point &sourcePt, const Common::Point &destPt, WalkInfo *walkInfo);
+ void walkFindPath(WalkArea *sourceWalkArea, int infoCount);
+ int calcDistance(const Common::Point &pt1, const Common::Point &pt2);
+ void walkFoundPath(int count);
+
+ void updateSceneObjectsTurnValue();
+ void updateDialogConditions();
+
+ void playSpeech(int soundNum);
+ void stopSpeech();
+
+ void playSound(uint soundNum, bool loop = false);
+ void stopSound(uint soundNum);
+ void stopSounds();
+
+ bool runMinigame(int minigameNum);
+ void playVideo(int videoNum);
+
+ void runMainMenu();
+ void checkEasterEgg(char key);
+
+ // Savegame API
+
+ enum kReadSaveHeaderError {
+ kRSHENoError = 0,
+ kRSHEInvalidType = 1,
+ kRSHEInvalidVersion = 2,
+ kRSHEIoError = 3
+ };
+
+ struct SaveHeader {
+ Common::String description;
+ uint32 version;
+ byte gameID;
+ uint32 flags;
+ uint32 saveDate;
+ uint32 saveTime;
+ uint32 playTime;
+ Graphics::Surface *thumbnail;
+ };
+
+ bool _isSaveAllowed;
+
+ bool canLoadGameStateCurrently() { return _isSaveAllowed; }
+ bool canSaveGameStateCurrently() { return _isSaveAllowed; }
+ Common::Error loadGameState(int slot);
+ Common::Error saveGameState(int slot, const Common::String &description);
+ void savegame(const char *filename, const char *description);
+ void loadgame(const char *filename);
+ const char *getSavegameFilename(int num);
+ bool existsSavegame(int num);
+ static Common::String getSavegameFilename(const Common::String &target, int num);
+ static kReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header);
+
+ void allocSnapshot();
+ void freeSnapshot();
+ void saveSnapshot();
+
+ void writeContinueSavegame();
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_BBVS_H
diff --git a/engines/bbvs/configure.engine b/engines/bbvs/configure.engine
new file mode 100644
index 0000000000..c1dc1ef924
--- /dev/null
+++ b/engines/bbvs/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine bbvs "Beavis and Butthead in Virtual Stupidity" no
diff --git a/engines/bbvs/detection.cpp b/engines/bbvs/detection.cpp
new file mode 100644
index 0000000000..e7383163f5
--- /dev/null
+++ b/engines/bbvs/detection.cpp
@@ -0,0 +1,162 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/bbvs.h"
+
+#include "common/config-manager.h"
+#include "engines/advancedDetector.h"
+#include "common/savefile.h"
+#include "common/system.h"
+#include "base/plugins.h"
+#include "graphics/thumbnail.h"
+
+static const PlainGameDescriptor bbvsGames[] = {
+ { "bbvs", "Beavis and Butthead in Virtual Stupidity" },
+ { 0, 0 }
+};
+
+namespace Bbvs {
+
+static const ADGameDescription gameDescriptions[] = {
+ {
+ "bbvs",
+ 0,
+ AD_ENTRY1s("game0001.vnm", "637e5411751c7065bc385dd73d224561", 64004),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ },
+
+ AD_TABLE_END_MARKER
+};
+
+} // End of namespace Bbvs
+
+static const char * const directoryGlobs[] = {
+ "vnm",
+ 0
+};
+
+class BbvsMetaEngine : public AdvancedMetaEngine {
+public:
+ BbvsMetaEngine() : AdvancedMetaEngine(Bbvs::gameDescriptions, sizeof(ADGameDescription), bbvsGames) {
+ _singleid = "bbvs";
+ _maxScanDepth = 3;
+ _directoryGlobs = directoryGlobs;
+ }
+
+ virtual const char *getName() const {
+ return "MTV's Beavis and Butt-Head in Virtual Stupidity";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "(C) 1995 Viacom New Media";
+ }
+
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual SaveStateList listSaves(const char *target) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+ virtual void removeSaveState(const char *target, int slot) const;
+};
+
+bool BbvsMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate);
+}
+
+void BbvsMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String fileName = Common::String::format("%s.%03d", target, slot);
+ g_system->getSavefileManager()->removeSavefile(fileName);
+}
+
+int BbvsMetaEngine::getMaximumSaveSlot() const {
+ return 999;
+}
+
+SaveStateList BbvsMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Bbvs::BbvsEngine::SaveHeader header;
+ Common::String pattern = target;
+ pattern += ".???";
+ Common::StringArray filenames;
+ filenames = saveFileMan->listSavefiles(pattern.c_str());
+ Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+ SaveStateList saveList;
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ // Obtain the last 3 digits of the filename, since they correspond to the save slot
+ int slotNum = atoi(file->c_str() + file->size() - 3);
+ if (slotNum >= 0 && slotNum <= 999) {
+ Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
+ if (in) {
+ if (Bbvs::BbvsEngine::readSaveHeader(in, false, header) == Bbvs::BbvsEngine::kRSHENoError) {
+ saveList.push_back(SaveStateDescriptor(slotNum, header.description));
+ }
+ delete in;
+ }
+ }
+ }
+ return saveList;
+}
+
+SaveStateDescriptor BbvsMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
+ Common::String filename = Bbvs::BbvsEngine::getSavegameFilename(target, slot);
+ Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
+ if (in) {
+ Bbvs::BbvsEngine::SaveHeader header;
+ Bbvs::BbvsEngine::kReadSaveHeaderError error;
+ error = Bbvs::BbvsEngine::readSaveHeader(in, true, header);
+ delete in;
+ if (error == Bbvs::BbvsEngine::kRSHENoError) {
+ SaveStateDescriptor desc(slot, header.description);
+ // Slot 0 is used for the "Continue" save
+ desc.setDeletableFlag(slot != 0);
+ desc.setWriteProtectedFlag(slot == 0);
+ desc.setThumbnail(header.thumbnail);
+ desc.setSaveDate(header.saveDate & 0xFFFF, (header.saveDate >> 16) & 0xFF, (header.saveDate >> 24) & 0xFF);
+ desc.setSaveTime((header.saveTime >> 16) & 0xFF, (header.saveTime >> 8) & 0xFF);
+ desc.setPlayTime(header.playTime * 1000);
+ return desc;
+ }
+ }
+ return SaveStateDescriptor();
+}
+
+bool BbvsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ if (desc) {
+ *engine = new Bbvs::BbvsEngine(syst, desc);
+ }
+ return desc != 0;
+}
+
+#if PLUGIN_ENABLED_DYNAMIC(BBVS)
+ REGISTER_PLUGIN_DYNAMIC(BBVS, PLUGIN_TYPE_ENGINE, BbvsMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(BBVS, PLUGIN_TYPE_ENGINE, BbvsMetaEngine);
+#endif
diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp
new file mode 100644
index 0000000000..5247a58ec8
--- /dev/null
+++ b/engines/bbvs/dialogs.cpp
@@ -0,0 +1,182 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/dialogs.h"
+#include "common/events.h"
+#include "gui/gui-manager.h"
+#include "gui/ThemeEval.h"
+
+namespace Bbvs {
+
+struct MenuButton {
+ const char *label;
+ uint32 cmd;
+};
+
+static const MenuButton kMenuButtons[] = {
+ // Main menu
+ {"New Game", kCmdNewGame},
+ {"Continue", kCmdContinue},
+ {"Options", kCmdOptions},
+ {"Mini Games", kCmdMiniGames},
+ {"Quit", kCmdQuit},
+ // Options
+ {"Uninstall", kCmdUninstall},
+ {"Credits", kCmdCredits},
+ {"Opening", kCmdOpening},
+ {"Chicks 'n' Stuff", kCmdChicksNStuff},
+ {"Back ..", kCmdBack},
+ // Minigames
+ {"Hock-A-Loogie", kCmdHockALoogie},
+ {"Bug Justice", kCmdBugJustice},
+ {"Court Chaos", kCmdCourtChaos},
+ {"Air Guitar", kCmdAirGuitar},
+ {"Back ..", kCmdBack}
+};
+
+MainMenu::MainMenu(BbvsEngine *vm) : Dialog(0, 0, 1, 1), _vm(vm) {
+ init();
+}
+
+MainMenu::~MainMenu() {
+}
+
+void MainMenu::init() {
+ _buttons[0] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
+ _buttons[1] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
+ _buttons[2] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
+ _buttons[3] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
+ _buttons[4] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
+ gotoMenuScreen(kMainMenuScr);
+}
+
+void MainMenu::reflowLayout() {
+ const int screenW = g_system->getOverlayWidth();
+ const int screenH = g_system->getOverlayHeight();
+
+ const int buttonWidth = screenW * 70 / 320;
+ const int buttonHeight = screenH * 14 / 240;
+ const int buttonPadding = screenW * 3 / 320;
+
+ _w = 2 * buttonWidth + buttonPadding;
+ _h = 3 * buttonHeight + 3 * buttonPadding;
+ _x = (screenW - _w) / 2;
+ _y = screenH - _h;
+
+ int x = 0, y = 0;
+
+ x = 0;
+ y = 0;
+ _buttons[0]->resize(x, y, buttonWidth, buttonHeight);
+ x += buttonWidth + buttonPadding;
+ _buttons[1]->resize(x, y, buttonWidth, buttonHeight);
+
+ x = 0;
+ y += buttonHeight + buttonPadding;
+ _buttons[2]->resize(x, y, buttonWidth, buttonHeight);
+ x += buttonWidth + buttonPadding;
+ _buttons[3]->resize(x, y, buttonWidth, buttonHeight);
+
+ x = (_w - buttonWidth) / 2; // Center the last button
+ y += buttonHeight + buttonPadding;
+ _buttons[4]->resize(x, y, buttonWidth, buttonHeight);
+
+ GUI::Dialog::reflowLayout();
+
+}
+
+void MainMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data) {
+ switch (command) {
+ // Main menu
+ case kCmdNewGame:
+ close();
+ _vm->newGame();
+ break;
+ case kCmdContinue:
+ close();
+ _vm->continueGameFromQuickSave();
+ break;
+ case kCmdOptions:
+ gotoMenuScreen(kOptionsMenuScr);
+ break;
+ case kCmdMiniGames:
+ gotoMenuScreen(kMiniGamesMenuScr);
+ break;
+ case kCmdQuit:
+ close();
+ _vm->quitGame();
+ break;
+ // Options menu
+ case kCmdUninstall:
+ break;
+ case kCmdCredits:
+ gotoScene(45);
+ break;
+ case kCmdOpening:
+ gotoScene(43);
+ break;
+ case kCmdChicksNStuff:
+ gotoScene(41);
+ break;
+ // Minigames menu
+ case kCmdHockALoogie:
+ gotoScene(27);
+ break;
+ case kCmdBugJustice:
+ gotoScene(29);
+ break;
+ case kCmdCourtChaos:
+ gotoScene(28);
+ break;
+ case kCmdAirGuitar:
+ gotoScene(30);
+ break;
+ case kCmdBack:
+ gotoMenuScreen(kMainMenuScr);
+ break;
+ default:
+ Dialog::handleCommand(sender, command, data);
+ }
+}
+
+void MainMenu::gotoMenuScreen(int screen) {
+ for (int i = 0; i < 5; ++i) {
+ const MenuButton *btn = &kMenuButtons[screen * 5 + i];
+ _buttons[i]->setLabel(btn->label);
+ _buttons[i]->setCmd(btn->cmd);
+ _buttons[i]->setEnabled(btn->cmd != 0);
+ }
+ // Enable the "Continue" button if a savegame at slot 0 exists
+ if (screen == kMainMenuScr)
+ _buttons[1]->setEnabled(canContinue());
+}
+
+bool MainMenu::canContinue() {
+ return _vm->existsSavegame(0);
+}
+
+void MainMenu::gotoScene(int sceneNum) {
+ close();
+ _vm->setNewSceneNum(sceneNum);
+}
+
+} // End of namespace Hugo
diff --git a/engines/bbvs/dialogs.h b/engines/bbvs/dialogs.h
new file mode 100644
index 0000000000..2dce2a110b
--- /dev/null
+++ b/engines/bbvs/dialogs.h
@@ -0,0 +1,81 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_DIALOGS_H
+#define BBVS_DIALOGS_H
+
+#include "bbvs/bbvs.h"
+#include "gui/dialog.h"
+#include "gui/widgets/edittext.h"
+
+namespace Bbvs {
+
+enum {
+ // Main menu
+ kCmdNewGame = 'NEWG',
+ kCmdContinue = 'CONT',
+ kCmdOptions = 'OPTN',
+ kCmdMiniGames = 'MINI',
+ kCmdQuit = 'QUIT',
+ // Options
+ kCmdUninstall = 0,
+ kCmdCredits = 'CRED',
+ kCmdOpening = 'OPEN',
+ kCmdChicksNStuff = 'CHIC',
+ // Minigames
+ kCmdHockALoogie = 'HOCK',
+ kCmdBugJustice = 'BUGJ',
+ kCmdCourtChaos = 'CORT',
+ kCmdAirGuitar = 'AIRG',
+ kCmdBack = 'BACK'
+};
+
+enum {
+ kMainMenuScr = 0,
+ kOptionsMenuScr = 1,
+ kMiniGamesMenuScr = 2
+};
+
+class MainMenu : public GUI::Dialog {
+public:
+ MainMenu(BbvsEngine *vm);
+ ~MainMenu();
+
+ void reflowLayout();
+ void handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data);
+
+protected:
+ BbvsEngine *_vm;
+
+ void init();
+
+ GUI::ButtonWidget *_buttons[5];
+
+ void gotoMenuScreen(int index);
+ bool canContinue();
+ void gotoScene(int sceneNum);
+
+};
+
+}
+
+#endif // BBVS_DIALOGS_H
diff --git a/engines/bbvs/gamemodule.cpp b/engines/bbvs/gamemodule.cpp
new file mode 100644
index 0000000000..d6343084ab
--- /dev/null
+++ b/engines/bbvs/gamemodule.cpp
@@ -0,0 +1,500 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/gamemodule.h"
+#include "engines/util.h"
+
+namespace Bbvs {
+
+GameModule::GameModule()
+ : _bgSpriteCount(0), _bgSpriteIndices(0), _bgSpritePriorities(0), _walkRectsCount(0),
+ _walkRects(0), _sceneExitsCount(0), _sceneExits(0), _bgObjectsCount(0), _bgObjects(0),
+ _animationsCount(0), _animations(0), _sceneObjectDefsCount(0), _sceneObjectDefs(0),
+ _sceneObjectInitsCount(0), _sceneObjectInits(0), _actionsCount(0), _actions(0),
+ _sceneSoundsCount(0), _sceneSounds(0), _preloadSoundsCount(0), _preloadSounds(0) {
+}
+
+GameModule::~GameModule() {
+ unload();
+}
+
+void GameModule::load(const char *filename) {
+ debug(0, "GameModule::load()");
+
+ unload();
+
+ Common::File fd;
+
+ if (!fd.open(filename))
+ error("GameModule::load() Could not open %s", filename);
+
+ loadBgSprites(fd);
+ loadCameraInits(fd);
+ loadWalkRects(fd);
+ loadSceneExits(fd);
+ loadBgObjects(fd);
+ loadAnimations(fd);
+ loadSceneObjectDefs(fd);
+ loadSceneObjectInits(fd);
+ loadActions(fd);
+ loadGuiSpriteIndices(fd);
+ loadInventoryItemSpriteIndices(fd);
+ loadInventoryItemInfos(fd);
+ loadDialogItemSpriteIndices(fd);
+ loadSceneSounds(fd);
+ loadPreloadSounds(fd);
+
+ fd.seek(0xC);
+ _fieldC = fd.readUint32LE();
+
+ fd.seek(0x1A8);
+ _buttheadObjectIndex = fd.readUint32LE();
+
+ fd.close();
+
+ debug(0, "GameModule::load() OK");
+}
+
+int GameModule::getFieldC() {
+ return _fieldC;
+}
+
+int GameModule::getButtheadObjectIndex() {
+ return _buttheadObjectIndex;
+}
+
+int GameModule::getGuiSpriteIndex(int index) {
+ assert(index < kGuiSpriteCount);
+ return _guiSpriteIndices[index];
+}
+
+int GameModule::getInventoryItemSpriteIndex(int index) {
+ assert(index < kInventoryItemSpriteCount);
+ return _inventoryItemSpriteIndices[index];
+}
+
+int GameModule::getDialogItemSpriteIndex(int index) {
+ assert(index < kDialogItemSpriteCount);
+ return _dialogItemSpriteIndices[index];
+}
+
+int GameModule::getActionsCount() {
+ return _actionsCount;
+}
+
+Action *GameModule::getAction(int index) {
+ assert(index < _actionsCount);
+ return &_actions[index];
+}
+
+InventoryItemInfo *GameModule::getInventoryItemInfo(int index) {
+ assert(index < kInventoryItemCount);
+ return &_inventoryItemInfos[index];
+}
+
+CameraInit *GameModule::getCameraInit(int cameraNum) {
+ assert(cameraNum < kCameraInitsCount);
+ return &_cameraInits[cameraNum];
+}
+
+int GameModule::getSceneExitsCount() {
+ return _sceneExitsCount;
+}
+
+SceneExit *GameModule::getSceneExit(int index) {
+ assert(index < _sceneExitsCount);
+ return &_sceneExits[index];
+}
+
+int GameModule::getWalkRectsCount() {
+ return _walkRectsCount;
+}
+
+Common::Rect *GameModule::getWalkRects() {
+ return _walkRects;
+}
+
+int GameModule::getSceneObjectDefsCount() {
+ return _sceneObjectDefsCount;
+}
+
+SceneObjectDef *GameModule::getSceneObjectDef(int index) {
+ assert(index < _sceneObjectDefsCount);
+ return &_sceneObjectDefs[index];
+}
+
+int GameModule::getSceneObjectInitsCount() {
+ return _sceneObjectInitsCount;
+}
+
+SceneObjectInit *GameModule::getSceneObjectInit(int index) {
+ assert(index < _sceneObjectInitsCount);
+ return &_sceneObjectInits[index];
+}
+
+int GameModule::getBgObjectsCount() {
+ return _bgObjectsCount;
+}
+
+BgObject *GameModule::getBgObject(int index) {
+ assert(index < _bgObjectsCount);
+ return &_bgObjects[index];
+}
+
+int GameModule::getBgSpritesCount() {
+ return _bgSpriteCount;
+}
+
+int GameModule::getBgSpriteIndex(int index) {
+ assert(index < _bgSpriteCount);
+ return _bgSpriteIndices[index];
+}
+
+int GameModule::getBgSpritePriority(int index) {
+ assert(index < _bgSpriteCount);
+ return _bgSpritePriorities[index];
+}
+
+int GameModule::getSceneSoundsCount() {
+ return _sceneSoundsCount;
+}
+
+SceneSound *GameModule::getSceneSound(int index) {
+ assert(index < _sceneSoundsCount);
+ return &_sceneSounds[index];
+}
+
+uint GameModule::getSceneSoundIndex(uint soundNum) {
+ for (int i = 0; i < getSceneSoundsCount(); ++i)
+ if (getSceneSound(i)->soundNum == soundNum)
+ return i;
+ return 0;
+}
+
+uint GameModule::getPreloadSoundsCount() {
+ return _preloadSoundsCount;
+}
+
+uint GameModule::getPreloadSound(uint index) {
+ assert(index < _preloadSoundsCount);
+ return _preloadSounds[index];
+}
+
+Animation *GameModule::getAnimation(int index) {
+ assert(index < _animationsCount);
+ return &_animations[index];
+}
+
+Common::Point GameModule::readPoint(Common::SeekableReadStream &s) {
+ Common::Point p;
+ p.x = s.readUint16LE();
+ p.y = s.readUint16LE();
+ return p;
+}
+
+Common::Rect GameModule::readRect(Common::SeekableReadStream &s) {
+ Common::Rect r;
+ r.left = s.readUint16LE();
+ r.top = s.readUint16LE();
+ r.setWidth(s.readUint16LE());
+ r.setHeight(s.readUint16LE());
+ return r;
+}
+
+Conditions GameModule::readConditions(Common::SeekableReadStream &s) {
+ Conditions c;
+ for (int i = 0; i < 8; ++i) {
+ c.conditions[i].cond = s.readByte();
+ c.conditions[i].value1 = s.readByte();
+ c.conditions[i].value2 = s.readUint16LE();
+ }
+ return c;
+}
+
+void GameModule::unload() {
+ delete[] _bgSpriteIndices;
+ delete[] _bgSpritePriorities;
+ delete[] _walkRects;
+ delete[] _sceneExits;
+ delete[] _bgObjects;
+ delete[] _animations;
+ delete[] _sceneObjectDefs;
+ delete[] _sceneObjectInits;
+ delete[] _actions;
+ delete[] _sceneSounds;
+ delete[] _preloadSounds;
+ _bgSpriteIndices = 0;
+ _bgSpritePriorities = 0;
+ _walkRects = 0;
+ _sceneExits = 0;
+ _bgObjects = 0;
+ _animations = 0;
+ _sceneObjectDefs = 0;
+ _sceneObjectInits = 0;
+ _actions = 0;
+ _sceneSounds = 0;
+ _preloadSounds = 0;
+}
+
+void GameModule::loadBgSprites(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadBgSprites()");
+
+ s.seek(0x14);
+ _bgSpriteCount = s.readUint32LE();
+ uint32 bgSpriteIndicesOffs = s.readUint32LE();
+ uint32 bgSpritePrioritiesOffs = s.readUint32LE();
+ _bgSpriteIndices = new int[_bgSpriteCount];
+ _bgSpritePriorities = new int16[_bgSpriteCount];
+ s.seek(bgSpriteIndicesOffs);
+ for (int i = 0; i < _bgSpriteCount; ++i)
+ _bgSpriteIndices[i] = s.readUint32LE();
+ s.seek(bgSpritePrioritiesOffs);
+ for (int i = 0; i < _bgSpriteCount; ++i)
+ _bgSpritePriorities[i] = s.readUint16LE();
+
+}
+
+void GameModule::loadCameraInits(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadCameraInits()");
+
+ s.seek(0x20);
+ for (int i = 0; i < kCameraInitsCount; ++i) {
+ CameraInit &cameraInit = _cameraInits[i];
+ cameraInit.cameraPos = readPoint(s);
+ for (int j = 0; j < 8; ++j)
+ cameraInit.cameraLinks[j] = s.readByte();
+ for (int j = 0; j < 8; ++j)
+ cameraInit.rects[j] = readRect(s);
+ }
+}
+
+void GameModule::loadWalkRects(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadWalkRects()");
+
+ s.seek(0x150);
+ _walkRectsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _walkRects = new Common::Rect[_walkRectsCount];
+ s.seek(offs);
+ for (int i = 0; i < _walkRectsCount; ++i)
+ _walkRects[i] = readRect(s);
+}
+
+void GameModule::loadSceneExits(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadSceneExits()");
+
+ s.seek(0x158);
+ _sceneExitsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _sceneExits = new SceneExit[_sceneExitsCount];
+ s.seek(offs);
+ for (int i = 0; i < _sceneExitsCount; ++i) {
+ _sceneExits[i].rect = readRect(s);
+ _sceneExits[i].newModuleNum = s.readUint32LE();
+ }
+}
+
+void GameModule::loadBgObjects(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadBgObjects()");
+
+ s.seek(0x160);
+ _bgObjectsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _bgObjects = new BgObject[_bgObjectsCount];
+ s.seek(offs);
+ for (int i = 0; i < _bgObjectsCount; ++i) {
+ s.read(_bgObjects[i].name, 20);
+ _bgObjects[i].rect = readRect(s);
+ }
+}
+
+void GameModule::loadAnimations(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadAnimations()");
+
+ s.seek(0x168);
+ _animationsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _animations = new Animation[_animationsCount];
+ for (int i = 0; i < _animationsCount; ++i) {
+ Animation &anim = _animations[i];
+ s.seek(offs + i * 20);
+ anim.frameCount = s.readUint32LE();
+ uint32 frameSpriteIndicesOffs = s.readUint32LE();
+ uint32 frameTicksOffs = s.readUint32LE();
+ uint32 frameRects1Offs = s.readUint32LE();
+ uint32 frameRects2Offs = s.readUint32LE();
+ anim.frameSpriteIndices = new int[anim.frameCount];
+ s.seek(frameSpriteIndicesOffs);
+ for (int j = 0; j < anim.frameCount; ++j)
+ anim.frameSpriteIndices[j] = s.readUint32LE();
+ anim.frameTicks = new int16[anim.frameCount];
+ s.seek(frameTicksOffs);
+ for (int j = 0; j < anim.frameCount; ++j)
+ anim.frameTicks[j] = s.readUint16LE();
+ anim.frameRects1 = new Common::Rect[anim.frameCount];
+ s.seek(frameRects1Offs);
+ for (int j = 0; j < anim.frameCount; ++j)
+ anim.frameRects1[j] = readRect(s);
+ anim.frameRects2 = new Common::Rect[anim.frameCount];
+ s.seek(frameRects2Offs);
+ for (int j = 0; j < anim.frameCount; ++j)
+ anim.frameRects2[j] = readRect(s);
+ }
+}
+
+void GameModule::loadSceneObjectDefs(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadSceneObjectDefs()");
+
+ s.seek(0x170);
+ _sceneObjectDefsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _sceneObjectDefs = new SceneObjectDef[_sceneObjectDefsCount];
+ s.seek(offs);
+ for (int i = 0; i < _sceneObjectDefsCount; ++i) {
+ s.read(_sceneObjectDefs[i].name, 20);
+ _sceneObjectDefs[i].walkSpeed = s.readUint32LE();
+ for (int j = 0; j < 16; ++j)
+ _sceneObjectDefs[i].animIndices[j] = s.readUint32LE();
+ }
+}
+
+void GameModule::loadSceneObjectInits(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadSceneObjectInits()");
+
+ s.seek(0x178);
+ _sceneObjectInitsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _sceneObjectInits = new SceneObjectInit[_sceneObjectInitsCount];
+ s.seek(offs);
+ for (int i = 0; i < _sceneObjectInitsCount; ++i) {
+ _sceneObjectInits[i].conditions = readConditions(s);
+ _sceneObjectInits[i].sceneObjectIndex = s.readUint32LE();
+ _sceneObjectInits[i].animIndex = s.readUint32LE();
+ _sceneObjectInits[i].x = s.readUint16LE();
+ _sceneObjectInits[i].y = s.readUint16LE();
+ }
+}
+
+void GameModule::loadActions(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadActions()");
+
+ s.seek(0x180);
+ _actionsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _actions = new Action[_actionsCount];
+ for (int i = 0; i < _actionsCount; ++i) {
+ s.seek(offs + i * 72);
+ debug(0, "Action(%d) offs: %08X", i, offs + i * 72);
+ _actions[i].conditions = readConditions(s);
+ for (int j = 0; j < 8; ++j) {
+ _actions[i].results.actionResults[j].kind = s.readByte();
+ _actions[i].results.actionResults[j].value1 = s.readByte();
+ _actions[i].results.actionResults[j].value2 = s.readUint16LE();
+ }
+ const int actionListCount = s.readUint32LE();
+ const uint32 actionListOffs = s.readUint32LE();
+ s.seek(actionListOffs);
+ for (int j = 0; j < actionListCount; ++j) {
+ ActionCommand actionCommand;
+ actionCommand.cmd = s.readUint16LE();
+ actionCommand.sceneObjectIndex = s.readUint16LE();
+ actionCommand.timeStamp = s.readUint32LE();
+ actionCommand.walkDest = readPoint(s);
+ actionCommand.param = s.readUint32LE();
+ _actions[i].actionCommands.push_back(actionCommand);
+ }
+ }
+}
+
+void GameModule::loadGuiSpriteIndices(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadGuiSpriteIndices()");
+
+ s.seek(0x188);
+ uint32 offs = s.readUint32LE();
+ s.seek(offs);
+ for (int i = 0; i < kGuiSpriteCount; ++i)
+ _guiSpriteIndices[i] = s.readUint32LE();
+}
+
+void GameModule::loadInventoryItemSpriteIndices(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadInventoryItemSpriteIndices()");
+
+ s.seek(0x18C);
+ uint32 offs = s.readUint32LE();
+ s.seek(offs);
+ for (int i = 0; i < kInventoryItemSpriteCount; ++i)
+ _inventoryItemSpriteIndices[i] = s.readUint32LE();
+}
+
+void GameModule::loadInventoryItemInfos(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadInventoryItemInfos()");
+
+ s.seek(0x190);
+ uint32 offs = s.readUint32LE();
+ s.seek(offs);
+ for (int i = 0; i < kInventoryItemCount; ++i) {
+ _inventoryItemInfos[i].xOffs = s.readUint16LE();
+ _inventoryItemInfos[i].yOffs = s.readUint16LE();
+ _inventoryItemInfos[i].width = s.readUint16LE();
+ _inventoryItemInfos[i].height = s.readUint16LE();
+ s.skip(8); // Unused
+ }
+}
+
+void GameModule::loadDialogItemSpriteIndices(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadDialogItemSpriteIndices()");
+
+ s.seek(0x194);
+ uint32 offs = s.readUint32LE();
+ s.seek(offs);
+ for (int i = 0; i < kDialogItemSpriteCount; ++i) {
+ _dialogItemSpriteIndices[i] = s.readUint32LE();
+ }
+}
+
+void GameModule::loadSceneSounds(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadSceneSounds()");
+
+ s.seek(0x1A0);
+ _sceneSoundsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _sceneSounds = new SceneSound[_sceneSoundsCount];
+ s.seek(offs);
+ for (int i = 0; i < _sceneSoundsCount; ++i) {
+ _sceneSounds[i].conditions = readConditions(s);
+ _sceneSounds[i].soundNum = s.readUint32LE();
+ }
+}
+
+void GameModule::loadPreloadSounds(Common::SeekableReadStream &s) {
+ debug(0, "GameModule::loadPreloadSounds()");
+
+ s.seek(0x198);
+ _preloadSoundsCount = s.readUint32LE();
+ uint32 offs = s.readUint32LE();
+ _preloadSounds = new uint[_preloadSoundsCount];
+ s.seek(offs);
+ for (uint i = 0; i < _preloadSoundsCount; ++i)
+ _preloadSounds[i] = s.readUint32LE();
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/gamemodule.h b/engines/bbvs/gamemodule.h
new file mode 100644
index 0000000000..4d4f5b90a1
--- /dev/null
+++ b/engines/bbvs/gamemodule.h
@@ -0,0 +1,251 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_GAMEMODULE_H
+#define BBVS_GAMEMODULE_H
+
+#include "common/array.h"
+#include "common/file.h"
+#include "common/memstream.h"
+#include "common/rect.h"
+#include "common/str.h"
+
+namespace Bbvs {
+
+const int kInventoryItemCount = 42;
+const int kInventoryItemSpriteCount = 2 * kInventoryItemCount;
+const int kDialogItemSpriteCount = 26;
+const int kGuiSpriteCount = 21;
+const int kCameraInitsCount = 4;
+
+struct Condition {
+ byte cond;
+ byte value1;
+ int16 value2;
+};
+
+struct Conditions {
+ Condition conditions[8];
+};
+
+struct ActionResult {
+ byte kind;
+ byte value1;
+ int16 value2;
+};
+
+struct ActionResults {
+ ActionResult actionResults[8];
+};
+
+struct ActionCommand {
+ uint16 cmd;
+ int16 sceneObjectIndex;
+ uint32 timeStamp;
+ Common::Point walkDest;
+ int32 param;
+};
+
+class ActionCommands : public Common::Array<ActionCommand> {
+};
+
+struct Action {
+ Conditions conditions;
+ ActionResults results;
+ ActionCommands actionCommands;
+};
+
+struct InventoryItemInfo {
+ int16 xOffs, yOffs;
+ int16 width, height;
+};
+
+struct CameraInit {
+ Common::Point cameraPos;
+ byte cameraLinks[8];
+ Common::Rect rects[8];
+};
+
+struct SceneObjectDef {
+ char name[20];
+ int animIndices[16];
+ int walkSpeed;
+};
+
+struct SceneObjectInit {
+ Conditions conditions;
+ int sceneObjectIndex;
+ int animIndex;
+ int x, y;
+};
+
+struct BgObject {
+ char name[20];
+ Common::Rect rect;
+};
+
+struct Animation {
+ int frameCount;
+ int *frameSpriteIndices;
+ int16 *frameTicks;
+ Common::Rect *frameRects1;
+ Common::Rect *frameRects2;
+ Animation()
+ : frameCount(0), frameSpriteIndices(0), frameTicks(0), frameRects1(0), frameRects2(0) {
+ }
+ ~Animation() {
+ delete[] frameSpriteIndices;
+ delete[] frameTicks;
+ delete[] frameRects1;
+ delete[] frameRects2;
+ }
+};
+
+struct SceneExit {
+ Common::Rect rect;
+ int newModuleNum;
+};
+
+struct SceneSound {
+ Conditions conditions;
+ uint soundNum;
+};
+
+class GameModule {
+public:
+ GameModule();
+ ~GameModule();
+
+ void load(const char *filename);
+
+ int getFieldC();
+ int getButtheadObjectIndex();
+
+ int getGuiSpriteIndex(int index);
+ int getInventoryItemSpriteIndex(int index);
+ int getDialogItemSpriteIndex(int index);
+
+ int getActionsCount();
+ Action *getAction(int index);
+
+ InventoryItemInfo *getInventoryItemInfo(int index);
+
+ CameraInit *getCameraInit(int cameraNum);
+
+ int getSceneExitsCount();
+ SceneExit *getSceneExit(int index);
+
+ int getWalkRectsCount();
+ Common::Rect *getWalkRects();
+
+ int getSceneObjectDefsCount();
+ SceneObjectDef *getSceneObjectDef(int index);
+
+ int getSceneObjectInitsCount();
+ SceneObjectInit *getSceneObjectInit(int index);
+
+ int getBgObjectsCount();
+ BgObject *getBgObject(int index);
+
+ int getBgSpritesCount();
+ int getBgSpriteIndex(int index);
+ int getBgSpritePriority(int index);
+
+ int getSceneSoundsCount();
+ SceneSound *getSceneSound(int index);
+ uint getSceneSoundIndex(uint soundNum);
+
+ uint getPreloadSoundsCount();
+ uint getPreloadSound(uint index);
+
+ Animation *getAnimation(int index);
+
+protected:
+
+ int _bgSpriteCount;
+ int *_bgSpriteIndices;
+ int16 *_bgSpritePriorities;
+
+ CameraInit _cameraInits[kCameraInitsCount];
+
+ int _walkRectsCount;
+ Common::Rect *_walkRects;
+
+ int _sceneExitsCount;
+ SceneExit *_sceneExits;
+
+ int _bgObjectsCount;
+ BgObject *_bgObjects;
+
+ int _animationsCount;
+ Animation *_animations;
+
+ int _sceneObjectDefsCount;
+ SceneObjectDef *_sceneObjectDefs;
+
+ int _sceneObjectInitsCount;
+ SceneObjectInit *_sceneObjectInits;
+
+ int _actionsCount;
+ Action *_actions;
+
+ int _sceneSoundsCount;
+ SceneSound *_sceneSounds;
+
+ uint _preloadSoundsCount;
+ uint *_preloadSounds;
+
+ int _guiSpriteIndices[kGuiSpriteCount];
+ int _inventoryItemSpriteIndices[kInventoryItemSpriteCount];
+ InventoryItemInfo _inventoryItemInfos[kInventoryItemCount];
+ int _dialogItemSpriteIndices[kDialogItemSpriteCount];
+
+ int _fieldC;
+ int _buttheadObjectIndex;
+
+ Common::Point readPoint(Common::SeekableReadStream &s);
+ Common::Rect readRect(Common::SeekableReadStream &s);
+ Conditions readConditions(Common::SeekableReadStream &s);
+
+ void unload();
+
+ void loadBgSprites(Common::SeekableReadStream &s);
+ void loadCameraInits(Common::SeekableReadStream &s);
+ void loadWalkRects(Common::SeekableReadStream &s);
+ void loadSceneExits(Common::SeekableReadStream &s);
+ void loadBgObjects(Common::SeekableReadStream &s);
+ void loadAnimations(Common::SeekableReadStream &s);
+ void loadSceneObjectDefs(Common::SeekableReadStream &s);
+ void loadSceneObjectInits(Common::SeekableReadStream &s);
+ void loadActions(Common::SeekableReadStream &s);
+ void loadGuiSpriteIndices(Common::SeekableReadStream &s);
+ void loadInventoryItemSpriteIndices(Common::SeekableReadStream &s);
+ void loadInventoryItemInfos(Common::SeekableReadStream &s);
+ void loadDialogItemSpriteIndices(Common::SeekableReadStream &s);
+ void loadSceneSounds(Common::SeekableReadStream &s);
+ void loadPreloadSounds(Common::SeekableReadStream &s);
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_GAMEMODULE_H
diff --git a/engines/bbvs/graphics.cpp b/engines/bbvs/graphics.cpp
new file mode 100644
index 0000000000..810d910abf
--- /dev/null
+++ b/engines/bbvs/graphics.cpp
@@ -0,0 +1,141 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/graphics.h"
+
+namespace Bbvs {
+
+void DrawList::add(int index, int x, int y, int priority) {
+ debug(5, "DrawList::add() %d (%d, %d) %d", index, x, y, priority);
+ DrawListEntry drawListEntry;
+ drawListEntry.index = index;
+ drawListEntry.x = x;
+ drawListEntry.y = y;
+ drawListEntry.priority = priority;
+ // Insert the sprite at the correct position
+ uint insertIndex = 0;
+ while (insertIndex < size() && (*this)[insertIndex].priority <= priority)
+ ++insertIndex;
+ insert_at(insertIndex, drawListEntry);
+}
+
+Screen::Screen(OSystem *system) : _system(system) {
+ _surface = new Graphics::Surface();
+ _surface->create(320, 240, Graphics::PixelFormat::createFormatCLUT8());
+}
+
+Screen::~Screen() {
+ _surface->free();
+ delete _surface;
+}
+
+void Screen::setPalette(Palette &palette) {
+ byte pal[768];
+ memset(pal, 0, 768);
+ memcpy(&pal[palette.start * 3], palette.data, palette.count * 3);
+ _system->getPaletteManager()->setPalette(pal, 0, 256);
+}
+
+void Screen::copyToScreen() {
+ _system->copyRectToScreen((const byte*)_surface->getBasePtr(0, 0), _surface->pitch, 0, 0, 320, 240);
+ _system->updateScreen();
+}
+
+void Screen::clear() {
+ _surface->fillRect(Common::Rect(0, 0, 320, 240), 0);
+}
+
+void Screen::drawDrawList(DrawList &drawList, SpriteModule *spriteModule) {
+ for (uint i = 0; i < drawList.size(); ++i) {
+ debug(1, "index: %d; x: %d; y: %d; priority: %d", drawList[i].index, drawList[i].x, drawList[i].y, drawList[i].priority);
+ Sprite sprite = spriteModule->getSprite(drawList[i].index);
+ drawSprite(sprite, drawList[i].x, drawList[i].y);
+ }
+}
+
+void Screen::drawSprite(Sprite &sprite, int x, int y) {
+ debug(5, "Screen::drawSprite()");
+
+ int destX, destY, width, height, skipX = 0, skipY = 0;
+
+ destX = sprite.xOffs + x;
+ destY = sprite.yOffs + y;
+
+ if (destX >= _surface->w || destY >= _surface->h)
+ return;
+
+ height = sprite.height;
+ if (destY < 0) {
+ height += destY;
+ if (height <= 0)
+ return;
+ skipY = -destY;
+ destY = 0;
+ }
+ if (destY + height > _surface->h)
+ height = _surface->h - destY;
+
+ width = sprite.width;
+ if (destX < 0) {
+ width += destX;
+ if (width <= 0)
+ return;
+ skipX = -destX;
+ destX = 0;
+ }
+ if (destX + width >= _surface->w)
+ width = _surface->w - destX;
+
+ debug(0, "drawSprite() (%d, %d, %d, %d); skipX: %d; skipY: %d; %d", destX, destY, width, height, skipX, skipY, sprite.type);
+
+ if (sprite.type == 1) {
+ for (int yc = 0; yc < height; ++yc) {
+ byte *source = sprite.getRow(skipY + yc);
+ byte *dest = (byte*)_surface->getBasePtr(destX, destY + yc);
+ int currWidth = -skipX;
+ while (currWidth < width) {
+ int8 op = *source++;
+ if (op < 0) {
+ currWidth += (-op);
+ } else {
+ while (op >= 0 && currWidth < width) {
+ if (currWidth >= 0)
+ dest[currWidth] = *source;
+ ++source;
+ ++currWidth;
+ --op;
+ }
+ }
+ }
+ }
+ } else {
+ for (int yc = 0; yc < height; ++yc) {
+ byte *source = sprite.getRow(skipY + yc) + skipX;
+ byte *dest = (byte*)_surface->getBasePtr(destX, destY + yc);
+ memcpy(dest, source, width);
+ }
+ }
+
+ debug(5, "Screen::drawSprite() OK");
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/graphics.h b/engines/bbvs/graphics.h
new file mode 100644
index 0000000000..acb8eb953a
--- /dev/null
+++ b/engines/bbvs/graphics.h
@@ -0,0 +1,61 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_GRAPHICS_H
+#define BBVS_GRAPHICS_H
+
+#include "bbvs/spritemodule.h"
+#include "common/array.h"
+#include "common/system.h"
+#include "graphics/palette.h"
+#include "graphics/surface.h"
+
+namespace Bbvs {
+
+struct DrawListEntry {
+ int index;
+ int x, y;
+ int priority;
+};
+
+class DrawList : public Common::Array<DrawListEntry> {
+public:
+ void add(int index, int x, int y, int priority);
+};
+
+class Screen {
+public:
+ Screen(OSystem *system);
+ ~Screen();
+ void setPalette(Palette &palette);
+ void copyToScreen();
+ void drawDrawList(DrawList &drawList, SpriteModule *spriteModule);
+ void drawSprite(Sprite &sprite, int x, int y);
+ void clear();
+//protected:
+ OSystem *_system;
+ Graphics::Surface *_surface;
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_GRAPHICS_H
diff --git a/engines/bbvs/logic.cpp b/engines/bbvs/logic.cpp
new file mode 100644
index 0000000000..06792e2df1
--- /dev/null
+++ b/engines/bbvs/logic.cpp
@@ -0,0 +1,265 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/bbvs.h"
+#include "bbvs/gamemodule.h"
+
+namespace Bbvs {
+
+bool BbvsEngine::evalCondition(Conditions &conditions) {
+ bool result = true;
+ for (int i = 0; i < 8 && result; ++i) {
+ const Condition &condition = conditions.conditions[i];
+ switch (condition.cond) {
+ case kCondSceneObjectVerb:
+ result = _activeItemType == KITSceneObject &&
+ condition.value1 == _currVerbNum &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondBgObjectVerb:
+ result = _activeItemType == kITBgObject &&
+ condition.value1 == _currVerbNum &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondSceneObjectInventory:
+ result = _activeItemType == KITSceneObject &&
+ _currVerbNum == kVerbInvItem &&
+ condition.value1 == _currInventoryItem &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondBgObjectInventory:
+ result = _activeItemType == kITBgObject &&
+ _currVerbNum == kVerbInvItem &&
+ condition.value1 == _currInventoryItem &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondHasInventoryItem:
+ result = _inventoryItemStatus[condition.value1] != 0;
+ break;
+ case kCondHasNotInventoryItem:
+ result = _inventoryItemStatus[condition.value1] == 0;
+ break;
+ case kCondIsGameVar:
+ result = _gameVars[condition.value2] != 0;
+ break;
+ case kCondIsNotGameVar:
+ result = _gameVars[condition.value2] == 0;
+ break;
+ case kCondIsPrevSceneNum:
+ result = condition.value2 == _prevSceneNum;
+ break;
+ case kCondIsCurrTalkObject:
+ result = condition.value2 == _currTalkObjectIndex;
+ break;
+ case kCondIsDialogItem:
+ result = _activeItemType == kITDialog &&
+ condition.value1 == _activeItemIndex;
+ break;
+ case kCondIsCameraNum:
+ result = condition.value1 == _currCameraNum;
+ break;
+ case kCondIsNotPrevSceneNum:
+ result = condition.value2 != _prevSceneNum;
+ break;
+ case kCondIsButtheadAtBgObject:
+ result = _buttheadObject &&
+ _gameModule->getBgObject(condition.value2)->rect.contains(_buttheadObject->x >> 16, _buttheadObject->y >> 16);
+ break;
+ case kCondIsNotSceneVisited:
+ result = _sceneVisited[_currSceneNum] == 0;
+ break;
+ case kCondIsSceneVisited:
+ result = _sceneVisited[_currSceneNum] != 0;
+ break;
+ case kCondUnused:
+ case kCondDialogItem0:
+ case kCondIsCameraNumTransition:
+ result = false;
+ break;
+ }
+ }
+ return result;
+}
+
+bool BbvsEngine::evalCameraCondition(Conditions &conditions, int value) {
+ bool result = true;
+ for (int i = 0; i < 8 && result; ++i) {
+ const Condition &condition = conditions.conditions[i];
+ switch (condition.cond) {
+ case kCondHasInventoryItem:
+ result = _inventoryItemStatus[condition.value1] != 0;
+ break;
+ case kCondHasNotInventoryItem:
+ result = _inventoryItemStatus[condition.value1] == 0;
+ break;
+ case kCondIsGameVar:
+ result = _gameVars[condition.value2] != 0;
+ break;
+ case kCondIsNotGameVar:
+ result = _gameVars[condition.value2] == 0;
+ break;
+ case kCondIsPrevSceneNum:
+ result = condition.value2 == _prevSceneNum;
+ break;
+ case kCondIsNotPrevSceneNum:
+ result = condition.value2 != _prevSceneNum;
+ break;
+ case kCondIsNotSceneVisited:
+ result = _sceneVisited[_currSceneNum] == 0;
+ break;
+ case kCondIsSceneVisited:
+ result = _sceneVisited[_currSceneNum] != 0;
+ break;
+ case kCondIsCameraNumTransition:
+ result = condition.value1 == _currCameraNum &&
+ condition.value2 == value;
+ break;
+ case kCondUnused:
+ case kCondSceneObjectVerb:
+ case kCondBgObjectVerb:
+ case kCondSceneObjectInventory:
+ case kCondBgObjectInventory:
+ case kCondIsCurrTalkObject:
+ case kCondIsDialogItem:
+ case kCondIsCameraNum:
+ case kCondDialogItem0:
+ case kCondIsButtheadAtBgObject:
+ result = false;
+ break;
+ default:
+ break;
+ }
+ }
+ return result;
+}
+
+int BbvsEngine::evalDialogCondition(Conditions &conditions) {
+ int result = -1;
+ bool success = false;
+ for (int i = 0; i < 8; ++i) {
+ const Condition &condition = conditions.conditions[i];
+ switch (condition.cond) {
+ case kCondSceneObjectVerb:
+ success = _activeItemType == KITSceneObject &&
+ condition.value1 == _currVerbNum &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondBgObjectVerb:
+ success = _activeItemType == kITBgObject &&
+ condition.value1 == _currVerbNum &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondSceneObjectInventory:
+ success = _activeItemType == KITSceneObject &&
+ _currVerbNum == kVerbInvItem &&
+ condition.value1 == _currInventoryItem &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondBgObjectInventory:
+ success = _activeItemType == kITBgObject &&
+ _currVerbNum == kVerbInvItem &&
+ condition.value1 == _currInventoryItem &&
+ condition.value2 == _activeItemIndex;
+ break;
+ case kCondHasInventoryItem:
+ success = _inventoryItemStatus[condition.value1] != 0;
+ break;
+ case kCondHasNotInventoryItem:
+ success = _inventoryItemStatus[condition.value1] == 0;
+ break;
+ case kCondIsGameVar:
+ success = _gameVars[condition.value2] != 0;
+ break;
+ case kCondIsNotGameVar:
+ success = _gameVars[condition.value2] == 0;
+ break;
+ case kCondIsPrevSceneNum:
+ success = condition.value2 == _prevSceneNum;
+ break;
+ case kCondIsCurrTalkObject:
+ success = condition.value2 == _currTalkObjectIndex;
+ break;
+ case kCondIsDialogItem:
+ result = condition.value1;
+ break;
+ case kCondIsCameraNum:
+ success = condition.value1 == _currCameraNum;
+ break;
+ case kCondIsNotPrevSceneNum:
+ success = condition.value2 != _prevSceneNum;
+ break;
+ case kCondIsButtheadAtBgObject:
+ success = _buttheadObject &&
+ _gameModule->getBgObject(condition.value2)->rect.contains(_buttheadObject->x >> 16, _buttheadObject->y >> 16);
+ break;
+ case kCondIsNotSceneVisited:
+ success = _sceneVisited[_currSceneNum] == 0;
+ break;
+ case kCondIsSceneVisited:
+ success = _sceneVisited[_currSceneNum] != 0;
+ break;
+ case kCondDialogItem0:
+ return 0;
+ case kCondUnused:
+ case kCondIsCameraNumTransition:
+ success = false;
+ break;
+ }
+ if (!success)
+ return -1;
+ }
+ return result;
+}
+
+void BbvsEngine::evalActionResults(ActionResults &results) {
+ for (int i = 0; i < 8; ++i) {
+ const ActionResult &result = results.actionResults[i];
+ switch (result.kind) {
+ case kActResAddInventoryItem:
+ _inventoryItemStatus[result.value1] = 1;
+ _currVerbNum = kVerbInvItem;
+ _currInventoryItem = result.value1;
+ break;
+ case kActResRemoveInventoryItem:
+ _inventoryItemStatus[result.value1] = 0;
+ if (result.value1 == _currInventoryItem)
+ _currInventoryItem = -1;
+ if (_currVerbNum == kVerbInvItem)
+ _currVerbNum = kVerbLook;
+ break;
+ case kActResSetGameVar:
+ _gameVars[result.value2] = 1;
+ break;
+ case kActResUnsetGameVar:
+ _gameVars[result.value2] = 0;
+ break;
+ case kActResStartDialog:
+ _gameState = kGSDialog;
+ break;
+ case kActResChangeScene:
+ _newSceneNum = result.value2;
+ break;
+ }
+ }
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbairguitar.cpp b/engines/bbvs/minigames/bbairguitar.cpp
new file mode 100644
index 0000000000..f2e42313e3
--- /dev/null
+++ b/engines/bbvs/minigames/bbairguitar.cpp
@@ -0,0 +1,1198 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbairguitar.h"
+
+namespace Bbvs {
+
+static const char * const kNoteSoundFilenames[] = {
+ "a.aif", "a#.aif", "b.aif", "c.aif", "c#.aif",
+ "d.aif", "d#.aif", "e.aif", "f.aif", "f#.aif",
+ "g.aif", "g#.aif", "a_oct.aif"
+};
+
+static const uint kNoteSoundFilenamesCount = ARRAYSIZE(kNoteSoundFilenames);
+
+static const char * const kPatchDirectories[] = {
+ "rock", "burp", "fart"
+};
+
+static const uint kPatchDirectoriesCount = ARRAYSIZE(kPatchDirectories);
+
+static const BBPoint kPianoKeyArea1[] = {{29, 192}, {38, 192}, {38, 222}, {41, 222}, {41, 239}, {29, 239}};
+static const BBPoint kPianoKeyArea2[] = {{38, 192}, {43, 192}, {43, 222}, {38, 222}};
+static const BBPoint kPianoKeyArea3[] = {{43, 192}, {49, 192}, {49, 222}, {52, 222}, {52, 239}, {41, 239}, {41, 222}, {43, 222}};
+static const BBPoint kPianoKeyArea4[] = {{49, 192}, {54, 192}, {54, 222}, {49, 222}};
+static const BBPoint kPianoKeyArea5[] = {{54, 192}, {63, 192}, {63, 239}, {52, 239}, {52, 222}, {54, 222}};
+static const BBPoint kPianoKeyArea6[] = {{63, 192}, {71, 192}, {71, 222}, {74, 222}, {74, 239}, {63, 239}};
+static const BBPoint kPianoKeyArea7[] = {{71, 192}, {76, 192}, {76, 222}, {71, 222}};
+static const BBPoint kPianoKeyArea8[] = {{76, 192}, {82, 192}, {82, 222}, {85, 222}, {85, 239}, {74, 239}, {74, 222}, {76, 222}};
+static const BBPoint kPianoKeyArea9[] = {{82, 192}, {87, 192}, {87, 222}, {82, 222}};
+static const BBPoint kPianoKeyArea10[] = {{87, 192}, {94, 192}, {94, 222}, {96, 222}, {96, 239}, {85, 239}, {85, 222}, {87, 222}};
+static const BBPoint kPianoKeyArea11[] = {{94, 192}, {99, 192}, {99, 222}, {94, 222}};
+static const BBPoint kPianoKeyArea12[] = {{99, 192}, {107, 192}, {107, 239}, {96, 239}, {96, 222}, {99, 222}};
+static const BBPoint kPianoKeyArea13[] = {{107, 192}, {118, 192}, {118, 239}, {107, 239}};
+
+static const BBPolygon kPianoKeyAreas[] = {
+ {kPianoKeyArea1, ARRAYSIZE(kPianoKeyArea1)},
+ {kPianoKeyArea2, ARRAYSIZE(kPianoKeyArea2)},
+ {kPianoKeyArea3, ARRAYSIZE(kPianoKeyArea3)},
+ {kPianoKeyArea4, ARRAYSIZE(kPianoKeyArea4)},
+ {kPianoKeyArea5, ARRAYSIZE(kPianoKeyArea5)},
+ {kPianoKeyArea6, ARRAYSIZE(kPianoKeyArea6)},
+ {kPianoKeyArea7, ARRAYSIZE(kPianoKeyArea7)},
+ {kPianoKeyArea8, ARRAYSIZE(kPianoKeyArea8)},
+ {kPianoKeyArea9, ARRAYSIZE(kPianoKeyArea9)},
+ {kPianoKeyArea10, ARRAYSIZE(kPianoKeyArea10)},
+ {kPianoKeyArea11, ARRAYSIZE(kPianoKeyArea11)},
+ {kPianoKeyArea12, ARRAYSIZE(kPianoKeyArea12)},
+ {kPianoKeyArea13, ARRAYSIZE(kPianoKeyArea13)},
+};
+
+static const BBPoint kObjPoints[] = {
+ {161, 189}, {269, 189}, {161, 208}, {279, 208}, {172, 208},
+ {141, 224}, {257, 191}, {257, 199}, {148, 223}, {124, 224},
+ { 29, 192}, {182, 220}, {245, 220}, {269, 220}, {161, 220},
+ {203, 220}, {224, 220}, {123, 189}, {123, 199}, {123, 209},
+ {134, 224}, { 29, 185}, {124, 224}, {226, 127}, {226, 127},
+ {209, 141}, {244, 141}, {226, 127}, { 99, 107}, { 99, 107},
+ { 76, 137}, {118, 136}, { 99, 107}, {195, 104}, {100, 78}
+};
+
+static const MinigameBbAirGuitar::PianoKeyInfo kPianoKeyInfos[] = {
+ { 30, 192, 0},
+ { 38, 192, 5},
+ { 41, 192, 1},
+ { 49, 192, 5},
+ { 52, 192, 2},
+ { 63, 192, 3},
+ { 71, 192, 5},
+ { 74, 192, 1},
+ { 82, 192, 5},
+ { 85, 192, 1},
+ { 94, 192, 5},
+ { 96, 192, 2},
+ {107, 192, 4}
+};
+
+static const Rect kRect2 = {29, 189, 290, 239};
+static const Rect kPianoRect = {29, 192, 118, 239};
+
+static const Rect kPlayerButtonRects[] = {
+ {123, 189, 145, 199},
+ {123, 199, 145, 209},
+ {123, 209, 145, 220},
+ {148, 223, 156, 236},
+ {161, 189, 182, 205},
+ {161, 208, 171, 218},
+ {161, 220, 182, 231},
+ {182, 220, 203, 231},
+ {203, 220, 224, 231},
+ {224, 220, 245, 231},
+ {245, 220, 266, 231},
+ {269, 220, 290, 231},
+ {269, 189, 290, 205},
+ {279, 208, 290, 218}
+};
+
+static const BBPoint kPointsTbl1[] = {
+ {196, 191}, {202, 191}, {207, 191}, {212, 191}, {217, 191},
+ {223, 191}, {228, 191}, {233, 191}, {238, 191}, {244, 191},
+ {249, 191}
+};
+
+static const BBPoint kPointsTbl2[] = {
+ {196, 199}, {202, 199}, {207, 199}, {212, 199}, {217, 199},
+ {223, 199}, {228, 199}, {233, 199}, {238, 199}, {244, 199},
+ {249, 199}
+};
+
+static const struct { int frameIndex; byte flag; } kNoteFrameTbl[13] = {
+ {2, 0}, {2, 1}, {3, 0}, {3, 1}, {4, 0},
+ {5, 0}, {5, 1}, {6, 0}, {6, 1}, {0, 0},
+ {0, 1}, {1, 0}, {2, 0}
+};
+
+const int kTrackBarMinX = 172;
+const int kTrackBarMaxX = 272;
+
+bool MinigameBbAirGuitar::ptInRect(const Rect *r, int x, int y) {
+ return r && Common::Rect(r->left, r->top, r->right, r->bottom).contains(x, y);
+}
+
+bool MinigameBbAirGuitar::ptInPoly(const BBPolygon *poly, int x, int y) {
+ if (!poly)
+ return false;
+ const BBPoint *points = poly->points;
+ int pointsCount = poly->pointsCount;
+ bool result = false;
+ if (pointsCount > 0)
+ for (int i = 0, j = pointsCount - 1; i < pointsCount; j = i++)
+ if (((points[i].y > y) != (points[j].y > y)) &&
+ (x < (points[j].x - points[i].x) * (y - points[i].y) /
+ (points[j].y - points[i].y) + points[i].x))
+ result = !result;
+ return result;
+}
+
+void MinigameBbAirGuitar::buildDrawList(DrawList &drawList) {
+ switch (_gameState) {
+ case 0:
+ buildDrawList0(drawList);
+ break;
+ case 1:
+ buildDrawList1(drawList);
+ break;
+ }
+}
+
+void MinigameBbAirGuitar::buildDrawList0(DrawList &drawList) {
+
+ drawList.add(_objects[0].anim->frameIndices[0], _objects[0].x, _objects[0].y, 2000);
+
+ for (int i = 1; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->y + 16);
+ }
+
+ if (_titleScreenSpriteIndex> 0)
+ drawList.add(_titleScreenSpriteIndex, 0, 0, 0);
+
+}
+
+void MinigameBbAirGuitar::buildDrawList1(DrawList &drawList) {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, 255 - i);
+ }
+
+ if (_movingTrackBar) {
+ _trackBarX = _trackBarMouseX;
+ } else if (_totalTrackLength > 0) {
+ _trackBarX = 100 * _currTrackPos / _totalTrackLength + kTrackBarMinX;
+ } else {
+ _trackBarX = kTrackBarMinX;
+ }
+
+ if (_trackBarX > kTrackBarMaxX)
+ _trackBarX = kTrackBarMaxX;
+
+ _trackBarThumbRect.top = 208;
+ _trackBarThumbRect.bottom = 218;
+ _trackBarThumbRect.left = _trackBarX;
+ _trackBarThumbRect.right = _trackBarX + 6;
+
+ drawList.add(_objects[5].anim->frameIndices[0], _trackBarX, 208, 100);
+
+ if (_playerMode != 0) {
+ for (int i = 36; i < _vuMeterLeft2 + 36; ++i) {
+ int frameIndex = 0;
+ if (i >= 45)
+ frameIndex = 3;
+ else if (i >= 43)
+ frameIndex = 2;
+ else if (i >= 41)
+ frameIndex = 1;
+ drawList.add(_objects[i].anim->frameIndices[frameIndex], kPointsTbl1[i - 36].x, kPointsTbl1[i - 36].y, 254);
+ }
+ for (int i = 47; i < _vuMeterRight2 + 47; ++i) {
+ int frameIndex = 0;
+ if (i >= 56)
+ frameIndex = 3;
+ else if (i >= 54)
+ frameIndex = 2;
+ else if (i >= 52)
+ frameIndex = 1;
+ drawList.add(_objects[i].anim->frameIndices[frameIndex], kPointsTbl2[i - 47].x, kPointsTbl2[i - 47].y, 254);
+ }
+ }
+
+ if (_backgroundSpriteIndex > 0)
+ drawList.add(_backgroundSpriteIndex, 0, 0, 0);
+
+}
+
+void MinigameBbAirGuitar::drawSprites() {
+ DrawList drawList;
+ buildDrawList(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+void MinigameBbAirGuitar::initObjs() {
+ for (int i = 0; i < kMaxObjectsCount; ++i)
+ _objects[i].kind = 0;
+}
+
+MinigameBbAirGuitar::Obj *MinigameBbAirGuitar::getFreeObject() {
+ for (int i = 0; i < kMaxObjectsCount; ++i)
+ if (_objects[i].kind == 0)
+ return &_objects[i];
+ return 0;
+}
+
+void MinigameBbAirGuitar::initObjects() {
+ switch (_gameState) {
+ case 0:
+ initObjects0();
+ break;
+ case 1:
+ initObjects1();
+ break;
+ }
+}
+
+void MinigameBbAirGuitar::initObjects0() {
+ _objects[0].anim = getAnimation(0);
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = getAnimation(0)->frameTicks[0];
+ _objects[0].x = 160;
+ _objects[0].y = 120;
+ _objects[0].kind = 1;
+ _objects[1].anim = getAnimation(37);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = getAnimation(37)->frameTicks[0];
+ _objects[1].x = 40;
+ _objects[1].y = 240;
+ _objects[1].kind = 2;
+ _objects[2].anim = getAnimation(36);
+ _objects[2].frameIndex = 0;
+ _objects[2].ticks = getAnimation(36)->frameTicks[0];
+ _objects[2].x = 280;
+ _objects[2].y = 240;
+ _objects[2].kind = 2;
+
+}
+
+void MinigameBbAirGuitar::initObjects1() {
+
+ for (int i = 0; i < 60; ++i)
+ _objects[i].kind = 0;
+
+ _objects[0].kind = 0;
+ _objects[0].kind = 1;
+ _objects[0].anim = getAnimation(0);
+ _objects[0].ticks = getAnimation(0)->frameTicks[0];
+ _objects[1].anim = getAnimation(1);
+ _objects[1].ticks = getAnimation(1)->frameTicks[0];
+ _objects[2].anim = getAnimation(2);
+ _objects[2].ticks = getAnimation(2)->frameTicks[0];
+ _objects[3].anim = getAnimation(3);
+ _objects[3].ticks = getAnimation(3)->frameTicks[0];
+ _objects[4].anim = getAnimation(4);
+ _objects[4].ticks = getAnimation(4)->frameTicks[0];
+ _objects[5].anim = getAnimation(5);
+ _objects[5].ticks = getAnimation(5)->frameTicks[0];
+ _objects[6].anim = getAnimation(6);
+ _objects[6].ticks = getAnimation(6)->frameTicks[0];
+ _objects[7].anim = getAnimation(8);
+ _objects[7].ticks = getAnimation(8)->frameTicks[0];
+ _objects[8].anim = getAnimation(9);
+ _objects[8].ticks = getAnimation(9)->frameTicks[0];
+ _objects[9].anim = getAnimation(10);
+ _objects[9].ticks = getAnimation(10)->frameTicks[0];
+ _objects[10].anim = getAnimation(11);
+ _objects[10].ticks = getAnimation(11)->frameTicks[0];
+ _objects[11].anim = getAnimation(12);
+ _objects[11].ticks = getAnimation(12)->frameTicks[0];
+ _objects[12].anim = getAnimation(13);
+ _objects[12].ticks = getAnimation(13)->frameTicks[0];
+ _objects[13].anim = getAnimation(14);
+ _objects[13].ticks = getAnimation(14)->frameTicks[0];
+ _objects[14].anim = getAnimation(15);
+ _objects[14].ticks = getAnimation(15)->frameTicks[0];
+ _objects[15].anim = getAnimation(16);
+ _objects[15].ticks = getAnimation(16)->frameTicks[0];
+ _objects[16].anim = getAnimation(17);
+ _objects[16].ticks = getAnimation(17)->frameTicks[0];
+ _objects[17].anim = getAnimation(18);
+ _objects[17].ticks = getAnimation(18)->frameTicks[0];
+ _objects[18].anim = getAnimation(19);
+ _objects[18].ticks = getAnimation(19)->frameTicks[0];
+ _objects[19].anim = getAnimation(20);
+ _objects[19].ticks = getAnimation(20)->frameTicks[0];
+ _objects[20].anim = getAnimation(21);
+ _objects[20].ticks = getAnimation(21)->frameTicks[0];
+ _objects[21].anim = getAnimation(11);
+ _objects[21].ticks = getAnimation(11)->frameTicks[0];
+ _objects[22].anim = getAnimation(22);
+ _objects[22].ticks = getAnimation(22)->frameTicks[0];
+ _objects[23].anim = getAnimation(23);
+ _objects[23].ticks = getAnimation(23)->frameTicks[0];
+ _objects[24].anim = getAnimation(24);
+ _objects[24].ticks = getAnimation(24)->frameTicks[0];
+ _objects[25].anim = getAnimation(25);
+ _objects[25].ticks = getAnimation(25)->frameTicks[0];
+ _objects[26].anim = getAnimation(26);
+ _objects[26].ticks = getAnimation(26)->frameTicks[0];
+ _objects[27].anim = getAnimation(27);
+ _objects[27].ticks = getAnimation(27)->frameTicks[0];
+ _objects[28].anim = getAnimation(28);
+ _objects[28].ticks = getAnimation(28)->frameTicks[0];
+ _objects[29].anim = getAnimation(29);
+ _objects[29].ticks = getAnimation(29)->frameTicks[0];
+ _objects[30].anim = getAnimation(30);
+ _objects[30].ticks = getAnimation(30)->frameTicks[0];
+ _objects[31].anim = getAnimation(31);
+ _objects[31].ticks = getAnimation(31)->frameTicks[0];
+ _objects[32].anim = getAnimation(32);
+ _objects[32].ticks = getAnimation(32)->frameTicks[0];
+ _objects[33].anim = getAnimation(33);
+ _objects[33].ticks = getAnimation(33)->frameTicks[0];
+ _objects[34].anim = getAnimation(34);
+ _objects[34].ticks = getAnimation(34)->frameTicks[0];
+ _objects[35].anim = getAnimation(35);
+ _objects[35].ticks = getAnimation(35)->frameTicks[0];
+
+ for (int i = 36; i <= 57; ++i) {
+ _objects[i].anim = getAnimation(7);
+ _objects[i].ticks = getAnimation(7)->frameTicks[0];
+ }
+
+ for (int i = 1; i <= 35; ++i) {
+ _objects[i].x = kObjPoints[i - 1].x;
+ _objects[i].y = kObjPoints[i - 1].y;
+ }
+
+ _objects[22].kind = 1;
+ _objects[6].kind = 1;
+ _objects[26].kind = 1;
+ _objects[26].frameIndex = 3;
+ _objects[27].kind = 1;
+ _objects[27].frameIndex = 3;
+ _objects[31].kind = 1;
+ _objects[31].frameIndex = 3;
+ _objects[32].kind = 1;
+ _objects[32].frameIndex = 3;
+ _objects[28].kind = 1;
+ _objects[33].kind = 1;
+ _objects[34].kind = 1;
+ _objects[35].kind = 1;
+
+ _track[0].noteNum = -1;
+ stop();
+ changePatch(0);
+
+}
+
+bool MinigameBbAirGuitar::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
+ switch (_gameState) {
+ case 0:
+ return updateStatus0(mouseX, mouseY, mouseButtons);
+ case 1:
+ return updateStatus1(mouseX, mouseY, mouseButtons);
+ }
+ return false;
+}
+
+bool MinigameBbAirGuitar::updateStatus0(int mouseX, int mouseY, uint mouseButtons) {
+
+ if (mouseButtons & kAnyButtonDown) {
+ stopSound(1);
+ _rockTunePlaying = false;
+ _gameState = 1;
+ initObjects();
+ _gameTicks = 0;
+ } else {
+
+ if (!_rockTunePlaying) {
+ _rockTunePlaying = true;
+ playSound(1, true);
+ }
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ for (int i = 1; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind && --obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex >= obj->anim->frameCount)
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+ }
+
+ }
+
+ return true;
+}
+
+bool MinigameBbAirGuitar::updateStatus1(int mouseX, int mouseY, uint mouseButtons) {
+
+ int currTicks = _vm->_system->getMillis();
+
+ if (_playerMode == 1 && _track[_trackIndex].ticks <= currTicks - _noteStartTime) {
+ noteOff(_track[_trackIndex].noteNum);
+ if (_trackIndex < _trackCount && _track[++_trackIndex].noteNum != -1)
+ noteOn(_track[_trackIndex].noteNum);
+ else
+ stop();
+ }
+
+ if (_vuMeterLeft1 - 2 <= _vuMeterLeft2) {
+ if (_vuMeterLeft1 + 1 >= _vuMeterLeft2) {
+ int incr = MIN(_vm->getRandom(4), 2) - 1;
+ if (incr < 0 && _vuMeterLeft2 == 0)
+ incr = -incr;
+ if (incr > 0 && _vuMeterLeft2 == 11)
+ incr = -incr;
+ _vuMeterLeft2 += incr;
+ } else {
+ --_vuMeterLeft2;
+ }
+ } else {
+ ++_vuMeterLeft2;
+ }
+
+ if (_vuMeterRight1 - 2 <= _vuMeterRight2) {
+ if (_vuMeterRight1 + 1 >= _vuMeterRight2) {
+ int incr = MIN(_vm->getRandom(4), 2) - 1;
+ if (incr < 0 && _vuMeterRight2 == 0)
+ incr = -incr;
+ if (incr > 0 && _vuMeterRight2 == 11)
+ incr = -incr;
+ _vuMeterRight2 += incr;
+ } else {
+ --_vuMeterRight2;
+ }
+ } else {
+ ++_vuMeterRight2;
+ }
+
+ if (_resetAnims && _vm->_system->getMillis() - _noteStartTime >= 1000)
+ resetObjs();
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ _trackBarMouseX = CLIP(mouseX, kTrackBarMinX, kTrackBarMaxX);
+
+ bool checkClick = false;
+
+ if (mouseButtons & kAnyButtonClicked) {
+ checkClick = true;
+ } else if (!(mouseButtons & kAnyButtonDown)) {
+ afterButtonReleased();
+ } else if (!_movingTrackBar && ((_currButtonNum >= 14 && ptInPoly(_currPianoKeyArea, mouseX, mouseY)) || ptInRect(_currPlayerButtonRect, mouseX, mouseY))) {
+ if (_currButtonNum == 5 && _trackIndex > 0) {
+ --_trackIndex;
+ calcTotalTicks2();
+ } else if (_currButtonNum == 13 && _trackIndex < _trackCount) {
+ ++_trackIndex;
+ calcTotalTicks2();
+ }
+ } else if (!_movingTrackBar)
+ checkClick = true;
+
+ if (checkClick) {
+
+ afterButtonReleased();
+ _objects[0].frameIndex = 1;
+
+ if (ptInRect(&kRect2, mouseX, mouseY)) {
+
+ if (_playerMode != 1 && ptInRect(&kPianoRect, mouseX, mouseY)) {
+ for (int i = 0; i <= 12; ++i) {
+ if (ptInPoly(&kPianoKeyAreas[i], mouseX, mouseY)) {
+ _currButtonNum = i + 14;
+ _currPianoKeyArea = &kPianoKeyAreas[i];
+ _objects[11].kind = 1;
+ _objects[11].x = kPianoKeyInfos[i].x;
+ _objects[11].y = kPianoKeyInfos[i].y;
+ _objects[11].frameIndex = kPianoKeyInfos[i].frameIndex;
+ noteOn(i);
+ break;
+ }
+ }
+ } else if (_playerMode != 1 && ptInRect(&_trackBarThumbRect, mouseX, mouseY)) {
+ _movingTrackBar = true;
+ } else {
+
+ int playerButtonNum = -1;
+ for (int i = 0; i < 14; ++i) {
+ if (ptInRect(&kPlayerButtonRects[i], mouseX, mouseY)) {
+ playerButtonNum = i;
+ break;
+ }
+ }
+
+ if (playerButtonNum >= 0) {
+ _currButtonNum = playerButtonNum;
+ _currPlayerButtonRect = &kPlayerButtonRects[playerButtonNum];
+
+ switch (playerButtonNum) {
+
+ case 0:
+ if (_playerMode == 0) {
+ changePatch(0);
+ _currFrameIndex = &_objects[18 + 0].frameIndex;
+ *_currFrameIndex = 0;
+ }
+ break;
+
+ case 1:
+ if (_playerMode == 0) {
+ changePatch(1);
+ _currFrameIndex = &_objects[18 + 1].frameIndex;
+ *_currFrameIndex = 0;
+ }
+ break;
+
+ case 2:
+ if (_playerMode == 0) {
+ changePatch(2);
+ _currFrameIndex = &_objects[18 + 2].frameIndex;
+ *_currFrameIndex = 0;
+ }
+ break;
+
+ case 3:
+ _btn3KindToggle = !_btn3KindToggle;
+ _objects[9].kind = _btn3KindToggle ? 0 : 1;
+ _objects[22].frameIndex = _btn3KindToggle ? 0 : 1;
+ break;
+
+ case 4:
+ if (_playerMode == 0) {
+ _objects[1].kind = 1;
+ _currFrameIndex = &_objects[1].frameIndex;
+ _objects[1].frameIndex = 0;
+ }
+ break;
+
+ case 5:
+ if (_playerMode == 0) {
+ if (_trackIndex > 0)
+ --_trackIndex;
+ _objects[3].kind = 1;
+ calcTotalTicks2();
+ }
+ break;
+
+ case 6:
+ stop();
+ _currFrameIndex = &_objects[15].frameIndex;
+ _objects[15].frameIndex = 0;
+ break;
+
+ case 7:
+ if (_playerMode == 0) {
+ play();
+ _currFrameIndex = &_objects[12].frameIndex;
+ _objects[12].frameIndex = 0;
+ }
+ break;
+
+ case 8:
+ if (_playerMode == 0) {
+ _trackIndex = 0;
+ _objects[16].kind = 1;
+ calcTotalTicks2();
+ }
+ break;
+
+ case 9:
+ if (_playerMode == 0) {
+ _trackIndex = _trackCount;
+ _objects[17].kind = 1;
+ calcTotalTicks2();
+ }
+ break;
+
+ case 10:
+ if (_playerMode == 0) {
+ record();
+ _currFrameIndex = &_objects[13].frameIndex;
+ _objects[13].frameIndex = 0;
+ }
+ break;
+
+ case 11:
+ if (_playerMode == 0) {
+ setPlayerMode3();
+ _currFrameIndex = &_objects[14].frameIndex;
+ _objects[14].frameIndex = 0;
+ }
+ break;
+
+ case 12:
+ if (_playerMode == 0) {
+ _objects[2].kind = 1;
+ _currFrameIndex = &_objects[2].frameIndex;
+ _objects[2].frameIndex = 0;
+ }
+ break;
+
+ case 13:
+ if (_playerMode == 0) {
+ if (_trackIndex < _trackCount)
+ ++_trackIndex;
+ _objects[4].kind = 1;
+ calcTotalTicks2();
+ }
+ break;
+
+ }
+ }
+ }
+ }
+ }
+
+ if (_playerMode != 0) {
+ _currTrackPos = currTicks + _actionStartTrackPos - _actionStartTime;
+ if (_currTrackPos > _actionTrackPos && _playerMode != 1) {
+ if (_currTrackPos >= 15000) {
+ _currTrackPos = 15000;
+ _actionTrackPos = 15000;
+ stop();
+ } else {
+ _actionTrackPos = currTicks + _actionStartTrackPos - _actionStartTime;
+ }
+ }
+ }
+
+ if (_buttonClickTicks + 1000 < currTicks)
+ _buttonClickTicks = currTicks;
+
+ int newKind = _buttonClickTicks + 500 < currTicks ? 1 : 0;
+
+ switch (_playerMode) {
+
+ case 1:
+ if (_currButtonNum == 7) {
+ _objects[12].kind = 1;
+ _objects[12].frameIndex = 0;
+ } else {
+ _objects[12].kind = newKind;
+ _objects[12].frameIndex = 1;
+ }
+ break;
+
+ case 2:
+ if (_currButtonNum == 10) {
+ _objects[13].kind = 1;
+ _objects[13].frameIndex = 0;
+ } else {
+ _objects[13].kind = newKind;
+ _objects[13].frameIndex = 1;
+ }
+ break;
+
+ case 3:
+ if (_currButtonNum == 11) {
+ _objects[14].kind = 1;
+ _objects[14].frameIndex = 0;
+ } else {
+ _objects[14].kind = newKind;
+ _objects[14].frameIndex = 1;
+ }
+ break;
+
+ }
+
+ updateObjs();
+
+ return true;
+}
+
+void MinigameBbAirGuitar::updateObjs() {
+ for (int i = 24; i <= 33; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind && --obj->ticks == 0) {
+ if (obj->frameIndex + 1 >= obj->anim->frameCount) {
+ obj->ticks = -1;
+ } else {
+ ++obj->frameIndex;
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+ }
+ }
+}
+
+bool MinigameBbAirGuitar::run(bool fromMainGame) {
+
+ memset(_objects, 0, sizeof(_objects));
+
+ _modified = false;
+ _currPatchNum = -1;
+ _btn3KindToggle = 0;
+ _currButtonNum = 27;
+ _actionStartTime = 0;
+ _currFrameIndex = 0;
+ _currPlayerButtonRect = 0;
+ _currPianoKeyArea = 0;
+ _trackCount = 0;
+ _trackIndex = 0;
+ _totalTrackLength = 0;
+ _actionTrackPos = 0;
+ _noteStartTime = 0;
+ _actionStartTrackPos = 0;
+ _trackBarX = kTrackBarMinX;
+ _currTrackPos = 0;
+ _currNoteNum = -2;
+ _resetAnims = false;
+ _vuMeterLeft2 = 0;
+ _vuMeterRight2 = 0;
+ _vuMeterLeft1 = 0;
+ _vuMeterRight1 = 0;
+ _rockTunePlaying = false;
+
+ _backgroundSpriteIndex = 97;
+ _titleScreenSpriteIndex = 98;
+
+ _fromMainGame = fromMainGame;
+
+ _gameState = 0;
+ _gameTicks = 0;
+ _gameResult = false;
+ _gameDone = false;
+ initObjects();
+
+ _spriteModule = new SpriteModule();
+ _spriteModule->load("bbairg/bbairg.000");
+
+ Palette palette = _spriteModule->getPalette();
+ _vm->_screen->setPalette(palette);
+
+ loadSounds();
+
+ while (!_vm->shouldQuit() &&!_gameDone) {
+ _vm->updateEvents();
+ update();
+ }
+
+ _vm->_sound->unloadSounds();
+
+ delete _spriteModule;
+
+ return _gameResult;
+}
+
+void MinigameBbAirGuitar::update() {
+
+ int inputTicks;
+
+ if (_gameTicks > 0) {
+ int currTicks = _vm->_system->getMillis();
+ inputTicks = 3 * (currTicks - _gameTicks) / 50;
+ _gameTicks = currTicks - (currTicks - _gameTicks - 50 * inputTicks / 3);
+ } else {
+ inputTicks = 1;
+ _gameTicks = _vm->_system->getMillis();
+ }
+
+ if (_vm->_keyCode == Common::KEYCODE_ESCAPE) {
+ _gameDone = true;
+ return;
+ }
+
+ if (inputTicks == 0)
+ return;
+
+ bool done;
+
+ do {
+ done = !updateStatus(_vm->_mouseX, _vm->_mouseY, _vm->_mouseButtons);
+ _vm->_mouseButtons &= ~kLeftButtonClicked;
+ _vm->_mouseButtons &= ~kRightButtonClicked;
+ _vm->_keyCode = Common::KEYCODE_INVALID;
+ } while (--inputTicks && _gameTicks > 0 && !done);
+
+ drawSprites();
+
+ _vm->_system->delayMillis(10);
+
+}
+
+void MinigameBbAirGuitar::play() {
+ if (_track[_trackIndex].noteNum != -1) {
+ _playerMode = 1;
+ _objects[7].kind = 1;
+ _objects[8].kind = 0;
+ _objects[15].kind = 0;
+ _actionStartTime = _vm->_system->getMillis();
+ _actionStartTrackPos = _currTrackPos;
+ noteOn(_track[_trackIndex].noteNum);
+ }
+}
+
+
+void MinigameBbAirGuitar::record() {
+ _playerMode = 2;
+ _objects[7].kind = 1;
+ _objects[8].kind = 0;
+ _objects[15].kind = 0;
+ _totalTrackLength = 15000;
+ _actionStartTime = _vm->_system->getMillis();
+ _actionStartTrackPos = _currTrackPos;
+ _noteStartTime = _vm->_system->getMillis();
+ _actionTrackPos = _currTrackPos;
+ _trackCount = _trackIndex;
+ _vuMeterRight1 = 0;
+ _vuMeterRight2 = 0;
+ _vuMeterLeft1 = 0;
+ _vuMeterLeft2 = 0;
+ _modified = true;
+ _track[_trackIndex].noteNum = -2;
+}
+
+void MinigameBbAirGuitar::setPlayerMode3() {
+ _playerMode = 3;
+ _objects[7].kind = 1;
+ _objects[8].kind = 0;
+ _objects[15].kind = 0;
+ _totalTrackLength = 15000;
+ _actionStartTime = _vm->_system->getMillis();
+ _actionStartTrackPos = _currTrackPos;
+ _noteStartTime = _vm->_system->getMillis();
+ _actionTrackPos = _currTrackPos;
+ _trackCount = _trackIndex;
+ _vuMeterRight1 = 0;
+ _vuMeterRight2 = 0;
+ _vuMeterLeft1 = 0;
+ _vuMeterLeft2 = 0;
+ _modified = true;
+ _track[_trackIndex].noteNum = -2;
+}
+
+void MinigameBbAirGuitar::stop() {
+ noteOff(_currNoteNum);
+ if (_playerMode == 2 || _playerMode == 3) {
+ _totalTrackLength = _actionTrackPos;
+ _track[_trackCount].noteNum = -1;
+ }
+ _playerMode = 0;
+ _objects[7].kind = 0;
+ _objects[8].kind = 1;
+ _objects[15].kind = 1;
+ _objects[15].frameIndex = 1;
+ _objects[12].kind = 0;
+ _objects[13].kind = 0;
+ _objects[14].kind = 0;
+ resetObjs();
+}
+
+void MinigameBbAirGuitar::changePatch(int patchNum) {
+
+ resetObjs();
+
+ if (patchNum == -1 || patchNum != _currPatchNum)
+ _currPatchNum = -1;
+
+ _objects[20].kind = 0;
+ _objects[19].kind = _objects[20].kind;
+ _objects[18].kind = _objects[19].kind;
+ _objects[patchNum + 18].kind = 1;
+ _objects[patchNum + 18].frameIndex = 1;
+ _objects[6].frameIndex = patchNum;
+ _currPatchNum = patchNum;
+}
+
+void MinigameBbAirGuitar::afterButtonReleased() {
+ if (_movingTrackBar) {
+ _movingTrackBar = false;
+ _currTrackPos = _totalTrackLength * (_trackBarX - kTrackBarMinX) / 100;
+ calcTotalTicks1();
+ } else {
+ switch (_currButtonNum) {
+ case 0:
+ case 1:
+ case 2:
+ *_currFrameIndex = 1;
+ break;
+ case 4:
+ *_currFrameIndex = 1;
+ // TODO Run load dialog
+ break;
+ case 5:
+ _objects[3].kind = 0;
+ break;
+ case 6:
+ *_currFrameIndex = 1;
+ break;
+ case 7:
+ *_currFrameIndex = 1;
+ break;
+ case 8:
+ _objects[16].kind = 0;
+ break;
+ case 9:
+ _objects[17].kind = 0;
+ break;
+ case 10:
+ *_currFrameIndex = 1;
+ break;
+ case 11:
+ *_currFrameIndex = 1;
+ break;
+ case 12:
+ *_currFrameIndex = 1;
+ // TODO Run save dialog
+ break;
+ case 13:
+ _objects[4].kind = 0;
+ break;
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ case 26:
+ noteOff(_currButtonNum - 14);
+ break;
+ }
+ }
+
+ _objects->frameIndex = 0;
+ _currPlayerButtonRect = 0;
+ _currPianoKeyArea = 0;
+ _currButtonNum = 27;
+}
+
+void MinigameBbAirGuitar::calcTotalTicks2() {
+ _currTrackPos = 0;
+ for (int i = 0; i < _trackIndex; ++i)
+ _currTrackPos += _track[i].ticks;
+}
+
+void MinigameBbAirGuitar::calcTotalTicks1() {
+ int totalTicks = 0;
+ // TODO Try to clean this up
+ _trackIndex = 0;
+ if (_track[0].ticks <= _currTrackPos) {
+ do {
+ totalTicks += _track[_trackIndex].ticks;
+ if (_trackIndex >= _trackCount)
+ break;
+ ++_trackIndex;
+ } while (totalTicks + _track[_trackIndex].ticks <= _currTrackPos);
+ }
+ _currTrackPos = totalTicks;
+}
+
+void MinigameBbAirGuitar::noteOn(int noteNum) {
+
+ if (_currNoteNum != -2) {
+ if (noteNum == _currNoteNum)
+ return;
+ noteOff(_currNoteNum);
+ }
+
+ if (noteNum == -2) {
+ _vuMeterRight1 = 0;
+ _vuMeterRight2 = 0;
+ _vuMeterLeft1 = 0;
+ _vuMeterLeft2 = 0;
+ } else {
+ playNote(noteNum);
+ _vuMeterRight1 = 10;
+ _vuMeterRight2 = 10;
+ _vuMeterLeft1 = 10;
+ _vuMeterLeft2 = 10;
+ if (_btn3KindToggle) {
+ _objects[23].kind = 1;
+ _objects[23].frameIndex = noteNum;
+ } else {
+ _objects[10].kind = 1;
+ _objects[10].frameIndex = kNoteFrameTbl[noteNum].frameIndex;
+ if (kNoteFrameTbl[noteNum].flag) {
+ _objects[21].kind = 1;
+ _objects[21].frameIndex = 7;
+ }
+ }
+ }
+
+ _currNoteNum = noteNum;
+
+ if (_playerMode == 2 || _playerMode == 3) {
+ _ticksDelta = _vm->_system->getMillis() - _noteStartTime;
+ _track[_trackCount].ticks = _ticksDelta;
+ if (_trackCount < kMaxTracks - 1)
+ ++_trackCount;
+ _track[_trackCount].noteNum = noteNum;
+ }
+
+ _noteStartTime = _vm->_system->getMillis();
+
+ if (noteNum != -2) {
+ _resetAnims = false;
+ if (_currPatchNum == 0) {
+ _objects[25].kind = 1;
+ _objects[28].kind = 0;
+ _objects[25].frameIndex = 0;
+ _objects[25].ticks = getAnimation(25)->frameTicks[0];
+ _objects[26].frameIndex = 0;
+ _objects[26].ticks = getAnimation(26)->frameTicks[0];
+ _objects[27].frameIndex = 0;
+ _objects[27].ticks = getAnimation(27)->frameTicks[0];
+ _objects[30].kind = 1;
+ _objects[33].kind = 0;
+ _objects[30].frameIndex = 0;
+ _objects[30].ticks = getAnimation(30)->frameTicks[0];
+ _objects[31].frameIndex = 0;
+ _objects[31].ticks = getAnimation(31)->frameTicks[0];
+ _objects[32].frameIndex = 0;
+ _objects[32].ticks = getAnimation(32)->frameTicks[0];
+ } else if (_currPatchNum == 1) {
+ _objects[29].kind = 1;
+ _objects[33].kind = 0;
+ _objects[29].frameIndex = 0;
+ _objects[29].ticks = getAnimation(29)->frameTicks[0];
+ _objects[31].frameIndex = 0;
+ _objects[31].ticks = getAnimation(31)->frameTicks[0];
+ _objects[32].frameIndex = 0;
+ _objects[32].ticks = getAnimation(32)->frameTicks[0];
+ } else if (_currPatchNum == 2) {
+ _objects[24].kind = 1;
+ _objects[28].kind = 0;
+ _objects[24].frameIndex = 0;
+ _objects[24].ticks = getAnimation(24)->frameTicks[0];
+ _objects[26].frameIndex = 0;
+ _objects[26].ticks = getAnimation(26)->frameTicks[0];
+ _objects[27].frameIndex = 0;
+ _objects[27].ticks = getAnimation(27)->frameTicks[0];
+ }
+ }
+
+}
+
+void MinigameBbAirGuitar::noteOff(int noteNum) {
+
+ if (_currNoteNum != noteNum)
+ return;
+
+ if (noteNum != -2)
+ stopNote(noteNum);
+
+ _objects[21].kind = 0;
+ _objects[23].kind = _objects[21].kind;
+ _objects[10].kind = _objects[23].kind;
+
+ _vuMeterRight1 = 0;
+ _vuMeterRight2 = 0;
+ _vuMeterLeft1 = 0;
+ _vuMeterLeft2 = 0;
+
+ _currNoteNum = -2;
+
+ _objects[11].kind = 0;
+
+ _ticksDelta = _vm->_system->getMillis() - _noteStartTime;
+
+ if (_playerMode == 2 || _playerMode == 3) {
+ if (_actionTrackPos + _ticksDelta > 15000)
+ _ticksDelta = 15000 - _actionTrackPos;
+ _track[_trackCount].ticks = _ticksDelta;
+ if (_trackCount < 2048)
+ ++_trackCount;
+ _track[_trackCount].noteNum = -2;
+ _noteStartTime = _vm->_system->getMillis();
+ }
+
+ if (noteNum != -2) {
+ if (_playerMode == 0) {
+ _resetAnims = true;
+ _noteStartTime = _vm->_system->getMillis();
+ }
+ if (_currPatchNum == 0) {
+ _objects[25].frameIndex = 3;
+ _objects[25].ticks = -1;
+ _objects[26].frameIndex = 3;
+ _objects[26].ticks = -1;
+ _objects[27].frameIndex = 3;
+ _objects[27].ticks = -1;
+ _objects[30].frameIndex = 3;
+ _objects[30].ticks = -1;
+ _objects[31].frameIndex = 3;
+ _objects[31].ticks = -1;
+ _objects[32].frameIndex = 3;
+ _objects[32].ticks = -1;
+ } else if (_currPatchNum == 1) {
+ _objects[29].frameIndex = 3;
+ _objects[29].ticks = -1;
+ _objects[31].frameIndex = 3;
+ _objects[31].ticks = -1;
+ _objects[32].frameIndex = 3;
+ _objects[32].ticks = -1;
+ } else if (_currPatchNum == 2) {
+ _objects[24].frameIndex = 2;
+ _objects[24].ticks = -1;
+ _objects[26].frameIndex = 3;
+ _objects[26].ticks = -1;
+ _objects[27].frameIndex = 3;
+ _objects[27].ticks = -1;
+ }
+ }
+
+}
+
+void MinigameBbAirGuitar::resetObjs() {
+ _resetAnims = false;
+ _objects[25].kind = 0;
+ _objects[24].kind = 0;
+ _objects[28].kind = 1;
+ _objects[26].frameIndex = 0;
+ _objects[26].ticks = -1;
+ _objects[27].frameIndex = 0;
+ _objects[27].ticks = -1;
+ _objects[30].kind = 0;
+ _objects[29].kind = 0;
+ _objects[33].kind = 1;
+ _objects[31].frameIndex = 0;
+ _objects[31].ticks = -1;
+ _objects[32].frameIndex = 0;
+ _objects[32].ticks = -1;
+}
+
+void MinigameBbAirGuitar::loadSounds() {
+ _vm->_sound->loadSound("bbairg/audio/rocktune.aif");
+ for (uint i = 0; i < kPatchDirectoriesCount; ++i) {
+ const char *patchDirectory = kPatchDirectories[i];
+ for (uint j = 0; j < kNoteSoundFilenamesCount; ++j) {
+ Common::String filename = Common::String::format("bbairg/audio/%s/%s", patchDirectory, kNoteSoundFilenames[j]);
+ _vm->_sound->loadSound(filename.c_str());
+ }
+ }
+}
+
+void MinigameBbAirGuitar::playNote(int noteNum) {
+ if (noteNum >= 0 && _currPatchNum >= 0)
+ playSound(2 + _currPatchNum * kNoteSoundFilenamesCount + noteNum);
+}
+
+void MinigameBbAirGuitar::stopNote(int noteNum) {
+ if (noteNum >= 0 && _currPatchNum >= 0)
+ stopSound(2 + _currPatchNum * kNoteSoundFilenamesCount + noteNum);
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbairguitar.h b/engines/bbvs/minigames/bbairguitar.h
new file mode 100644
index 0000000000..d4fd6ec30c
--- /dev/null
+++ b/engines/bbvs/minigames/bbairguitar.h
@@ -0,0 +1,148 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_MINIGAMES_BBAIRGUITAR_H
+#define BBVS_MINIGAMES_BBAIRGUITAR_H
+
+#include "bbvs/minigames/minigame.h"
+
+namespace Bbvs {
+
+class MinigameBbAirGuitar : public Minigame {
+public:
+ MinigameBbAirGuitar(BbvsEngine *vm) : Minigame(vm) {};
+ bool run(bool fromMainGame);
+public:
+
+ struct Obj {
+ int kind;
+ int x, y;
+ int xIncr, yIncr;
+ const ObjAnimation *anim;
+ int frameIndex;
+ int ticks;
+ int status;
+ int16 frameIndexAdd;
+ int16 unk2;
+ };
+
+ enum {
+ kMaxObjectsCount = 256,
+ kMaxTracks = 2049
+ };
+
+ struct PianoKeyInfo {
+ int x, y;
+ int frameIndex;
+ };
+
+ struct TrackEvt {
+ int8 noteNum;
+ int16 ticks;
+ };
+
+ Obj _objects[kMaxObjectsCount];
+
+ int _playerMode;
+
+ bool _modified;
+
+ TrackEvt _track[kMaxTracks];
+ int _trackIndex, _trackCount;
+
+ int _noteStartTime;
+
+ int _vuMeterLeft1, _vuMeterLeft2;
+ int _vuMeterRight1, _vuMeterRight2;
+
+ bool _resetAnims;
+ bool _rockTunePlaying;
+
+ int _currButtonNum;
+ int _buttonClickTicks;
+
+ int *_currFrameIndex;
+ int _btn3KindToggle;
+
+ const BBPolygon *_currPianoKeyArea;
+ const Rect *_currPlayerButtonRect;
+
+ bool _movingTrackBar;
+ int _trackBarMouseX;
+ int _trackBarX;
+ Rect _trackBarThumbRect;
+
+ int _currTrackPos, _totalTrackLength;
+ int _ticksDelta;
+
+ int _actionStartTrackPos, _actionTrackPos;
+ int _actionStartTime;
+
+ int _currNoteNum;
+ int _currPatchNum;
+
+ const ObjAnimation *getAnimation(int animIndex);
+ bool ptInRect(const Rect *r, int x, int y);
+ bool ptInPoly(const BBPolygon *poly, int x, int y);
+
+ void buildDrawList(DrawList &drawList);
+ void buildDrawList0(DrawList &drawList);
+ void buildDrawList1(DrawList &drawList);
+
+ void drawSprites();
+
+ void initObjs();
+ Obj *getFreeObject();
+
+ void initObjects();
+ void initObjects0();
+ void initObjects1();
+
+ bool updateStatus(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus0(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus1(int mouseX, int mouseY, uint mouseButtons);
+
+ void updateObjs();
+
+ void update();
+
+ void play();
+ void record();
+ void setPlayerMode3();
+ void stop();
+ void changePatch(int patchNum);
+ void afterButtonReleased();
+ void calcTotalTicks2();
+ void calcTotalTicks1();
+ void noteOn(int noteNum);
+ void noteOff(int noteNum);
+ void resetObjs();
+
+ void loadSounds();
+ void playNote(int noteNum);
+ void stopNote(int noteNum);
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_MINIGAMES_BBAIRGUITAR_H
diff --git a/engines/bbvs/minigames/bbairguitar_anims.cpp b/engines/bbvs/minigames/bbairguitar_anims.cpp
new file mode 100644
index 0000000000..4f87eb5c78
--- /dev/null
+++ b/engines/bbvs/minigames/bbairguitar_anims.cpp
@@ -0,0 +1,186 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbairguitar.h"
+
+namespace Bbvs {
+
+static const int kAnim0FrameIndices[] = {0, 1};
+static const int16 kAnim0FrameTicks[] = {6, 6};
+static const BBRect kAnim0FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim1FrameIndices[] = {2, 3};
+static const int16 kAnim1FrameTicks[] = {6, 6};
+static const BBRect kAnim1FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim2FrameIndices[] = {4, 5};
+static const int16 kAnim2FrameTicks[] = {6, 6};
+static const BBRect kAnim2FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim3FrameIndices[] = {6};
+static const int16 kAnim3FrameTicks[] = {6};
+static const BBRect kAnim3FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim4FrameIndices[] = {7};
+static const int16 kAnim4FrameTicks[] = {6};
+static const BBRect kAnim4FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim5FrameIndices[] = {8};
+static const int16 kAnim5FrameTicks[] = {6};
+static const BBRect kAnim5FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim6FrameIndices[] = {9, 10, 11};
+static const int16 kAnim6FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim6FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim7FrameIndices[] = {12, 13, 14, 15};
+static const int16 kAnim7FrameTicks[] = {10, 10, 10, 10};
+static const BBRect kAnim7FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim8FrameIndices[] = {16};
+static const int16 kAnim8FrameTicks[] = {10};
+static const BBRect kAnim8FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim9FrameIndices[] = {17};
+static const int16 kAnim9FrameTicks[] = {10};
+static const BBRect kAnim9FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim10FrameIndices[] = {18};
+static const int16 kAnim10FrameTicks[] = {6};
+static const BBRect kAnim10FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim11FrameIndices[] = {19, 20, 21, 22, 23, 24, 25, 26, 27};
+static const int16 kAnim11FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim11FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim12FrameIndices[] = {28, 29, 30, 31, 32, 33};
+static const int16 kAnim12FrameTicks[] = {10, 10, 10, 10, 10, 10};
+static const BBRect kAnim12FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim13FrameIndices[] = {34, 35};
+static const int16 kAnim13FrameTicks[] = {6, 6};
+static const BBRect kAnim13FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim14FrameIndices[] = {36, 37};
+static const int16 kAnim14FrameTicks[] = {6, 6};
+static const BBRect kAnim14FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim15FrameIndices[] = {38, 39};
+static const int16 kAnim15FrameTicks[] = {6, 6};
+static const BBRect kAnim15FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim16FrameIndices[] = {40, 41};
+static const int16 kAnim16FrameTicks[] = {6, 6};
+static const BBRect kAnim16FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim17FrameIndices[] = {42};
+static const int16 kAnim17FrameTicks[] = {6};
+static const BBRect kAnim17FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim18FrameIndices[] = {43};
+static const int16 kAnim18FrameTicks[] = {6};
+static const BBRect kAnim18FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim19FrameIndices[] = {44, 45};
+static const int16 kAnim19FrameTicks[] = {6, 6};
+static const BBRect kAnim19FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim20FrameIndices[] = {46, 47};
+static const int16 kAnim20FrameTicks[] = {6, 6};
+static const BBRect kAnim20FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim21FrameIndices[] = {48, 49};
+static const int16 kAnim21FrameTicks[] = {6, 6};
+static const BBRect kAnim21FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim22FrameIndices[] = {50, 51};
+static const int16 kAnim22FrameTicks[] = {10, 10};
+static const BBRect kAnim22FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim23FrameIndices[] = {52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64};
+static const int16 kAnim23FrameTicks[] = {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
+static const BBRect kAnim23FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim24FrameIndices[] = {65, 66, 67};
+static const int16 kAnim24FrameTicks[] = {11, 16, 6};
+static const BBRect kAnim24FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim25FrameIndices[] = {68, 67, 69, 67};
+static const int16 kAnim25FrameTicks[] = {6, 6, 11, 6};
+static const BBRect kAnim25FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim26FrameIndices[] = {70, 71, 72, 71};
+static const int16 kAnim26FrameTicks[] = {6, 6, 6, 6};
+static const BBRect kAnim26FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim27FrameIndices[] = {73, 74, 75, 74};
+static const int16 kAnim27FrameTicks[] = {6, 6, 6, 6};
+static const BBRect kAnim27FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim28FrameIndices[] = {76};
+static const int16 kAnim28FrameTicks[] = {6};
+static const BBRect kAnim28FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim29FrameIndices[] = {77, 78, 79, 78};
+static const int16 kAnim29FrameTicks[] = {6, 6, 18, 6};
+static const BBRect kAnim29FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim30FrameIndices[] = {77, 80, 81, 80};
+static const int16 kAnim30FrameTicks[] = {6, 6, 10, 6};
+static const BBRect kAnim30FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim31FrameIndices[] = {82, 83, 84, 83};
+static const int16 kAnim31FrameTicks[] = {6, 6, 6, 6};
+static const BBRect kAnim31FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim32FrameIndices[] = {85, 86, 87, 86};
+static const int16 kAnim32FrameTicks[] = {6, 6, 6, 6};
+static const BBRect kAnim32FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim33FrameIndices[] = {88};
+static const int16 kAnim33FrameTicks[] = {6};
+static const BBRect kAnim33FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim34FrameIndices[] = {89};
+static const int16 kAnim34FrameTicks[] = {6};
+static const BBRect kAnim34FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim35FrameIndices[] = {90};
+static const int16 kAnim35FrameTicks[] = {6};
+static const BBRect kAnim35FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim36FrameIndices[] = {91, 92, 93, 91, 93, 91, 92, 93, 92, 91, 92, 93, 91, 93, 91, 92, 93, 92};
+static const int16 kAnim36FrameTicks[] = {10, 6, 8, 6, 6, 8, 6, 6, 6, 10, 6, 8, 6, 6, 8, 6, 6, 6};
+static const BBRect kAnim36FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim37FrameIndices[] = {94, 95, 96, 94, 96, 94, 95, 96, 95, 94, 95, 96, 94, 96, 94, 95, 96, 95};
+static const int16 kAnim37FrameTicks[] = {10, 6, 8, 6, 6, 8, 6, 6, 6, 10, 6, 8, 6, 6, 8, 6, 6, 6};
+static const BBRect kAnim37FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const ObjAnimation kAnimations[] = {
+ {2, kAnim0FrameIndices, kAnim0FrameTicks, kAnim0FrameRects},
+ {2, kAnim1FrameIndices, kAnim1FrameTicks, kAnim1FrameRects},
+ {2, kAnim2FrameIndices, kAnim2FrameTicks, kAnim2FrameRects},
+ {1, kAnim3FrameIndices, kAnim3FrameTicks, kAnim3FrameRects},
+ {1, kAnim4FrameIndices, kAnim4FrameTicks, kAnim4FrameRects},
+ {1, kAnim5FrameIndices, kAnim5FrameTicks, kAnim5FrameRects},
+ {3, kAnim6FrameIndices, kAnim6FrameTicks, kAnim6FrameRects},
+ {4, kAnim7FrameIndices, kAnim7FrameTicks, kAnim7FrameRects},
+ {1, kAnim8FrameIndices, kAnim8FrameTicks, kAnim8FrameRects},
+ {1, kAnim9FrameIndices, kAnim9FrameTicks, kAnim9FrameRects},
+ {1, kAnim10FrameIndices, kAnim10FrameTicks, kAnim10FrameRects},
+ {9, kAnim11FrameIndices, kAnim11FrameTicks, kAnim11FrameRects},
+ {6, kAnim12FrameIndices, kAnim12FrameTicks, kAnim12FrameRects},
+ {2, kAnim13FrameIndices, kAnim13FrameTicks, kAnim13FrameRects},
+ {2, kAnim14FrameIndices, kAnim14FrameTicks, kAnim14FrameRects},
+ {2, kAnim15FrameIndices, kAnim15FrameTicks, kAnim15FrameRects},
+ {2, kAnim16FrameIndices, kAnim16FrameTicks, kAnim16FrameRects},
+ {1, kAnim17FrameIndices, kAnim17FrameTicks, kAnim17FrameRects},
+ {1, kAnim18FrameIndices, kAnim18FrameTicks, kAnim18FrameRects},
+ {2, kAnim19FrameIndices, kAnim19FrameTicks, kAnim19FrameRects},
+ {2, kAnim20FrameIndices, kAnim20FrameTicks, kAnim20FrameRects},
+ {2, kAnim21FrameIndices, kAnim21FrameTicks, kAnim21FrameRects},
+ {2, kAnim22FrameIndices, kAnim22FrameTicks, kAnim22FrameRects},
+ {13, kAnim23FrameIndices, kAnim23FrameTicks, kAnim23FrameRects},
+ {3, kAnim24FrameIndices, kAnim24FrameTicks, kAnim24FrameRects},
+ {4, kAnim25FrameIndices, kAnim25FrameTicks, kAnim25FrameRects},
+ {4, kAnim26FrameIndices, kAnim26FrameTicks, kAnim26FrameRects},
+ {4, kAnim27FrameIndices, kAnim27FrameTicks, kAnim27FrameRects},
+ {1, kAnim28FrameIndices, kAnim28FrameTicks, kAnim28FrameRects},
+ {4, kAnim29FrameIndices, kAnim29FrameTicks, kAnim29FrameRects},
+ {4, kAnim30FrameIndices, kAnim30FrameTicks, kAnim30FrameRects},
+ {4, kAnim31FrameIndices, kAnim31FrameTicks, kAnim31FrameRects},
+ {4, kAnim32FrameIndices, kAnim32FrameTicks, kAnim32FrameRects},
+ {1, kAnim33FrameIndices, kAnim33FrameTicks, kAnim33FrameRects},
+ {1, kAnim34FrameIndices, kAnim34FrameTicks, kAnim34FrameRects},
+ {1, kAnim35FrameIndices, kAnim35FrameTicks, kAnim35FrameRects},
+ {18, kAnim36FrameIndices, kAnim36FrameTicks, kAnim36FrameRects},
+ {18, kAnim37FrameIndices, kAnim37FrameTicks, kAnim37FrameRects}
+};
+
+const ObjAnimation *MinigameBbAirGuitar::getAnimation(int animIndex) {
+ return &kAnimations[animIndex];
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbant.cpp b/engines/bbvs/minigames/bbant.cpp
new file mode 100644
index 0000000000..9786682ada
--- /dev/null
+++ b/engines/bbvs/minigames/bbant.cpp
@@ -0,0 +1,1317 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbant.h"
+
+namespace Bbvs {
+
+static const BBPoint kPosIncrTbl1[] = {
+ {0, -1}, {-1, -1}, {-1, 0}, {-1, 1},
+ { 0, 1}, { 1, 1}, { 1, 0}, { 1, -1}
+};
+
+static const BBPoint kPosIncrTbl2[] = {
+ {0, -2}, {-2, -2}, {-2, 0}, {-2, 2},
+ { 0, 2}, { 2, 2}, { 2, 0}, { 2, -2}
+};
+
+static const int kScoreTbl[] = {
+ 0, 1, 1, 3, 2, 4
+};
+
+static const char * const kSoundFilenames[] = {
+ "ant1.aif", "ant2.aif", "ant3.aif", "ant4.aif", "ant5.aif",
+ "ant6.aif", "ant7.aif", "ant8.aif", "ant9.aif", "ant10.aif",
+ "ant11.aif", "antmus1.aif", "fryant.aif", "stomp.aif", "bing.aif",
+ "bvyell.aif"
+};
+
+static const uint kSoundFilenamesCount = ARRAYSIZE(kSoundFilenames);
+
+static const uint kSoundTbl1[] = {
+ 2, 3, 4, 6
+};
+
+static const uint kSoundTbl2[] = {
+ 5, 7, 11
+};
+
+static const uint kSoundTbl3[] = {
+ 8, 10, 11
+};
+
+static const uint kSoundTbl4[] = {
+ 2, 3, 4, 6, 8, 10, 11, 5, 7, 16
+};
+
+void MinigameBbAnt::buildDrawList0(DrawList &drawList) {
+
+ if (_titleScreenSpriteIndex)
+ drawList.add(_titleScreenSpriteIndex, 0, 0, 0);
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->priority);
+ }
+
+}
+
+void MinigameBbAnt::buildDrawList1(DrawList &drawList) {
+
+ if (_backgroundSpriteIndex)
+ drawList.add(_backgroundSpriteIndex, _stompX, _stompY, 0);
+
+ for (int i = 1; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind) {
+ drawList.add(obj->anim->frameIndices[obj->frameIndex],
+ _stompX + (obj->x >> 16), _stompY + (obj->y >> 16),
+ obj->priority);
+ }
+ }
+
+ drawList.add(getAnimation(164)->frameIndices[0], 5, 2, 2000);
+ drawNumber(drawList, _score, 68, 16);
+ drawList.add(getAnimation(166)->frameIndices[0], 230, 2, 2000);
+ drawNumber(drawList, _levelTimeLeft, 280, 16);
+
+ for (int i = 0; i < _stompCount; ++i)
+ drawList.add(getAnimation(130)->frameIndices[0], 20 + i * 30, 230, 2000);
+
+}
+
+void MinigameBbAnt::buildDrawList2(DrawList &drawList) {
+ buildDrawList1(drawList);
+ drawList.add(getAnimation(168)->frameIndices[0], 40, 100, 2000);
+ drawNumber(drawList, _counter1, 190, 112);
+ drawNumber(drawList, _countdown5, 258, 112);
+ drawList.add(getAnimation(169)->frameIndices[0], 120, 120, 2000);
+ drawNumber(drawList, _counter4, 192, 132);
+}
+
+void MinigameBbAnt::buildDrawList3(DrawList &drawList) {
+ buildDrawList1(drawList);
+ drawList.add(getAnimation(163)->frameIndices[0], 120, 70, 2000);
+ drawList.add(getAnimation(165)->frameIndices[0], 95, 95, 2000);
+ drawNumber(drawList, _hiScore, 208, 107);
+}
+
+void MinigameBbAnt::drawMagnifyingGlass(DrawList &drawList) {
+ scale2x(_objects[0].x - 28, _objects[0].y - 27);
+ drawList.clear();
+ drawList.add(_objects[0].anim->frameIndices[0], _objects[0].x, _objects[0].y, _objects[0].priority);
+ drawList.add(_objects[0].anim->frameIndices[1], _objects[0].x, _objects[0].y, _objects[0].priority);
+ drawList.add(_objects[0].anim->frameIndices[2], _objects[0].x, _objects[0].y, _objects[0].priority);
+}
+
+void MinigameBbAnt::drawSprites() {
+ switch (_gameState) {
+ case 0:
+ drawSprites0();
+ break;
+ case 1:
+ drawSprites1();
+ break;
+ case 2:
+ drawSprites2();
+ break;
+ case 3:
+ drawSprites3();
+ break;
+ }
+}
+
+void MinigameBbAnt::drawSprites0() {
+ DrawList drawList;
+ buildDrawList0(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+void MinigameBbAnt::drawSprites1() {
+ DrawList drawList;
+ buildDrawList1(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ drawMagnifyingGlass(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+void MinigameBbAnt::drawSprites2() {
+ DrawList drawList;
+ buildDrawList2(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ drawMagnifyingGlass(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+void MinigameBbAnt::drawSprites3() {
+ DrawList drawList;
+ buildDrawList3(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+MinigameBbAnt::Obj *MinigameBbAnt::getFreeObject() {
+ for (int i = 12; i < kMaxObjectsCount; ++i)
+ if (_objects[i].kind == 0)
+ return &_objects[i];
+ return 0;
+}
+
+void MinigameBbAnt::initObjects() {
+ switch (_gameState) {
+ case 0:
+ initObjects0();
+ break;
+ case 1:
+ initObjects1();
+ break;
+ case 2:
+ case 3:
+ // Nothing
+ break;
+ }
+}
+
+void MinigameBbAnt::initObjects0() {
+ _objects[0].anim = getAnimation(172);
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = getAnimation(172)->frameTicks[0];
+ _objects[0].x = 160;
+ _objects[0].y = 120;
+ _objects[0].priority = 2000;
+ _objects[0].kind = 1;
+ _objects[1].anim = getAnimation(170);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = getAnimation(170)->frameTicks[0];
+ _objects[1].x = 40;
+ _objects[1].y = 240;
+ _objects[1].priority = 100;
+ _objects[1].kind = 2;
+ _objects[2].anim = getAnimation(171);
+ _objects[2].frameIndex = 0;
+ _objects[2].ticks = getAnimation(171)->frameTicks[0];
+ _objects[2].x = 280;
+ _objects[2].y = 240;
+ _objects[2].priority = 100;
+ _objects[2].kind = 2;
+}
+
+void MinigameBbAnt::initObjects1() {
+ _objects[0].kind = 0;
+ _objects[0].x = 160;
+ _objects[0].y = 120;
+ _objects[0].xIncr = 0;
+ _objects[0].yIncr = 0;
+ _objects[0].anim = getAnimation(159);
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = _objects[0].anim->frameTicks[0];
+ _objects[0].priority = 1000;
+ _objects[1].kind = 8;
+ _objects[1].x = 0x1E0000;
+ _objects[1].y = 0x280000;
+ _objects[1].xIncr = 0;
+ _objects[1].yIncr = 0;
+ _objects[1].anim = getAnimation(160);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = _objects[0].anim->frameTicks[0];
+ _objects[1].priority = 900;
+ _objects[1].smokeCtr = 0;
+ _objects[1].hasSmoke = false;
+ _objects[1].status = 0;
+ _objects[2].kind = 8;
+ _objects[2].x = 0x280000;
+ _objects[2].y = 0x4B0000;
+ _objects[2].xIncr = 0;
+ _objects[2].yIncr = 0;
+ _objects[2].anim = getAnimation(161);
+ _objects[2].frameIndex = 0;
+ _objects[2].ticks = _objects[0].anim->frameTicks[0];
+ _objects[2].priority = 900;
+ _objects[2].smokeCtr = 0;
+ _objects[2].hasSmoke = false;
+ _objects[2].status = 0;
+ for (int i = 3; i < 12; ++i) {
+ const ObjInit *objInit = getObjInit(i - 3);
+ _objects[i].kind = 6;
+ _objects[i].x = objInit->x << 16;
+ _objects[i].y = objInit->y << 16;
+ _objects[i].xIncr = 0;
+ _objects[i].yIncr = 0;
+ _objects[i].anim = objInit->anim1;
+ _objects[i].frameIndex = 0;
+ _objects[i].ticks = _objects[0].anim->frameTicks[0];
+ _objects[i].priority = 600;
+ _objects[i].status = 9;
+ _objects[i].damageCtr = 0;
+
+ }
+}
+
+void MinigameBbAnt::initVars() {
+ switch (_gameState) {
+ case 0:
+ // Nothing
+ break;
+ case 1:
+ initVars1();
+ break;
+ case 2:
+ initVars2();
+ break;
+ case 3:
+ initVars3();
+ break;
+ }
+}
+
+void MinigameBbAnt::initVars1() {
+ _stompX = 0;
+ _stompY = 0;
+ _stompDelay1 = 0;
+ _stompCount = 1;
+ _stompCounter1 = 80;
+ _stompCounter2 = 80;
+ _totalBugsCount = 0;
+ _hasLastStompObj = false;
+ _counter1 = 9;
+ _countdown10 = 140;
+ _score = 0;
+ _counter4 = 1;
+ _gameTicks = 0;
+ _skullBugCtr = 500;
+ _levelTimeDelay = 58;
+ _levelTimeLeft = 30;
+ _bugsChanceByKind[0] = 0;
+ _bugsChanceByKind[1] = 20;
+ _bugsChanceByKind[2] = 20;
+ _bugsChanceByKind[3] = 5;
+ _bugsChanceByKind[4] = 7;
+ _bugsCountByKind[0] = 0;
+ _bugsCountByKind[1] = 0;
+ _bugsCountByKind[2] = 0;
+ _bugsCountByKind[3] = 0;
+ _bugsCountByKind[4] = 0;
+ _bugsCountByKind[5] = 0;
+}
+
+void MinigameBbAnt::initVars2() {
+ _countdown4 = 0;
+ _countdown3 = 0;
+ _levelTimeDelay = 58;
+ _countdown6 = 60;
+ _countdown5 = 50 * _counter1;
+}
+
+void MinigameBbAnt::initVars3() {
+ if (_score > _hiScore)
+ _hiScore = _score;
+ playSound(9);
+}
+
+bool MinigameBbAnt::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
+ switch (_gameState) {
+ case 0:
+ return updateStatus0(mouseX, mouseY, mouseButtons);
+ case 1:
+ return updateStatus1(mouseX, mouseY, mouseButtons);
+ case 2:
+ return updateStatus2(mouseX, mouseY, mouseButtons);
+ case 3:
+ return updateStatus3(mouseX, mouseY, mouseButtons);
+ }
+ return false;
+}
+
+bool MinigameBbAnt::updateStatus0(int mouseX, int mouseY, uint mouseButtons) {
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ if (_objects[0].x >= 320)
+ _objects[0].x = 320 - 1;
+ if (_objects[0].y >= 240)
+ _objects[0].y = 240 - 1;
+ if (_objects[0].x < 0)
+ _objects[0].x = 0;
+ if (_objects[0].y < 0)
+ _objects[0].y = 0;
+
+ if ((mouseButtons & kLeftButtonDown) || (mouseButtons & kRightButtonDown)) {
+ _gameState = 1;
+ initObjects();
+ initVars();
+ _gameTicks = 0;
+ playSound(1);
+ } else {
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind == 2) {
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex >= obj->anim->frameCount)
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+bool MinigameBbAnt::updateStatus1(int mouseX, int mouseY, uint mouseButtons) {
+ const int kMaxBugsCount = 52;
+
+ --_levelTimeDelay;
+ if (!_levelTimeDelay) {
+ _levelTimeDelay = 58;
+ --_levelTimeLeft;
+ }
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ if (_objects[0].x >= 320)
+ _objects[0].x = 320 - 1;
+ if (_objects[0].y >= 240)
+ _objects[0].y = 240 - 1;
+ if (_objects[0].x < 0)
+ _objects[0].x = 0;
+ if (_objects[0].y < 0)
+ _objects[0].y = 0;
+
+ if (!_levelTimeLeft) {
+ _gameState = 2;
+ initVars();
+ initObjects();
+ _gameTicks = 0;
+ return true;
+ }
+
+ if (_counter1 == 0) {
+ _gameState = 3;
+ initVars();
+ initObjects();
+ _gameTicks = 0;
+ return true;
+ }
+
+ if ((mouseButtons & kRightButtonClicked) && (_stompCount > 0|| _hasLastStompObj) && !_objects[2].status) {
+ if (_hasLastStompObj)
+ removeStompObj(_lastStompObj);
+ --_stompCount;
+ _objects[2].status = 1;
+ }
+
+ if ((mouseButtons & kLeftButtonClicked) && _objects[2].status == 0 && isMagGlassAtBeavisLeg(2)) {
+ if (_vm->getRandom(10) == 1 && !isAnySoundPlaying(kSoundTbl4, 10))
+ playSound(16);
+ insertSmokeObj(_objects[0].x << 16, _objects[0].y << 16);
+ }
+
+ if (_skullBugCtr > 0) {
+ if (--_skullBugCtr == 0) {
+ _skullBugCtr = _vm->getRandom(150) + 500;
+ insertRandomBugObj(5);
+ }
+ }
+
+ if (_stompCounter2 > 0)
+ --_stompCounter2;
+
+ if (_totalBugsCount < kMaxBugsCount && _vm->getRandom(_stompCounter2) == 0) {
+ int testTbl[4];
+ int maxKindCount = 0, objKind = 0;
+
+ _stompCounter2 = _stompCounter1;
+
+ for (int i = 0; i < 4; ++i)
+ testTbl[i] = _vm->getRandom(_bugsChanceByKind[i] - _bugsCountByKind[i]);
+
+ for (int i = 0; i < 4; ++i) {
+ if (testTbl[i] >= maxKindCount) {
+ maxKindCount = testTbl[i];
+ objKind = i + 1;
+ }
+ }
+
+ if (objKind)
+ insertRandomBugObj(objKind);
+
+ }
+
+ updateObjs(mouseButtons);
+ updateFootObj(2);
+
+ if (--_countdown10 == 0) {
+ _countdown10 = 140;
+ if (_stompCounter1 > 20)
+ --_stompCounter1;
+ }
+
+ return true;
+}
+
+bool MinigameBbAnt::updateStatus2(int mouseX, int mouseY, uint mouseButtons) {
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ if (_objects[0].x >= 320)
+ _objects[0].x = 320 - 1;
+ if (_objects[0].y >= 240)
+ _objects[0].y = 240 - 1;
+ if (_objects[0].x < 0)
+ _objects[0].x = 0;
+ if (_objects[0].y < 0)
+ _objects[0].y = 0;
+
+ if (_countdown6 > 0) {
+ if (--_countdown6 == 0) {
+ _countdown4 = 150;
+ playSound(15, true);
+ }
+ } else if (_countdown4 > 0) {
+ if (--_countdown4 == 0) {
+ _countdown3 = 150;
+ } else if (_countdown5 > 0) {
+ ++_countdown4;
+ ++_score;
+ if (--_countdown5 == 0) {
+ stopSound(15);
+ _bugsChanceByKind[5] = 10;
+ _countdown7 = 40;
+ _countdown4 = 10 * (13 - _counter1);
+ return true;
+ }
+ } else {
+ if (--_countdown7 == 0) {
+ bool flag1 = false;
+ _countdown7 = _bugsChanceByKind[5];
+ for (int i = 3; i < 12 && !flag1; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->status == 13) {
+ const ObjInit *objInit = getObjInit(i - 3);
+ obj->x = objInit->x << 16;
+ obj->y = objInit->y << 16;
+ obj->anim = objInit->anim3;
+ obj->frameIndex = 0;
+ obj->ticks = _objects[0].anim->frameTicks[0];
+ obj->status = 9;
+ obj->damageCtr = 0;
+ obj->priority = 600;
+ ++_counter1;
+ playSound(15);
+ flag1 = true;
+ }
+ }
+ }
+ }
+ } else if (_countdown3 > 0) {
+ if ((mouseButtons & kLeftButtonDown) || (mouseButtons & kRightButtonDown) || (--_countdown3 == 0)) {
+ _levelTimeDelay = 58;
+ _levelTimeLeft = 30;
+ _gameState = 1;
+ _gameTicks = 0;
+ ++_counter4;
+ }
+ }
+
+ return true;
+}
+
+bool MinigameBbAnt::updateStatus3(int mouseX, int mouseY, uint mouseButtons) {
+ if (!isSoundPlaying(9) && _fromMainGame) {
+ _vm->_system->delayMillis(1000);
+ _gameDone = true;
+ }
+ return true;
+}
+
+void MinigameBbAnt::getRandomBugObjValues(int &x, int &y, int &animIndexIncr, int &field30) {
+ field30 = _vm->getRandom(4);
+ switch (field30) {
+ case 0:
+ y = -5;
+ x = _vm->getRandom(190) + 120;
+ animIndexIncr = 4;
+ break;
+ case 1:
+ x = 325;
+ y = _vm->getRandom(220) + 10;
+ animIndexIncr = 2;
+ break;
+ case 2:
+ y = 245;
+ x = _vm->getRandom(300) + 10;
+ animIndexIncr = 0;
+ break;
+ case 3:
+ x = -5;
+ y = _vm->getRandom(190) + 120;
+ animIndexIncr = 6;
+ break;
+ }
+}
+
+void MinigameBbAnt::insertBugSmokeObj(int x, int y, int bugObjIndex) {
+ Obj *obj = getFreeObject();
+ if (obj) {
+ Obj *bugObj = &_objects[bugObjIndex];
+ bugObj->hasSmoke = true;
+ obj->kind = 7;
+ obj->x = x;
+ obj->y = y;
+ obj->priority = 950;
+ if (bugObj->status >= 4 && (bugObj->status <= 6 || bugObj->status == 8)) {
+ obj->xIncr = 0;
+ obj->yIncr = (-1 << 16);
+ } else {
+ obj->xIncr = bugObj->xIncr / 8;
+ obj->yIncr = bugObj->yIncr / 8;
+ }
+ obj->anim = getAnimation(158);
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ }
+}
+
+void MinigameBbAnt::insertSmokeObj(int x, int y) {
+ Obj *obj = getFreeObject();
+ if (obj) {
+ obj->kind = 7;
+ obj->x = x;
+ obj->y = y;
+ obj->priority = 950;
+ obj->xIncr = 0x2000;
+ obj->yIncr = -0xC000;
+ obj->anim = getAnimation(158);
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ }
+}
+
+void MinigameBbAnt::resetObj(int objIndex) {
+ _objects[objIndex].kind = 0;
+}
+
+void MinigameBbAnt::insertStompObj(int x, int y) {
+ Obj *obj = getFreeObject();
+ if (obj) {
+ obj->kind = 9;
+ obj->x = x;
+ obj->y = y;
+ obj->priority = 2000;
+ obj->xIncr = (0x1E0000 * _stompCount - x + 0x140000) / 15;
+ obj->yIncr = (0xE60000 - y) / 15;
+ obj->anim = getAnimation(130);
+ obj->frameIndex = 0;
+ obj->ticks = 15;
+ _lastStompObj = obj;
+ _hasLastStompObj = true;
+ }
+}
+
+void MinigameBbAnt::removeStompObj(Obj *obj) {
+ ++_stompCount;
+ _hasLastStompObj = false;
+ obj->kind = 0;
+}
+
+void MinigameBbAnt::insertBugObj(int kind, int animIndexIncr, int always0, int x, int y, int field30, int always1) {
+ Obj *obj = getFreeObject();
+ if (obj) {
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(kind);
+ obj->field30 = field30;
+ obj->animIndexIncr = animIndexIncr;
+ obj->kind = kind;
+ obj->x = x << 16;
+ obj->y = y << 16;
+ obj->priority = 610;
+ obj->xIncr = kPosIncrTbl1[0].x << 16;
+ obj->yIncr = kPosIncrTbl1[0].y << 16;
+ obj->anim = objKindAnimTable[0];
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ obj->animIndex = 0;
+ obj->status = 1;
+ obj->damageCtr = 0;
+ obj->hasSmoke = false;
+ obj->flag = 0;
+ ++_bugsCountByKind[kind];
+ ++_totalBugsCount;
+ }
+}
+
+void MinigameBbAnt::removeBugObj(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+ --_totalBugsCount;
+ --_bugsCountByKind[obj->kind];
+ obj->hasSmoke = false;
+ obj->kind = 0;
+}
+
+void MinigameBbAnt::updateBugObjAnim(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->field30) {
+ case 0:
+ obj->animIndexIncr = 4;
+ break;
+ case 1:
+ obj->animIndexIncr = 2;
+ break;
+ case 2:
+ obj->animIndexIncr = 0;
+ break;
+ case 3:
+ obj->animIndexIncr = 6;
+ break;
+ }
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
+ obj->xIncr = kPosIncrTbl1[obj->animIndexIncr].x << 16;
+ obj->yIncr = kPosIncrTbl1[obj->animIndexIncr].y << 16;
+ obj->anim = objKindAnimTable[obj->animIndexIncr];
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+}
+
+void MinigameBbAnt::updateObjAnim2(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->animIndexIncr += _vm->getRandom(3) - 1;
+ if (obj->animIndexIncr < 0)
+ obj->animIndexIncr = 7;
+ if (obj->animIndexIncr > 7)
+ obj->animIndexIncr = 0;
+ obj->animIndexIncr += 4;
+ if (obj->animIndexIncr >= 8)
+ obj->animIndexIncr %= 8;
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
+ obj->xIncr = kPosIncrTbl1[obj->animIndex + obj->animIndexIncr].x << 16;
+ obj->yIncr = kPosIncrTbl1[obj->animIndex + obj->animIndexIncr].y << 16;
+ obj->anim = objKindAnimTable[obj->animIndex + obj->animIndexIncr];
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+}
+
+void MinigameBbAnt::insertRandomBugObj(int kind) {
+ int x, y, animIndexIncr, field30;
+ getRandomBugObjValues(x, y, animIndexIncr, field30);
+ insertBugObj(kind, animIndexIncr, 0, x, y, field30, 1);
+}
+
+bool MinigameBbAnt::isBugOutOfScreen(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ return
+ obj->x < (-10 << 16) || obj->x > (330 << 16) ||
+ obj->y < (-10 << 16) || obj->y > (250 << 16);
+}
+
+void MinigameBbAnt::updateObjAnim3(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->animIndexIncr += _vm->getRandom(3) - 1;
+ if (obj->animIndexIncr < 0)
+ obj->animIndexIncr = 7;
+ if (obj->animIndexIncr > 7)
+ obj->animIndexIncr = 0;
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
+ obj->xIncr = kPosIncrTbl1[obj->animIndexIncr].x << 16;
+ obj->yIncr = kPosIncrTbl1[obj->animIndexIncr].y << 16;
+ obj->anim = objKindAnimTable[obj->animIndexIncr];
+}
+
+void MinigameBbAnt::updateBugObj1(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+ bool flag1 = false;
+ bool flag2 = false;
+
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->anim->frameCount == obj->frameIndex) {
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ flag1 = true;
+ } else {
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ flag2 = true;
+ }
+ }
+
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+
+ if (obj->status != 7) {
+ if (obj->damageCtr <= 5) {
+ obj->hasSmoke = false;
+ } else if (!obj->hasSmoke) {
+ obj->smokeCtr = 6;
+ insertBugSmokeObj(obj->x, obj->y, objIndex);
+ } else if (obj->damageCtr > 200 && obj->status != 4 && obj->status != 6) {
+ _score += kScoreTbl[obj->kind];
+ if (obj->status == 3) {
+ _objects[obj->otherObjIndex].status = 9;
+ _objects[obj->otherObjIndex].priority = 600;
+ if (_vm->getRandom(3) == 1 && !isAnySoundPlaying(kSoundTbl4, 10))
+ playSound(kSoundTbl3[_vm->getRandom(3)]);
+ } else {
+ if (_vm->getRandom(3) == 1 && !isAnySoundPlaying(kSoundTbl4, 10))
+ playSound(kSoundTbl2[_vm->getRandom(3)]);
+ }
+ flag1 = false;
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
+ obj->hasSmoke = false;
+ obj->status = 4;
+ obj->xIncr = 0;
+ obj->yIncr = 0;
+ obj->anim = objKindAnimTable[16];
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ obj->priority = 605;
+ if (obj->kind == 5) {
+ // Skull Beetle
+ if (_stompCount < 10)
+ insertStompObj(obj->x, obj->y);
+ obj->kind = 4;
+ obj->anim = getObjAnim(70);
+ obj->ticks = obj->anim->frameTicks[0];
+ }
+ } else if (--obj->smokeCtr == 0) {
+ obj->smokeCtr = 6;
+ insertBugSmokeObj(obj->x, obj->y, objIndex);
+ }
+ }
+
+ switch (obj->status) {
+
+ case 1:
+ if (isBugOutOfScreen(objIndex))
+ removeBugObj(objIndex);
+ else if (flag1 && !obj->flag)
+ updateObjAnim3(objIndex);
+ break;
+
+ case 3:
+ // Bug carries candy
+ _objects[obj->otherObjIndex].x = obj->x;
+ _objects[obj->otherObjIndex].y = obj->y;
+ if (isBugOutOfScreen(objIndex)) {
+ _objects[obj->otherObjIndex].status = 13;
+ _objects[obj->otherObjIndex].x = (500 << 16);
+ _objects[obj->otherObjIndex].y = (500 << 16);
+ removeBugObj(objIndex);
+ --_counter1;
+ }
+ break;
+
+ case 4:
+ if (flag1) {
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
+ obj->status = 6;
+ obj->xIncr = 0;
+ obj->yIncr = 0;
+ obj->anim = objKindAnimTable[17];
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ }
+ break;
+
+ case 6:
+ if (flag1) {
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(obj->kind);
+ obj->status = 7;
+ obj->xIncr = kPosIncrTbl2[obj->animIndexIncr].x << 16;
+ obj->yIncr = kPosIncrTbl2[obj->animIndexIncr].y << 16;
+ obj->anim = objKindAnimTable[obj->animIndexIncr + 8];
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[0];
+ obj->animIndex = 8;
+ obj->priority = 610;
+ }
+ break;
+
+ case 7:
+ if (isBugOutOfScreen(objIndex))
+ removeBugObj(objIndex);
+ break;
+
+ case 8:
+ if (--obj->counter != 0) {
+ if (flag2 && obj->frameIndex == 13) {
+ obj->frameIndex = 4;
+ obj->ticks = obj->anim->frameTicks[4];
+ }
+ } else {
+ obj->status = obj->status2;
+ obj->anim = obj->anim2;
+ obj->frameIndex = obj->frameIndex2;
+ obj->ticks = obj->ticks2;
+ obj->xIncr = kPosIncrTbl1[obj->animIndex + obj->animIndexIncr].x << 16;
+ obj->yIncr = kPosIncrTbl1[obj->animIndex + obj->animIndexIncr].y << 16;
+ obj->priority = 610;
+ }
+ break;
+
+ }
+
+}
+
+void MinigameBbAnt::updateObjKind2(int objIndex) {
+ updateBugObj1(objIndex);
+}
+
+void MinigameBbAnt::updateObjKind3(int objIndex) {
+ updateBugObj1(objIndex);
+}
+
+void MinigameBbAnt::updateObjKind4(int objIndex) {
+ updateBugObj1(objIndex);
+}
+
+void MinigameBbAnt::updateObjKind5(int objIndex) {
+ ++_skullBugCtr;
+ updateBugObj1(objIndex);
+}
+
+void MinigameBbAnt::updateStompObj(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+ if (--obj->ticks == 0)
+ removeStompObj(obj);
+}
+
+void MinigameBbAnt::updateSmokeObj(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->anim->frameCount == obj->frameIndex)
+ resetObj(objIndex);
+ else
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+}
+
+void MinigameBbAnt::updateFootObj(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->status) {
+
+ case 1:
+ obj->xIncr = -0x8000;
+ obj->yIncr = (-4 << 16);
+ obj->status = 2;
+ _stompCounter1 += 5;
+ _stompCounter2 = 100;
+ break;
+
+ case 2:
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+ obj->yIncr += 0x2000;
+ if (obj->y < (20 << 16)) {
+ obj->xIncr = 0x8000;
+ obj->yIncr = (7 << 16);
+ obj->status = 3;
+ }
+ break;
+
+ case 3:
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+ obj->yIncr += 0x2000;
+ if (obj->y >= 0x4B0000) {
+ obj->x = (40 << 16);
+ obj->y = (75 << 16);
+ obj->status = 4;
+ _stompDelay1 = 6;
+ _stompY = 0;
+ playSound(14);
+ }
+ break;
+
+ case 4:
+ if (--_stompDelay1 == 0) {
+ _gameTicks = 0;
+ if (_stompDelay1 % 2)
+ _stompY = _stompY < 1 ? -8 : 0;
+ } else {
+ obj->status = 0;
+ _stompX = 0;
+ _stompY = 0;
+ // Stun all bugs
+ for (int i = 12; i < kMaxObjectsCount; ++i) {
+ Obj *bugObj = &_objects[i];
+ if (bugObj->kind >= 1 && bugObj->kind <= 5) {
+ bugObj->counter = _vm->getRandom(200) + 360;
+ const ObjAnimation * const *objKindAnimTable = getObjKindAnimTable(bugObj->kind);
+ if (bugObj->status == 8) {
+ bugObj->hasSmoke = false;
+ bugObj->xIncr = 0;
+ bugObj->yIncr = 0;
+ bugObj->status2 = 7;
+ bugObj->anim2 = objKindAnimTable[bugObj->animIndexIncr + 8];
+ bugObj->frameIndex2 = 0;
+ bugObj->ticks2 = obj->anim->frameTicks[0];
+ bugObj->anim = objKindAnimTable[17];
+ bugObj->frameIndex = 0;
+ bugObj->ticks = _vm->getRandom(4) + obj->anim->frameTicks[0];
+ bugObj->animIndex = 8;
+ } else {
+ if (bugObj->status == 3) {
+ bugObj->priority = 610;
+ _objects[bugObj->otherObjIndex].status = 9;
+ _objects[bugObj->otherObjIndex].priority = 600;
+ }
+ bugObj->hasSmoke = false;
+ bugObj->xIncr = 0;
+ bugObj->yIncr = 0;
+ bugObj->status2 = 1;
+ bugObj->anim2 = bugObj->anim;
+ bugObj->frameIndex2 = bugObj->frameIndex;
+ bugObj->ticks2 = bugObj->ticks;
+ bugObj->anim = objKindAnimTable[17];
+ bugObj->frameIndex = 0;
+ bugObj->ticks = _vm->getRandom(4) + obj->anim->frameTicks[0];
+ }
+ bugObj->status = 8;
+ bugObj->priority = 605;
+ }
+ }
+ }
+ break;
+
+ }
+
+}
+
+bool MinigameBbAnt::isBugAtCandy(int objIndex, int &candyObjIndex) {
+ Obj *obj = &_objects[objIndex];
+ bool result = false;
+
+ if (obj->kind >= 1 && obj->kind <= 4) {
+ const BBRect &frameRect1 = obj->anim->frameRects[obj->frameIndex];
+ const int obj1X1 = frameRect1.x + (obj->x >> 16);
+ const int obj1Y1 = frameRect1.y + (obj->y >> 16);
+ const int obj1X2 = obj1X1 + frameRect1.width;
+ const int obj1Y2 = obj1Y1 + frameRect1.height;
+ for (int i = 3; i < 12 && !result; ++i) {
+ Obj *obj2 = &_objects[i];
+ const BBRect &frameRect2 = obj->anim->frameRects[obj2->frameIndex]; // sic
+ const int obj2X1 = (obj2->x >> 16) + frameRect2.x;
+ const int obj2Y1 = (obj2->y >> 16) + frameRect2.y;
+ const int obj2X2 = obj2X1 + frameRect2.width;
+ const int obj2Y2 = obj2Y1 + frameRect2.height;
+ if (obj2->status == 9 && obj1X1 <= obj2X2 && obj1X2 >= obj2X1 && obj1Y1 <= obj2Y2 && obj1Y2 >= obj2Y1) {
+ result = true;
+ candyObjIndex = i;
+ }
+ }
+ }
+ return result;
+}
+
+bool MinigameBbAnt::isMagGlassAtBug(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+ Obj *obj0 = &_objects[0];
+ bool result = false;
+
+ if (obj->kind >= 1 && obj->kind <= 5) {
+ const BBRect &frameRect1 = obj0->anim->frameRects[0];
+ const int obj1X1 = obj0->x + frameRect1.x;
+ const int obj1Y1 = obj0->y + frameRect1.y;
+ const int obj1X2 = obj1X1 + frameRect1.width;
+ const int obj1Y2 = obj1Y1 + frameRect1.height;
+ const BBRect &frameRect2 = obj->anim->frameRects[obj->frameIndex];
+ const int obj2X1 = (obj->x >> 16) + frameRect2.x;
+ const int obj2Y1 = (obj->y >> 16) + frameRect2.y;
+ const int obj2X2 = obj2X1 + frameRect2.width;
+ const int obj2Y2 = obj2Y1 + frameRect2.height;
+ if (obj2X2 >= obj1X1 && obj1X2 >= obj2X1 && obj1Y1 <= obj2Y2 && obj1Y2 >= obj2Y1)
+ result = true;
+ }
+ return result;
+}
+
+bool MinigameBbAnt::isMagGlassAtBeavisLeg(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+ Obj *magGlassObj = &_objects[0];
+ bool result = false;
+
+ const BBRect &frameRect1 = magGlassObj->anim->frameRects[0];
+ const int obj1X1 = magGlassObj->x + frameRect1.x;
+ const int obj1Y1 = magGlassObj->y + frameRect1.y;
+ const int obj1X2 = obj1X1 + frameRect1.width;
+ const int obj1Y2 = obj1Y1 + frameRect1.height;
+ const BBRect &frameRect2 = obj->anim->frameRects[obj->frameIndex];
+ const int obj2X1 = (obj->x >> 16) + frameRect2.x;
+ const int obj2Y1 = (obj->y >> 16) + frameRect2.y;
+ const int obj2X2 = obj2X1 + frameRect2.width;
+ const int obj2Y2 = obj2Y1 + frameRect2.height;
+ if (obj2X2 >= obj1X1 && obj1X2 >= obj2X1 && obj1Y1 <= obj2Y2 && obj1Y2 >= obj2Y1)
+ result = true;
+ return result;
+}
+
+bool MinigameBbAnt::testObj5(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+ bool result = false;
+ if (obj->kind >= 1 && obj->kind <= 5) {
+ const int x = obj->x >> 16;
+ const int y = obj->y >> 16;
+ if (x < 0 || x >= 110 || y < 0 || y >= 110) {
+ obj->flag = 0;
+ } else if (!obj->flag) {
+ obj->flag = 1;
+ result = true;
+ }
+ }
+ return result;
+}
+
+void MinigameBbAnt::updateObjs(uint mouseButtons) {
+
+ for (int i = 12; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+
+ if (obj->kind) {
+
+ if ((mouseButtons & kLeftButtonClicked) && isMagGlassAtBug(i))
+ obj->damageCtr += 100;
+
+ if (obj->status == 1) {
+ int candyObjIndex;
+ if (isBugAtCandy(i, candyObjIndex)) {
+ obj->status = 3;
+ obj->otherObjIndex = candyObjIndex;
+ _objects[candyObjIndex].otherObjIndex = i;
+ _objects[candyObjIndex].status = 10;
+ _objects[candyObjIndex].priority = 620;
+ _objects[candyObjIndex].status = 11;
+ _objects[candyObjIndex].anim = getObjInit(candyObjIndex - 3)->anim3;
+ updateBugObjAnim(i);
+ if (_vm->getRandom(3) == 1 && !isAnySoundPlaying(kSoundTbl4, 10))
+ playSound(kSoundTbl1[_vm->getRandom(4)]);
+ }
+ }
+
+ if (testObj5(i)) {
+ updateObjAnim2(i);
+ }
+
+ if (obj->damageCtr) {
+ --obj->damageCtr;
+ if (!isSoundPlaying(13))
+ playSound(13);
+ }
+
+ switch (obj->kind) {
+ case 1:
+ updateBugObj1(i);
+ break;
+ case 2:
+ updateObjKind2(i);
+ break;
+ case 3:
+ updateObjKind3(i);
+ break;
+ case 4:
+ updateObjKind4(i);
+ break;
+ case 5:
+ updateObjKind5(i);
+ break;
+ case 7:
+ updateSmokeObj(i);
+ break;
+ case 9:
+ updateStompObj(i);
+ break;
+ }
+
+ }
+
+ }
+
+}
+
+bool MinigameBbAnt::run(bool fromMainGame) {
+
+ memset(_objects, 0, sizeof(_objects));
+
+ _numbersAnim = getAnimation(167);
+
+ _backgroundSpriteIndex = 303;
+ _titleScreenSpriteIndex = 304;
+
+ _fromMainGame = fromMainGame;
+
+ _hiScore = 0;
+ if (!_fromMainGame)
+ _hiScore = loadHiscore(kMinigameBbAnt);
+
+ _gameState = 0;
+ _gameResult = false;
+ _gameDone = false;
+ initObjects();
+ initVars();
+
+ _spriteModule = new SpriteModule();
+ _spriteModule->load("bbant/bbant.000");
+
+ Palette palette = _spriteModule->getPalette();
+ _vm->_screen->setPalette(palette);
+
+ loadSounds();
+
+ _gameTicks = 0;
+ playSound(12, true);
+
+ while (!_vm->shouldQuit() &&!_gameDone) {
+ _vm->updateEvents();
+ update();
+ }
+
+ _vm->_sound->unloadSounds();
+
+ if (!_fromMainGame)
+ saveHiscore(kMinigameBbAnt, _hiScore);
+
+ delete _spriteModule;
+
+ return _gameResult;
+}
+
+void MinigameBbAnt::update() {
+
+ int inputTicks;
+
+ if (_gameTicks > 0) {
+ int currTicks = _vm->_system->getMillis();
+ inputTicks = 3 * (currTicks - _gameTicks) / 50;
+ _gameTicks = currTicks - (currTicks - _gameTicks - 50 * inputTicks / 3);
+ } else {
+ inputTicks = 1;
+ _gameTicks = _vm->_system->getMillis();
+ }
+
+ if (_vm->_keyCode == Common::KEYCODE_ESCAPE) {
+ _gameDone = true;
+ return;
+ }
+
+ if (inputTicks == 0)
+ return;
+
+ bool done;
+
+ do {
+ done = !updateStatus(_vm->_mouseX, _vm->_mouseY, _vm->_mouseButtons);
+ _vm->_mouseButtons &= ~kLeftButtonClicked;
+ _vm->_mouseButtons &= ~kRightButtonClicked;
+ _vm->_keyCode = Common::KEYCODE_INVALID;
+ } while (--inputTicks && _gameTicks > 0 && !done);
+
+ drawSprites();
+
+ _vm->_system->delayMillis(10);
+
+}
+
+void MinigameBbAnt::scale2x(int x, int y) {
+ Graphics::Surface *surface = _vm->_screen->_surface;
+
+ int srcX = x + 14, srcY = y + 14;
+ int srcW = kScaleDim, srcH = kScaleDim;
+
+ if (srcX < 0) {
+ srcW += srcX;
+ srcX = 0;
+ }
+
+ if (srcY < 0) {
+ srcH += srcY;
+ srcY = 0;
+ }
+
+ if (srcX + srcW >= 320)
+ srcW = 320 - srcX - 1;
+
+ if (srcY + srcH >= 240)
+ srcH = 240 - srcY - 1;
+
+ for (int yc = 0; yc < srcH; ++yc) {
+ byte *src = (byte*)surface->getBasePtr(srcX, srcY + yc);
+ memcpy(&_scaleBuf[yc * kScaleDim], src, srcW);
+ }
+
+ int dstX = x, dstY = y;
+ int dstW = 2 * kScaleDim, dstH = 2 * kScaleDim;
+
+ if (dstX < 0) {
+ dstW += dstX;
+ dstX = 0;
+ }
+
+ if (dstY < 0) {
+ dstH += dstY;
+ dstY = 0;
+ }
+
+ if (dstX + dstW >= 320)
+ dstW = 320 - dstX - 1;
+
+ if (dstY + dstH >= 240)
+ dstH = 240 - dstY - 1;
+
+ int w = MIN(srcW * 2, dstW), h = MIN(srcH * 2, dstH);
+
+ for (int yc = 0; yc < h; ++yc) {
+ byte *src = _scaleBuf + kScaleDim * (yc / 2);
+ byte *dst = (byte*)surface->getBasePtr(dstX, dstY + yc);
+ for (int xc = 0; xc < w; ++xc)
+ dst[xc] = src[xc / 2];
+ }
+
+}
+
+void MinigameBbAnt::loadSounds() {
+ for (uint i = 0; i < kSoundFilenamesCount; ++i) {
+ Common::String filename = Common::String::format("bbant/%s", kSoundFilenames[i]);
+ _vm->_sound->loadSound(filename.c_str());
+ }
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbant.h b/engines/bbvs/minigames/bbant.h
new file mode 100644
index 0000000000..be2afe688d
--- /dev/null
+++ b/engines/bbvs/minigames/bbant.h
@@ -0,0 +1,173 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_MINIGAMES_BBANT_H
+#define BBVS_MINIGAMES_BBANT_H
+
+#include "bbvs/minigames/minigame.h"
+
+namespace Bbvs {
+
+class MinigameBbAnt : public Minigame {
+public:
+ MinigameBbAnt(BbvsEngine *vm) : Minigame(vm) {};
+ bool run(bool fromMainGame);
+public:
+
+ struct Obj {
+ int kind;
+ int x, y, priority;
+ int xIncr, yIncr;
+ const ObjAnimation *anim;
+ int frameIndex;
+ int ticks;
+ int otherObjIndex;
+ int animIndex;
+ int animIndexIncr;
+ int status;
+ int field30;
+ int damageCtr;
+ int smokeCtr;
+ int counter;
+ int hasSmoke;
+ const ObjAnimation *anim2;
+ int frameIndex2;
+ int ticks2;
+ int status2;
+ int flag;
+ };
+
+ enum {
+ kMaxObjectsCount = 256,
+ kScaleDim = 28
+ };
+
+ struct ObjInit {
+ const ObjAnimation *anim1;
+ const ObjAnimation *anim2;
+ const ObjAnimation *anim3;
+ int x, y;
+ };
+
+ Obj _objects[kMaxObjectsCount];
+
+ int _score, _hiScore;
+
+ int _totalBugsCount;
+ int _bugsChanceByKind[6], _bugsCountByKind[6];
+ int _skullBugCtr;
+
+ int _stompX, _stompY;
+ int _stompDelay1;
+ int _stompCounter1;
+ int _stompCounter2;
+
+ int _stompCount;
+ int _hasLastStompObj;
+ Obj *_lastStompObj;
+
+ int _counter1;
+ int _countdown10;
+ int _counter4;
+ int _levelTimeDelay;
+ int _levelTimeLeft;
+
+ int _countdown4;
+ int _countdown3;
+ int _countdown6;
+ int _countdown5;
+ int _countdown7;
+
+ byte _scaleBuf[kScaleDim * kScaleDim];
+
+ const ObjAnimation *getAnimation(int animIndex);
+ const ObjInit *getObjInit(int index);
+ const ObjAnimation * const *getObjKindAnimTable(int kind);
+ const ObjAnimation *getObjAnim(int index);
+
+ void buildDrawList0(DrawList &drawList);
+ void buildDrawList1(DrawList &drawList);
+ void buildDrawList2(DrawList &drawList);
+ void buildDrawList3(DrawList &drawList);
+ void drawMagnifyingGlass(DrawList &drawList);
+
+ void drawSprites();
+ void drawSprites0();
+ void drawSprites1();
+ void drawSprites2();
+ void drawSprites3();
+
+ Obj *getFreeObject();
+
+ void initObjects();
+ void initObjects0();
+ void initObjects1();
+
+ void initVars();
+ void initVars1();
+ void initVars2();
+ void initVars3();
+
+ bool updateStatus(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus0(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus1(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus2(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus3(int mouseX, int mouseY, uint mouseButtons);
+
+ void getRandomBugObjValues(int &x, int &y, int &animIndexIncr, int &field30);
+ void insertBugSmokeObj(int x, int y, int bugObjIndex);
+ void insertSmokeObj(int x, int y);
+ void resetObj(int objIndex);
+ void insertStompObj(int x, int y);
+ void removeStompObj(Obj *obj);
+ void insertBugObj(int kind, int animIndexIncr, int always0, int x, int y, int field30, int always1);
+ void removeBugObj(int objIndex);
+ void updateBugObjAnim(int objIndex);
+ void updateObjAnim2(int objIndex);
+ void insertRandomBugObj(int kind);
+ bool isBugOutOfScreen(int objIndex);
+ void updateObjAnim3(int objIndex);
+ void updateBugObj1(int objIndex);
+ void updateObjKind2(int objIndex);
+ void updateObjKind3(int objIndex);
+ void updateObjKind4(int objIndex);
+ void updateObjKind5(int objIndex);
+ void updateStompObj(int objIndex);
+ void updateSmokeObj(int objIndex);
+ void updateFootObj(int objIndex);
+ bool isBugAtCandy(int objIndex, int &candyObjIndex);
+ bool isMagGlassAtBug(int objIndex);
+ bool isMagGlassAtBeavisLeg(int objIndex);
+ bool testObj5(int objIndex);
+ void updateObjs(uint mouseButtons);
+
+ void update();
+
+ void scale2x(int x, int y);
+
+ void loadSounds();
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_MINIGAMES_BBANT_H
diff --git a/engines/bbvs/minigames/bbant_anims.cpp b/engines/bbvs/minigames/bbant_anims.cpp
new file mode 100644
index 0000000000..c9223adca1
--- /dev/null
+++ b/engines/bbvs/minigames/bbant_anims.cpp
@@ -0,0 +1,757 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbant.h"
+
+namespace Bbvs {
+
+static const int kAnim0FrameIndices[] = {0, 1, 2};
+static const int16 kAnim0FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim0FrameRects[] = {{-3, -8, 6, 14}, {-3, -8, 6, 13}, {-3, -7, 6, 12}};
+static const int kAnim1FrameIndices[] = {3, 4, 5};
+static const int16 kAnim1FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim1FrameRects[] = {{-5, -6, 13, 9}, {-5, -6, 13, 10}, {-5, -6, 13, 10}};
+static const int kAnim2FrameIndices[] = {6, 7, 8};
+static const int16 kAnim2FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim2FrameRects[] = {{-6, -6, 17, 7}, {-6, -6, 15, 6}, {-7, -6, 17, 6}};
+static const int kAnim3FrameIndices[] = {9, 10, 11};
+static const int16 kAnim3FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim3FrameRects[] = {{-5, -7, 13, 8}, {-5, -7, 12, 7}, {-5, -7, 12, 9}};
+static const int kAnim4FrameIndices[] = {12, 13, 14};
+static const int16 kAnim4FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim4FrameRects[] = {{-3, -9, 7, 11}, {-3, -9, 7, 11}, {-3, -9, 7, 11}};
+static const int kAnim5FrameIndices[] = {15, 16, 17};
+static const int16 kAnim5FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim5FrameRects[] = {{-7, -8, 13, 9}, {-7, -7, 13, 8}, {-7, -7, 13, 8}};
+static const int kAnim6FrameIndices[] = {18, 19, 20};
+static const int16 kAnim6FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim6FrameRects[] = {{-10, -6, 17, 7}, {-11, -6, 18, 7}, {-11, -6, 18, 6}};
+static const int kAnim7FrameIndices[] = {21, 22, 23};
+static const int16 kAnim7FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim7FrameRects[] = {{-7, -6, 13, 8}, {-7, -7, 12, 9}, {-7, -7, 13, 9}};
+static const int kAnim8FrameIndices[] = {24};
+static const int16 kAnim8FrameTicks[] = {8};
+static const BBRect kAnim8FrameRects[] = {{-3, -9, 6, 12}};
+static const int kAnim9FrameIndices[] = {25};
+static const int16 kAnim9FrameTicks[] = {8};
+static const BBRect kAnim9FrameRects[] = {{-5, -6, 12, 7}};
+static const int kAnim10FrameIndices[] = {26};
+static const int16 kAnim10FrameTicks[] = {8};
+static const BBRect kAnim10FrameRects[] = {{-4, -6, 13, 6}};
+static const int kAnim11FrameIndices[] = {27};
+static const int16 kAnim11FrameTicks[] = {8};
+static const BBRect kAnim11FrameRects[] = {{-5, -7, 11, 8}};
+static const int kAnim12FrameIndices[] = {28};
+static const int16 kAnim12FrameTicks[] = {8};
+static const BBRect kAnim12FrameRects[] = {{-2, -10, 5, 12}};
+static const int kAnim13FrameIndices[] = {29};
+static const int16 kAnim13FrameTicks[] = {8};
+static const BBRect kAnim13FrameRects[] = {{-6, -8, 13, 9}};
+static const int kAnim14FrameIndices[] = {30};
+static const int16 kAnim14FrameTicks[] = {8};
+static const BBRect kAnim14FrameRects[] = {{-8, -6, 13, 6}};
+static const int kAnim15FrameIndices[] = {31};
+static const int16 kAnim15FrameTicks[] = {8};
+static const BBRect kAnim15FrameRects[] = {{-7, -7, 12, 8}};
+static const int kAnim16FrameIndices[] = {0, 1, 2};
+static const int16 kAnim16FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim16FrameRects[] = {{-3, -8, 6, 14}, {-3, -8, 6, 13}, {-3, -7, 6, 12}};
+static const int kAnim17FrameIndices[] = {3, 4, 5};
+static const int16 kAnim17FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim17FrameRects[] = {{-5, -6, 13, 9}, {-5, -6, 13, 10}, {-5, -6, 13, 10}};
+static const int kAnim18FrameIndices[] = {6, 7, 8};
+static const int16 kAnim18FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim18FrameRects[] = {{-6, -6, 17, 7}, {-6, -6, 15, 6}, {-7, -6, 17, 6}};
+static const int kAnim19FrameIndices[] = {9, 10, 11};
+static const int16 kAnim19FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim19FrameRects[] = {{-5, -7, 13, 8}, {-5, -7, 12, 7}, {-5, -7, 12, 9}};
+static const int kAnim20FrameIndices[] = {12, 13, 14};
+static const int16 kAnim20FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim20FrameRects[] = {{-3, -9, 7, 11}, {-3, -9, 7, 11}, {-3, -9, 7, 11}};
+static const int kAnim21FrameIndices[] = {15, 16, 17};
+static const int16 kAnim21FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim21FrameRects[] = {{-7, -8, 13, 9}, {-7, -7, 13, 8}, {-7, -7, 13, 8}};
+static const int kAnim22FrameIndices[] = {18, 19, 20};
+static const int16 kAnim22FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim22FrameRects[] = {{-10, -6, 17, 7}, {-11, -6, 18, 7}, {-11, -6, 18, 6}};
+static const int kAnim23FrameIndices[] = {21, 22, 23};
+static const int16 kAnim23FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim23FrameRects[] = {{-7, -6, 13, 8}, {-7, -7, 12, 9}, {-7, -7, 13, 9}};
+static const int kAnim24FrameIndices[] = {32, 33, 34, 35, 36, 37, 36, 37, 36, 37, 36, 37, 36, 38};
+static const int16 kAnim24FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim24FrameRects[] = {{-3, -14, 12, 10}, {-2, -21, 11, 11}, {0, -23, 8, 14}, {-6, -15, 13, 11}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 5}};
+static const int kAnim25FrameIndices[] = {39, 40, 41, 42, 43, 44, 43, 44, 43, 44, 43, 44, 43, 45};
+static const int16 kAnim25FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim25FrameRects[] = {{-9, -14, 13, 10}, {-8, -22, 12, 12}, {-8, -24, 8, 15}, {-7, -15, 13, 10}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}};
+static const int kAnim26FrameIndices[] = {46, 47, 48};
+static const int16 kAnim26FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim26FrameRects[] = {{-3, -8, 6, 14}, {-3, -8, 6, 13}, {-3, -7, 6, 12}};
+static const int kAnim27FrameIndices[] = {49, 50, 51};
+static const int16 kAnim27FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim27FrameRects[] = {{-5, -6, 13, 9}, {-5, -6, 13, 10}, {-5, -6, 13, 10}};
+static const int kAnim28FrameIndices[] = {52, 53, 54};
+static const int16 kAnim28FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim28FrameRects[] = {{-6, -6, 17, 7}, {-6, -6, 15, 6}, {-7, -6, 17, 6}};
+static const int kAnim29FrameIndices[] = {55, 56, 57};
+static const int16 kAnim29FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim29FrameRects[] = {{-5, -7, 13, 8}, {-5, -7, 12, 7}, {-5, -7, 12, 9}};
+static const int kAnim30FrameIndices[] = {58, 59, 60};
+static const int16 kAnim30FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim30FrameRects[] = {{-3, -9, 7, 11}, {-3, -9, 7, 11}, {-3, -9, 7, 11}};
+static const int kAnim31FrameIndices[] = {61, 62, 63};
+static const int16 kAnim31FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim31FrameRects[] = {{-7, -8, 13, 9}, {-7, -7, 13, 8}, {-7, -7, 13, 8}};
+static const int kAnim32FrameIndices[] = {64, 65, 66};
+static const int16 kAnim32FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim32FrameRects[] = {{-10, -6, 17, 7}, {-11, -6, 18, 7}, {-11, -6, 18, 6}};
+static const int kAnim33FrameIndices[] = {67, 68, 69};
+static const int16 kAnim33FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim33FrameRects[] = {{-7, -6, 13, 8}, {-7, -7, 12, 9}, {-7, -7, 13, 9}};
+static const int kAnim34FrameIndices[] = {70};
+static const int16 kAnim34FrameTicks[] = {8};
+static const BBRect kAnim34FrameRects[] = {{-3, -9, 6, 12}};
+static const int kAnim35FrameIndices[] = {71};
+static const int16 kAnim35FrameTicks[] = {8};
+static const BBRect kAnim35FrameRects[] = {{-5, -6, 12, 7}};
+static const int kAnim36FrameIndices[] = {72};
+static const int16 kAnim36FrameTicks[] = {8};
+static const BBRect kAnim36FrameRects[] = {{-4, -6, 13, 6}};
+static const int kAnim37FrameIndices[] = {73};
+static const int16 kAnim37FrameTicks[] = {8};
+static const BBRect kAnim37FrameRects[] = {{-5, -7, 11, 8}};
+static const int kAnim38FrameIndices[] = {74};
+static const int16 kAnim38FrameTicks[] = {8};
+static const BBRect kAnim38FrameRects[] = {{-2, -10, 5, 12}};
+static const int kAnim39FrameIndices[] = {75};
+static const int16 kAnim39FrameTicks[] = {8};
+static const BBRect kAnim39FrameRects[] = {{-6, -8, 13, 9}};
+static const int kAnim40FrameIndices[] = {76};
+static const int16 kAnim40FrameTicks[] = {8};
+static const BBRect kAnim40FrameRects[] = {{-8, -6, 13, 6}};
+static const int kAnim41FrameIndices[] = {77};
+static const int16 kAnim41FrameTicks[] = {8};
+static const BBRect kAnim41FrameRects[] = {{-7, -7, 12, 8}};
+static const int kAnim42FrameIndices[] = {46, 47, 48};
+static const int16 kAnim42FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim42FrameRects[] = {{-3, -8, 6, 14}, {-3, -8, 6, 13}, {-3, -7, 6, 12}};
+static const int kAnim43FrameIndices[] = {49, 50, 51};
+static const int16 kAnim43FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim43FrameRects[] = {{-5, -6, 13, 9}, {-5, -6, 13, 10}, {-5, -6, 13, 10}};
+static const int kAnim44FrameIndices[] = {52, 53, 54};
+static const int16 kAnim44FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim44FrameRects[] = {{-6, -6, 17, 7}, {-6, -6, 15, 6}, {-7, -6, 17, 6}};
+static const int kAnim45FrameIndices[] = {55, 56, 57};
+static const int16 kAnim45FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim45FrameRects[] = {{-5, -7, 13, 8}, {-5, -7, 12, 7}, {-5, -7, 12, 9}};
+static const int kAnim46FrameIndices[] = {58, 59, 60};
+static const int16 kAnim46FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim46FrameRects[] = {{-3, -9, 7, 11}, {-3, -9, 7, 11}, {-3, -9, 7, 11}};
+static const int kAnim47FrameIndices[] = {61, 62, 63};
+static const int16 kAnim47FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim47FrameRects[] = {{-7, -8, 13, 9}, {-7, -7, 13, 8}, {-7, -7, 13, 8}};
+static const int kAnim48FrameIndices[] = {64, 65, 66};
+static const int16 kAnim48FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim48FrameRects[] = {{-10, -6, 17, 7}, {-11, -6, 18, 7}, {-11, -6, 18, 6}};
+static const int kAnim49FrameIndices[] = {67, 68, 69};
+static const int16 kAnim49FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim49FrameRects[] = {{-7, -6, 13, 8}, {-7, -7, 12, 9}, {-7, -7, 13, 9}};
+static const int kAnim50FrameIndices[] = {78, 79, 80, 81, 82, 83, 82, 83, 82, 83, 82, 83, 82, 84};
+static const int16 kAnim50FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim50FrameRects[] = {{-3, -14, 12, 10}, {-2, -21, 11, 11}, {0, -23, 8, 14}, {-6, -15, 13, 11}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 6}, {-8, -4, 15, 5}, {-9, -4, 16, 5}};
+static const int kAnim51FrameIndices[] = {85, 86, 87, 88, 89, 90, 89, 90, 89, 90, 89, 90, 89, 91};
+static const int16 kAnim51FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim51FrameRects[] = {{-9, -14, 13, 10}, {-8, -22, 12, 12}, {-8, -24, 8, 15}, {-7, -15, 13, 10}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}, {-6, -4, 15, 7}, {-7, -4, 16, 6}};
+static const int kAnim52FrameIndices[] = {92, 93, 94};
+static const int16 kAnim52FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim52FrameRects[] = {{-6, -14, 13, 24}, {-7, -13, 14, 23}, {-6, -13, 12, 22}};
+static const int kAnim53FrameIndices[] = {95, 96, 97};
+static const int16 kAnim53FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim53FrameRects[] = {{-4, -12, 19, 17}, {-3, -12, 18, 18}, {-2, -12, 17, 18}};
+static const int kAnim54FrameIndices[] = {98, 99, 100};
+static const int16 kAnim54FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim54FrameRects[] = {{-6, -16, 23, 14}, {-6, -15, 24, 13}, {-7, -15, 25, 14}};
+static const int kAnim55FrameIndices[] = {101, 102, 103};
+static const int16 kAnim55FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim55FrameRects[] = {{-4, -22, 16, 20}, {-3, -23, 14, 22}, {-4, -23, 14, 22}};
+static const int kAnim56FrameIndices[] = {104, 105, 106};
+static const int16 kAnim56FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim56FrameRects[] = {{-5, -24, 11, 23}, {-5, -25, 11, 25}, {-5, -25, 11, 26}};
+static const int kAnim57FrameIndices[] = {107, 108, 109};
+static const int16 kAnim57FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim57FrameRects[] = {{-10, -23, 15, 21}, {-11, -22, 16, 20}, {-11, -23, 17, 21}};
+static const int kAnim58FrameIndices[] = {110, 111, 112};
+static const int16 kAnim58FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim58FrameRects[] = {{-17, -15, 25, 15}, {-17, -15, 25, 14}, {-17, -15, 25, 14}};
+static const int kAnim59FrameIndices[] = {113, 114, 115};
+static const int16 kAnim59FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim59FrameRects[] = {{-14, -12, 20, 17}, {-14, -13, 19, 18}, {-14, -13, 19, 18}};
+static const int kAnim60FrameIndices[] = {116};
+static const int16 kAnim60FrameTicks[] = {6};
+static const BBRect kAnim60FrameRects[] = {{-6, -12, 12, 23}};
+static const int kAnim61FrameIndices[] = {117};
+static const int16 kAnim61FrameTicks[] = {6};
+static const BBRect kAnim61FrameRects[] = {{-5, -11, 20, 19}};
+static const int kAnim62FrameIndices[] = {118};
+static const int16 kAnim62FrameTicks[] = {6};
+static const BBRect kAnim62FrameRects[] = {{-8, -14, 27, 15}};
+static const int kAnim63FrameIndices[] = {119};
+static const int16 kAnim63FrameTicks[] = {6};
+static const BBRect kAnim63FrameRects[] = {{-4, -22, 17, 20}};
+static const int kAnim64FrameIndices[] = {120};
+static const int16 kAnim64FrameTicks[] = {6};
+static const BBRect kAnim64FrameRects[] = {{-6, -25, 13, 25}};
+static const int kAnim65FrameIndices[] = {121};
+static const int16 kAnim65FrameTicks[] = {6};
+static const BBRect kAnim65FrameRects[] = {{-11, -23, 17, 23}};
+static const int kAnim66FrameIndices[] = {122};
+static const int16 kAnim66FrameTicks[] = {6};
+static const BBRect kAnim66FrameRects[] = {{-18, -13, 29, 13}};
+static const int kAnim67FrameIndices[] = {123};
+static const int16 kAnim67FrameTicks[] = {6};
+static const BBRect kAnim67FrameRects[] = {{-14, -12, 21, 19}};
+static const int kAnim68FrameIndices[] = {92, 93, 94};
+static const int16 kAnim68FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim68FrameRects[] = {{-6, -14, 13, 24}, {-7, -13, 14, 23}, {-6, -13, 12, 22}};
+static const int kAnim69FrameIndices[] = {95, 96, 97};
+static const int16 kAnim69FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim69FrameRects[] = {{-4, -12, 19, 17}, {-3, -12, 18, 18}, {-2, -12, 17, 18}};
+static const int kAnim70FrameIndices[] = {98, 99, 100};
+static const int16 kAnim70FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim70FrameRects[] = {{-6, -16, 23, 14}, {-6, -15, 24, 13}, {-7, -15, 25, 14}};
+static const int kAnim71FrameIndices[] = {101, 102, 103};
+static const int16 kAnim71FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim71FrameRects[] = {{-4, -22, 16, 20}, {-3, -23, 14, 22}, {-4, -23, 14, 22}};
+static const int kAnim72FrameIndices[] = {104, 105, 106};
+static const int16 kAnim72FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim72FrameRects[] = {{-5, -24, 11, 23}, {-5, -25, 11, 25}, {-5, -25, 11, 26}};
+static const int kAnim73FrameIndices[] = {107, 108, 109};
+static const int16 kAnim73FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim73FrameRects[] = {{-10, -23, 15, 21}, {-11, -22, 16, 20}, {-11, -23, 17, 21}};
+static const int kAnim74FrameIndices[] = {110, 111, 112};
+static const int16 kAnim74FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim74FrameRects[] = {{-17, -15, 25, 15}, {-17, -15, 25, 14}, {-17, -15, 25, 14}};
+static const int kAnim75FrameIndices[] = {113, 114, 115};
+static const int16 kAnim75FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim75FrameRects[] = {{-14, -12, 20, 17}, {-14, -13, 19, 18}, {-14, -13, 19, 18}};
+static const int kAnim76FrameIndices[] = {124, 125, 126, 127, 128, 129, 128, 129, 128, 129, 128, 129, 128, 130};
+static const int16 kAnim76FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim76FrameRects[] = {{-14, -23, 23, 18}, {-12, -32, 18, 23}, {-16, -29, 18, 22}, {-17, -17, 23, 17}, {-17, -10, 26, 14}, {-17, -12, 25, 15}, {-17, -10, 26, 14}, {-17, -12, 25, 15}, {-17, -10, 26, 14}, {-17, -12, 25, 15}, {-17, -10, 26, 14}, {-17, -12, 25, 15}, {-17, -10, 26, 14}, {-18, -13, 28, 14}};
+static const int kAnim77FrameIndices[] = {131, 132, 133, 134, 135, 136, 135, 136, 135, 136, 135, 136, 135, 137};
+static const int16 kAnim77FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim77FrameRects[] = {{-6, -24, 21, 19}, {-5, -33, 19, 24}, {-1, -29, 18, 22}, {-5, -17, 22, 17}, {-6, -10, 23, 14}, {-7, -10, 26, 13}, {-6, -10, 23, 14}, {-7, -10, 26, 13}, {-6, -10, 23, 14}, {-7, -10, 26, 13}, {-6, -10, 23, 14}, {-7, -10, 26, 13}, {-6, -10, 23, 14}, {-7, -12, 26, 14}};
+static const int kAnim78FrameIndices[] = {138, 139, 140};
+static const int16 kAnim78FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim78FrameRects[] = {{-3, -17, 7, 20}, {-3, -16, 7, 19}, {-3, -16, 7, 19}};
+static const int kAnim79FrameIndices[] = {141, 142, 143};
+static const int16 kAnim79FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim79FrameRects[] = {{-6, -14, 13, 15}, {-7, -13, 14, 14}, {-6, -13, 13, 14}};
+static const int kAnim80FrameIndices[] = {144, 145, 146};
+static const int16 kAnim80FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim80FrameRects[] = {{-10, -10, 20, 9}, {-9, -9, 19, 8}, {-9, -9, 19, 8}};
+static const int kAnim81FrameIndices[] = {147, 148, 149};
+static const int16 kAnim81FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim81FrameRects[] = {{-7, -11, 16, 10}, {-7, -11, 16, 10}, {-7, -11, 16, 10}};
+static const int kAnim82FrameIndices[] = {150, 151, 152};
+static const int16 kAnim82FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim82FrameRects[] = {{-3, -13, 7, 16}, {-3, -13, 7, 16}, {-3, -12, 7, 15}};
+static const int kAnim83FrameIndices[] = {153, 154, 155};
+static const int16 kAnim83FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim83FrameRects[] = {{-8, -11, 18, 10}, {-7, -11, 16, 11}, {-7, -10, 17, 9}};
+static const int kAnim84FrameIndices[] = {156, 157, 158};
+static const int16 kAnim84FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim84FrameRects[] = {{-8, -9, 20, 7}, {-9, -9, 21, 8}, {-9, -9, 21, 8}};
+static const int kAnim85FrameIndices[] = {159, 160, 161};
+static const int16 kAnim85FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim85FrameRects[] = {{-6, -14, 15, 15}, {-5, -13, 12, 14}, {-6, -13, 14, 14}};
+static const int kAnim86FrameIndices[] = {162};
+static const int16 kAnim86FrameTicks[] = {6};
+static const BBRect kAnim86FrameRects[] = {{-3, -15, 8, 18}};
+static const int kAnim87FrameIndices[] = {163};
+static const int16 kAnim87FrameTicks[] = {6};
+static const BBRect kAnim87FrameRects[] = {{-7, -13, 14, 14}};
+static const int kAnim88FrameIndices[] = {164};
+static const int16 kAnim88FrameTicks[] = {6};
+static const BBRect kAnim88FrameRects[] = {{-11, -9, 21, 8}};
+static const int kAnim89FrameIndices[] = {165};
+static const int16 kAnim89FrameTicks[] = {6};
+static const BBRect kAnim89FrameRects[] = {{-9, -11, 18, 11}};
+static const int kAnim90FrameIndices[] = {166};
+static const int16 kAnim90FrameTicks[] = {6};
+static const BBRect kAnim90FrameRects[] = {{-3, -12, 7, 15}};
+static const int kAnim91FrameIndices[] = {167};
+static const int16 kAnim91FrameTicks[] = {6};
+static const BBRect kAnim91FrameRects[] = {{-8, -11, 17, 12}};
+static const int kAnim92FrameIndices[] = {168};
+static const int16 kAnim92FrameTicks[] = {6};
+static const BBRect kAnim92FrameRects[] = {{-9, -10, 21, 9}};
+static const int kAnim93FrameIndices[] = {169};
+static const int16 kAnim93FrameTicks[] = {6};
+static const BBRect kAnim93FrameRects[] = {{-6, -14, 14, 15}};
+static const int kAnim94FrameIndices[] = {138, 139, 140};
+static const int16 kAnim94FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim94FrameRects[] = {{-3, -17, 7, 20}, {-3, -16, 7, 19}, {-3, -16, 7, 19}};
+static const int kAnim95FrameIndices[] = {141, 142, 143};
+static const int16 kAnim95FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim95FrameRects[] = {{-6, -14, 13, 15}, {-7, -13, 14, 14}, {-6, -13, 13, 14}};
+static const int kAnim96FrameIndices[] = {144, 145, 146};
+static const int16 kAnim96FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim96FrameRects[] = {{-10, -10, 20, 9}, {-9, -9, 19, 8}, {-9, -9, 19, 8}};
+static const int kAnim97FrameIndices[] = {147, 148, 149};
+static const int16 kAnim97FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim97FrameRects[] = {{-7, -11, 16, 10}, {-7, -11, 16, 10}, {-7, -11, 16, 10}};
+static const int kAnim98FrameIndices[] = {150, 151, 152};
+static const int16 kAnim98FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim98FrameRects[] = {{-3, -13, 7, 16}, {-3, -13, 7, 16}, {-3, -12, 7, 15}};
+static const int kAnim99FrameIndices[] = {153, 154, 155};
+static const int16 kAnim99FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim99FrameRects[] = {{-8, -11, 18, 10}, {-7, -11, 16, 11}, {-7, -10, 17, 9}};
+static const int kAnim100FrameIndices[] = {156, 157, 158};
+static const int16 kAnim100FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim100FrameRects[] = {{-8, -9, 20, 7}, {-9, -9, 21, 8}, {-9, -9, 21, 8}};
+static const int kAnim101FrameIndices[] = {159, 160, 161};
+static const int16 kAnim101FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim101FrameRects[] = {{-6, -14, 15, 15}, {-5, -13, 12, 14}, {-6, -13, 14, 14}};
+static const int kAnim102FrameIndices[] = {170, 171, 172, 173, 174, 175, 174, 175, 174, 175, 174, 175, 174, 176};
+static const int16 kAnim102FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim102FrameRects[] = {{-7, -18, 15, 14}, {-6, -24, 11, 18}, {-6, -24, 9, 17}, {-5, -14, 16, 11}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}};
+static const int kAnim103FrameIndices[] = {177, 178, 179, 180, 181, 182, 181, 182, 181, 182, 181, 182, 181, 183};
+static const int16 kAnim103FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim103FrameRects[] = {{-9, -18, 16, 15}, {-6, -24, 12, 18}, {-6, -24, 13, 16}, {-12, -15, 17, 13}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -6, 21, 6}};
+static const int kAnim104FrameIndices[] = {184, 185, 186};
+static const int16 kAnim104FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim104FrameRects[] = {{-3, -17, 7, 20}, {-3, -16, 7, 19}, {-3, -16, 7, 19}};
+static const int kAnim105FrameIndices[] = {187, 188, 189};
+static const int16 kAnim105FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim105FrameRects[] = {{-6, -14, 13, 15}, {-7, -13, 14, 14}, {-6, -13, 13, 14}};
+static const int kAnim106FrameIndices[] = {190, 191, 192};
+static const int16 kAnim106FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim106FrameRects[] = {{-10, -10, 20, 9}, {-9, -9, 19, 8}, {-9, -9, 19, 8}};
+static const int kAnim107FrameIndices[] = {193, 194, 195};
+static const int16 kAnim107FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim107FrameRects[] = {{-7, -11, 16, 10}, {-7, -11, 16, 10}, {-7, -11, 16, 10}};
+static const int kAnim108FrameIndices[] = {196, 197, 198};
+static const int16 kAnim108FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim108FrameRects[] = {{-3, -13, 7, 16}, {-3, -13, 7, 16}, {-3, -12, 7, 15}};
+static const int kAnim109FrameIndices[] = {199, 200, 201};
+static const int16 kAnim109FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim109FrameRects[] = {{-8, -11, 18, 10}, {-7, -11, 16, 11}, {-7, -10, 17, 9}};
+static const int kAnim110FrameIndices[] = {202, 203, 204};
+static const int16 kAnim110FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim110FrameRects[] = {{-8, -9, 20, 7}, {-9, -9, 21, 8}, {-9, -9, 21, 8}};
+static const int kAnim111FrameIndices[] = {205, 206, 207};
+static const int16 kAnim111FrameTicks[] = {10, 8, 8};
+static const BBRect kAnim111FrameRects[] = {{-6, -14, 15, 15}, {-5, -13, 12, 14}, {-6, -13, 14, 14}};
+static const int kAnim112FrameIndices[] = {208};
+static const int16 kAnim112FrameTicks[] = {6};
+static const BBRect kAnim112FrameRects[] = {{-3, -15, 8, 18}};
+static const int kAnim113FrameIndices[] = {209};
+static const int16 kAnim113FrameTicks[] = {6};
+static const BBRect kAnim113FrameRects[] = {{-7, -13, 14, 14}};
+static const int kAnim114FrameIndices[] = {210};
+static const int16 kAnim114FrameTicks[] = {6};
+static const BBRect kAnim114FrameRects[] = {{-11, -9, 21, 8}};
+static const int kAnim115FrameIndices[] = {211};
+static const int16 kAnim115FrameTicks[] = {6};
+static const BBRect kAnim115FrameRects[] = {{-9, -11, 18, 11}};
+static const int kAnim116FrameIndices[] = {212};
+static const int16 kAnim116FrameTicks[] = {6};
+static const BBRect kAnim116FrameRects[] = {{-3, -12, 7, 15}};
+static const int kAnim117FrameIndices[] = {213};
+static const int16 kAnim117FrameTicks[] = {6};
+static const BBRect kAnim117FrameRects[] = {{-8, -11, 17, 12}};
+static const int kAnim118FrameIndices[] = {214};
+static const int16 kAnim118FrameTicks[] = {6};
+static const BBRect kAnim118FrameRects[] = {{-9, -10, 21, 9}};
+static const int kAnim119FrameIndices[] = {215};
+static const int16 kAnim119FrameTicks[] = {6};
+static const BBRect kAnim119FrameRects[] = {{-6, -14, 14, 15}};
+static const int kAnim120FrameIndices[] = {184, 185, 186};
+static const int16 kAnim120FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim120FrameRects[] = {{-3, -17, 7, 20}, {-3, -16, 7, 19}, {-3, -16, 7, 19}};
+static const int kAnim121FrameIndices[] = {187, 188, 189};
+static const int16 kAnim121FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim121FrameRects[] = {{-6, -14, 13, 15}, {-7, -13, 14, 14}, {-6, -13, 13, 14}};
+static const int kAnim122FrameIndices[] = {190, 191, 192};
+static const int16 kAnim122FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim122FrameRects[] = {{-10, -10, 20, 9}, {-9, -9, 19, 8}, {-9, -9, 19, 8}};
+static const int kAnim123FrameIndices[] = {193, 194, 195};
+static const int16 kAnim123FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim123FrameRects[] = {{-7, -11, 16, 10}, {-7, -11, 16, 10}, {-7, -11, 16, 10}};
+static const int kAnim124FrameIndices[] = {196, 197, 198};
+static const int16 kAnim124FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim124FrameRects[] = {{-3, -13, 7, 16}, {-3, -13, 7, 16}, {-3, -12, 7, 15}};
+static const int kAnim125FrameIndices[] = {199, 200, 201};
+static const int16 kAnim125FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim125FrameRects[] = {{-8, -11, 18, 10}, {-7, -11, 16, 11}, {-7, -10, 17, 9}};
+static const int kAnim126FrameIndices[] = {202, 203, 204};
+static const int16 kAnim126FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim126FrameRects[] = {{-8, -9, 20, 7}, {-9, -9, 21, 8}, {-9, -9, 21, 8}};
+static const int kAnim127FrameIndices[] = {205, 206, 207};
+static const int16 kAnim127FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim127FrameRects[] = {{-6, -14, 15, 15}, {-5, -13, 12, 14}, {-6, -13, 14, 14}};
+static const int kAnim128FrameIndices[] = {216, 217, 218, 219, 220, 221, 220, 221, 220, 221, 220, 221, 220, 222};
+static const int16 kAnim128FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim128FrameRects[] = {{-7, -18, 15, 14}, {-6, -24, 11, 18}, {-6, -24, 9, 17}, {-5, -14, 16, 11}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}, {-7, -6, 18, 7}, {-8, -7, 19, 8}};
+static const int kAnim129FrameIndices[] = {223, 224, 225, 226, 227, 228, 227, 228, 227, 228, 227, 228, 227, 229};
+static const int16 kAnim129FrameTicks[] = {6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim129FrameRects[] = {{-9, -18, 16, 15}, {-6, -24, 12, 18}, {-6, -24, 13, 16}, {-12, -15, 17, 13}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -7, 21, 9}, {-10, -7, 19, 8}, {-11, -6, 21, 6}};
+static const int kAnim130FrameIndices[] = {230};
+static const int16 kAnim130FrameTicks[] = {6};
+static const BBRect kAnim130FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim131FrameIndices[] = {231};
+static const int16 kAnim131FrameTicks[] = {6};
+static const BBRect kAnim131FrameRects[] = {{-8, -9, 16, 12}};
+static const int kAnim132FrameIndices[] = {231, 232, 233};
+static const int16 kAnim132FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim132FrameRects[] = {{-8, -9, 16, 12}, {-8, -11, 16, 12}, {-8, -13, 16, 12}};
+static const int kAnim133FrameIndices[] = {233};
+static const int16 kAnim133FrameTicks[] = {6};
+static const BBRect kAnim133FrameRects[] = {{-8, -13, 16, 12}};
+static const int kAnim134FrameIndices[] = {234};
+static const int16 kAnim134FrameTicks[] = {6};
+static const BBRect kAnim134FrameRects[] = {{-7, -6, 14, 10}};
+static const int kAnim135FrameIndices[] = {234, 235, 236};
+static const int16 kAnim135FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim135FrameRects[] = {{-7, -6, 14, 10}, {-7, -9, 14, 9}, {-7, -12, 14, 9}};
+static const int kAnim136FrameIndices[] = {236};
+static const int16 kAnim136FrameTicks[] = {6};
+static const BBRect kAnim136FrameRects[] = {{-7, -12, 14, 9}};
+static const int kAnim137FrameIndices[] = {237};
+static const int16 kAnim137FrameTicks[] = {6};
+static const BBRect kAnim137FrameRects[] = {{-7, -8, 16, 13}};
+static const int kAnim138FrameIndices[] = {237, 238, 239};
+static const int16 kAnim138FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim138FrameRects[] = {{-7, -8, 16, 13}, {-7, -11, 16, 12}, {-7, -14, 16, 13}};
+static const int kAnim139FrameIndices[] = {239};
+static const int16 kAnim139FrameTicks[] = {6};
+static const BBRect kAnim139FrameRects[] = {{-7, -14, 16, 13}};
+static const int kAnim140FrameIndices[] = {240};
+static const int16 kAnim140FrameTicks[] = {6};
+static const BBRect kAnim140FrameRects[] = {{-4, -4, 11, 7}};
+static const int kAnim141FrameIndices[] = {240, 241, 242};
+static const int16 kAnim141FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim141FrameRects[] = {{-4, -4, 11, 7}, {-5, -7, 12, 7}, {-5, -10, 12, 7}};
+static const int kAnim142FrameIndices[] = {242};
+static const int16 kAnim142FrameTicks[] = {6};
+static const BBRect kAnim142FrameRects[] = {{-5, -10, 12, 7}};
+static const int kAnim143FrameIndices[] = {243};
+static const int16 kAnim143FrameTicks[] = {6};
+static const BBRect kAnim143FrameRects[] = {{-5, -4, 12, 7}};
+static const int kAnim144FrameIndices[] = {243, 244, 245};
+static const int16 kAnim144FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim144FrameRects[] = {{-5, -4, 12, 7}, {-5, -7, 12, 7}, {-5, -10, 11, 7}};
+static const int kAnim145FrameIndices[] = {245};
+static const int16 kAnim145FrameTicks[] = {6};
+static const BBRect kAnim145FrameRects[] = {{-5, -10, 11, 7}};
+static const int kAnim146FrameIndices[] = {246};
+static const int16 kAnim146FrameTicks[] = {6};
+static const BBRect kAnim146FrameRects[] = {{-9, -11, 19, 15}};
+static const int kAnim147FrameIndices[] = {246, 247, 248};
+static const int16 kAnim147FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim147FrameRects[] = {{-9, -11, 19, 15}, {-9, -13, 19, 14}, {-9, -17, 19, 15}};
+static const int kAnim148FrameIndices[] = {248};
+static const int16 kAnim148FrameTicks[] = {6};
+static const BBRect kAnim148FrameRects[] = {{-9, -17, 19, 15}};
+static const int kAnim149FrameIndices[] = {249};
+static const int16 kAnim149FrameTicks[] = {6};
+static const BBRect kAnim149FrameRects[] = {{-9, -12, 22, 17}};
+static const int kAnim150FrameIndices[] = {249, 250, 251};
+static const int16 kAnim150FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim150FrameRects[] = {{-9, -12, 22, 17}, {-9, -15, 22, 17}, {-9, -18, 22, 17}};
+static const int kAnim151FrameIndices[] = {251};
+static const int16 kAnim151FrameTicks[] = {6};
+static const BBRect kAnim151FrameRects[] = {{-9, -18, 22, 17}};
+static const int kAnim152FrameIndices[] = {252};
+static const int16 kAnim152FrameTicks[] = {6};
+static const BBRect kAnim152FrameRects[] = {{-8, -5, 18, 9}};
+static const int kAnim153FrameIndices[] = {252, 253, 254};
+static const int16 kAnim153FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim153FrameRects[] = {{-8, -5, 18, 9}, {-7, -9, 17, 9}, {-8, -11, 19, 9}};
+static const int kAnim154FrameIndices[] = {254};
+static const int16 kAnim154FrameTicks[] = {6};
+static const BBRect kAnim154FrameRects[] = {{-8, -11, 19, 9}};
+static const int kAnim155FrameIndices[] = {255};
+static const int16 kAnim155FrameTicks[] = {6};
+static const BBRect kAnim155FrameRects[] = {{-8, -9, 18, 13}};
+static const int kAnim156FrameIndices[] = {255, 256, 257};
+static const int16 kAnim156FrameTicks[] = {6, 6, 6};
+static const BBRect kAnim156FrameRects[] = {{-8, -9, 18, 13}, {-8, -12, 18, 13}, {-7, -15, 17, 13}};
+static const int kAnim157FrameIndices[] = {257};
+static const int16 kAnim157FrameTicks[] = {6};
+static const BBRect kAnim157FrameRects[] = {{-7, -15, 17, 13}};
+static const int kAnim158FrameIndices[] = {258, 259, 260, 261, 262, 263};
+static const int16 kAnim158FrameTicks[] = {6, 8, 8, 8, 6, 6};
+static const BBRect kAnim158FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim159FrameIndices[] = {264, 265, 266};
+static const int16 kAnim159FrameTicks[] = {1, 1, 1};
+static const BBRect kAnim159FrameRects[] = {{-9, -8, 18, 16}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim160FrameIndices[] = {267};
+static const int16 kAnim160FrameTicks[] = {6};
+static const BBRect kAnim160FrameRects[] = {{-25, -83, 43, 54}};
+static const int kAnim161FrameIndices[] = {268};
+static const int16 kAnim161FrameTicks[] = {6};
+static const BBRect kAnim161FrameRects[] = {{-33, -93, 41, 60}};
+static const int kAnim162FrameIndices[] = {269};
+static const int16 kAnim162FrameTicks[] = {1};
+static const BBRect kAnim162FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim163FrameIndices[] = {270};
+static const int16 kAnim163FrameTicks[] = {5};
+static const BBRect kAnim163FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim164FrameIndices[] = {271};
+static const int16 kAnim164FrameTicks[] = {1};
+static const BBRect kAnim164FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim165FrameIndices[] = {272};
+static const int16 kAnim165FrameTicks[] = {1};
+static const BBRect kAnim165FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim166FrameIndices[] = {273};
+static const int16 kAnim166FrameTicks[] = {2};
+static const BBRect kAnim166FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim167FrameIndices[] = {274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286};
+static const int16 kAnim167FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim167FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim168FrameIndices[] = {287};
+static const int16 kAnim168FrameTicks[] = {1};
+static const BBRect kAnim168FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim169FrameIndices[] = {288};
+static const int16 kAnim169FrameTicks[] = {6};
+static const BBRect kAnim169FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim170FrameIndices[] = {289, 290, 291, 292, 293, 294};
+static const int16 kAnim170FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim170FrameRects[] = {{-22, -91, 45, 93}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}};
+static const int kAnim171FrameIndices[] = {295, 296, 297, 298, 299, 300};
+static const int16 kAnim171FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim171FrameRects[] = {{-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}};
+static const int kAnim172FrameIndices[] = {301, 302};
+static const int16 kAnim172FrameTicks[] = {6, 6};
+static const BBRect kAnim172FrameRects[] = {{-9, -9, 17, 15}, {-11, -10, 19, 16}};
+static const ObjAnimation kAnimations[] = {
+ {3, kAnim0FrameIndices, kAnim0FrameTicks, kAnim0FrameRects},
+ {3, kAnim1FrameIndices, kAnim1FrameTicks, kAnim1FrameRects},
+ {3, kAnim2FrameIndices, kAnim2FrameTicks, kAnim2FrameRects},
+ {3, kAnim3FrameIndices, kAnim3FrameTicks, kAnim3FrameRects},
+ {3, kAnim4FrameIndices, kAnim4FrameTicks, kAnim4FrameRects},
+ {3, kAnim5FrameIndices, kAnim5FrameTicks, kAnim5FrameRects},
+ {3, kAnim6FrameIndices, kAnim6FrameTicks, kAnim6FrameRects},
+ {3, kAnim7FrameIndices, kAnim7FrameTicks, kAnim7FrameRects},
+ {1, kAnim8FrameIndices, kAnim8FrameTicks, kAnim8FrameRects},
+ {1, kAnim9FrameIndices, kAnim9FrameTicks, kAnim9FrameRects},
+ {1, kAnim10FrameIndices, kAnim10FrameTicks, kAnim10FrameRects},
+ {1, kAnim11FrameIndices, kAnim11FrameTicks, kAnim11FrameRects},
+ {1, kAnim12FrameIndices, kAnim12FrameTicks, kAnim12FrameRects},
+ {1, kAnim13FrameIndices, kAnim13FrameTicks, kAnim13FrameRects},
+ {1, kAnim14FrameIndices, kAnim14FrameTicks, kAnim14FrameRects},
+ {1, kAnim15FrameIndices, kAnim15FrameTicks, kAnim15FrameRects},
+ {3, kAnim16FrameIndices, kAnim16FrameTicks, kAnim16FrameRects},
+ {3, kAnim17FrameIndices, kAnim17FrameTicks, kAnim17FrameRects},
+ {3, kAnim18FrameIndices, kAnim18FrameTicks, kAnim18FrameRects},
+ {3, kAnim19FrameIndices, kAnim19FrameTicks, kAnim19FrameRects},
+ {3, kAnim20FrameIndices, kAnim20FrameTicks, kAnim20FrameRects},
+ {3, kAnim21FrameIndices, kAnim21FrameTicks, kAnim21FrameRects},
+ {3, kAnim22FrameIndices, kAnim22FrameTicks, kAnim22FrameRects},
+ {3, kAnim23FrameIndices, kAnim23FrameTicks, kAnim23FrameRects},
+ {14, kAnim24FrameIndices, kAnim24FrameTicks, kAnim24FrameRects},
+ {14, kAnim25FrameIndices, kAnim25FrameTicks, kAnim25FrameRects},
+ {3, kAnim26FrameIndices, kAnim26FrameTicks, kAnim26FrameRects},
+ {3, kAnim27FrameIndices, kAnim27FrameTicks, kAnim27FrameRects},
+ {3, kAnim28FrameIndices, kAnim28FrameTicks, kAnim28FrameRects},
+ {3, kAnim29FrameIndices, kAnim29FrameTicks, kAnim29FrameRects},
+ {3, kAnim30FrameIndices, kAnim30FrameTicks, kAnim30FrameRects},
+ {3, kAnim31FrameIndices, kAnim31FrameTicks, kAnim31FrameRects},
+ {3, kAnim32FrameIndices, kAnim32FrameTicks, kAnim32FrameRects},
+ {3, kAnim33FrameIndices, kAnim33FrameTicks, kAnim33FrameRects},
+ {1, kAnim34FrameIndices, kAnim34FrameTicks, kAnim34FrameRects},
+ {1, kAnim35FrameIndices, kAnim35FrameTicks, kAnim35FrameRects},
+ {1, kAnim36FrameIndices, kAnim36FrameTicks, kAnim36FrameRects},
+ {1, kAnim37FrameIndices, kAnim37FrameTicks, kAnim37FrameRects},
+ {1, kAnim38FrameIndices, kAnim38FrameTicks, kAnim38FrameRects},
+ {1, kAnim39FrameIndices, kAnim39FrameTicks, kAnim39FrameRects},
+ {1, kAnim40FrameIndices, kAnim40FrameTicks, kAnim40FrameRects},
+ {1, kAnim41FrameIndices, kAnim41FrameTicks, kAnim41FrameRects},
+ {3, kAnim42FrameIndices, kAnim42FrameTicks, kAnim42FrameRects},
+ {3, kAnim43FrameIndices, kAnim43FrameTicks, kAnim43FrameRects},
+ {3, kAnim44FrameIndices, kAnim44FrameTicks, kAnim44FrameRects},
+ {3, kAnim45FrameIndices, kAnim45FrameTicks, kAnim45FrameRects},
+ {3, kAnim46FrameIndices, kAnim46FrameTicks, kAnim46FrameRects},
+ {3, kAnim47FrameIndices, kAnim47FrameTicks, kAnim47FrameRects},
+ {3, kAnim48FrameIndices, kAnim48FrameTicks, kAnim48FrameRects},
+ {3, kAnim49FrameIndices, kAnim49FrameTicks, kAnim49FrameRects},
+ {14, kAnim50FrameIndices, kAnim50FrameTicks, kAnim50FrameRects},
+ {14, kAnim51FrameIndices, kAnim51FrameTicks, kAnim51FrameRects},
+ {3, kAnim52FrameIndices, kAnim52FrameTicks, kAnim52FrameRects},
+ {3, kAnim53FrameIndices, kAnim53FrameTicks, kAnim53FrameRects},
+ {3, kAnim54FrameIndices, kAnim54FrameTicks, kAnim54FrameRects},
+ {3, kAnim55FrameIndices, kAnim55FrameTicks, kAnim55FrameRects},
+ {3, kAnim56FrameIndices, kAnim56FrameTicks, kAnim56FrameRects},
+ {3, kAnim57FrameIndices, kAnim57FrameTicks, kAnim57FrameRects},
+ {3, kAnim58FrameIndices, kAnim58FrameTicks, kAnim58FrameRects},
+ {3, kAnim59FrameIndices, kAnim59FrameTicks, kAnim59FrameRects},
+ {1, kAnim60FrameIndices, kAnim60FrameTicks, kAnim60FrameRects},
+ {1, kAnim61FrameIndices, kAnim61FrameTicks, kAnim61FrameRects},
+ {1, kAnim62FrameIndices, kAnim62FrameTicks, kAnim62FrameRects},
+ {1, kAnim63FrameIndices, kAnim63FrameTicks, kAnim63FrameRects},
+ {1, kAnim64FrameIndices, kAnim64FrameTicks, kAnim64FrameRects},
+ {1, kAnim65FrameIndices, kAnim65FrameTicks, kAnim65FrameRects},
+ {1, kAnim66FrameIndices, kAnim66FrameTicks, kAnim66FrameRects},
+ {1, kAnim67FrameIndices, kAnim67FrameTicks, kAnim67FrameRects},
+ {3, kAnim68FrameIndices, kAnim68FrameTicks, kAnim68FrameRects},
+ {3, kAnim69FrameIndices, kAnim69FrameTicks, kAnim69FrameRects},
+ {3, kAnim70FrameIndices, kAnim70FrameTicks, kAnim70FrameRects},
+ {3, kAnim71FrameIndices, kAnim71FrameTicks, kAnim71FrameRects},
+ {3, kAnim72FrameIndices, kAnim72FrameTicks, kAnim72FrameRects},
+ {3, kAnim73FrameIndices, kAnim73FrameTicks, kAnim73FrameRects},
+ {3, kAnim74FrameIndices, kAnim74FrameTicks, kAnim74FrameRects},
+ {3, kAnim75FrameIndices, kAnim75FrameTicks, kAnim75FrameRects},
+ {14, kAnim76FrameIndices, kAnim76FrameTicks, kAnim76FrameRects},
+ {14, kAnim77FrameIndices, kAnim77FrameTicks, kAnim77FrameRects},
+ {3, kAnim78FrameIndices, kAnim78FrameTicks, kAnim78FrameRects},
+ {3, kAnim79FrameIndices, kAnim79FrameTicks, kAnim79FrameRects},
+ {3, kAnim80FrameIndices, kAnim80FrameTicks, kAnim80FrameRects},
+ {3, kAnim81FrameIndices, kAnim81FrameTicks, kAnim81FrameRects},
+ {3, kAnim82FrameIndices, kAnim82FrameTicks, kAnim82FrameRects},
+ {3, kAnim83FrameIndices, kAnim83FrameTicks, kAnim83FrameRects},
+ {3, kAnim84FrameIndices, kAnim84FrameTicks, kAnim84FrameRects},
+ {3, kAnim85FrameIndices, kAnim85FrameTicks, kAnim85FrameRects},
+ {1, kAnim86FrameIndices, kAnim86FrameTicks, kAnim86FrameRects},
+ {1, kAnim87FrameIndices, kAnim87FrameTicks, kAnim87FrameRects},
+ {1, kAnim88FrameIndices, kAnim88FrameTicks, kAnim88FrameRects},
+ {1, kAnim89FrameIndices, kAnim89FrameTicks, kAnim89FrameRects},
+ {1, kAnim90FrameIndices, kAnim90FrameTicks, kAnim90FrameRects},
+ {1, kAnim91FrameIndices, kAnim91FrameTicks, kAnim91FrameRects},
+ {1, kAnim92FrameIndices, kAnim92FrameTicks, kAnim92FrameRects},
+ {1, kAnim93FrameIndices, kAnim93FrameTicks, kAnim93FrameRects},
+ {3, kAnim94FrameIndices, kAnim94FrameTicks, kAnim94FrameRects},
+ {3, kAnim95FrameIndices, kAnim95FrameTicks, kAnim95FrameRects},
+ {3, kAnim96FrameIndices, kAnim96FrameTicks, kAnim96FrameRects},
+ {3, kAnim97FrameIndices, kAnim97FrameTicks, kAnim97FrameRects},
+ {3, kAnim98FrameIndices, kAnim98FrameTicks, kAnim98FrameRects},
+ {3, kAnim99FrameIndices, kAnim99FrameTicks, kAnim99FrameRects},
+ {3, kAnim100FrameIndices, kAnim100FrameTicks, kAnim100FrameRects},
+ {3, kAnim101FrameIndices, kAnim101FrameTicks, kAnim101FrameRects},
+ {14, kAnim102FrameIndices, kAnim102FrameTicks, kAnim102FrameRects},
+ {14, kAnim103FrameIndices, kAnim103FrameTicks, kAnim103FrameRects},
+ {3, kAnim104FrameIndices, kAnim104FrameTicks, kAnim104FrameRects},
+ {3, kAnim105FrameIndices, kAnim105FrameTicks, kAnim105FrameRects},
+ {3, kAnim106FrameIndices, kAnim106FrameTicks, kAnim106FrameRects},
+ {3, kAnim107FrameIndices, kAnim107FrameTicks, kAnim107FrameRects},
+ {3, kAnim108FrameIndices, kAnim108FrameTicks, kAnim108FrameRects},
+ {3, kAnim109FrameIndices, kAnim109FrameTicks, kAnim109FrameRects},
+ {3, kAnim110FrameIndices, kAnim110FrameTicks, kAnim110FrameRects},
+ {3, kAnim111FrameIndices, kAnim111FrameTicks, kAnim111FrameRects},
+ {1, kAnim112FrameIndices, kAnim112FrameTicks, kAnim112FrameRects},
+ {1, kAnim113FrameIndices, kAnim113FrameTicks, kAnim113FrameRects},
+ {1, kAnim114FrameIndices, kAnim114FrameTicks, kAnim114FrameRects},
+ {1, kAnim115FrameIndices, kAnim115FrameTicks, kAnim115FrameRects},
+ {1, kAnim116FrameIndices, kAnim116FrameTicks, kAnim116FrameRects},
+ {1, kAnim117FrameIndices, kAnim117FrameTicks, kAnim117FrameRects},
+ {1, kAnim118FrameIndices, kAnim118FrameTicks, kAnim118FrameRects},
+ {1, kAnim119FrameIndices, kAnim119FrameTicks, kAnim119FrameRects},
+ {3, kAnim120FrameIndices, kAnim120FrameTicks, kAnim120FrameRects},
+ {3, kAnim121FrameIndices, kAnim121FrameTicks, kAnim121FrameRects},
+ {3, kAnim122FrameIndices, kAnim122FrameTicks, kAnim122FrameRects},
+ {3, kAnim123FrameIndices, kAnim123FrameTicks, kAnim123FrameRects},
+ {3, kAnim124FrameIndices, kAnim124FrameTicks, kAnim124FrameRects},
+ {3, kAnim125FrameIndices, kAnim125FrameTicks, kAnim125FrameRects},
+ {3, kAnim126FrameIndices, kAnim126FrameTicks, kAnim126FrameRects},
+ {3, kAnim127FrameIndices, kAnim127FrameTicks, kAnim127FrameRects},
+ {14, kAnim128FrameIndices, kAnim128FrameTicks, kAnim128FrameRects},
+ {14, kAnim129FrameIndices, kAnim129FrameTicks, kAnim129FrameRects},
+ {1, kAnim130FrameIndices, kAnim130FrameTicks, kAnim130FrameRects},
+ {1, kAnim131FrameIndices, kAnim131FrameTicks, kAnim131FrameRects},
+ {3, kAnim132FrameIndices, kAnim132FrameTicks, kAnim132FrameRects},
+ {1, kAnim133FrameIndices, kAnim133FrameTicks, kAnim133FrameRects},
+ {1, kAnim134FrameIndices, kAnim134FrameTicks, kAnim134FrameRects},
+ {3, kAnim135FrameIndices, kAnim135FrameTicks, kAnim135FrameRects},
+ {1, kAnim136FrameIndices, kAnim136FrameTicks, kAnim136FrameRects},
+ {1, kAnim137FrameIndices, kAnim137FrameTicks, kAnim137FrameRects},
+ {3, kAnim138FrameIndices, kAnim138FrameTicks, kAnim138FrameRects},
+ {1, kAnim139FrameIndices, kAnim139FrameTicks, kAnim139FrameRects},
+ {1, kAnim140FrameIndices, kAnim140FrameTicks, kAnim140FrameRects},
+ {3, kAnim141FrameIndices, kAnim141FrameTicks, kAnim141FrameRects},
+ {1, kAnim142FrameIndices, kAnim142FrameTicks, kAnim142FrameRects},
+ {1, kAnim143FrameIndices, kAnim143FrameTicks, kAnim143FrameRects},
+ {3, kAnim144FrameIndices, kAnim144FrameTicks, kAnim144FrameRects},
+ {1, kAnim145FrameIndices, kAnim145FrameTicks, kAnim145FrameRects},
+ {1, kAnim146FrameIndices, kAnim146FrameTicks, kAnim146FrameRects},
+ {3, kAnim147FrameIndices, kAnim147FrameTicks, kAnim147FrameRects},
+ {1, kAnim148FrameIndices, kAnim148FrameTicks, kAnim148FrameRects},
+ {1, kAnim149FrameIndices, kAnim149FrameTicks, kAnim149FrameRects},
+ {3, kAnim150FrameIndices, kAnim150FrameTicks, kAnim150FrameRects},
+ {1, kAnim151FrameIndices, kAnim151FrameTicks, kAnim151FrameRects},
+ {1, kAnim152FrameIndices, kAnim152FrameTicks, kAnim152FrameRects},
+ {3, kAnim153FrameIndices, kAnim153FrameTicks, kAnim153FrameRects},
+ {1, kAnim154FrameIndices, kAnim154FrameTicks, kAnim154FrameRects},
+ {1, kAnim155FrameIndices, kAnim155FrameTicks, kAnim155FrameRects},
+ {3, kAnim156FrameIndices, kAnim156FrameTicks, kAnim156FrameRects},
+ {1, kAnim157FrameIndices, kAnim157FrameTicks, kAnim157FrameRects},
+ {6, kAnim158FrameIndices, kAnim158FrameTicks, kAnim158FrameRects},
+ {3, kAnim159FrameIndices, kAnim159FrameTicks, kAnim159FrameRects},
+ {1, kAnim160FrameIndices, kAnim160FrameTicks, kAnim160FrameRects},
+ {1, kAnim161FrameIndices, kAnim161FrameTicks, kAnim161FrameRects},
+ {1, kAnim162FrameIndices, kAnim162FrameTicks, kAnim162FrameRects},
+ {1, kAnim163FrameIndices, kAnim163FrameTicks, kAnim163FrameRects},
+ {1, kAnim164FrameIndices, kAnim164FrameTicks, kAnim164FrameRects},
+ {1, kAnim165FrameIndices, kAnim165FrameTicks, kAnim165FrameRects},
+ {1, kAnim166FrameIndices, kAnim166FrameTicks, kAnim166FrameRects},
+ {13, kAnim167FrameIndices, kAnim167FrameTicks, kAnim167FrameRects},
+ {1, kAnim168FrameIndices, kAnim168FrameTicks, kAnim168FrameRects},
+ {1, kAnim169FrameIndices, kAnim169FrameTicks, kAnim169FrameRects},
+ {6, kAnim170FrameIndices, kAnim170FrameTicks, kAnim170FrameRects},
+ {6, kAnim171FrameIndices, kAnim171FrameTicks, kAnim171FrameRects},
+ {2, kAnim172FrameIndices, kAnim172FrameTicks, kAnim172FrameRects}
+};
+
+static const MinigameBbAnt::ObjInit kObjInits[] = {
+ {&kAnimations[131], &kAnimations[132], &kAnimations[133], 160, 120},
+ {&kAnimations[134], &kAnimations[135], &kAnimations[136], 155, 130},
+ {&kAnimations[137], &kAnimations[138], &kAnimations[139], 150, 100},
+ {&kAnimations[140], &kAnimations[141], &kAnimations[142], 195, 150},
+ {&kAnimations[143], &kAnimations[144], &kAnimations[145], 120, 110},
+ {&kAnimations[146], &kAnimations[147], &kAnimations[148], 170, 170},
+ {&kAnimations[149], &kAnimations[150], &kAnimations[151], 175, 95},
+ {&kAnimations[152], &kAnimations[153], &kAnimations[154], 145, 165},
+ {&kAnimations[155], &kAnimations[156], &kAnimations[157], 110, 175}
+};
+static const ObjAnimation * const kAnimationsTbl[] = {&kAnimations[0], &kAnimations[1], &kAnimations[2], &kAnimations[3], &kAnimations[4], &kAnimations[5], &kAnimations[6], &kAnimations[7], &kAnimations[16], &kAnimations[17], &kAnimations[18], &kAnimations[19], &kAnimations[20], &kAnimations[21], &kAnimations[22], &kAnimations[23], &kAnimations[24], &kAnimations[25], &kAnimations[26], &kAnimations[27], &kAnimations[28], &kAnimations[29], &kAnimations[30], &kAnimations[31], &kAnimations[32], &kAnimations[33], &kAnimations[42], &kAnimations[43], &kAnimations[44], &kAnimations[45], &kAnimations[46], &kAnimations[47], &kAnimations[48], &kAnimations[49], &kAnimations[50], &kAnimations[51], &kAnimations[52], &kAnimations[53], &kAnimations[54], &kAnimations[55], &kAnimations[56], &kAnimations[57], &kAnimations[58], &kAnimations[59], &kAnimations[68], &kAnimations[69], &kAnimations[70], &kAnimations[71], &kAnimations[72], &kAnimations[73], &kAnimations[74], &kAnimations[75], &kAnimations[76], &kAnimations[77], &kAnimations[78], &kAnimations[79], &kAnimations[80], &kAnimations[81], &kAnimations[82], &kAnimations[83], &kAnimations[84], &kAnimations[85], &kAnimations[94], &kAnimations[95], &kAnimations[96], &kAnimations[97], &kAnimations[98], &kAnimations[99], &kAnimations[100], &kAnimations[101], &kAnimations[102], &kAnimations[103], &kAnimations[104], &kAnimations[105], &kAnimations[106], &kAnimations[107], &kAnimations[108], &kAnimations[109], &kAnimations[110], &kAnimations[111], &kAnimations[120], &kAnimations[121], &kAnimations[122], &kAnimations[123], &kAnimations[124], &kAnimations[125], &kAnimations[126], &kAnimations[127], &kAnimations[128], &kAnimations[129]};
+
+static const ObjAnimation * const * const kObjKindAnimTables[] = {
+ 0, &kAnimationsTbl[0],
+ &kAnimationsTbl[18], &kAnimationsTbl[36],
+ &kAnimationsTbl[54], &kAnimationsTbl[72]
+};
+
+const ObjAnimation *MinigameBbAnt::getAnimation(int animIndex) {
+ return &kAnimations[animIndex];
+}
+
+const MinigameBbAnt::ObjInit *MinigameBbAnt::getObjInit(int index) {
+ return &kObjInits[index];
+}
+
+const ObjAnimation * const *MinigameBbAnt::getObjKindAnimTable(int kind) {
+ return kObjKindAnimTables[kind];
+}
+
+const ObjAnimation *MinigameBbAnt::getObjAnim(int index) {
+ return kAnimationsTbl[index];
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbloogie.cpp b/engines/bbvs/minigames/bbloogie.cpp
new file mode 100644
index 0000000000..4601e9ff93
--- /dev/null
+++ b/engines/bbvs/minigames/bbloogie.cpp
@@ -0,0 +1,1353 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbloogie.h"
+
+namespace Bbvs {
+
+static const int kLoogieOffY[16] = {
+ 0, 1, 1, 2, 2, 3, 3, 4,
+ 4, 5, 5, 6, 6, 7, 7, 0
+};
+
+static const int kSquirrelOffX[] = {
+ -43, -43, -38, -33, -33, -27, -23, -23,
+ -23, -23, -23, -23, -18, -14, -8, -4,
+ 2, 8, 12, 18, 20, 20, 26, 31,
+ 37, 37, 37, 37, 37, 37, 37, 32,
+ 29, 26, 21, 14, 10, 6, 6, 6,
+ 6, 6, 6, 6, 0, -6, -15, -20,
+ -27, -37, -41, -41, -41, -41
+};
+
+static const int kPlaneOffX[] = {
+ 0, -1, -1, -1, 0, 1, 1, 1
+};
+
+static const int kPlaneOffY[] = {
+ -1, -1, 0, 1, 1, 1, 0, -1
+};
+
+static const int kLevelScores[] = {
+ 20, 50, 90, 140, 200, 270, 350, 440, 540, 10000
+};
+
+static const int kLevelTimes[] = {
+ 120, 110, 100, 90, 80, 70, 60, 50, 40, 30
+};
+
+static const uint kBeavisSounds1[] = {
+ 14, 15, 19, 20, 22, 23, 24, 26
+};
+
+static const uint kButtheadSounds1[] = {
+ 16, 14, 15, 22, 23
+};
+
+static const uint kBeavisSounds2[] = {
+ 9, 3, 4, 5, 7, 14, 15, 19, 20, 22, 23, 24, 26
+};
+
+static const uint kButtheadSounds2[] = {
+ 9, 3, 4, 5, 7, 16, 14, 15, 22, 23
+};
+
+static const uint kPrincipalSounds[] = {
+ 3, 4, 5, 7
+};
+
+static const char * const kSoundFilenames[] = {
+ "loog1.aif", "loog2.aif", "loog3.aif", "loog4.aif", "loog5.aif",
+ "loog6.aif", "loog7.aif", "loog8.aif", "loog9.aif", "loog10.aif",
+ "loog11.aif", "loog12.aif", "loog13.aif", "loog14.aif", "loog15.aif",
+ "loog16.aif", "loog17.aif", "loog18.aif", "loog19.aif", "loog20.aif",
+ "loog21.aif", "loog22.aif", "loog23.aif", "loog24.aif", "loog25.aif",
+ "loog26.aif", "loog27.aif", "meghoker.aif", "spit1.aif", "megaloog.aif",
+ "megaspit.aif", "gamemuse.aif", "bing.aif", "carhit.aif", "bikehit.aif",
+ "squirhit.aif", "planehit.aif", "bing2.aif"
+};
+
+static const uint kSoundFilenamesCount = ARRAYSIZE(kSoundFilenames);
+
+void MinigameBbLoogie::buildDrawList(DrawList &drawList) {
+ switch (_gameState) {
+ case kGSTitleScreen:
+ buildDrawList0(drawList);
+ break;
+ case kGSMainGame:
+ buildDrawList1(drawList);
+ break;
+ case kGSStandaloneGame:
+ buildDrawList2(drawList);
+ break;
+ case kGSScoreCountUp:
+ buildDrawList3(drawList);
+ break;
+ }
+}
+
+void MinigameBbLoogie::buildDrawList0(DrawList &drawList) {
+ drawList.add(_objects[0].anim->frameIndices[_objects[0].frameIndex], _objects[0].x, _objects[0].y, 2000);
+ for (int i = 1; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind != 0)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->y + 16);
+ }
+ if (_titleScreenSpriteIndex)
+ drawList.add(_titleScreenSpriteIndex, 0, 0, 0);
+}
+
+void MinigameBbLoogie::buildDrawList1(DrawList &drawList) {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ switch (obj->kind) {
+ case 0:
+ // Empty object
+ break;
+ case 2:
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, 400);
+ break;
+ case 3:
+ drawList.add(obj->anim->frameIndices[obj->frameIndex + obj->frameIndexAdd], obj->x, obj->y, 1000);
+ break;
+ case 7:
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, 390);
+ break;
+ case 8:
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, 1000);
+ break;
+ default:
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->y + 16);
+ break;
+ }
+ }
+
+ if (_backgroundSpriteIndex)
+ drawList.add(_backgroundSpriteIndex, 0, 0, 0);
+
+ if (_fromMainGame) {
+ drawList.add(getAnimation(8)->frameIndices[0], 8, 2, 2000);
+ drawNumber(drawList, _numberOfHits, 56, 16);
+ } else {
+ drawList.add(getAnimation(10)->frameIndices[0], 230, 2, 2000);
+ drawNumber(drawList, _levelTimeLeft, 280, 16);
+ drawList.add(getAnimation(15)->frameIndices[0], 5, 2, 2000);
+ int numberX2 = drawNumber(drawList, _currScore, 68, 16);
+ drawList.add(getAnimation(9)->frameIndices[10], numberX2, 16, 2000);
+ drawNumber(drawList, _dispLevelScore, numberX2 + 10, 16);
+ }
+
+ for (int i = 0; i < _megaLoogieCount; ++i)
+ drawList.add(getAnimation(19)->frameIndices[0], 20 + i * 25, 236, 2000);
+
+}
+
+void MinigameBbLoogie::buildDrawList2(DrawList &drawList) {
+
+ buildDrawList1(drawList);
+
+ if (_level > 0 && (_bonusDisplayDelay1 > 0 || _bonusDisplayDelay2 > 0)) {
+ drawList.add(getAnimation(12)->frameIndices[0], 100, 80, 2000);
+ drawNumber(drawList, _timeBonusCtr, 212, 94);
+ }
+
+ if (_bonusDisplayDelay3 > 0) {
+ drawList.add(getAnimation(14)->frameIndices[0], 65, 80, 2000);
+ int numberX2 = drawNumber(drawList, _nextLevelScore, 170, 92);
+ drawList.add(getAnimation(11)->frameIndices[0], numberX2, 80, 2000);
+ }
+
+}
+
+void MinigameBbLoogie::buildDrawList3(DrawList &drawList) {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind == 2)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, 400);
+ else
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->y + 16);
+ }
+
+ if (_backgroundSpriteIndex)
+ drawList.add(_backgroundSpriteIndex, 0, 0, 0);
+
+ drawList.add(getAnimation(10)->frameIndices[0], 230, 2, 2000);
+
+ drawNumber(drawList, _levelTimeLeft, 280, 16);
+
+ drawList.add(getAnimation(15)->frameIndices[0], 5, 2, 2000);
+
+ int numberX2 = drawNumber(drawList, _currScore, 68, 16);
+ drawList.add(getAnimation(9)->frameIndices[10], numberX2, 16, 2000);
+ drawNumber(drawList, _dispLevelScore, numberX2 + 10, 16);
+
+ drawList.add(getAnimation(20)->frameIndices[0], 120, 70, 2000);
+ drawList.add(getAnimation(13)->frameIndices[0], 95, 95, 2000);
+
+ drawNumber(drawList, _hiScore, 210, 109);
+
+}
+
+void MinigameBbLoogie::drawSprites() {
+ DrawList drawList;
+ buildDrawList(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+void MinigameBbLoogie::initObjs() {
+ for (int i = 0; i < kMaxObjectsCount; ++i)
+ _objects[i].kind = 0;
+}
+
+MinigameBbLoogie::Obj *MinigameBbLoogie::getFreeObject() {
+ for (int i = 0; i < kMaxObjectsCount; ++i)
+ if (_objects[i].kind == 0)
+ return &_objects[i];
+ return 0;
+}
+
+MinigameBbLoogie::Obj *MinigameBbLoogie::findLoogieObj(int startObjIndex) {
+ for (int i = startObjIndex; i < kMaxObjectsCount; ++i)
+ if (_objects[i].kind == 3)
+ return &_objects[i];
+ return 0;
+}
+
+bool MinigameBbLoogie::isHit(Obj *obj1, Obj *obj2) {
+ const BBRect &frameRect1 = obj1->anim->frameRects[obj1->frameIndex];
+ const BBRect &frameRect2 = obj2->anim->frameRects[obj2->frameIndex];
+ const int obj1X1 = obj1->x + frameRect1.x;
+ const int obj1Y1 = obj1->y + frameRect1.y;
+ const int obj1X2 = obj1X1 + frameRect1.width;
+ const int obj1Y2 = obj1Y1 + frameRect1.height;
+ const int obj2X1 = obj2->x + frameRect2.x;
+ const int obj2Y1 = obj2->y + frameRect2.y;
+ const int obj2X2 = obj2X1 + frameRect2.width;
+ const int obj2Y2 = obj2Y1 + frameRect2.height;
+ return obj1X1 <= obj2X2 && obj1X2 >= obj2X1 && obj1Y1 <= obj2Y2 && obj1Y2 >= obj2Y1;
+}
+
+bool MinigameBbLoogie::isCursorAtObj(int objIndex) {
+ return isHit(&_objects[0], &_objects[objIndex]);
+}
+
+void MinigameBbLoogie::initObjects() {
+ switch (_gameState) {
+ case kGSTitleScreen:
+ initObjects0();
+ break;
+ case kGSMainGame:
+ initObjects1();
+ break;
+ case kGSStandaloneGame:
+ // Nothing
+ break;
+ case kGSScoreCountUp:
+ initObjects3();
+ break;
+ }
+}
+
+void MinigameBbLoogie::initObjects0() {
+ initObjs();
+ _objects[0].anim = getAnimation(25);
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = getAnimation(25)->frameTicks[0];
+ _objects[0].x = 160;
+ _objects[0].y = 120;
+ _objects[0].kind = 1;
+ _objects[1].anim = getAnimation(21);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = getAnimation(21)->frameTicks[0];
+ _objects[1].x = 40;
+ _objects[1].y = 240;
+ _objects[1].kind = 1;
+ _objects[2].anim = getAnimation(23);
+ _objects[2].frameIndex = 0;
+ _objects[2].ticks = getAnimation(23)->frameTicks[0];
+ _objects[2].x = 280;
+ _objects[2].y = 240;
+ _objects[2].kind = 1;
+ _objects[3].anim = getAnimation(22);
+ _objects[3].frameIndex = 0;
+ _objects[3].ticks = getAnimation(22)->frameTicks[0];
+ _objects[3].x = 40;
+ _objects[3].y = 240;
+ _objects[3].kind = 0;
+ _objects[4].anim = getAnimation(24);
+ _objects[4].frameIndex = 0;
+ _objects[4].ticks = getAnimation(24)->frameTicks[0];
+ _objects[4].x = 280;
+ _objects[4].y = 240;
+ _objects[4].kind = 0;
+}
+
+void MinigameBbLoogie::initObjects1() {
+ initObjs();
+ _objects[0].anim = _playerAnim;
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = _playerAnim->frameTicks[0];
+ _objects[0].status = 0;
+ _objects[0].x = 160;
+ _objects[0].y = 240;
+ _objects[0].kind = 1;
+ _objects[1].anim = getAnimation(4);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = getAnimation(4)->frameTicks[0];
+ _objects[1].x = 248;
+ _objects[1].y = 24;
+ _objects[1].kind = 2;
+}
+
+void MinigameBbLoogie::initObjects3() {
+ initObjs();
+ _objects[0].anim = _playerAnim;
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = _playerAnim->frameTicks[0];
+ _objects[0].status = 0;
+ _objects[0].kind = 1;
+ _objects[1].anim = getAnimation(4);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = getAnimation(4)->frameTicks[0];
+ _objects[1].x = 248;
+ _objects[1].y = 24;
+ _objects[1].kind = 2;
+}
+
+void MinigameBbLoogie::initVars() {
+ switch (_gameState) {
+ case kGSTitleScreen:
+ initVars0();
+ break;
+ case kGSMainGame:
+ initVars1();
+ break;
+ case kGSStandaloneGame:
+ initVars2();
+ break;
+ case kGSScoreCountUp:
+ initVars3();
+ break;
+ }
+}
+
+void MinigameBbLoogie::initVars0() {
+ _carDelay = 120;
+ _bikeDelay = 250;
+ _squirrelDelay = 40;
+ _paperPlaneDelay = 400; // Uninitialized in the original
+ _principalDelay = 1750;
+ _levelTimeDelay = 58;
+ _principalAngry = false;
+ _squirrelDirection = false;
+ _numberOfHits = 0;
+ _megaLoogieCount = 0;
+ _level = 0;
+ _levelTimeLeft = 0;
+ _currScore = 0;
+ _dispLevelScore = 0;
+}
+
+void MinigameBbLoogie::initVars1() {
+ _carDelay = 120;
+ _bikeDelay = 250;
+ _squirrelDelay = 40;
+ _paperPlaneDelay = 400; // Uninitialized in the original
+ _principalDelay = 1750;
+ _squirrelDirection = false;
+ _numberOfHits = 0;
+ _megaLoogieCount = 0;
+}
+
+void MinigameBbLoogie::initVars2() {
+ _timeBonusCtr = _levelTimeLeft;
+ _levelTimeDelay = 58;
+ _bonusDisplayDelay1 = 60;
+ _levelTimeLeft = kLevelTimes[_level];
+ _nextLevelScore = kLevelScores[_level] + _currScore;
+ _bonusDisplayDelay2 = 0;
+ _bonusDisplayDelay3 = 0;
+}
+
+void MinigameBbLoogie::initVars3() {
+ if (_currScore > _hiScore)
+ _hiScore = _currScore;
+ if (_playerKind) {
+ playSound(11);
+ } else {
+ playSound(21);
+ }
+}
+
+bool MinigameBbLoogie::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
+ switch (_gameState) {
+ case kGSTitleScreen:
+ return updateStatus0(mouseX, mouseY, mouseButtons);
+ case kGSMainGame:
+ return updateStatus1(mouseX, mouseY, mouseButtons);
+ case kGSStandaloneGame:
+ return updateStatus2(mouseX, mouseY, mouseButtons);
+ case kGSScoreCountUp:
+ return updateStatus3(mouseX, mouseY, mouseButtons);
+ }
+ return false;
+}
+
+bool MinigameBbLoogie::updateStatus0(int mouseX, int mouseY, uint mouseButtons) {
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ if (_objects[1].kind != 0 && isCursorAtObj(1)) {
+ _objects[0].frameIndex = 1;
+ _objects[1].kind = 0;
+ _objects[3].kind = 11;
+ _objects[3].frameIndex = 0;
+ _objects[3].ticks = _objects[3].anim->frameTicks[0];
+ } else if (!isCursorAtObj(3)) {
+ if (_objects[4].kind == 0)
+ _objects[0].frameIndex = 0;
+ _objects[3].kind = 0;
+ _objects[1].kind = 1;
+ }
+
+ if (_objects[2].kind && isCursorAtObj(2)) {
+ _objects[0].frameIndex = 1;
+ _objects[2].kind = 0;
+ _objects[4].kind = 11;
+ _objects[4].frameIndex = 0;
+ _objects[4].ticks = _objects[4].anim->frameTicks[0];
+ } else if (!isCursorAtObj(4)) {
+ if (_objects[3].kind == 0)
+ _objects[0].frameIndex = 0;
+ _objects[4].kind = 0;
+ _objects[2].kind = 1;
+ }
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind == 11) {
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex >= obj->anim->frameCount)
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+ }
+ }
+
+ if ((mouseButtons & kLeftButtonDown) &&
+ (_objects[3].kind != 0 || _objects[4].kind != 0)) {
+ if (_objects[4].kind != 0) {
+ // Beavis
+ _playerKind = 0;
+ _playerAnim = getAnimation(0);
+ _playerSounds1 = kBeavisSounds1;
+ _playerSounds1Count = 8;
+ _playerSounds2 = kBeavisSounds2;
+ _playerSounds2Count = 13;
+ playSound(15);
+ while (isSoundPlaying(15)) { }
+ } else {
+ // Butt-head
+ _playerKind = 1;
+ _playerAnim = getAnimation(1);
+ _playerSounds1 = kButtheadSounds1;
+ _playerSounds1Count = 5;
+ _playerSounds2 = kButtheadSounds2;
+ _playerSounds2Count = 10;
+ playSound(23);
+ while (isSoundPlaying(23)) { }
+ }
+ _gameState = _fromMainGame ? kGSMainGame : kGSStandaloneGame;
+ initObjects1();
+ initObjects();
+ initVars();
+ _gameTicks = 0;
+ }
+
+ return true;
+}
+
+bool MinigameBbLoogie::updateStatus1(int mouseX, int mouseY, uint mouseButtons) {
+
+ if (--_levelTimeDelay == 0) {
+ _levelTimeDelay = 58;
+ --_levelTimeLeft;
+ }
+
+ if (!_fromMainGame && _levelTimeLeft == 0) {
+ _gameState = kGSScoreCountUp;
+ initObjects();
+ initVars();
+ } else if (_fromMainGame || _currScore < _nextLevelScore) {
+ _objects->x = CLIP(mouseX, 0, 319);
+ _objects->y = 240;
+ if (!_principalAngry &&
+ ((mouseButtons & kLeftButtonDown) || ((mouseButtons & kRightButtonDown) && _megaLoogieCount)) &&
+ _objects[0].status == 0 && mouseX != 32512 && mouseY != 32512) {
+ _objects[0].ticks = _playerAnim->frameTicks[13];
+ _objects[0].frameIndex = 14;
+ _objects[0].status = 1;
+ _objects[0].unk2 = 0;
+ Obj *newObj = getFreeObject();
+ newObj->anim = getAnimation(17);
+ newObj->frameIndex = 0;
+ newObj->ticks = 1;
+ newObj->x = 0;
+ newObj->y = 140;
+ newObj->kind = 8;
+ if (mouseButtons & kLeftButtonDown) {
+ _doubleScore = 0;
+ playSound(28);
+ } else {
+ _doubleScore = 17;
+ playSound(30);
+ }
+ }
+ updateObjs(mouseButtons);
+ } else {
+ _gameState = kGSStandaloneGame;
+ ++_level;
+ initObjects();
+ initVars();
+ }
+ return true;
+}
+
+bool MinigameBbLoogie::updateStatus2(int mouseX, int mouseY, uint mouseButtons) {
+
+ _objects[0].x = mouseX;
+
+ if (_bonusDisplayDelay1 > 0) {
+ if (--_bonusDisplayDelay1 == 0) {
+ _bonusDisplayDelay2 = 60;
+ if (_timeBonusCtr)
+ playSound(33, true);
+ }
+ } else if (_bonusDisplayDelay2 > 0) {
+ if (--_bonusDisplayDelay2 == 0) {
+ _bonusDisplayDelay3 = 150;
+ playSound(38);
+ } else if (_timeBonusCtr > 0) {
+ ++_bonusDisplayDelay2;
+ ++_levelTimeLeft;
+ if (--_timeBonusCtr == 0)
+ stopSound(33);
+ }
+ } else if (_bonusDisplayDelay3 > 0) {
+ if ((mouseButtons & kAnyButtonDown) || (--_bonusDisplayDelay3 == 0)) {
+ _dispLevelScore = _nextLevelScore;
+ _gameState = kGSMainGame;
+ _gameTicks = 0;
+ }
+ }
+ return true;
+}
+
+bool MinigameBbLoogie::updateStatus3(int mouseX, int mouseY, uint mouseButtons) {
+
+ _objects[0].x = mouseX;
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind == 2) {
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex >= obj->anim->frameCount)
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+ }
+ }
+
+ return true;
+}
+
+void MinigameBbLoogie::updateObjs(uint mouseButtons) {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ switch (obj->kind) {
+ case 1:
+ updatePlayer(i, mouseButtons);
+ break;
+ case 2:
+ updateObjKind2(i);
+ break;
+ case 3:
+ updateLoogie(i);
+ break;
+ case 4:
+ updateCar(i);
+ break;
+ case 5:
+ updateBike(i);
+ break;
+ case 6:
+ updateSquirrel(i);
+ break;
+ case 7:
+ updatePaperPlane(i);
+ break;
+ case 8:
+ updateIndicator(i);
+ break;
+ case 9:
+ updatePrincipal(i);
+ break;
+ }
+ }
+
+ if (--_carDelay == 0) {
+ // Car
+ Obj *obj = getFreeObject();
+ obj->anim = getAnimation(2);
+ obj->kind = 4;
+ obj->frameIndex = 0;
+ obj->x = 379;
+ obj->y = 22;
+ obj->xIncr = -2;
+ obj->yIncr = 0;
+ _carDelay = _vm->getRandom(256) + 800;
+ }
+
+ if (--_bikeDelay == 0) {
+ // Bike
+ Obj *obj = getFreeObject();
+ obj->kind = 5;
+ obj->anim = getAnimation(3);
+ obj->frameIndex = 0;
+ obj->x = 360;
+ obj->y = _vm->getRandom(32) + 82;
+ obj->xIncr = -1;
+ obj->yIncr = 0;
+ _bikeDelay = _vm->getRandom(512) + 500;
+ }
+
+ if (--_squirrelDelay == 0) {
+ // Squirrel
+ Obj *obj = getFreeObject();
+ obj->kind = 6;
+ obj->anim = getAnimation(7);
+ obj->frameIndex = !_squirrelDirection ? 0 : 29;
+ obj->x = 160;
+ obj->y = 36;
+ obj->xIncr = 0;
+ obj->yIncr = 0;
+ _squirrelDirection = !_squirrelDirection;
+ if (_vm->getRandom(5) == 1 && !isAnySoundPlaying(_playerSounds2, _playerSounds2Count))
+ playSound(9);
+ _squirrelDelay = _vm->getRandom(512) + 300;
+ }
+
+ if (--_paperPlaneDelay == 0) {
+ // Paper plane
+ Obj *obj = getFreeObject();
+ obj->kind = 7;
+ obj->anim = getAnimation(16);
+ obj->frameIndex = 0;
+ obj->x = 86;
+ obj->y = 187;
+ obj->xIncr = 0;
+ obj->yIncr = -1;
+ switch (_vm->getRandom(3)) {
+ case 1:
+ obj->frameIndex = 1;
+ obj->xIncr = -1;
+ break;
+ case 2:
+ obj->frameIndex = 7;
+ obj->xIncr = 1;
+ break;
+ }
+ _paperPlaneDelay = 400;
+ }
+
+ if (_principalDelay >= 0 && --_principalDelay == 0) {
+ // Principal
+ Obj *obj = getFreeObject();
+ obj->kind = 9;
+ obj->anim = getAnimation(18);
+ obj->frameIndex = 11;
+ obj->x = -20;
+ obj->y = 130;
+ obj->xIncr = 1;
+ obj->yIncr = 0;
+ obj->status = 0;
+ obj->frameIndexAdd = 0;
+ obj->unk2 = _vm->getRandom(256) + 100;
+ _principalCtr = 0;
+ _principalFirstFrameIndex = 11;
+ _principalLastFrameIndex = 16;
+ }
+
+}
+
+void MinigameBbLoogie::updatePlayer(int objIndex, uint mouseButtons) {
+
+ Obj *obj = &_objects[0];
+
+ switch (obj->status) {
+
+ case 1:
+ if (obj->ticks-- == 0) {
+ if (obj->frameIndex != 15) {
+ ++obj->frameIndex;
+ obj->ticks = _playerAnim->frameTicks[obj->frameIndex];
+ }
+ }
+ if ((((mouseButtons & kLeftButtonDown) && _doubleScore == 0) ||
+ ((mouseButtons & kRightButtonDown) && _doubleScore == 17))
+ && obj->unk2 != 61) {
+ ++obj->unk2;
+ } else {
+ obj->status = 2;
+ obj->frameIndex = 16;
+ obj->ticks = _playerAnim->frameTicks[16];
+ if (obj->unk2 >= 30) {
+ obj->status = 3;
+ obj->frameIndex = 21;
+ obj->ticks = _playerAnim->frameTicks[21];
+ }
+ if (obj->unk2 < 30) {
+ Obj *newObj = getFreeObject();
+ newObj->kind = 3;
+ newObj->anim = getAnimation(5);
+ newObj->frameIndex = 0;
+ newObj->ticks = getAnimation(5)->frameTicks[0];
+ newObj->x = obj->x;
+ newObj->y = 172;
+ newObj->unk2 = obj->unk2;
+ newObj->frameIndexAdd = _doubleScore;
+ if (_doubleScore)
+ --_megaLoogieCount;
+ }
+ if (_doubleScore) {
+ stopSound(30);
+ playSound(31);
+ } else {
+ stopSound(28);
+ playSound(29);
+ }
+ }
+ break;
+
+ case 2:
+ if (obj->ticks-- == 0) {
+ if (obj->frameIndex == 17) {
+ obj->frameIndex = 0;
+ obj->status = 0;
+ } else {
+ ++obj->frameIndex;
+ obj->ticks = _playerAnim->frameTicks[obj->frameIndex];
+ }
+ }
+ break;
+
+ case 3:
+ if (obj->ticks-- == 0) {
+ if (obj->frameIndex == 23) {
+ obj->frameIndex = 0;
+ obj->status = 0;
+ } else {
+ ++obj->frameIndex;
+ obj->ticks = _playerAnim->frameTicks[obj->frameIndex];
+ if (obj->frameIndex == 22) {
+ Obj *newObj = getFreeObject();
+ newObj->kind = 3;
+ newObj->anim = getAnimation(5);
+ newObj->frameIndex = 0;
+ newObj->ticks = getAnimation(5)->frameTicks[0];
+ newObj->x = obj->x;
+ newObj->y = 154;
+ newObj->unk2 = obj->unk2;
+ newObj->frameIndexAdd = _doubleScore;
+ if (_doubleScore)
+ --_megaLoogieCount;
+ }
+ }
+ }
+ break;
+
+ }
+
+}
+
+void MinigameBbLoogie::updateObjKind2(int objIndex) {
+
+ Obj *obj = &_objects[objIndex];
+
+ if (obj->ticks-- == 0) {
+ obj->ticks = getAnimation(4)->frameTicks[0];
+ if (obj->frameIndex > 7)
+ obj->frameIndex = 1;
+ if (obj->frameIndex++ >= 7)
+ obj->frameIndex = 0;
+ }
+
+}
+
+void MinigameBbLoogie::updateLoogie(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ if (obj->unk2 > 0) {
+ obj->y -= kLoogieOffY[obj->unk2 / 8];
+ --obj->unk2;
+ }
+
+ if (obj->ticks-- == 0) {
+ obj->ticks = getAnimation(5)->frameTicks[0];
+ ++obj->frameIndex;
+ if (obj->frameIndex >= 17) {
+ obj->kind = 0;
+ obj->anim = getAnimation(6);
+ obj->frameIndex = 0;
+ }
+ }
+
+}
+
+void MinigameBbLoogie::updateCar(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->x += obj->xIncr;
+
+ if (obj->ticks-- == 0) {
+ if (obj->frameIndex++ == 3 || obj->frameIndex == 6)
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(2)->frameTicks[obj->frameIndex];
+ }
+
+ if (obj->x <= -60) {
+ obj->kind = 0;
+ obj->anim = getAnimation(6);
+ obj->frameIndex = 0;
+ } else if (!_principalAngry && obj->frameIndex <= 3) {
+ int loogieObjIndex = 0;
+ Obj *loogieObj = findLoogieObj(loogieObjIndex++);
+ while (loogieObj) {
+ if (loogieObj->frameIndex >= 8 && loogieObj->frameIndex <= 10 && isHit(obj, loogieObj)) {
+ incNumberOfHits();
+ incScore(7);
+ loogieObj->frameIndex = 13;
+ loogieObj->ticks = getAnimation(5)->frameTicks[12];
+ obj->frameIndex = 4;
+ obj->ticks = getAnimation(2)->frameTicks[4];
+ playSound(34);
+ playRndSound();
+ }
+ loogieObj = findLoogieObj(loogieObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbLoogie::updateBike(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->x += obj->xIncr;
+
+ if (obj->ticks-- == 0) {
+ if (obj->frameIndex++ == 3 || obj->frameIndex == 7)
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(3)->frameTicks[obj->frameIndex];
+ }
+
+ if (obj->x == -40) {
+ obj->kind = 0;
+ obj->anim = getAnimation(6);
+ obj->frameIndex = 0;
+ } else if (!_principalAngry && obj->frameIndex <= 3) {
+ int loogieObjIndex = 0;
+ Obj *loogieObj = findLoogieObj(loogieObjIndex++);
+ while (loogieObj) {
+ if (loogieObj->frameIndex >= 7 && loogieObj->frameIndex <= 11 && isHit(obj, loogieObj)) {
+ incNumberOfHits();
+ incScore(2);
+ loogieObj->frameIndex = 13;
+ loogieObj->ticks = getAnimation(5)->frameTicks[12];
+ obj->frameIndex = 4;
+ obj->ticks = getAnimation(3)->frameTicks[4];
+ playSound(35);
+ playRndSound();
+ }
+ loogieObj = findLoogieObj(loogieObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbLoogie::updateSquirrel(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ if (obj->ticks-- == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 29 || obj->frameIndex == 54 ||
+ obj->frameIndex == 58 || obj->frameIndex == 62) {
+ obj->kind = 0;
+ obj->anim = getAnimation(6);
+ obj->frameIndex = 0;
+ }
+ obj->ticks = getAnimation(7)->frameTicks[obj->frameIndex];
+ }
+
+ if (!_principalAngry && obj->frameIndex <= 53) {
+ int loogieObjIndex = 0;
+ Obj *loogieObj = findLoogieObj(loogieObjIndex++);
+ while (loogieObj) {
+ if (loogieObj->frameIndex >= 7 && loogieObj->frameIndex <= 9 && isHit(obj, loogieObj)) {
+ incNumberOfHits();
+ incScore(10);
+ loogieObj->frameIndex = 13;
+ loogieObj->ticks = getAnimation(5)->frameTicks[12];
+ obj->x += kSquirrelOffX[obj->frameIndex];
+ obj->frameIndex = obj->frameIndex < 29 ? 54 : 58;
+ obj->ticks = getAnimation(7)->frameTicks[obj->frameIndex];
+ playSound(36);
+ playRndSound();
+ }
+ loogieObj = findLoogieObj(loogieObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbLoogie::updatePaperPlane(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+
+ if (obj->x == -16 || obj->x == 336 || obj->y == -16) {
+ obj->kind = 0;
+ obj->anim = getAnimation(6);
+ obj->frameIndex = 0;
+ }
+
+ if (!_principalAngry && obj->frameIndex <= 53) {
+ int loogieObjIndex = 0;
+ Obj *loogieObj = findLoogieObj(loogieObjIndex++);
+ while (loogieObj) {
+ if (loogieObj->frameIndex >= 4 && loogieObj->frameIndex <= 7 && isHit(obj, loogieObj)) {
+ incNumberOfHits();
+ incScore(5);
+ loogieObj->frameIndex = 13;
+ loogieObj->ticks = getAnimation(5)->frameTicks[12];
+ obj->frameIndex = (obj->frameIndex + 1) % 8;
+ obj->xIncr = kPlaneOffX[obj->frameIndex];
+ obj->yIncr = kPlaneOffY[obj->frameIndex];
+ playSound(37);
+ playRndSound();
+ }
+ loogieObj = findLoogieObj(loogieObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbLoogie::updateIndicator(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+ Obj *loogieObj = &_objects[0];
+
+ if (obj->ticks-- == 0) {
+ obj->frameIndex = (obj->frameIndex + 1) % 2;
+ obj->ticks = getAnimation(17)->frameTicks[0];
+ }
+
+ if (loogieObj->status != 0) {
+ int unk2mod = loogieObj->unk2 / 8;
+ int unk2div = loogieObj->unk2 / 8 * 8;
+ int v6 = 0;
+ if (unk2div > 8) {
+ int v7 = 1;
+ do {
+ v6 += 8 * kLoogieOffY[v7++];
+ } while (v7 != unk2mod);
+ }
+ int yOfs = (loogieObj->unk2 % 8 + 1) * kLoogieOffY[loogieObj->unk2 / 8] + v6;
+ if (loogieObj->unk2 >= 30)
+ yOfs += 18;
+ obj->y = 140 - yOfs;
+ } else {
+ obj->kind = 0;
+ obj->anim = getAnimation(6);
+ }
+
+}
+
+void MinigameBbLoogie::updatePrincipal(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->status) {
+
+ case 0:
+ if (obj->unk2--) {
+ if (obj->ticks-- == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == _principalLastFrameIndex)
+ obj->frameIndex = _principalFirstFrameIndex;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ ++_principalCtr;
+ if (_principalCtr % 2 != 0) {
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+ if (obj->xIncr > 0 && obj->x == 340) {
+ obj->xIncr = -1;
+ _principalLastFrameIndex = 34;
+ _principalFirstFrameIndex = 29;
+ obj->frameIndex = 29;
+ obj->status = 2;
+ obj->ticks = _vm->getRandom(256) + 60;
+ }
+ if (obj->xIncr < 0 && obj->x == -20) {
+ obj->xIncr = 1;
+ _principalLastFrameIndex = 16;
+ _principalFirstFrameIndex = 11;
+ obj->frameIndex = 11;
+ obj->status = 2;
+ obj->ticks = _vm->getRandom(256) + 60;
+ }
+ }
+ } else {
+ obj->unk2 = _vm->getRandom(64) + 20;
+ ++obj->status;
+ if (_vm->getRandom(2) == 1) {
+ obj->frameIndex = _principalFirstFrameIndex < 11 ? 17 : 26;
+ _principalFirstFrameIndex = 19;
+ } else {
+ obj->frameIndex = _principalFirstFrameIndex < 11 ? 8 : 35;
+ _principalFirstFrameIndex = 1;
+ }
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ break;
+
+ case 1:
+ if (obj->unk2--) {
+ if (obj->ticks-- == 0)
+ obj->frameIndex = _principalFirstFrameIndex;
+ } else {
+ obj->unk2 = _vm->getRandom(256) + 100;
+ ++obj->status;
+ if (_vm->getRandom(2) == 1) {
+ _principalLastFrameIndex = 16;
+ _principalFirstFrameIndex = 11;
+ obj->frameIndex = obj->frameIndex < 1 ? 8 : 17;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ obj->xIncr = 1;
+ } else {
+ _principalLastFrameIndex = 34;
+ _principalFirstFrameIndex = 29;
+ obj->frameIndex = obj->frameIndex < 1 ? 35 : 26;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ obj->xIncr = -1;
+ }
+ }
+ break;
+
+ case 2:
+ if (obj->ticks-- == 0) {
+ obj->status = 0;
+ obj->frameIndex = _principalFirstFrameIndex;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ break;
+
+ case 3:
+ if (obj->ticks-- == 0) {
+ obj->status = _prevPrincipalStatus;
+ obj->frameIndex = _principalFirstFrameIndex;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ break;
+
+ case 4:
+ if (obj->ticks-- == 0) {
+ switch (obj->frameIndex) {
+ case 8:
+ obj->frameIndex = 36;
+ break;
+ case 26:
+ obj->frameIndex = 28;
+ break;
+ case 28:
+ obj->frameIndex = 35;
+ break;
+ case 35:
+ ++obj->frameIndex;
+ break;
+ case 36:
+ obj->status = 5;
+ ++obj->frameIndex;
+ break;
+ }
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ break;
+
+ case 5:
+ if (obj->ticks-- == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 48)
+ obj->frameIndex = 36;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ if (!isSoundPlaying(1)) {
+ _gameResult = true;
+ if (_fromMainGame) {
+ _principalAngry = true;
+ if (obj->x <= 140 || obj->x >= 165) {
+ obj->status = 6;
+ if (obj->x >= 160) {
+ _principalLastFrameIndex = 34;
+ _principalFirstFrameIndex = 29;
+ obj->frameIndex = 29;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ obj->xIncr = -1;
+ } else {
+ _principalLastFrameIndex = 16;
+ _principalFirstFrameIndex = 11;
+ obj->frameIndex = 11;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ obj->xIncr = 1;
+ }
+ } else {
+ obj->status = 7;
+ _principalFirstFrameIndex = 2;
+ _principalLastFrameIndex = 7;
+ obj->frameIndex = 2;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ obj->xIncr = 0;
+ obj->yIncr = 1;
+ }
+ } else {
+ obj->status = _prevPrincipalStatus;
+ obj->frameIndex = _principalFirstFrameIndex;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ }
+ break;
+
+ case 6:
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+ if (obj->ticks-- == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == _principalLastFrameIndex)
+ obj->frameIndex = _principalFirstFrameIndex;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ if (obj->x > 145 && obj->x < 160) {
+ obj->status = 7;
+ _principalFirstFrameIndex = 2;
+ _principalLastFrameIndex = 7;
+ obj->frameIndex = 2;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ obj->xIncr = 0;
+ obj->yIncr = 1;
+ }
+ break;
+
+ case 7:
+ obj->x += obj->xIncr;
+ obj->y += obj->yIncr;
+ if (obj->ticks-- == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == _principalLastFrameIndex)
+ obj->frameIndex = _principalFirstFrameIndex;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ }
+ if (obj->y > 175) {
+ // Angry principal enters school, end the minigame
+ _gameDone = true;
+ }
+ break;
+
+ }
+
+ if (!_principalAngry) {
+ int loogieObjIndex = 0;
+ Obj *loogieObj = findLoogieObj(loogieObjIndex++);
+ while (loogieObj) {
+ if (loogieObj->frameIndex >= 7 && loogieObj->frameIndex <= 12 && isHit(obj, loogieObj)) {
+ incNumberOfHits();
+ incScore(1);
+ loogieObj->frameIndex = 13;
+ loogieObj->ticks = getAnimation(5)->frameTicks[12];
+ if (obj->status != 3 && obj->status != 4 && obj->status != 5) {
+ _prevPrincipalStatus = obj->status;
+ obj->status = 3;
+ if (_principalFirstFrameIndex == 1 || _principalFirstFrameIndex == 19)
+ obj->frameIndex = _principalFirstFrameIndex - 1;
+ else
+ obj->frameIndex = _principalFirstFrameIndex - 2;
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ if (loogieObj->frameIndexAdd > 0) {
+ obj->status = 4;
+ switch (obj->frameIndex) {
+ case 0:
+ obj->frameIndex = 36;
+ break;
+ case 9:
+ obj->frameIndex = 8;
+ break;
+ case 27:
+ obj->frameIndex = 35;
+ break;
+ case 18:
+ obj->frameIndex = 26;
+ break;
+ }
+ obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex];
+ playSound(1);
+ } else {
+ if (!isAnySoundPlaying(_playerSounds2, _playerSounds2Count))
+ playSound(kPrincipalSounds[_vm->getRandom(4)]);
+ playRndSound();
+ }
+ }
+ }
+ loogieObj = findLoogieObj(loogieObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbLoogie::incNumberOfHits() {
+ ++_numberOfHits;
+ if (_numberOfHits == 1000)
+ _numberOfHits = 0;
+ if (_numberOfHits % 10 == 0) {
+ ++_megaLoogieCount;
+ if (_megaLoogieCount > 11)
+ _megaLoogieCount = 11;
+ }
+}
+
+void MinigameBbLoogie::incScore(int incrAmount) {
+ if (_doubleScore)
+ _currScore += 2 * incrAmount;
+ else
+ _currScore += incrAmount;
+}
+
+void MinigameBbLoogie::playRndSound() {
+ if (!isAnySoundPlaying(_playerSounds2, _playerSounds2Count))
+ playSound(_playerSounds1[_vm->getRandom(_playerSounds1Count)]);
+}
+
+bool MinigameBbLoogie::run(bool fromMainGame) {
+
+ memset(_objects, 0, sizeof(_objects));
+
+ _numbersAnim = getAnimation(9);
+
+ _backgroundSpriteIndex = 210;
+ _titleScreenSpriteIndex = 211;
+
+ _fromMainGame = fromMainGame;
+
+ _hiScore = 0;
+ if (!_fromMainGame)
+ _hiScore = loadHiscore(kMinigameBbLoogie);
+
+ _gameState = kGSTitleScreen;
+ _gameTicks = 0;
+ _gameResult = false;
+ _gameDone = false;
+ initObjects();
+ initVars();
+
+ _spriteModule = new SpriteModule();
+ _spriteModule->load("bbloogie/bbloogie.000");
+
+ Palette palette = _spriteModule->getPalette();
+ _vm->_screen->setPalette(palette);
+
+ loadSounds();
+
+ playSound(32, true);
+
+ while (!_vm->shouldQuit() &&!_gameDone) {
+ _vm->updateEvents();
+ update();
+ }
+
+ _vm->_sound->unloadSounds();
+
+ if (!_fromMainGame)
+ saveHiscore(kMinigameBbLoogie, _hiScore);
+
+ delete _spriteModule;
+
+ return _gameResult;
+}
+
+void MinigameBbLoogie::update() {
+
+ int inputTicks;
+
+ if (_gameTicks > 0) {
+ int currTicks = _vm->_system->getMillis();
+ inputTicks = (currTicks - _gameTicks) / 17;
+ _gameTicks = currTicks - (currTicks - _gameTicks) % 17;
+ } else {
+ inputTicks = 1;
+ _gameTicks = _vm->_system->getMillis();
+ }
+
+ if (_vm->_keyCode == Common::KEYCODE_ESCAPE) {
+ _gameDone = true;
+ return;
+ }
+
+ if (inputTicks == 0)
+ return;
+
+ bool done;
+
+ do {
+ done = !updateStatus(_vm->_mouseX, _vm->_mouseY, _vm->_mouseButtons);
+ _vm->_mouseButtons &= ~kLeftButtonClicked;
+ _vm->_mouseButtons &= ~kRightButtonClicked;
+ _vm->_keyCode = Common::KEYCODE_INVALID;
+ } while (--inputTicks && _gameTicks > 0 && !done);
+
+ drawSprites();
+
+ _vm->_system->delayMillis(10);
+
+}
+
+void MinigameBbLoogie::loadSounds() {
+ for (uint i = 0; i < kSoundFilenamesCount; ++i) {
+ Common::String filename = Common::String::format("bbloogie/%s", kSoundFilenames[i]);
+ _vm->_sound->loadSound(filename.c_str());
+ }
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbloogie.h b/engines/bbvs/minigames/bbloogie.h
new file mode 100644
index 0000000000..1dd4049b41
--- /dev/null
+++ b/engines/bbvs/minigames/bbloogie.h
@@ -0,0 +1,141 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_MINIGAMES_BBLOOGIE_H
+#define BBVS_MINIGAMES_BBLOOGIE_H
+
+#include "bbvs/minigames/minigame.h"
+
+namespace Bbvs {
+
+class MinigameBbLoogie : public Minigame {
+public:
+ MinigameBbLoogie(BbvsEngine *vm) : Minigame(vm) {};
+ bool run(bool fromMainGame);
+public:
+
+ struct Obj {
+ int kind;
+ int x, y;
+ int xIncr, yIncr;
+ const ObjAnimation *anim;
+ int frameIndex;
+ int ticks;
+ int status;
+ int16 frameIndexAdd;
+ int16 unk2;
+ };
+
+ enum {
+ kMaxObjectsCount = 256
+ };
+
+ enum {
+ kGSTitleScreen = 0, // Title screen
+ kGSMainGame = 1, // Game when called as part of the main game
+ kGSStandaloneGame = 2, // Game when called as standalone game
+ kGSScoreCountUp = 3 // Score countup and next level text
+ };
+
+ Obj _objects[kMaxObjectsCount];
+
+ int _playerKind;
+ const ObjAnimation *_playerAnim;
+ const uint *_playerSounds1, *_playerSounds2;
+ uint _playerSounds1Count, _playerSounds2Count;
+
+ int _level, _levelTimeLeft, _levelTimeDelay;
+ int _numberOfHits, _currScore, _hiScore;
+ int _doubleScore, _megaLoogieCount;
+
+ int _dispLevelScore, _nextLevelScore;
+
+ int _timeBonusCtr, _bonusDisplayDelay1, _bonusDisplayDelay2, _bonusDisplayDelay3;
+
+ int _carDelay;
+ int _bikeDelay;
+ int _squirrelDelay;
+ bool _squirrelDirection;
+ int _paperPlaneDelay;
+ int _principalDelay;
+
+ int _prevPrincipalStatus;
+ int _principalCtr, _principalFirstFrameIndex, _principalLastFrameIndex;
+ bool _principalAngry;
+
+ const ObjAnimation *getAnimation(int animIndex);
+
+ void buildDrawList(DrawList &drawList);
+ void buildDrawList0(DrawList &drawList);
+ void buildDrawList1(DrawList &drawList);
+ void buildDrawList2(DrawList &drawList);
+ void buildDrawList3(DrawList &drawList);
+
+ void drawSprites();
+
+ void initObjs();
+ Obj *getFreeObject();
+ Obj *findLoogieObj(int startObjIndex);
+ bool isHit(Obj *obj1, Obj *obj2);
+ bool isCursorAtObj(int objIndex);
+
+ void initObjects();
+ void initObjects0();
+ void initObjects1();
+ void initObjects3();
+
+ void initVars();
+ void initVars0();
+ void initVars1();
+ void initVars2();
+ void initVars3();
+
+ bool updateStatus(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus0(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus1(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus2(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus3(int mouseX, int mouseY, uint mouseButtons);
+
+ void updateObjs(uint mouseButtons);
+ void updatePlayer(int objIndex, uint mouseButtons);
+ void updateObjKind2(int objIndex);
+ void updateLoogie(int objIndex);
+ void updateCar(int objIndex);
+ void updateBike(int objIndex);
+ void updateSquirrel(int objIndex);
+ void updatePaperPlane(int objIndex);
+ void updateIndicator(int objIndex);
+ void updatePrincipal(int objIndex);
+
+ void incNumberOfHits();
+ void incScore(int incrAmount);
+ void playRndSound();
+
+ void update();
+
+ void loadSounds();
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_MINIGAMES_BBLOOGIE_H
diff --git a/engines/bbvs/minigames/bbloogie_anims.cpp b/engines/bbvs/minigames/bbloogie_anims.cpp
new file mode 100644
index 0000000000..a82be8a279
--- /dev/null
+++ b/engines/bbvs/minigames/bbloogie_anims.cpp
@@ -0,0 +1,138 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbloogie.h"
+
+namespace Bbvs {
+
+static const int kAnim0FrameIndices[] = {0, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 0, 5, 6, 7, 0, 0, 5, 6, 7, 8, 0, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 0};
+static const int16 kAnim0FrameTicks[] = {22, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 8, 8, 10, 10, 10, 8, 22, 6, 12, 20, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 22};
+static const BBRect kAnim0FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim1FrameIndices[] = {9, 10, 11, 12, 13, 10, 11, 12, 13, 10, 11, 12, 13, 9, 14, 15, 16, 9, 9, 14, 15, 16, 17, 9, 13, 12, 11, 10, 13, 12, 11, 10, 13, 12, 11, 10, 9};
+static const int16 kAnim1FrameTicks[] = {22, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 8, 8, 10, 10, 10, 8, 22, 6, 12, 20, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 22};
+static const BBRect kAnim1FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim2FrameIndices[] = {18, 19, 20, 18, 21, 22};
+static const int16 kAnim2FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim2FrameRects[] = {{-45, -43, 86, 38}, {-45, -43, 86, 38}, {-45, -43, 86, 38}, {-45, -43, 86, 38}, {-45, -43, 86, 38}, {-45, -43, 86, 38}};
+static const int kAnim3FrameIndices[] = {23, 24, 25, 26, 27, 28, 27};
+static const int16 kAnim3FrameTicks[] = {6, 6, 6, 6, 6, 7, 6};
+static const BBRect kAnim3FrameRects[] = {{-24, -17, 48, 14}, {-24, -17, 48, 14}, {-24, -17, 48, 14}, {-24, -17, 48, 14}, {-24, -17, 48, 14}, {-24, -17, 48, 14}, {-24, -17, 48, 14}};
+static const int kAnim4FrameIndices[] = {29, 30, 31, 32, 33, 34, 35, 36};
+static const int16 kAnim4FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim4FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim5FrameIndices[] = {37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70};
+static const int16 kAnim5FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim5FrameRects[] = {{-1, -11, 4, 11}, {-2, -15, 6, 8}, {-3, -24, 8, 8}, {-3, -31, 7, 9}, {-3, -33, 8, 8}, {-3, -34, 8, 10}, {-2, -34, 7, 8}, {-1, -34, 6, 7}, {-1, -34, 5, 6}, {-1, -34, 4, 4}, {0, -34, 3, 4}, {-1, -34, 4, 3}, {0, -34, 3, 4}, {0, -33, 3, 3}, {-1, -35, 5, 5}, {-3, -37, 9, 9}, {-4, -39, 12, 13}, {-3, -11, 7, 8}, {-3, -15, 8, 9}, {-5, -24, 11, 13}, {-4, -31, 10, 13}, {-5, -34, 11, 13}, {-5, -34, 11, 11}, {-4, -34, 9, 10}, {-4, -34, 9, 9}, {-3, -34, 7, 8}, {-2, -34, 6, 7}, {-2, -34, 5, 6}, {-2, -34, 4, 5}, {-7, -38, 13, 13}, {-10, -44, 22, 22}, {-13, -47, 27, 27}, {-17, -49, 32, 30}, {-17, -50, 34, 33}};
+static const int kAnim6FrameIndices[] = {71};
+static const int16 kAnim6FrameTicks[] = {1};
+static const BBRect kAnim6FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim7FrameIndices[] = {72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 80, 79, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 110, 109, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129};
+static const int16 kAnim7FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 30, 6, 20, 6, 30, 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 6, 20, 6, 30, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim7FrameRects[] = {{-46, -6, 7, 6}, {-46, -12, 11, 12}, {-47, -15, 17, 15}, {-46, -14, 20, 12}, {-47, -10, 24, 10}, {-41, -11, 22, 11}, {-33, -10, 15, 10}, {-32, -10, 14, 10}, {-32, -9, 13, 9}, {-32, -9, 13, 9}, {-32, -9, 13, 9}, {-32, -10, 13, 10}, {-34, -11, 24, 11}, {-30, -12, 25, 9}, {-24, -10, 24, 10}, {-18, -11, 22, 11}, {-14, -11, 24, 10}, {-9, -12, 25, 9}, {-3, -10, 24, 10}, {4, -11, 22, 11}, {11, -10, 15, 10}, {12, -10, 13, 10}, {10, -11, 24, 11}, {15, -12, 25, 9}, {22, -16, 22, 16}, {34, -16, 9, 16}, {35, -12, 9, 12}, {38, -6, 6, 6}, {38, -6, 4, 4}, {36, -6, 7, 6}, {31, -12, 12, 12}, {27, -15, 17, 15}, {24, -12, 20, 12}, {19, -11, 22, 11}, {13, -11, 24, 11}, {7, -11, 25, 9}, {4, -10, 24, 10}, {1, -11, 22, 11}, {1, -10, 15, 10}, {2, -10, 13, 10}, {2, -10, 13, 10}, {2, -9, 13, 9}, {2, -10, 13, 10}, {2, -10, 13, 10}, {-7, -11, 24, 11}, {-14, -11, 25, 9}, {-21, -10, 24, 11}, {-27, -11, 23, 11}, {-34, -12, 24, 11}, {-44, -18, 22, 16}, {-44, -16, 9, 16}, {-46, -12, 9, 12}, {-45, -6, 7, 6}, {-45, -4, 6, 5}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim8FrameIndices[] = {130};
+static const int16 kAnim8FrameTicks[] = {6};
+static const BBRect kAnim8FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim9FrameIndices[] = {131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141};
+static const int16 kAnim9FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim9FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim10FrameIndices[] = {142};
+static const int16 kAnim10FrameTicks[] = {2};
+static const BBRect kAnim10FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim11FrameIndices[] = {143};
+static const int16 kAnim11FrameTicks[] = {1};
+static const BBRect kAnim11FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim12FrameIndices[] = {144};
+static const int16 kAnim12FrameTicks[] = {1};
+static const BBRect kAnim12FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim13FrameIndices[] = {145};
+static const int16 kAnim13FrameTicks[] = {1};
+static const BBRect kAnim13FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim14FrameIndices[] = {146};
+static const int16 kAnim14FrameTicks[] = {1};
+static const BBRect kAnim14FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim15FrameIndices[] = {147};
+static const int16 kAnim15FrameTicks[] = {1};
+static const BBRect kAnim15FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim16FrameIndices[] = {148, 149, 150, 151, 152, 153, 154, 155};
+static const int16 kAnim16FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim16FrameRects[] = {{-5, -5, 9, 9}, {-6, -5, 11, 11}, {-6, -4, 9, 9}, {-5, -5, 10, 10}, {-5, -3, 9, 9}, {-6, -5, 10, 10}, {-4, -4, 9, 9}, {-6, -4, 10, 10}};
+static const int kAnim17FrameIndices[] = {156, 157};
+static const int16 kAnim17FrameTicks[] = {6, 6};
+static const BBRect kAnim17FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim18FrameIndices[] = {158, 159, 160, 161, 160, 162, 163, 162, 164, 165, 166, 167, 168, 167, 169, 170, 169, 171, 172, 173, 174, 175, 174, 176, 177, 176, 178, 179, 180, 181, 182, 181, 183, 184, 183, 185, 186, 187, 188, 189, 190, 188, 189, 191, 188, 190, 189, 187, 186};
+static const int16 kAnim18FrameTicks[] = {10, 20, 8, 8, 8, 8, 8, 8, 6, 10, 20, 8, 8, 8, 8, 8, 8, 6, 10, 20, 8, 8, 8, 8, 8, 8, 6, 10, 20, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim18FrameRects[] = {{-13, -16, 26, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-10, -19, 18, 20}, {-8, -20, 15, 23}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-10, -18, 19, 20}, {-12, -17, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-12, -16, 24, 16}, {-10, -18, 20, 19}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-8, -20, 16, 22}, {-9, -19, 18, 20}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}, {-12, -17, 24, 17}};
+static const int kAnim19FrameIndices[] = {192};
+static const int16 kAnim19FrameTicks[] = {8};
+static const BBRect kAnim19FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim20FrameIndices[] = {193};
+static const int16 kAnim20FrameTicks[] = {5};
+static const BBRect kAnim20FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim21FrameIndices[] = {194};
+static const int16 kAnim21FrameTicks[] = {6};
+static const BBRect kAnim21FrameRects[] = {{-7, -80, 17, 81}};
+static const int kAnim22FrameIndices[] = {195, 196, 197, 198, 199, 200};
+static const int16 kAnim22FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim22FrameRects[] = {{-22, -91, 45, 93}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}};
+static const int kAnim23FrameIndices[] = {201};
+static const int16 kAnim23FrameTicks[] = {6};
+static const BBRect kAnim23FrameRects[] = {{-12, -75, 21, 75}};
+static const int kAnim24FrameIndices[] = {202, 203, 204, 205, 206, 207};
+static const int16 kAnim24FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim24FrameRects[] = {{-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}};
+static const int kAnim25FrameIndices[] = {208, 209};
+static const int16 kAnim25FrameTicks[] = {6, 6};
+static const BBRect kAnim25FrameRects[] = {{-9, -9, 17, 15}, {-11, -10, 19, 16}};
+static const ObjAnimation kAnimations[] = {
+ {37, kAnim0FrameIndices, kAnim0FrameTicks, kAnim0FrameRects},
+ {37, kAnim1FrameIndices, kAnim1FrameTicks, kAnim1FrameRects},
+ {6, kAnim2FrameIndices, kAnim2FrameTicks, kAnim2FrameRects},
+ {7, kAnim3FrameIndices, kAnim3FrameTicks, kAnim3FrameRects},
+ {8, kAnim4FrameIndices, kAnim4FrameTicks, kAnim4FrameRects},
+ {34, kAnim5FrameIndices, kAnim5FrameTicks, kAnim5FrameRects},
+ {1, kAnim6FrameIndices, kAnim6FrameTicks, kAnim6FrameRects},
+ {62, kAnim7FrameIndices, kAnim7FrameTicks, kAnim7FrameRects},
+ {1, kAnim8FrameIndices, kAnim8FrameTicks, kAnim8FrameRects},
+ {11, kAnim9FrameIndices, kAnim9FrameTicks, kAnim9FrameRects},
+ {1, kAnim10FrameIndices, kAnim10FrameTicks, kAnim10FrameRects},
+ {1, kAnim11FrameIndices, kAnim11FrameTicks, kAnim11FrameRects},
+ {1, kAnim12FrameIndices, kAnim12FrameTicks, kAnim12FrameRects},
+ {1, kAnim13FrameIndices, kAnim13FrameTicks, kAnim13FrameRects},
+ {1, kAnim14FrameIndices, kAnim14FrameTicks, kAnim14FrameRects},
+ {1, kAnim15FrameIndices, kAnim15FrameTicks, kAnim15FrameRects},
+ {8, kAnim16FrameIndices, kAnim16FrameTicks, kAnim16FrameRects},
+ {2, kAnim17FrameIndices, kAnim17FrameTicks, kAnim17FrameRects},
+ {49, kAnim18FrameIndices, kAnim18FrameTicks, kAnim18FrameRects},
+ {1, kAnim19FrameIndices, kAnim19FrameTicks, kAnim19FrameRects},
+ {1, kAnim20FrameIndices, kAnim20FrameTicks, kAnim20FrameRects},
+ {1, kAnim21FrameIndices, kAnim21FrameTicks, kAnim21FrameRects},
+ {6, kAnim22FrameIndices, kAnim22FrameTicks, kAnim22FrameRects},
+ {1, kAnim23FrameIndices, kAnim23FrameTicks, kAnim23FrameRects},
+ {6, kAnim24FrameIndices, kAnim24FrameTicks, kAnim24FrameRects},
+ {2, kAnim25FrameIndices, kAnim25FrameTicks, kAnim25FrameRects}
+};
+
+const ObjAnimation *MinigameBbLoogie::getAnimation(int animIndex) {
+ return &kAnimations[animIndex];
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbtennis.cpp b/engines/bbvs/minigames/bbtennis.cpp
new file mode 100644
index 0000000000..926642cc5f
--- /dev/null
+++ b/engines/bbvs/minigames/bbtennis.cpp
@@ -0,0 +1,1274 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/sound.h"
+#include "bbvs/minigames/bbtennis.h"
+
+namespace Bbvs {
+
+static const int kLeftPlayerOffX[] = {
+ -44, -44, -44, -44, -39, -39, -34,
+ -26, -26, -14, -6, -6, -6, -6
+};
+
+static const int kLeftPlayerOffY[] = {
+ -31, -31, -31, -31, -23, -23, -21,
+ -18, -18, -14, -11, -11, -11, -11
+};
+
+static const char * const kSoundFilenames[] = {
+ "tenis9.aif", "tenis10.aif", "tenis11.aif", "tenis12.aif", "tenis13.aif",
+ "tenis14.aif", "tenis15.aif", "tenis16.aif", "tenis17.aif", "tenis18.aif",
+ "tenis19.aif", "tenis20.aif", "tenis21.aif", "1ahh.aif", "1dammit.aif",
+ "1getawy.aif", "1getthem.aif", "1owww.aif", "1pardon.aif", "1rcktbll.aif",
+ "1yourout.aif", "2hey.aif", "2inhere.aif", "2stoptht.aif", "2theyare.aif",
+ "3oh.aif", "3ow.aif", "3upunks.aif", "tenismus.aif", "canon1.aif",
+ "canon2.aif"
+};
+
+static const uint kSoundFilenamesCount = ARRAYSIZE(kSoundFilenames);
+
+static const int kLeftNetPlayAnims[] = {
+ 13, 15, 17
+};
+
+static const int kRightNetPlayAnims[] = {
+ 14, 16, 18
+};
+
+static const uint kYuppieHitSounds[] = {
+ 14, 15, 18, 22, 26, 27
+};
+
+static const uint kYuppieEnteringCourtSounds[] = {
+ 19, 20
+};
+
+static const uint kYuppieChargeSounds[] = {
+ 16, 17, 23, 24, 28, 0
+};
+
+static const uint kAllSounds[] = {
+ 3, 4, 7, 9, 19, 20, 16, 17, 23, 24, 28
+};
+
+void MinigameBbTennis::buildDrawList(DrawList &drawList) {
+ switch (_gameState) {
+ case 0:
+ buildDrawList0(drawList);
+ break;
+ case 1:
+ buildDrawList1(drawList);
+ break;
+ case 2:
+ buildDrawList2(drawList);
+ break;
+ }
+}
+
+void MinigameBbTennis::buildDrawList0(DrawList &drawList) {
+
+ drawList.add(_objects[0].anim->frameIndices[_objects[0].frameIndex], _objects[0].x, _objects[0].y, 2000);
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->y + 16);
+ }
+
+ if (_titleScreenSpriteIndex > 0)
+ drawList.add(_titleScreenSpriteIndex, 0, 0, 0);
+
+}
+
+void MinigameBbTennis::buildDrawList1(DrawList &drawList) {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+
+ if (obj->kind) {
+ int index = obj->anim->frameIndices[obj->frameIndex];
+ int x = obj->x;
+ int y = obj->y;
+ int priority = obj->y + 16;
+
+ switch (obj->kind) {
+
+ case 1:
+ priority = 3000;
+ break;
+
+ case 2:
+ priority = 550;
+ if (obj->frameIndex == 0)
+ drawList.add(obj->anim->frameIndices[8], obj->x, obj->y, 550);
+ break;
+
+ case 6:
+ if (obj->frameIndex == 31) {
+ y = 640;
+ index = obj->anim->frameIndices[26];
+ }
+ if (obj->status == 4) {
+ --obj->blinkCtr;
+ if (obj->blinkCtr % 2)
+ y = 600;
+ if (obj->blinkCtr == 0)
+ obj->kind = 0;
+ }
+ break;
+
+ case 7:
+ priority = 540;
+ if (obj->frameIndex == 0)
+ drawList.add(obj->anim->frameIndices[8], obj->x, obj->y, 550);
+ break;
+
+ case 4:
+ if (obj->status == 8) {
+ --obj->blinkCtr;
+ if (obj->blinkCtr % 2)
+ y = 600;
+ if (obj->blinkCtr == 0)
+ obj->kind = 0;
+ }
+ break;
+
+ }
+
+ drawList.add(index, x, y, priority);
+
+ }
+ }
+
+ if (_rapidFireBallsCount > 0) {
+ drawList.add(getAnimation(19)->frameIndices[0], 24, 208, 990);
+ drawList.add(getAnimation(20)->frameIndices[_rapidFireBallsCount / 10 % 10], 19, 198, 2000);
+ drawList.add(getAnimation(20)->frameIndices[_rapidFireBallsCount % 10], 29, 198, 2000);
+
+ }
+
+ if (_backgroundSpriteIndex > 0)
+ drawList.add(_backgroundSpriteIndex, 0, 0, 0);
+
+ drawList.add(getAnimation(8)->frameIndices[0], 9, 53, 500);
+ drawList.add(getAnimation(9)->frameIndices[0], 256, 52, 500);
+ drawList.add(getAnimation(10)->frameIndices[0], 60, 162, 500);
+ drawList.add(getAnimation(21)->frameIndices[0], 36, 18, 2000);
+
+ drawNumber(drawList, _score, 70, 18);
+
+ for (int i = 0; i < _numHearts; ++i)
+ drawList.add(getAnimation(7)->frameIndices[0], 20 + i * 20, 236, 990);
+
+}
+
+void MinigameBbTennis::buildDrawList2(DrawList &drawList) {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind)
+ drawList.add(obj->anim->frameIndices[obj->frameIndex], obj->x, obj->y, obj->y + 16);
+ }
+
+ if (_backgroundSpriteIndex > 0)
+ drawList.add(_backgroundSpriteIndex, 0, 0, 0);
+
+ drawList.add(getAnimation(21)->frameIndices[0], 36, 18, 2000);
+
+ drawNumber(drawList, _score, 70, 18);
+
+ drawList.add(getAnimation(22)->frameIndices[0], 120, 70, 2000);
+ drawList.add(getAnimation(23)->frameIndices[0], 95, 95, 2000);
+
+ drawNumber(drawList, _hiScore, 210, 109);
+
+}
+
+void MinigameBbTennis::drawSprites() {
+ DrawList drawList;
+ buildDrawList(drawList);
+ _vm->_screen->drawDrawList(drawList, _spriteModule);
+ _vm->_screen->copyToScreen();
+}
+
+void MinigameBbTennis::initObjs() {
+ for (int i = 0; i < kMaxObjectsCount; ++i)
+ _objects[i].kind = 0;
+}
+
+MinigameBbTennis::Obj *MinigameBbTennis::getFreeObject() {
+ for (int i = 0; i < kMaxObjectsCount; ++i)
+ if (_objects[i].kind == 0)
+ return &_objects[i];
+ return 0;
+}
+
+MinigameBbTennis::Obj *MinigameBbTennis::findTennisBall(int startObjIndex) {
+ for (int i = startObjIndex; i < kMaxObjectsCount; ++i)
+ if (_objects[i].kind == 2)
+ return &_objects[i];
+ return 0;
+}
+
+bool MinigameBbTennis::isHit(Obj *obj1, Obj *obj2) {
+ const BBRect &frameRect1 = obj1->anim->frameRects[obj1->frameIndex];
+ const BBRect &frameRect2 = obj2->anim->frameRects[obj2->frameIndex];
+ const int obj1X1 = obj1->x + frameRect1.x;
+ const int obj1Y1 = obj1->y + frameRect1.y;
+ const int obj1X2 = obj1X1 + frameRect1.width;
+ const int obj1Y2 = obj1Y1 + frameRect1.height;
+ const int obj2X1 = obj2->x + frameRect2.x;
+ const int obj2Y1 = obj2->y + frameRect2.y;
+ const int obj2X2 = obj2X1 + frameRect2.width;
+ const int obj2Y2 = obj2Y1 + frameRect2.height;
+ return obj1X1 <= obj2X2 && obj1X2 >= obj2X1 && obj1Y1 <= obj2Y2 && obj1Y2 >= obj2Y1;
+}
+
+void MinigameBbTennis::initObjects() {
+ switch (_gameState) {
+ case 0:
+ initObjects0();
+ break;
+ case 1:
+ initObjects1();
+ break;
+ case 2:
+ initObjects2();
+ break;
+ }
+}
+
+void MinigameBbTennis::initObjects0() {
+ _objects[0].anim = getAnimation(24);
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = getAnimation(24)->frameTicks[0];
+ _objects[0].x = 160;
+ _objects[0].y = 100;
+ _objects[0].kind = 1;
+ _objects[1].anim = getAnimation(25);
+ _objects[1].frameIndex = 0;
+ _objects[1].ticks = getAnimation(25)->frameTicks[0];
+ _objects[1].x = 40;
+ _objects[1].y = 240;
+ _objects[1].kind = 2;
+ _objects[2].anim = getAnimation(26);
+ _objects[2].frameIndex = 0;
+ _objects[2].ticks = getAnimation(26)->frameTicks[0];
+ _objects[2].x = 280;
+ _objects[2].y = 240;
+ _objects[2].kind = 2;
+}
+
+void MinigameBbTennis::initObjects1() {
+ _objects[0].anim = getAnimation(5);
+ _objects[0].frameIndex = 0;
+ _objects[0].ticks = getAnimation(5)->frameTicks[0];
+ _objects[0].status = 0;
+ _objects[0].x = 160;
+ _objects[0].y = 100;
+ _objects[0].kind = 1;
+ for (int i = 1; i < kMaxObjectsCount; ++i)
+ _objects[i].kind = 0;
+}
+
+void MinigameBbTennis::initObjects2() {
+ // Nothing
+}
+
+void MinigameBbTennis::initVars() {
+ switch (_gameState) {
+ case 0:
+ initVars0();
+ break;
+ case 1:
+ initVars1();
+ break;
+ case 2:
+ initVars2();
+ break;
+ }
+}
+
+void MinigameBbTennis::initVars0() {
+ // Nothing
+}
+
+void MinigameBbTennis::initVars1() {
+ _numHearts = 15;
+ _allHeartsGone = false;
+ _squirrelDelay = 500;
+ _tennisPlayerDelay = 300;
+ _throwerDelay = 400;
+ _netPlayerDelay = 340;
+ _playerDecrease = 0;
+ _delayDecreaseTimer = 0;
+ _numBalls = 0;
+ _newBallTimer = 1;
+ _initBallTimer = 10;
+ _maxBalls = 5;
+ _rapidFireBallsCount = 0;
+ _score = 0;
+ _hitMissRatio = 0;
+ _playedThisIsTheCoolest = false;
+ _startSoundPlayed = false;
+ _endSoundPlaying = false;
+ stopSound(12);
+}
+
+void MinigameBbTennis::initVars2() {
+ if (_score > _hiScore)
+ _hiScore = _score;
+}
+
+bool MinigameBbTennis::updateStatus(int mouseX, int mouseY, uint mouseButtons) {
+ switch (_gameState) {
+ case 0:
+ return updateStatus0(mouseX, mouseY, mouseButtons);
+ case 1:
+ return updateStatus1(mouseX, mouseY, mouseButtons);
+ case 2:
+ return updateStatus2(mouseX, mouseY, mouseButtons);
+ }
+ return false;
+}
+
+bool MinigameBbTennis::updateStatus0(int mouseX, int mouseY, uint mouseButtons) {
+
+ if ((mouseButtons & kLeftButtonDown) || (mouseButtons & kRightButtonDown)) {
+ _gameState = 1;
+ initObjects();
+ initVars();
+ _gameTicks = 0;
+ return true;
+ }
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ if (obj->kind == 2) {
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex >= obj->anim->frameCount)
+ obj->frameIndex = 0;
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+ }
+ }
+
+ return true;
+}
+
+bool MinigameBbTennis::updateStatus1(int mouseX, int mouseY, uint mouseButtons) {
+
+ _objects[0].x = mouseX;
+ _objects[0].y = mouseY;
+
+ if (_allHeartsGone) {
+ _gameState = 2;
+ initObjects();
+ initVars();
+ _gameTicks = 0;
+ return true;
+ }
+
+ if (!_startSoundPlayed) {
+ playSound(12);
+ _startSoundPlayed = true;
+ }
+
+ if (((mouseButtons & kLeftButtonClicked) || (_rapidFireBallsCount > 0 && (mouseButtons & kLeftButtonDown))) &&
+ _newBallTimer == 0 && _numBalls < _maxBalls) {
+ // Insert a ball
+ Obj *obj = getFreeObject();
+ obj->anim = getAnimation(6);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(6)->frameTicks[0];
+ obj->x = 160;
+ obj->y = 240;
+ obj->kind = 2;
+ obj->targetX = mouseX;
+ obj->targetY = mouseY;
+ obj->ballStep = 12;
+ obj->ballStepCtr = 0;
+ obj->fltX = 160.0;
+ obj->fltY = 240.0;
+ obj->fltStepX = ((160 - mouseX) * 0.75) / 12.0;
+ obj->fltStepY = ((240 - mouseY) * 0.75) / 12.0;
+ _newBallTimer = _initBallTimer;
+ ++_numBalls;
+ playSound(31);
+ if (_rapidFireBallsCount > 0 && --_rapidFireBallsCount == 0) {
+ _initBallTimer = 10;
+ _maxBalls = 5;
+ }
+ }
+
+ if (_newBallTimer > 0)
+ --_newBallTimer;
+
+ if (++_delayDecreaseTimer == 30) {
+ _delayDecreaseTimer = 0;
+ if (_playerDecrease < 199)
+ ++_playerDecrease;
+ }
+
+ updateObjs();
+
+ if (!_playedThisIsTheCoolest && _score > 3 && _vm->getRandom(10) == 1 && !isAnySoundPlaying(kAllSounds, 11)) {
+ _playedThisIsTheCoolest = true;
+ playSound(9);
+ }
+
+ return true;
+}
+
+bool MinigameBbTennis::updateStatus2(int mouseX, int mouseY, uint mouseButtons) {
+ if (_endSoundPlaying) {
+ if (!isSoundPlaying(21) && _fromMainGame) {
+ //_vm->delayMillis(1000);
+ _gameDone = true;
+ }
+ } else {
+ playSound(21);
+ _endSoundPlaying = true;
+ }
+ return true;
+}
+
+void MinigameBbTennis::updateObjs() {
+
+ for (int i = 0; i < kMaxObjectsCount; ++i) {
+ Obj *obj = &_objects[i];
+ switch (obj->kind) {
+ case 2:
+ updateTennisBall(i);
+ break;
+ case 3:
+ updateSquirrel(i);
+ break;
+ case 4:
+ updateTennisPlayer(i);
+ break;
+ case 5:
+ updateThrower(i);
+ break;
+ case 6:
+ updateNetPlayer(i);
+ break;
+ case 7:
+ updateEnemyTennisBall(i);
+ break;
+ }
+ }
+
+ if (_rapidFireBallsCount == 0) {
+ --_squirrelDelay;
+ if (--_squirrelDelay == 0) {
+ Obj *obj = getFreeObject();
+ obj->kind = 3;
+ obj->x = 100;
+ obj->y = 69;
+ obj->anim = getAnimation(1);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(1)->frameTicks[0];
+ obj->status = 0;
+ obj->blinkCtr = _vm->getRandom(128) + 10;
+ _squirrelDelay = _vm->getRandom(512) + 1000;
+ }
+ }
+
+ if (--_tennisPlayerDelay == 0) {
+ Obj *obj = getFreeObject();
+ obj->kind = 4;
+ obj->y = 146;
+ obj->anim = getAnimation(11);
+ obj->ticks = getAnimation(11)->frameTicks[0];
+ if (_vm->getRandom(2) == 1) {
+ obj->x = 40;
+ obj->frameIndex = 0;
+ obj->status = 0;
+ } else {
+ obj->x = _vm->getRandom(2) == 1 ? 40 : 274;
+ obj->frameIndex = 16;
+ obj->status = 4;
+ }
+ obj->blinkCtr = _vm->getRandom(64) + 60;
+ _tennisPlayerDelay = _vm->getRandom(128) + 400 - _playerDecrease;
+ if (_vm->getRandom(10) == 1 && !isAnySoundPlaying(kAllSounds, 0x11))
+ playSound(kYuppieEnteringCourtSounds[_vm->getRandom(2)]);
+ }
+
+ if (--_throwerDelay == 0) {
+ Obj *obj = getFreeObject();
+ obj->kind = 5;
+ obj->x = 50;
+ obj->y = 62;
+ obj->anim = getAnimation(12);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(12)->frameTicks[0];
+ obj->status = 0;
+ _throwerDelay = _vm->getRandom(128) + 200 - _playerDecrease;
+ if (_vm->getRandom(10) == 1 && !isAnySoundPlaying(kAllSounds, 11))
+ playSound(kYuppieChargeSounds[_vm->getRandom(2)]);
+ }
+
+ if (--_netPlayerDelay == 0) {
+ Obj *obj = getFreeObject();
+ obj->kind = 6;
+ obj->y = 176;
+ if (_vm->getRandom(2) == 1) {
+ obj->x = 110;
+ obj->netPlayDirection = 1;
+ obj->anim = getAnimation(kLeftNetPlayAnims[_vm->getRandom(3)]);
+ } else {
+ obj->x = 216;
+ obj->netPlayDirection = 0;
+ obj->anim = getAnimation(kRightNetPlayAnims[_vm->getRandom(3)]);
+ }
+ obj->frameIndex = 1;
+ obj->ticks = obj->anim->frameTicks[1];
+ obj->status = 0;
+ obj->blinkCtr = 1;
+ _netPlayerDelay = _vm->getRandom(128) + 250 - _playerDecrease;
+ if (_vm->getRandom(10) == 1 && !isAnySoundPlaying(kAllSounds, 11))
+ playSound(kYuppieChargeSounds[_vm->getRandom(2)]);
+ }
+
+}
+
+void MinigameBbTennis::updateTennisBall(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 7) {
+ obj->kind = 0;
+ --_numBalls;
+ if (_hitMissRatio > 0) {
+ if (--_hitMissRatio == 0 && _vm->getRandom(8) == 1 && !isAnySoundPlaying(kAllSounds, 11))
+ playSound(3);
+ } else {
+ if (_vm->getRandom(10) == 1 && !isAnySoundPlaying(kAllSounds, 11))
+ playSound(3);
+ }
+ return;
+ }
+ obj->ticks = getAnimation(6)->frameTicks[obj->frameIndex];
+ }
+
+ if (--obj->ballStep == 0) {
+ obj->ballStep = 12;
+ ++obj->ballStepCtr;
+ if (obj->ballStepCtr == 1) {
+ obj->fltStepX = ((obj->fltX - (float)obj->targetX) * 0.75) / 12.0;
+ obj->fltStepY = ((obj->fltY - (float)obj->targetY) * 0.75) / 12.0;
+ } else if (obj->ballStepCtr == 2) {
+ obj->fltStepX = (obj->fltX - (float)obj->targetX) / 12.0;
+ obj->fltStepY = (obj->fltY - (float)obj->targetY) / 12.0;
+ } else {
+ obj->fltStepX = 0.0;
+ obj->fltStepY = 0.0;
+ }
+ }
+
+ obj->fltX = obj->fltX - obj->fltStepX;
+ obj->x = obj->fltX;
+ obj->fltY = obj->fltY - obj->fltStepY;
+ obj->y = obj->fltY;
+
+}
+
+void MinigameBbTennis::updateSquirrel(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->status) {
+
+ case 0:
+ --obj->ticks;
+ if (--obj->ticks == 0) {
+ if (++obj->frameIndex == 4) {
+ obj->anim = getAnimation(0);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(0)->frameTicks[0];
+ obj->y += 2;
+ ++obj->status;
+ } else {
+ obj->ticks = getAnimation(1)->frameTicks[obj->frameIndex];
+ ++_squirrelDelay;
+ }
+ } else {
+ ++_squirrelDelay;
+ }
+ break;
+
+ case 1:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 4)
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(0)->frameTicks[obj->frameIndex];
+ }
+ ++obj->x;
+ if (obj->x < 230) {
+ if (--obj->blinkCtr <= 0) {
+ obj->anim = getAnimation(4);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(4)->frameTicks[obj->frameIndex];
+ obj->status = 3;
+ }
+ ++_squirrelDelay;
+ } else {
+ obj->anim = getAnimation(2);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(2)->frameTicks[0];
+ obj->y -= 2;
+ ++obj->status;
+ }
+ break;
+
+ case 2:
+ if (--obj->ticks == 0) {
+ if (++obj->frameIndex == 4) {
+ obj->kind = 0;
+ } else {
+ obj->ticks = getAnimation(2)->frameTicks[0];
+ ++_squirrelDelay;
+ }
+ } else {
+ ++_squirrelDelay;
+ }
+ break;
+
+ case 3:
+ if (--obj->ticks) {
+ if (++obj->frameIndex == 2) {
+ obj->anim = getAnimation(0);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(0)->frameTicks[0];
+ obj->status = 1;
+ obj->blinkCtr = _vm->getRandom(128) + 10;
+ } else {
+ obj->ticks = getAnimation(4)->frameTicks[obj->frameIndex];
+ ++_squirrelDelay;
+ }
+ } else {
+ ++_squirrelDelay;
+ }
+ break;
+
+ case 4:
+ if (--obj->ticks == 0) {
+ if (++obj->frameIndex == 5) {
+ obj->kind = 0;
+ } else {
+ obj->ticks = getAnimation(3)->frameTicks[obj->frameIndex];
+ ++_squirrelDelay;
+ }
+ } else {
+ ++_squirrelDelay;
+ }
+ break;
+
+ }
+
+ if (obj->status != 4) {
+ int tennisBallObjIndex = 0;
+ Obj *tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ while (tennisBallObj) {
+ if (tennisBallObj->frameIndex >= 6 && isHit(obj, tennisBallObj)) {
+ hitSomething();
+ tennisBallObj->kind = 0;
+ --_numBalls;
+ obj->status = 4;
+ obj->anim = getAnimation(3);
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(3)->frameTicks[0];
+ _rapidFireBallsCount = 50;
+ _maxBalls = 10;
+ _initBallTimer = 6;
+ if (!isAnySoundPlaying(kAllSounds, 11))
+ playSound(4);
+ break;
+ }
+ tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbTennis::updateTennisPlayer(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->status) {
+
+ case 0:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 6)
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(11)->frameTicks[0];
+ }
+ ++obj->x;
+ if (obj->x == 280)
+ obj->kind = 0;
+ --obj->blinkCtr;
+ if (obj->blinkCtr <= 0) {
+ obj->frameIndex = 6;
+ obj->ticks = getAnimation(11)->frameTicks[6];
+ ++obj->status;
+ }
+ ++_tennisPlayerDelay;
+ break;
+
+ case 1:
+ if (--obj->ticks == 0) {
+ if (++obj->frameIndex == 9) {
+ if (obj->x < 210) {
+ obj->frameIndex = 9;
+ obj->status = 2;
+ } else {
+ obj->frameIndex = 15;
+ obj->status = 3;
+ }
+ obj->blinkCtr = _vm->getRandom(64) + 40;
+ }
+ obj->ticks = getAnimation(11)->frameTicks[obj->frameIndex];
+ }
+ if ((obj->ticks % 2) && obj->frameIndex != 8) {
+ ++obj->x;
+ if (obj->x == 280)
+ obj->kind = 0;
+ }
+ ++_tennisPlayerDelay;
+ break;
+
+ case 2:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 15)
+ ++obj->status;
+ obj->ticks = getAnimation(11)->frameTicks[obj->frameIndex];
+ if (obj->frameIndex == 13)
+ makeEnemyBall(obj->x, obj->y - 31, 4);
+ }
+ ++_tennisPlayerDelay;
+ break;
+
+ case 3:
+ if (--obj->ticks == 0) {
+ ++obj->status;
+ obj->frameIndex = 16;
+ obj->ticks = getAnimation(11)->frameTicks[16];
+ }
+ if (obj->ticks % 2) {
+ --obj->x;
+ if (obj->x <= 40)
+ obj->kind = 0;
+ } else
+ ++_tennisPlayerDelay;
+ break;
+
+ case 4:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 22)
+ obj->frameIndex = 16;
+ obj->ticks = getAnimation(11)->frameTicks[obj->frameIndex];
+ }
+ --obj->x;
+ if (obj->x > 40) {
+ if (--obj->blinkCtr <= 0) {
+ ++obj->status;
+ obj->frameIndex = 22;
+ obj->ticks = getAnimation(11)->frameTicks[22];
+ }
+ ++_tennisPlayerDelay;
+ } else {
+ obj->kind = 0;
+ }
+ break;
+
+ case 5:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 25) {
+ if (obj->x <= 70) {
+ obj->frameIndex = 33;
+ obj->status = 7;
+ } else {
+ obj->frameIndex = 25;
+ obj->status = 6;
+ }
+ obj->blinkCtr = _vm->getRandom(64) + 40;
+ }
+ obj->ticks = getAnimation(11)->frameTicks[obj->frameIndex];
+ }
+ if ((obj->ticks % 2) && obj->frameIndex != 24) {
+ --obj->x;
+ if (obj->x <= 40)
+ obj->kind = 0;
+ } else
+ ++_tennisPlayerDelay;
+ break;
+
+ case 6:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 33)
+ ++obj->status;
+ obj->ticks = getAnimation(11)->frameTicks[obj->frameIndex];
+ if (obj->frameIndex == 31)
+ makeEnemyBall(obj->x + 8, obj->y - 49, 4);
+ }
+ ++_tennisPlayerDelay;
+ break;
+
+ case 7:
+ if (--obj->ticks == 0) {
+ obj->frameIndex = 0;
+ obj->ticks = getAnimation(11)->frameTicks[0];
+ obj->status = 0;
+ }
+ if (obj->ticks % 2) {
+ ++obj->x;
+ if (obj->x == 280)
+ obj->kind = 0;
+ }
+ ++_tennisPlayerDelay;
+ break;
+
+ case 8:
+ break;
+
+ }
+
+ if (obj->status != 8) {
+ int tennisBallObjIndex = 0;
+ Obj *tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ while (tennisBallObj) {
+ if (tennisBallObj->frameIndex >= 6 && isHit(obj, tennisBallObj)) {
+ hitSomething();
+ tennisBallObj->kind = 0;
+ --_numBalls;
+ obj->status = 8;
+ obj->blinkCtr = 20;
+ playSound(kYuppieHitSounds[_vm->getRandom(6)]);
+ break;
+ }
+ tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbTennis::updateThrower(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->status) {
+
+ case 0:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 4)
+ ++obj->status;
+ obj->ticks = getAnimation(12)->frameTicks[obj->frameIndex];
+ }
+ ++_throwerDelay;
+ break;
+
+ case 1:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 8)
+ ++obj->status;
+ obj->ticks = getAnimation(12)->frameTicks[obj->frameIndex];
+ if (obj->frameIndex == 7)
+ makeEnemyBall(obj->x - 10, obj->y - 10, 3);
+ }
+ ++_throwerDelay;
+ break;
+
+ case 2:
+ --obj->ticks;
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 12) {
+ obj->kind = 0;
+ } else {
+ obj->ticks = getAnimation(12)->frameTicks[obj->frameIndex];
+ ++_throwerDelay;
+ }
+ } else {
+ ++_throwerDelay;
+ }
+ break;
+
+ case 3:
+ --obj->ticks;
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 14) {
+ obj->kind = 0;
+ } else {
+ obj->ticks = getAnimation(12)->frameTicks[obj->frameIndex];
+ ++_throwerDelay;
+ }
+ } else {
+ ++_throwerDelay;
+ }
+ break;
+
+ }
+
+ if (obj->status != 3) {
+ int tennisBallObjIndex = 0;
+ Obj *tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ while (tennisBallObj) {
+ if (tennisBallObj->frameIndex >= 5 && tennisBallObj->frameIndex <= 7 && isHit(obj, tennisBallObj)) {
+ hitSomething();
+ tennisBallObj->kind = 0;
+ --_numBalls;
+ obj->status = 3;
+ obj->frameIndex = 12;
+ obj->ticks = getAnimation(12)->frameTicks[12];
+ playSound(kYuppieHitSounds[_vm->getRandom(6)]);
+ break;
+ }
+ tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbTennis::updateNetPlayer(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ switch (obj->status) {
+
+ case 0:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 15) {
+ obj->blinkCtr = _vm->getRandom(32) + 10;
+ ++obj->status;
+ obj->frameIndex = 31;
+ } else {
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ ++_netPlayerDelay;
+ }
+ } else {
+ ++_netPlayerDelay;
+ }
+ break;
+
+ case 1:
+ if (--obj->blinkCtr <= 0) {
+ ++obj->status;
+ obj->frameIndex = 15;
+ obj->ticks = obj->anim->frameTicks[15];
+ obj->x = _vm->getRandom(128) + 100;
+ }
+ ++_netPlayerDelay;
+ break;
+
+ case 2:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 24) {
+ ++obj->status;
+ obj->frameIndex = 28;
+ }
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ if (obj->frameIndex == 23)
+ makeEnemyBall(obj->x - 8, obj->y - 40, 3);
+ }
+ ++_netPlayerDelay;
+ break;
+
+ case 3:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 31) {
+ obj->status = 1;
+ obj->frameIndex = 31;
+ obj->blinkCtr = _vm->getRandom(32) + 10;
+ } else {
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ ++_netPlayerDelay;
+ }
+ } else {
+ ++_netPlayerDelay;
+ }
+ break;
+
+ case 5:
+ if (--obj->ticks == 0) {
+ ++obj->frameIndex;
+ if (obj->frameIndex == 27)
+ obj->kind = 0;
+ obj->ticks = obj->anim->frameTicks[obj->frameIndex];
+ }
+ break;
+
+ case 4:
+ break;
+
+ }
+
+ if (obj->status < 4 && obj->frameIndex != 31) {
+ int tennisBallObjIndex = 0;
+ Obj *tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ while (tennisBallObj) {
+ if (obj->status == 0 && tennisBallObj->frameIndex >= 3 && tennisBallObj->frameIndex <= 6 &&
+ isHit(obj, tennisBallObj)) {
+ hitSomething();
+ tennisBallObj->kind = 0;
+ --_numBalls;
+ if (obj->netPlayDirection) {
+ obj->x += kLeftPlayerOffX[obj->frameIndex] + 10;
+ obj->y += kLeftPlayerOffY[obj->frameIndex] + 10;
+ } else {
+ obj->x -= kLeftPlayerOffX[obj->frameIndex] + 12;
+ obj->y += kLeftPlayerOffY[obj->frameIndex] + 10;
+ }
+ obj->status = 4;
+ obj->frameIndex = 0;
+ obj->blinkCtr = 20;
+ playSound(kYuppieHitSounds[_vm->getRandom(6)]);
+ break;
+ } else if (obj->status > 1 && obj->status < 4 && tennisBallObj->frameIndex >= 3 && tennisBallObj->frameIndex <= 4 &&
+ isHit(obj, tennisBallObj)) {
+ hitSomething();
+ tennisBallObj->kind = 0;
+ --_numBalls;
+ obj->status = 5;
+ obj->frameIndex = 24;
+ obj->ticks = obj->anim->frameTicks[24];
+ playSound(kYuppieHitSounds[_vm->getRandom(6)]);
+ break;
+ }
+ tennisBallObj = findTennisBall(tennisBallObjIndex++);
+ }
+ }
+
+}
+
+void MinigameBbTennis::updateEnemyTennisBall(int objIndex) {
+ Obj *obj = &_objects[objIndex];
+
+ if (--obj->ticks == 0) {
+ --obj->frameIndex;
+ obj->ticks = getAnimation(6)->frameTicks[obj->frameIndex];
+ }
+
+ if (--obj->ballStep == 0) {
+ obj->ballStep = 12;
+ --obj->ballStepCtr;
+ if (obj->ballStepCtr == 1) {
+ obj->fltStepX = (obj->fltX - (float)obj->targetX) / 12.0;
+ obj->fltStepY = (obj->fltY - (float)obj->targetY) / 12.0;
+ } else if (obj->ballStepCtr == 2) {
+ obj->fltStepX = ((obj->fltX - (float)obj->targetX) * 0.18) / 12.0;
+ obj->fltStepY = ((obj->fltY - (float)obj->targetY) * 0.18) / 12.0;
+ } else {
+ obj->kind = 0;
+ if (_numHearts > 0 && --_numHearts == 0)
+ _allHeartsGone = true;
+ }
+ }
+
+ obj->fltX = obj->fltX - obj->fltStepX;
+ obj->x = obj->fltX;
+ obj->fltY = obj->fltY - obj->fltStepY;
+ obj->y = obj->fltY;
+
+}
+
+void MinigameBbTennis::makeEnemyBall(int x, int y, int frameIndex) {
+ Obj *obj = getFreeObject();
+
+ obj->kind = 7;
+ obj->x = x;
+ obj->y = y;
+ obj->anim = getAnimation(6);
+ obj->frameIndex = frameIndex;
+ obj->ticks = getAnimation(6)->frameTicks[frameIndex];
+ obj->targetX = 160;
+ obj->targetY = 180;
+ obj->fltX = (float)x;
+ obj->fltY = (float)y;
+
+ switch (frameIndex) {
+
+ case 6:
+ obj->ballStep = 18;
+ obj->ballStepCtr = 3;
+ obj->fltStepX = 0.0;
+ obj->fltStepY = 0.0;
+ break;
+
+ case 5:
+ obj->ballStep = 12;
+ obj->ballStepCtr = 3;
+ obj->fltStepX = ((float)(x - 160) * 0.07) / 12.0;
+ obj->fltStepY = ((float)(y - 180) * 0.07) / 12.0;
+ break;
+
+ case 4:
+ obj->ballStep = 6;
+ obj->ballStepCtr = 3;
+ obj->fltStepX = ((float)(x - 160) * 0.07) / 6.0;
+ obj->fltStepY = ((float)(y - 180) * 0.07) / 6.0;
+ break;
+
+ case 3:
+ obj->ballStep = 12;
+ obj->ballStepCtr = 2;
+ obj->fltStepX = ((float)(x - 160) * 0.18) / 12.0;
+ obj->fltStepY = ((float)(y - 180) * 0.18) / 12.0;
+ break;
+
+ case 2:
+ obj->ballStep = 6;
+ obj->ballStepCtr = 2;
+ obj->fltStepX = ((float)(x - 160) * 0.18) / 6.0;
+ obj->fltStepY = ((float)(y - 180) * 0.18) / 6.0;
+ break;
+
+ case 1:
+ obj->ballStep = 12;
+ obj->ballStepCtr = 1;
+ obj->fltStepX = (float)((x - 160) / 12);
+ obj->fltStepY = (float)((y - 180) / 12);
+ break;
+
+ case 0:
+ obj->ballStep = 6;
+ obj->ballStepCtr = 1;
+ obj->fltStepX = (float)((x - 160) / 6);
+ obj->fltStepY = (float)((y - 180) / 6);
+ break;
+
+ }
+
+}
+
+void MinigameBbTennis::hitSomething() {
+ if (_hitMissRatio < 15)
+ _hitMissRatio += 3;
+ ++_score;
+}
+
+bool MinigameBbTennis::run(bool fromMainGame) {
+
+ memset(_objects, 0, sizeof(_objects));
+
+ _numbersAnim = getAnimation(20);
+
+ _backgroundSpriteIndex = 272;
+ _titleScreenSpriteIndex = 273;
+
+ _fromMainGame = fromMainGame;
+
+ _hiScore = 0;
+ if (!_fromMainGame)
+ _hiScore = loadHiscore(kMinigameBbTennis);
+
+ _gameState = 0;
+ _gameResult = false;
+ _gameDone = false;
+ initObjects();
+ initVars();
+
+ _spriteModule = new SpriteModule();
+ _spriteModule->load("bbtennis/bbtennis.000");
+
+ Palette palette = _spriteModule->getPalette();
+ _vm->_screen->setPalette(palette);
+
+ loadSounds();
+
+ _gameTicks = 0;
+ playSound(29, true);
+
+ while (!_vm->shouldQuit() &&!_gameDone) {
+ _vm->updateEvents();
+ update();
+ }
+
+ _vm->_sound->unloadSounds();
+
+ if (!_fromMainGame)
+ saveHiscore(kMinigameBbTennis, _hiScore);
+
+ delete _spriteModule;
+
+ return _gameResult;
+}
+
+void MinigameBbTennis::update() {
+
+ int inputTicks;
+
+ if (_gameTicks > 0) {
+ int currTicks = _vm->_system->getMillis();
+ inputTicks = 3 * (currTicks - _gameTicks) / 50;
+ _gameTicks = currTicks - (currTicks - _gameTicks - 50 * inputTicks / 3);
+ } else {
+ inputTicks = 1;
+ _gameTicks = _vm->_system->getMillis();
+ }
+
+ if (_vm->_keyCode == Common::KEYCODE_ESCAPE) {
+ _gameDone = true;
+ return;
+ }
+
+ if (inputTicks == 0)
+ return;
+
+ bool done;
+
+ do {
+ done = !updateStatus(_vm->_mouseX, _vm->_mouseY, _vm->_mouseButtons);
+ _vm->_mouseButtons &= ~kLeftButtonClicked;
+ _vm->_mouseButtons &= ~kRightButtonClicked;
+ _vm->_keyCode = Common::KEYCODE_INVALID;
+ } while (--inputTicks && _gameTicks > 0 && !done);
+
+ drawSprites();
+
+ _vm->_system->delayMillis(10);
+
+}
+
+void MinigameBbTennis::loadSounds() {
+ for (uint i = 0; i < kSoundFilenamesCount; ++i) {
+ Common::String filename = Common::String::format("bbtennis/%s", kSoundFilenames[i]);
+ _vm->_sound->loadSound(filename.c_str());
+ }
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/bbtennis.h b/engines/bbvs/minigames/bbtennis.h
new file mode 100644
index 0000000000..690bd724a0
--- /dev/null
+++ b/engines/bbvs/minigames/bbtennis.h
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_MINIGAMES_BBTENNIS_H
+#define BBVS_MINIGAMES_BBTENNIS_H
+
+#include "bbvs/minigames/minigame.h"
+
+namespace Bbvs {
+
+class MinigameBbTennis : public Minigame {
+public:
+ MinigameBbTennis(BbvsEngine *vm) : Minigame(vm) {};
+ bool run(bool fromMainGame);
+public:
+
+ struct Obj {
+ int kind;
+ int x, y;
+ const ObjAnimation *anim;
+ int frameIndex;
+ int ticks;
+ int status;
+ int blinkCtr;
+ float fltStepX;
+ float fltStepY;
+ float fltX;
+ float fltY;
+ int targetX;
+ int targetY;
+ int ballStep;
+ int ballStepCtr;
+ int netPlayDirection;
+ };
+
+ enum {
+ kMaxObjectsCount = 256
+ };
+
+ enum {
+ kGSTitleScreen = 0, // Title screen
+ kGSMainGame = 1, // Game when called as part of the main game
+ kGSStandaloneGame = 2, // Game when called as standalone game
+ kGSScoreCountUp = 3 // Score countup and next level text
+ };
+
+ Obj _objects[kMaxObjectsCount];
+
+ int _numHearts;
+ int _squirrelDelay;
+ int _tennisPlayerDelay;
+ int _throwerDelay;
+ int _netPlayerDelay;
+ int _playerDecrease;
+ int _delayDecreaseTimer;
+ int _numBalls;
+ int _newBallTimer;
+ int _initBallTimer;
+ int _maxBalls;
+ int _rapidFireBallsCount;
+ int _score, _hiScore;
+ int _hitMissRatio;
+ bool _allHeartsGone;
+ bool _playedThisIsTheCoolest;
+ bool _startSoundPlayed;
+ bool _endSoundPlaying;
+
+ const ObjAnimation *getAnimation(int animIndex);
+
+ void buildDrawList(DrawList &drawList);
+ void buildDrawList0(DrawList &drawList);
+ void buildDrawList1(DrawList &drawList);
+ void buildDrawList2(DrawList &drawList);
+
+ void drawSprites();
+
+ void initObjs();
+ Obj *getFreeObject();
+ Obj *findTennisBall(int startObjIndex);
+ bool isHit(Obj *obj1, Obj *obj2);
+
+ void initObjects();
+ void initObjects0();
+ void initObjects1();
+ void initObjects2();
+
+ void initVars();
+ void initVars0();
+ void initVars1();
+ void initVars2();
+
+ bool updateStatus(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus0(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus1(int mouseX, int mouseY, uint mouseButtons);
+ bool updateStatus2(int mouseX, int mouseY, uint mouseButtons);
+
+ void updateObjs();
+ void updateTennisBall(int objIndex);
+ void updateSquirrel(int objIndex);
+ void updateTennisPlayer(int objIndex);
+ void updateThrower(int objIndex);
+ void updateNetPlayer(int objIndex);
+ void updateEnemyTennisBall(int objIndex);
+ void makeEnemyBall(int x, int y, int frameIndex);
+ void hitSomething();
+
+ void update();
+
+ void loadSounds();
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_MINIGAMES_BBTENNIS_H
diff --git a/engines/bbvs/minigames/bbtennis_anims.cpp b/engines/bbvs/minigames/bbtennis_anims.cpp
new file mode 100644
index 0000000000..7441c66749
--- /dev/null
+++ b/engines/bbvs/minigames/bbtennis_anims.cpp
@@ -0,0 +1,142 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/bbtennis.h"
+
+namespace Bbvs {
+
+static const int kAnim0FrameIndices[] = {0, 1, 2, 3};
+static const int16 kAnim0FrameTicks[] = {6, 6, 6, 6};
+static const BBRect kAnim0FrameRects[] = {{-15, -11, 22, 10}, {-15, -12, 23, 10}, {-14, -11, 22, 8}, {-13, -11, 20, 10}};
+static const int kAnim1FrameIndices[] = {4, 5, 6, 7, 8, 3};
+static const int16 kAnim1FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim1FrameRects[] = {{-16, -3, 7, 6}, {-13, -8, 11, 10}, {-14, -12, 15, 12}, {-15, -10, 17, 10}, {-17, -10, 22, 9}, {-13, -12, 20, 12}};
+static const int kAnim2FrameIndices[] = {9, 10, 11, 12};
+static const int16 kAnim2FrameTicks[] = {6, 8, 8, 8};
+static const BBRect kAnim2FrameRects[] = {{-11, -14, 20, 14}, {-1, -14, 10, 15}, {3, -9, 6, 10}, {2, -5, 7, 6}};
+static const int kAnim3FrameIndices[] = {13, 14, 15, 16, 17};
+static const int16 kAnim3FrameTicks[] = {8, 8, 6, 6, 6};
+static const BBRect kAnim3FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim4FrameIndices[] = {18, 19};
+static const int16 kAnim4FrameTicks[] = {61, 22};
+static const BBRect kAnim4FrameRects[] = {{-8, -12, 14, 11}, {-8, -12, 14, 11}};
+static const int kAnim5FrameIndices[] = {20};
+static const int16 kAnim5FrameTicks[] = {6};
+static const BBRect kAnim5FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim6FrameIndices[] = {21, 22, 23, 24, 25, 26, 27, 28, 29};
+static const int16 kAnim6FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim6FrameRects[] = {{-59, -43, 114, 114}, {-24, -13, 44, 46}, {-12, -5, 24, 25}, {-8, -3, 15, 15}, {-5, -3, 8, 8}, {-3, -2, 5, 5}, {-1, -1, 3, 3}, {0, 0, 2, 2}, {-56, 25, 102, 50}};
+static const int kAnim7FrameIndices[] = {30};
+static const int16 kAnim7FrameTicks[] = {6};
+static const BBRect kAnim7FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim8FrameIndices[] = {31};
+static const int16 kAnim8FrameTicks[] = {6};
+static const BBRect kAnim8FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim9FrameIndices[] = {32};
+static const int16 kAnim9FrameTicks[] = {6};
+static const BBRect kAnim9FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim10FrameIndices[] = {33};
+static const int16 kAnim10FrameTicks[] = {6};
+static const BBRect kAnim10FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim11FrameIndices[] = {34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 58, 59, 60, 61, 62, 63, 64, 42, 65};
+static const int16 kAnim11FrameTicks[] = {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 6, 6, 6, 10, 10, 10, 10};
+static const BBRect kAnim11FrameRects[] = {{0, -50, 16, 47}, {1, -49, 16, 47}, {-1, -49, 17, 46}, {0, -47, 16, 45}, {2, -46, 15, 46}, {0, -48, 17, 45}, {2, -50, 14, 49}, {-2, -46, 17, 46}, {0, -57, 15, 57}, {-2, -56, 14, 56}, {-4, -56, 13, 56}, {-4, -56, 15, 56}, {5, -51, 14, 49}, {4, -52, 15, 52}, {-1, -57, 13, 57}, {0, -55, 14, 55}, {-5, -50, 17, 49}, {-9, -50, 17, 49}, {-9, -48, 16, 47}, {-6, -49, 14, 48}, {-8, -50, 17, 50}, {-10, -48, 19, 48}, {-2, -50, 14, 50}, {2, -47, 13, 48}, {-1, -57, 13, 57}, {4, -55, 12, 56}, {4, -58, 13, 59}, {5, -58, 12, 59}, {5, -57, 15, 58}, {1, -57, 14, 57}, {-7, -51, 15, 51}, {-5, -53, 16, 53}, {0, -57, 15, 57}, {1, -55, 14, 55}};
+static const int kAnim12FrameIndices[] = {66, 67, 68, 69, 70, 71, 72, 73, 69, 68, 67, 66, 74, 75};
+static const int16 kAnim12FrameTicks[] = {10, 10, 10, 20, 10, 10, 6, 10, 20, 10, 10, 10, 8, 6};
+static const BBRect kAnim12FrameRects[] = {{-5, -8, 12, 6}, {-12, -17, 24, 15}, {-12, -28, 24, 28}, {-10, -36, 20, 35}, {-9, -36, 18, 37}, {-11, -37, 17, 38}, {-6, -36, 16, 34}, {-5, -35, 20, 39}, {-10, -36, 20, 35}, {-12, -28, 24, 28}, {-12, -17, 24, 15}, {-5, -8, 12, 6}, {-15, -27, 23, 38}, {-19, -17, 15, 17}};
+static const int kAnim13FrameIndices[] = {76, 77, 78, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 98, 102, 103, 90};
+static const int16 kAnim13FrameTicks[] = {16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 6, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim13FrameRects[] = {{-21, -61, 16, 52}, {-42, -76, 7, 14}, {-43, -75, 13, 24}, {-42, -76, 7, 14}, {-42, -75, 4, 42}, {-42, -76, 11, 57}, {-40, -74, 13, 55}, {-36, -74, 11, 55}, {-31, -72, 12, 56}, {-27, -71, 14, 57}, {-20, -69, 15, 55}, {-12, -65, 15, 51}, {-7, -57, 18, 44}, {-3, -43, 18, 29}, {4, -27, 20, 14}, {0, -28, 13, 14}, {0, -38, 14, 24}, {-1, -49, 19, 36}, {0, -61, 17, 47}, {-2, -63, 19, 49}, {-5, -64, 19, 50}, {-3, -62, 18, 48}, {0, -61, 19, 47}, {0, -61, 16, 47}, {-4, -48, 17, 34}, {-9, -37, 15, 23}, {-13, -26, 14, 12}, {0, -61, 16, 47}, {0, -50, 15, 36}, {0, -39, 13, 25}, {0, -28, 12, 14}};
+static const int kAnim14FrameIndices[] = {104, 105, 106, 105, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 126, 130, 131, 118};
+static const int16 kAnim14FrameTicks[] = {16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 6, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim14FrameRects[] = {{6, -61, 14, 52}, {35, -77, 7, 16}, {29, -76, 13, 24}, {35, -77, 7, 16}, {38, -76, 4, 43}, {32, -75, 10, 55}, {24, -74, 16, 54}, {22, -74, 14, 53}, {18, -72, 12, 55}, {12, -71, 15, 57}, {2, -69, 17, 55}, {-5, -65, 18, 51}, {-13, -57, 18, 43}, {-20, -43, 23, 29}, {-26, -30, 25, 16}, {-13, -28, 13, 14}, {-16, -38, 24, 24}, {-16, -49, 20, 35}, {-15, -61, 17, 47}, {-15, -63, 17, 49}, {-13, -64, 17, 51}, {-14, -62, 15, 48}, {-19, -61, 19, 47}, {-16, -61, 16, 48}, {-18, -48, 22, 34}, {-6, -37, 14, 23}, {0, -27, 12, 14}, {-16, -61, 16, 48}, {-16, -50, 19, 36}, {-14, -39, 15, 25}, {-12, -28, 12, 15}};
+static const int kAnim15FrameIndices[] = {132, 133, 134, 133, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 154, 158, 159, 146};
+static const int16 kAnim15FrameTicks[] = {16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 6, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim15FrameRects[] = {{-21, -61, 16, 52}, {-42, -76, 7, 14}, {-43, -75, 13, 24}, {-42, -76, 7, 14}, {-42, -75, 4, 42}, {-42, -76, 11, 57}, {-40, -74, 13, 55}, {-36, -74, 11, 55}, {-31, -72, 12, 56}, {-27, -71, 14, 57}, {-20, -69, 15, 55}, {-12, -65, 15, 51}, {-7, -57, 18, 44}, {-3, -43, 18, 29}, {4, -27, 20, 14}, {0, -28, 13, 14}, {0, -38, 14, 24}, {-1, -49, 19, 36}, {0, -61, 17, 47}, {-2, -63, 19, 49}, {-5, -64, 19, 50}, {-3, -62, 18, 48}, {0, -61, 19, 47}, {0, -61, 16, 47}, {-4, -48, 17, 34}, {-9, -37, 15, 23}, {-13, -26, 14, 12}, {0, -61, 16, 47}, {0, -50, 15, 36}, {0, -39, 13, 25}, {0, -28, 12, 14}};
+static const int kAnim16FrameIndices[] = {160, 161, 162, 161, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 182, 186, 187, 174};
+static const int16 kAnim16FrameTicks[] = {16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 6, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim16FrameRects[] = {{6, -61, 14, 52}, {35, -77, 7, 16}, {29, -76, 13, 24}, {35, -77, 7, 16}, {38, -76, 4, 43}, {32, -75, 10, 55}, {24, -74, 16, 54}, {22, -74, 14, 53}, {18, -72, 12, 55}, {12, -71, 15, 57}, {2, -69, 17, 55}, {-5, -65, 18, 51}, {-13, -57, 18, 43}, {-20, -43, 23, 29}, {-26, -30, 25, 16}, {-13, -28, 13, 14}, {-16, -38, 24, 24}, {-16, -49, 20, 35}, {-15, -61, 17, 47}, {-15, -63, 17, 49}, {-13, -64, 17, 51}, {-14, -62, 15, 48}, {-19, -61, 19, 47}, {-16, -61, 16, 48}, {-18, -48, 22, 34}, {-6, -37, 14, 23}, {0, -27, 12, 14}, {-16, -61, 16, 48}, {-16, -50, 19, 36}, {-14, -39, 15, 25}, {-12, -28, 12, 15}};
+static const int kAnim17FrameIndices[] = {188, 189, 190, 189, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 210, 214, 215, 202};
+static const int16 kAnim17FrameTicks[] = {16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 6, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim17FrameRects[] = {{-21, -61, 16, 52}, {-42, -76, 7, 14}, {-43, -75, 13, 24}, {-42, -76, 7, 14}, {-42, -75, 4, 42}, {-42, -76, 11, 57}, {-40, -74, 13, 55}, {-36, -74, 11, 55}, {-31, -72, 12, 56}, {-27, -71, 14, 57}, {-20, -69, 15, 55}, {-12, -65, 15, 51}, {-7, -57, 18, 44}, {-3, -43, 18, 29}, {4, -27, 20, 14}, {0, -28, 13, 14}, {0, -38, 14, 24}, {-1, -49, 19, 36}, {0, -61, 17, 47}, {-2, -63, 19, 49}, {-5, -64, 19, 50}, {-3, -62, 18, 48}, {0, -61, 19, 47}, {0, -61, 16, 47}, {-4, -48, 17, 34}, {-9, -37, 15, 23}, {-13, -26, 14, 12}, {0, -61, 16, 47}, {0, -50, 15, 36}, {0, -39, 13, 25}, {0, -28, 12, 14}};
+static const int kAnim18FrameIndices[] = {216, 217, 218, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 238, 242, 243, 230};
+static const int16 kAnim18FrameTicks[] = {16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 6, 10, 10, 10, 10, 10, 10};
+static const BBRect kAnim18FrameRects[] = {{6, -61, 14, 52}, {35, -77, 7, 16}, {29, -76, 13, 24}, {35, -77, 7, 16}, {38, -76, 4, 43}, {32, -75, 10, 55}, {24, -74, 16, 54}, {22, -74, 14, 53}, {18, -72, 12, 55}, {12, -71, 15, 57}, {2, -69, 17, 55}, {-5, -65, 18, 51}, {-13, -57, 18, 43}, {-20, -43, 23, 29}, {-26, -30, 25, 16}, {-13, -28, 13, 14}, {-16, -38, 24, 24}, {-16, -49, 20, 35}, {-15, -61, 17, 47}, {-15, -63, 17, 49}, {-13, -64, 17, 51}, {-14, -62, 15, 48}, {-19, -61, 19, 47}, {-16, -61, 16, 48}, {-18, -48, 22, 34}, {-6, -37, 14, 23}, {0, -27, 12, 14}, {-16, -61, 16, 48}, {-16, -50, 19, 36}, {-14, -39, 15, 25}, {-12, -28, 12, 15}};
+static const int kAnim19FrameIndices[] = {244};
+static const int16 kAnim19FrameTicks[] = {6};
+static const BBRect kAnim19FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim20FrameIndices[] = {245, 246, 247, 248, 249, 250, 251, 252, 253, 254};
+static const int16 kAnim20FrameTicks[] = {6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+static const BBRect kAnim20FrameRects[] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+static const int kAnim21FrameIndices[] = {255};
+static const int16 kAnim21FrameTicks[] = {1};
+static const BBRect kAnim21FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim22FrameIndices[] = {256};
+static const int16 kAnim22FrameTicks[] = {5};
+static const BBRect kAnim22FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim23FrameIndices[] = {257};
+static const int16 kAnim23FrameTicks[] = {1};
+static const BBRect kAnim23FrameRects[] = {{0, 0, 0, 0}};
+static const int kAnim24FrameIndices[] = {258, 259};
+static const int16 kAnim24FrameTicks[] = {6, 6};
+static const BBRect kAnim24FrameRects[] = {{-9, -9, 17, 15}, {-11, -10, 19, 16}};
+static const int kAnim25FrameIndices[] = {260, 261, 262, 263, 264, 265};
+static const int16 kAnim25FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim25FrameRects[] = {{-22, -91, 45, 93}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}, {-21, -92, 43, 95}};
+static const int kAnim26FrameIndices[] = {266, 267, 268, 269, 270, 271};
+static const int16 kAnim26FrameTicks[] = {6, 6, 6, 6, 6, 6};
+static const BBRect kAnim26FrameRects[] = {{-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}, {-21, -85, 38, 86}};
+static const ObjAnimation kAnimations[] = {
+ {4, kAnim0FrameIndices, kAnim0FrameTicks, kAnim0FrameRects},
+ {6, kAnim1FrameIndices, kAnim1FrameTicks, kAnim1FrameRects},
+ {4, kAnim2FrameIndices, kAnim2FrameTicks, kAnim2FrameRects},
+ {5, kAnim3FrameIndices, kAnim3FrameTicks, kAnim3FrameRects},
+ {2, kAnim4FrameIndices, kAnim4FrameTicks, kAnim4FrameRects},
+ {1, kAnim5FrameIndices, kAnim5FrameTicks, kAnim5FrameRects},
+ {9, kAnim6FrameIndices, kAnim6FrameTicks, kAnim6FrameRects},
+ {1, kAnim7FrameIndices, kAnim7FrameTicks, kAnim7FrameRects},
+ {1, kAnim8FrameIndices, kAnim8FrameTicks, kAnim8FrameRects},
+ {1, kAnim9FrameIndices, kAnim9FrameTicks, kAnim9FrameRects},
+ {1, kAnim10FrameIndices, kAnim10FrameTicks, kAnim10FrameRects},
+ {34, kAnim11FrameIndices, kAnim11FrameTicks, kAnim11FrameRects},
+ {14, kAnim12FrameIndices, kAnim12FrameTicks, kAnim12FrameRects},
+ {31, kAnim13FrameIndices, kAnim13FrameTicks, kAnim13FrameRects},
+ {31, kAnim14FrameIndices, kAnim14FrameTicks, kAnim14FrameRects},
+ {31, kAnim15FrameIndices, kAnim15FrameTicks, kAnim15FrameRects},
+ {31, kAnim16FrameIndices, kAnim16FrameTicks, kAnim16FrameRects},
+ {31, kAnim17FrameIndices, kAnim17FrameTicks, kAnim17FrameRects},
+ {31, kAnim18FrameIndices, kAnim18FrameTicks, kAnim18FrameRects},
+ {1, kAnim19FrameIndices, kAnim19FrameTicks, kAnim19FrameRects},
+ {10, kAnim20FrameIndices, kAnim20FrameTicks, kAnim20FrameRects},
+ {1, kAnim21FrameIndices, kAnim21FrameTicks, kAnim21FrameRects},
+ {1, kAnim22FrameIndices, kAnim22FrameTicks, kAnim22FrameRects},
+ {1, kAnim23FrameIndices, kAnim23FrameTicks, kAnim23FrameRects},
+ {2, kAnim24FrameIndices, kAnim24FrameTicks, kAnim24FrameRects},
+ {6, kAnim25FrameIndices, kAnim25FrameTicks, kAnim25FrameRects},
+ {6, kAnim26FrameIndices, kAnim26FrameTicks, kAnim26FrameRects}
+};
+
+const ObjAnimation *MinigameBbTennis::getAnimation(int animIndex) {
+ return &kAnimations[animIndex];
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/minigame.cpp b/engines/bbvs/minigames/minigame.cpp
new file mode 100644
index 0000000000..aae18072d9
--- /dev/null
+++ b/engines/bbvs/minigames/minigame.cpp
@@ -0,0 +1,112 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/minigames/minigame.h"
+#include "common/savefile.h"
+
+namespace Bbvs {
+
+Minigame::Minigame(BbvsEngine *vm)
+ : _vm(vm), _spriteModule(nullptr) {
+
+ memset(_hiScoreTable, 0, sizeof(_hiScoreTable));
+ _gameState = 0;
+ _gameTicks = 0;
+ _gameResult = false;
+ _gameDone = false;
+ _fromMainGame = false;
+ _backgroundSpriteIndex = 0;
+ _titleScreenSpriteIndex = 0;
+ _numbersAnim = nullptr;
+}
+
+Minigame::~Minigame() {
+}
+
+int Minigame::drawNumber(DrawList &drawList, int number, int x, int y) {
+ int digits = 1, rightX = x;
+
+ for (int mag = 10; number / mag != 0; mag *= 10)
+ ++digits;
+
+ rightX = x + digits * 10;
+ x = rightX;
+
+ while (digits--) {
+ const int n = number % 10;
+ x -= 10;
+ drawList.add(_numbersAnim->frameIndices[n], x, y, 2000);
+ number /= 10;
+ }
+
+ return rightX;
+}
+
+void Minigame::playSound(uint index, bool loop) {
+ if (index > 0)
+ _vm->_sound->playSound(index - 1, loop);
+}
+
+void Minigame::stopSound(uint index) {
+ if (index > 0)
+ _vm->_sound->stopSound(index - 1);
+}
+
+bool Minigame::isSoundPlaying(uint index) {
+ return index > 0 && _vm->_sound->isSoundPlaying(index - 1);
+}
+
+bool Minigame::isAnySoundPlaying(const uint *indices, uint count) {
+ for (uint i = 0; i < count; ++i)
+ if (isSoundPlaying(indices[i]))
+ return true;
+ return false;
+}
+
+void Minigame::saveHiscore(int minigameNum, int score) {
+ Common::String filename = _vm->getTargetName() + "-highscore.dat";
+ Common::OutSaveFile *file = g_system->getSavefileManager()->openForSaving(filename);
+ if (file) {
+ // Reserve a byte for future usage (rarely a bad idea, you never know...)
+ file->writeByte(0);
+ _hiScoreTable[minigameNum] = score;
+ for (int i = 0; i < kMinigameCount; ++i)
+ file->writeUint32LE(_hiScoreTable[i]);
+ delete file;
+ }
+}
+
+int Minigame::loadHiscore(int minigameNum) {
+ int score = 0;
+ Common::String filename = _vm->getTargetName() + "-highscore.dat";
+ Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(filename);
+ if (file) {
+ file->readByte();
+ for (int i = 0; i < kMinigameCount; ++i)
+ _hiScoreTable[i] = file->readUint32LE();
+ delete file;
+ score = _hiScoreTable[minigameNum];
+ }
+ return score;
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/minigames/minigame.h b/engines/bbvs/minigames/minigame.h
new file mode 100644
index 0000000000..675dec360d
--- /dev/null
+++ b/engines/bbvs/minigames/minigame.h
@@ -0,0 +1,82 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_MINIGAMES_MINIGAME_H
+#define BBVS_MINIGAMES_MINIGAME_H
+
+#include "bbvs/bbvs.h"
+#include "bbvs/graphics.h"
+#include "bbvs/sound.h"
+#include "bbvs/spritemodule.h"
+
+namespace Bbvs {
+
+enum {
+ kMinigameBbLoogie = 0,
+ kMinigameBbTennis = 1,
+ kMinigameBbAnt = 2,
+ kMinigameBbAirGuitar = 3,
+ kMinigameCount
+};
+
+struct ObjAnimation {
+ int frameCount;
+ const int *frameIndices;
+ const int16 *frameTicks;
+ const BBRect *frameRects;
+};
+
+class Minigame {
+public:
+ Minigame(BbvsEngine *vm);
+ virtual ~Minigame();
+ virtual bool run(bool fromMainGame) = 0;
+protected:
+ BbvsEngine *_vm;
+ SpriteModule *_spriteModule;
+
+ int _gameState;
+ int _gameTicks;
+ bool _gameResult;
+ bool _gameDone;
+ bool _fromMainGame;
+ int _hiScoreTable[kMinigameCount];
+
+ int _backgroundSpriteIndex, _titleScreenSpriteIndex;
+
+ const ObjAnimation *_numbersAnim;
+
+ int drawNumber(DrawList &drawList, int number, int x, int y);
+
+ void playSound(uint index, bool loop = false);
+ void stopSound(uint index);
+ bool isSoundPlaying(uint index);
+ bool isAnySoundPlaying(const uint *indices, uint count);
+
+ void saveHiscore(int minigameNum, int score);
+ int loadHiscore(int minigameNum);
+
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_MINIGAMES_MINIGAME_H
diff --git a/engines/bbvs/module.mk b/engines/bbvs/module.mk
new file mode 100644
index 0000000000..90c62d0acb
--- /dev/null
+++ b/engines/bbvs/module.mk
@@ -0,0 +1,32 @@
+MODULE := engines/bbvs
+
+MODULE_OBJS := \
+ bbvs.o \
+ detection.o \
+ dialogs.o \
+ gamemodule.o \
+ graphics.o \
+ logic.o \
+ saveload.o \
+ scene.o \
+ sound.o \
+ spritemodule.o \
+ videoplayer.o \
+ walk.o \
+ minigames/bbairguitar.o \
+ minigames/bbairguitar_anims.o \
+ minigames/bbant.o \
+ minigames/bbant_anims.o \
+ minigames/bbloogie.o \
+ minigames/bbloogie_anims.o \
+ minigames/bbtennis.o \
+ minigames/bbtennis_anims.o \
+ minigames/minigame.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_BBVS), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/bbvs/saveload.cpp b/engines/bbvs/saveload.cpp
new file mode 100644
index 0000000000..ff53cc457b
--- /dev/null
+++ b/engines/bbvs/saveload.cpp
@@ -0,0 +1,278 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ */
+
+#include "bbvs/bbvs.h"
+#include "bbvs/gamemodule.h"
+#include "common/savefile.h"
+#include "graphics/thumbnail.h"
+
+namespace Bbvs {
+
+BbvsEngine::kReadSaveHeaderError BbvsEngine::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
+
+ header.version = in->readUint32LE();
+ if (header.version > BBVS_SAVEGAME_VERSION)
+ return kRSHEInvalidVersion;
+
+ byte descriptionLen = in->readByte();
+ header.description = "";
+ while (descriptionLen--)
+ header.description += (char)in->readByte();
+
+ if (loadThumbnail) {
+ header.thumbnail = Graphics::loadThumbnail(*in);
+ } else {
+ Graphics::skipThumbnail(*in);
+ }
+
+ // Not used yet, reserved for future usage
+ header.gameID = in->readByte();
+ header.flags = in->readUint32LE();
+
+ header.saveDate = in->readUint32LE();
+ header.saveTime = in->readUint32LE();
+ header.playTime = in->readUint32LE();
+
+ return ((in->eos() || in->err()) ? kRSHEIoError : kRSHENoError);
+}
+
+void BbvsEngine::savegame(const char *filename, const char *description) {
+
+ Common::OutSaveFile *out;
+ if (!(out = g_system->getSavefileManager()->openForSaving(filename))) {
+ warning("Can't create file '%s', game not saved", filename);
+ return;
+ }
+
+ TimeDate curTime;
+ g_system->getTimeAndDate(curTime);
+
+ // Header start
+ out->writeUint32LE(BBVS_SAVEGAME_VERSION);
+
+ byte descriptionLen = strlen(description);
+ out->writeByte(descriptionLen);
+ out->write(description, descriptionLen);
+
+ Graphics::saveThumbnail(*out);
+
+ // Not used yet, reserved for future usage
+ out->writeByte(0);
+ out->writeUint32LE(0);
+ uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
+ uint32 saveTime = ((curTime.tm_hour & 0xFF) << 16) | (((curTime.tm_min) & 0xFF) << 8) | ((curTime.tm_sec) & 0xFF);
+ uint32 playTime = g_engine->getTotalPlayTime() / 1000;
+ out->writeUint32LE(saveDate);
+ out->writeUint32LE(saveTime);
+ out->writeUint32LE(playTime);
+ // Header end
+
+ out->write(_snapshot, _snapshotStream->pos());
+
+ out->finalize();
+ delete out;
+}
+
+void BbvsEngine::loadgame(const char *filename) {
+ Common::InSaveFile *in;
+ if (!(in = g_system->getSavefileManager()->openForLoading(filename))) {
+ warning("Can't open file '%s', game not loaded", filename);
+ return;
+ }
+
+ SaveHeader header;
+
+ kReadSaveHeaderError errorCode = readSaveHeader(in, false, header);
+
+ if (errorCode != kRSHENoError) {
+ warning("Error loading savegame '%s'", filename);
+ delete in;
+ return;
+ }
+
+ g_engine->setTotalPlayTime(header.playTime * 1000);
+
+ memset(_sceneObjects, 0, sizeof(_sceneObjects));
+ for (int i = 0; i < kSceneObjectsCount; ++i) {
+ _sceneObjects[i].walkDestPt.x = -1;
+ _sceneObjects[i].walkDestPt.y = -1;
+ }
+
+ _currSceneNum = 0;
+ _newSceneNum = in->readUint32LE();
+
+ initScene(false);
+
+ _prevSceneNum = in->readUint32LE();
+ _gameState = in->readUint32LE();
+ _mouseCursorSpriteIndex = in->readUint32LE();
+ _mousePos.x = in->readUint16LE();
+ _mousePos.y = in->readUint16LE();
+ _currVerbNum = in->readUint32LE();
+ _activeItemType = in->readUint32LE();
+ _activeItemIndex = in->readUint32LE();
+ _verbPos.x = in->readUint16LE();
+ _verbPos.y = in->readUint16LE();
+ _inventoryButtonIndex = in->readUint32LE();
+ _currInventoryItem = in->readUint32LE();
+ _currTalkObjectIndex = in->readUint32LE();
+ _currCameraNum = in->readUint32LE();
+ _cameraPos.x = in->readUint16LE();
+ _cameraPos.y = in->readUint16LE();
+ _newCameraPos.x = in->readUint16LE();
+ _newCameraPos.y = in->readUint16LE();
+ _dialogSlotCount = in->readUint32LE();
+ _walkMousePos.x = in->readUint16LE();
+ _walkMousePos.y = in->readUint16LE();
+ in->read(_backgroundSoundsActive, kSceneSoundsCount);
+ in->read(_inventoryItemStatus, kInventoryItemStatusCount);
+ in->read(_dialogItemStatus, kDialogItemStatusCount);
+ in->read(_gameVars, kGameVarsCount);
+ in->read(_sceneVisited, kSceneVisitedCount);
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *obj = &_sceneObjects[i];
+ obj->x = in->readUint32LE();
+ obj->y = in->readUint32LE();
+ obj->animIndex = in->readUint32LE();
+ obj->frameIndex = in->readUint32LE();
+ obj->frameTicks = in->readUint32LE();
+ obj->walkCount = in->readUint32LE();
+ obj->xIncr = in->readUint32LE();
+ obj->yIncr = in->readUint32LE();
+ obj->turnValue = in->readUint32LE();
+ obj->turnCount = in->readUint32LE();
+ obj->turnTicks = in->readUint32LE();
+ obj->walkDestPt.x = in->readUint16LE();
+ obj->walkDestPt.y = in->readUint16LE();
+ obj->anim = obj->animIndex > 0 ? _gameModule->getAnimation(obj->animIndex) : 0;
+ }
+
+ updateWalkableRects();
+
+ // Restart scene background sounds
+ for (int i = 0; i < _gameModule->getSceneSoundsCount(); ++i) {
+ if (_backgroundSoundsActive[i]) {
+ SceneSound *sceneSound = _gameModule->getSceneSound(i);
+ playSound(sceneSound->soundNum, true);
+ }
+ }
+
+ _currAction = 0;
+ _currActionCommandIndex = -1;
+
+ delete in;
+
+}
+
+Common::Error BbvsEngine::loadGameState(int slot) {
+ const char *fileName = getSavegameFilename(slot);
+ loadgame(fileName);
+ return Common::kNoError;
+}
+
+Common::Error BbvsEngine::saveGameState(int slot, const Common::String &description) {
+ const char *fileName = getSavegameFilename(slot);
+ savegame(fileName, description.c_str());
+ return Common::kNoError;
+}
+
+const char *BbvsEngine::getSavegameFilename(int num) {
+ static Common::String filename;
+ filename = getSavegameFilename(_targetName, num);
+ return filename.c_str();
+}
+
+Common::String BbvsEngine::getSavegameFilename(const Common::String &target, int num) {
+ assert(num >= 0 && num <= 999);
+ return Common::String::format("%s.%03d", target.c_str(), num);
+}
+
+bool BbvsEngine::existsSavegame(int num) {
+ return _system->getSavefileManager()->listSavefiles(getSavegameFilename(_targetName, num)).size() != 0;
+}
+
+void BbvsEngine::allocSnapshot() {
+ _snapshot = new byte[kSnapshotSize];
+ _snapshotStream = new Common::SeekableMemoryWriteStream(_snapshot, kSnapshotSize);
+}
+
+void BbvsEngine::freeSnapshot() {
+ delete _snapshotStream;
+ delete[] _snapshot;
+}
+
+void BbvsEngine::saveSnapshot() {
+ _hasSnapshot = true;
+ _snapshotStream->seek(0);
+ _snapshotStream->writeUint32LE(_currSceneNum);
+ _snapshotStream->writeUint32LE(_prevSceneNum);
+ _snapshotStream->writeUint32LE(_gameState);
+ _snapshotStream->writeUint32LE(_mouseCursorSpriteIndex);
+ _snapshotStream->writeUint16LE(_mousePos.x);
+ _snapshotStream->writeUint16LE(_mousePos.y);
+ _snapshotStream->writeUint32LE(_currVerbNum);
+ _snapshotStream->writeUint32LE(_activeItemType);
+ _snapshotStream->writeUint32LE(_activeItemIndex);
+ _snapshotStream->writeUint16LE(_verbPos.x);
+ _snapshotStream->writeUint16LE(_verbPos.y);
+ _snapshotStream->writeUint32LE(_inventoryButtonIndex);
+ _snapshotStream->writeUint32LE(_currInventoryItem);
+ _snapshotStream->writeUint32LE(_currTalkObjectIndex);
+ _snapshotStream->writeUint32LE(_currCameraNum);
+ _snapshotStream->writeUint16LE(_cameraPos.x);
+ _snapshotStream->writeUint16LE(_cameraPos.y);
+ _snapshotStream->writeUint16LE(_newCameraPos.x);
+ _snapshotStream->writeUint16LE(_newCameraPos.y);
+ _snapshotStream->writeUint32LE(_dialogSlotCount);
+ _snapshotStream->writeUint16LE(_walkMousePos.x);
+ _snapshotStream->writeUint16LE(_walkMousePos.y);
+ _snapshotStream->write(_backgroundSoundsActive, kSceneSoundsCount);
+ _snapshotStream->write(_inventoryItemStatus, kInventoryItemStatusCount);
+ _snapshotStream->write(_dialogItemStatus, kDialogItemStatusCount);
+ _snapshotStream->write(_gameVars, kGameVarsCount);
+ _snapshotStream->write(_sceneVisited, kSceneVisitedCount);
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *obj = &_sceneObjects[i];
+ _snapshotStream->writeUint32LE(obj->x);
+ _snapshotStream->writeUint32LE(obj->y);
+ _snapshotStream->writeUint32LE(obj->animIndex);
+ _snapshotStream->writeUint32LE(obj->frameIndex);
+ _snapshotStream->writeUint32LE(obj->frameTicks);
+ _snapshotStream->writeUint32LE(obj->walkCount);
+ _snapshotStream->writeUint32LE(obj->xIncr);
+ _snapshotStream->writeUint32LE(obj->yIncr);
+ _snapshotStream->writeUint32LE(obj->turnValue);
+ _snapshotStream->writeUint32LE(obj->turnCount);
+ _snapshotStream->writeUint32LE(obj->turnTicks);
+ _snapshotStream->writeUint16LE(obj->walkDestPt.x);
+ _snapshotStream->writeUint16LE(obj->walkDestPt.y);
+ }
+}
+
+void BbvsEngine::writeContinueSavegame() {
+ if (_hasSnapshot) {
+ saveGameState(0, "Continue");
+ }
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/scene.cpp b/engines/bbvs/scene.cpp
new file mode 100644
index 0000000000..0d86eb4dbc
--- /dev/null
+++ b/engines/bbvs/scene.cpp
@@ -0,0 +1,227 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/bbvs.h"
+#include "bbvs/gamemodule.h"
+#include "bbvs/graphics.h"
+#include "bbvs/sound.h"
+
+namespace Bbvs {
+
+static const int kAfterVideoSceneNum[] = {
+ 0, 43, 23, 12, 4, 44, 2,
+ 16, 4, 4, 4, 44, 12, 44
+};
+
+void BbvsEngine::loadScene(int sceneNum) {
+ debug(0, "BbvsEngine::loadScene() sceneNum: %d", sceneNum);
+
+ Common::String sprFilename = Common::String::format("vnm/vspr%04d.vnm", sceneNum);
+ Common::String gamFilename = Common::String::format("vnm/game%04d.vnm", sceneNum);
+
+ _screen->clear();
+
+ _spriteModule->load(sprFilename.c_str());
+ _gameModule->load(gamFilename.c_str());
+
+ Palette palette = _spriteModule->getPalette();
+ _screen->setPalette(palette);
+
+ // Preload sounds
+ for (uint i = 0; i < _gameModule->getPreloadSoundsCount(); ++i) {
+ Common::String filename = Common::String::format("snd/snd%05d.aif", _gameModule->getPreloadSound(i));
+ _sound->loadSound(filename);
+ }
+
+ if (sceneNum >= kMainMenu) {
+ DrawList drawList;
+ drawList.add(_gameModule->getBgSpriteIndex(0), 0, 0, 0);
+ _screen->drawDrawList(drawList, _spriteModule);
+ drawScreen();
+ }
+
+}
+
+void BbvsEngine::initScene(bool sounds) {
+
+ stopSpeech();
+ stopSounds();
+ _sound->unloadSounds();
+
+ _gameState = kGSScene;
+ _prevSceneNum = _currSceneNum;
+ _sceneVisited[_currSceneNum] = 1;
+ _mouseCursorSpriteIndex = 0;
+ _verbPos.x = -1;
+ _verbPos.y = -1;
+ _activeItemType = kITEmpty;
+ _activeItemIndex = 0;
+ _cameraPos.x = 0;
+ _cameraPos.y = 0;
+ _newCameraPos.x = 0;
+ _newCameraPos.y = 0;
+ _inventoryButtonIndex = -1;
+ _currTalkObjectIndex = -1;
+ _currCameraNum = 0;
+ _walkMousePos.x = -1;
+ _walkMousePos.y = -1;
+ _currAction = 0;
+ _currActionCommandIndex = -1;
+ _currActionCommandTimeStamp = 0;
+ _dialogSlotCount = 0;
+ _buttheadObject = 0;
+ _beavisObject = 0;
+
+ memset(_backgroundSoundsActive, 0, sizeof(_backgroundSoundsActive));
+
+ memset(_sceneObjects, 0, sizeof(_sceneObjects));
+ for (int i = 0; i < kSceneObjectsCount; ++i) {
+ _sceneObjects[i].walkDestPt.x = -1;
+ _sceneObjects[i].walkDestPt.y = -1;
+ }
+
+ memset(_dialogItemStatus, 0, sizeof(_dialogItemStatus));
+
+ _sceneObjectActions.clear();
+
+ loadScene(_newSceneNum);
+ _currSceneNum = _newSceneNum;
+ _newSceneNum = 0;
+
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i)
+ _sceneObjects[i].sceneObjectDef = _gameModule->getSceneObjectDef(i);
+
+ for (int i = 0; i < _gameModule->getSceneObjectInitsCount(); ++i) {
+ SceneObjectInit *soInit = _gameModule->getSceneObjectInit(i);
+ if (evalCondition(soInit->conditions)) {
+ SceneObject *sceneObject = &_sceneObjects[soInit->sceneObjectIndex];
+ sceneObject->anim = _gameModule->getAnimation(soInit->animIndex);
+ sceneObject->animIndex = soInit->animIndex;
+ sceneObject->frameIndex = sceneObject->anim->frameCount - 1;
+ sceneObject->frameTicks = 1;
+ sceneObject->x = soInit->x << 16;
+ sceneObject->y = soInit->y << 16;
+ }
+ }
+
+ if (_gameModule->getButtheadObjectIndex() >= 0) {
+ _buttheadObject = &_sceneObjects[_gameModule->getButtheadObjectIndex()];
+ // Search for the Beavis object
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i)
+ if (!strcmp(_sceneObjects[i].sceneObjectDef->name, "Beavis")) {
+ _beavisObject = &_sceneObjects[i];
+ break;
+ }
+ }
+
+ updateSceneObjectsTurnValue();
+
+ updateWalkableRects();
+
+ _currCameraNum = 0;
+ if (_buttheadObject) {
+ int minDistance = 0xFFFFFF;
+ for (int cameraNum = 0; cameraNum < 4; ++cameraNum) {
+ CameraInit *cameraInit = _gameModule->getCameraInit(cameraNum);
+ int curDistance = ABS(cameraInit->cameraPos.x - (int)(_buttheadObject->x >> 16) + 160);
+ if (curDistance < minDistance) {
+ minDistance = curDistance;
+ _currCameraNum = cameraNum;
+ }
+ }
+ }
+
+ _cameraPos = _gameModule->getCameraInit(_currCameraNum)->cameraPos;
+ _newCameraPos = _cameraPos;
+
+ _walkAreaActions.clear();
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ for (int j = 0; j < 8; ++j)
+ if (action->conditions.conditions[j].cond == kCondIsButtheadAtBgObject)
+ _walkAreaActions.push_back(action);
+ }
+
+ _mouseCursorSpriteIndex = 0;
+
+ _activeItemIndex = 0;
+ _activeItemType = kITEmpty;
+
+ for (int i = 0; i < _gameModule->getActionsCount(); ++i) {
+ Action *action = _gameModule->getAction(i);
+ if (evalCondition(action->conditions)) {
+ _gameState = kGSWait;
+ _currAction = action;
+ for (uint j = 0; j < action->actionCommands.size(); ++j) {
+ ActionCommand *actionCommand = &action->actionCommands[j];
+ if (actionCommand->cmd == kActionCmdSetCameraPos) {
+ _currCameraNum = actionCommand->param;
+ _cameraPos = _gameModule->getCameraInit(_currCameraNum)->cameraPos;
+ _newCameraPos = _cameraPos;
+ break;
+ }
+ }
+ break;
+ }
+ }
+
+ if (sounds)
+ updateBackgroundSounds();
+
+}
+
+bool BbvsEngine::changeScene() {
+
+ writeContinueSavegame();
+
+ if (_newSceneNum >= 27 && _newSceneNum <= 30) {
+ // Run minigames
+ stopSpeech();
+ stopSounds();
+ _sceneVisited[_currSceneNum] = 1;
+ if (runMinigame(_newSceneNum - 27)) {
+ SWAP(_currSceneNum, _newSceneNum);
+ }
+ } else if (_newSceneNum >= 31 && _newSceneNum <= 43) {
+ // Play video
+ stopSpeech();
+ stopSounds();
+ _sceneVisited[_currSceneNum] = 1;
+ _playVideoNumber = _newSceneNum - 30;
+ _currSceneNum = _newSceneNum;
+ _newSceneNum = kAfterVideoSceneNum[_playVideoNumber];
+ } else if (_newSceneNum >= 100 && _currSceneNum == kCredits) {
+ // Play secret video
+ stopSounds();
+ _playVideoNumber = _newSceneNum;
+ _currSceneNum = 49;
+ _newSceneNum = kCredits;
+ } else {
+ // Normal scene
+ initScene(true);
+ }
+
+ return true;
+
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/sound.cpp b/engines/bbvs/sound.cpp
new file mode 100644
index 0000000000..7f9c00ad48
--- /dev/null
+++ b/engines/bbvs/sound.cpp
@@ -0,0 +1,107 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/sound.h"
+#include "audio/decoders/aiff.h"
+#include "common/debug.h"
+#include "common/file.h"
+#include "common/system.h"
+
+namespace Bbvs {
+
+Sound::Sound() : _stream(0) {
+}
+
+Sound::~Sound() {
+ stop();
+ delete _stream;
+}
+
+void Sound::load(const Common::String &filename) {
+ Common::File *fd = new Common::File();
+ if (!fd->open(filename)) {
+ delete fd;
+ error("SoundMan::loadSound() Could not load %s", filename.c_str());
+ }
+ _stream = Audio::makeAIFFStream(fd, DisposeAfterUse::YES);
+ _filename = filename;
+}
+
+void Sound::play(bool loop) {
+ debug(0, "Sound::play() [%s] loop:%d", _filename.c_str(), loop);
+ stop();
+ _stream->rewind();
+ Audio::AudioStream *audioStream = Audio::makeLoopingAudioStream(_stream, loop ? 0 : 1);
+ g_system->getMixer()->playStream(Audio::Mixer::kSFXSoundType, &_handle, audioStream,
+ -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
+}
+
+void Sound::stop() {
+ g_system->getMixer()->stopHandle(_handle);
+}
+
+bool Sound::isPlaying() {
+ return g_system->getMixer()->isSoundHandleActive(_handle);
+}
+
+SoundMan::~SoundMan() {
+ stopAllSounds();
+ unloadSounds();
+}
+
+void SoundMan::loadSound(const Common::String &filename) {
+ Sound *sound = new Sound();
+ sound->load(filename);
+ _sounds.push_back(sound);
+}
+
+void SoundMan::playSound(uint index, bool loop) {
+ _sounds[index]->play(loop);
+}
+
+void SoundMan::stopSound(uint index) {
+ _sounds[index]->stop();
+}
+
+bool SoundMan::isSoundPlaying(uint index) {
+ return _sounds[index]->isPlaying();
+}
+
+bool SoundMan::isAnySoundPlaying(uint *indices, uint count) {
+ for (uint i = 0; i < count; ++i)
+ if (isSoundPlaying(indices[i]))
+ return true;
+ return false;
+}
+
+void SoundMan::unloadSounds() {
+ for (uint i = 0; i < _sounds.size(); ++i)
+ delete _sounds[i];
+ _sounds.clear();
+}
+
+void SoundMan::stopAllSounds() {
+ for (uint i = 0; i < _sounds.size(); ++i)
+ _sounds[i]->stop();
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/sound.h b/engines/bbvs/sound.h
new file mode 100644
index 0000000000..4e44c2b962
--- /dev/null
+++ b/engines/bbvs/sound.h
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_SOUND_H
+#define BBVS_SOUND_H
+
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+#include "common/array.h"
+
+namespace Bbvs {
+
+class Sound {
+public:
+ Sound();
+ ~Sound();
+ void load(const Common::String &filename);
+ void play(bool loop);
+ void stop();
+ bool isPlaying();
+protected:
+ Audio::SeekableAudioStream *_stream;
+ Audio::SoundHandle _handle;
+ // Keep the filename for debugging purposes
+ Common::String _filename;
+};
+
+class SoundMan {
+public:
+ ~SoundMan();
+ void loadSound(const Common::String &fileName);
+ void playSound(uint index, bool loop = false);
+ void stopSound(uint index);
+ bool isSoundPlaying(uint index);
+ bool isAnySoundPlaying(uint *indices, uint count);
+ void unloadSounds();
+ void stopAllSounds();
+protected:
+ Common::Array<Sound*> _sounds;
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_SOUND_H
diff --git a/engines/bbvs/spritemodule.cpp b/engines/bbvs/spritemodule.cpp
new file mode 100644
index 0000000000..8eae7f9a6a
--- /dev/null
+++ b/engines/bbvs/spritemodule.cpp
@@ -0,0 +1,112 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/spritemodule.h"
+
+namespace Bbvs {
+
+byte *Sprite::getRow(int y) {
+ if (type == 1)
+ return data + READ_LE_UINT32((data + offset) + y * 4);
+ else
+ return data + offset + y * width;
+}
+
+SpriteModule::SpriteModule()
+ : _spritesCount(0), _paletteStart(0), _paletteCount(0), _spriteData(0) {
+}
+
+SpriteModule::~SpriteModule() {
+ unload();
+}
+
+void SpriteModule::load(const char *filename) {
+ unload();
+
+ Common::File fd;
+ if (!fd.open(filename))
+ error("SpriteModule::load() Could not open %s", filename);
+
+ fd.readUint32LE(); // Skip magic
+ fd.readUint32LE(); // Skip unused
+ fd.readUint32LE(); // Skip filesize
+
+ _paletteOffs = fd.readUint32LE();
+ fd.readUint32LE(); // Skip unused flagsTbl1Ofs
+ fd.readUint32LE(); // Skip unused flagsTbl2Ofs
+ _spriteTblOffs = fd.readUint32LE();
+ _paletteStart = fd.readUint32LE();
+ _paletteCount = fd.readUint32LE();
+ _spritesCount = fd.readUint32LE();
+
+ debug(0, "_paletteOffs: %08X", _paletteOffs);
+ debug(0, "_spriteTblOffs: %08X", _spriteTblOffs);
+ debug(0, "_paletteStart: %d", _paletteStart);
+ debug(0, "_paletteCount: %d", _paletteCount);
+ debug(0, "_spritesCount: %d", _spritesCount);
+
+ _spriteDataSize = fd.size();
+ _spriteData = new byte[_spriteDataSize];
+ fd.seek(0);
+ fd.read(_spriteData, _spriteDataSize);
+
+ // Convert palette
+ byte *palette = _spriteData + _paletteOffs;
+ for (int i = 0; i < _paletteCount; ++i) {
+ palette[i * 3 + 0] <<= 2;
+ palette[i * 3 + 1] <<= 2;
+ palette[i * 3 + 2] <<= 2;
+ }
+
+}
+
+Sprite SpriteModule::getSprite(int index) {
+ Sprite sprite;
+ uint32 spriteOffs = READ_LE_UINT32(_spriteData + _spriteTblOffs + index * 4);
+ byte *info = _spriteData + spriteOffs;
+ sprite.data = _spriteData;
+ sprite.offset = READ_LE_UINT32(info + 0);
+ sprite.type = READ_LE_UINT32(info + 4);
+ sprite.width = READ_LE_UINT32(info + 8);
+ sprite.height = READ_LE_UINT32(info + 12);
+ sprite.xOffs = READ_LE_UINT32(info + 16);
+ sprite.yOffs = READ_LE_UINT32(info + 20);
+ return sprite;
+}
+
+Palette SpriteModule::getPalette() {
+ Palette palette;
+ palette.data = _spriteData + _paletteOffs;
+ palette.start = _paletteStart;
+ palette.count = _paletteCount;
+ return palette;
+}
+
+void SpriteModule::unload() {
+ _spritesCount = 0;
+ _paletteStart = 0;
+ _paletteCount = 0;
+ delete[] _spriteData;
+ _spriteData = 0;
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/spritemodule.h b/engines/bbvs/spritemodule.h
new file mode 100644
index 0000000000..c287815dec
--- /dev/null
+++ b/engines/bbvs/spritemodule.h
@@ -0,0 +1,68 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BBVS_SPRITEMODULE_H
+#define BBVS_SPRITEMODULE_H
+
+#include "common/array.h"
+#include "common/file.h"
+#include "common/memstream.h"
+#include "common/rect.h"
+#include "common/str.h"
+
+namespace Bbvs {
+
+struct Sprite {
+ int type;
+ int xOffs, yOffs;
+ int width, height;
+ byte *data;
+ uint32 offset;
+ byte *getRow(int y);
+};
+
+struct Palette {
+ byte *data;
+ int start, count;
+};
+
+class SpriteModule {
+public:
+ SpriteModule();
+ ~SpriteModule();
+ void load(const char *filename);
+ int getSpriteCount() { return _spritesCount; }
+ Sprite getSprite(int index);
+ Palette getPalette();
+protected:
+ byte *_spriteData;
+ int _spriteDataSize;
+ int _spritesCount;
+ uint32 _spriteTblOffs;
+ uint32 _paletteOffs;
+ int _paletteStart, _paletteCount;
+ void unload();
+};
+
+} // End of namespace Bbvs
+
+#endif // BBVS_SPRITEMODULE_H
diff --git a/engines/bbvs/videoplayer.cpp b/engines/bbvs/videoplayer.cpp
new file mode 100644
index 0000000000..fda9372ade
--- /dev/null
+++ b/engines/bbvs/videoplayer.cpp
@@ -0,0 +1,82 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/bbvs.h"
+#include "engines/util.h"
+#include "graphics/palette.h"
+#include "graphics/surface.h"
+#include "video/avi_decoder.h"
+
+namespace Bbvs {
+
+void BbvsEngine::playVideo(int videoNum) {
+ Common::String videoFilename;
+
+ if (videoNum >= 100)
+ videoFilename = Common::String::format("snd/snd%05d.aif", videoNum + 1400);
+ else
+ videoFilename = Common::String::format("vid/video%03d.avi", videoNum - 1);
+
+ // Set the correct video mode
+ initGraphics(320, 240, false, 0);
+ if (_system->getScreenFormat().bytesPerPixel == 1) {
+ warning("Couldn't switch to a RGB color video mode to play a video.");
+ return;
+ }
+
+ Video::VideoDecoder *videoDecoder = new Video::AVIDecoder();
+ if (!videoDecoder->loadFile(videoFilename)) {
+ delete videoDecoder;
+ warning("Unable to open video %s", videoFilename.c_str());
+ return;
+ }
+
+ videoDecoder->start();
+
+ bool skipVideo = false;
+
+ while (!shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) {
+ if (videoDecoder->needsUpdate()) {
+ const Graphics::Surface *frame = videoDecoder->decodeNextFrame();
+ if (frame) {
+ _system->copyRectToScreen(frame->getPixels(), frame->pitch, 0, 0, frame->w, frame->h);
+ _system->updateScreen();
+ }
+ }
+
+ Common::Event event;
+ while (g_system->getEventManager()->pollEvent(event)) {
+ if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) ||
+ event.type == Common::EVENT_LBUTTONUP)
+ skipVideo = true;
+ }
+
+ _system->delayMillis(10);
+ }
+
+ delete videoDecoder;
+
+ initGraphics(320, 240, false);
+
+}
+
+} // End of namespace Bbvs
diff --git a/engines/bbvs/walk.cpp b/engines/bbvs/walk.cpp
new file mode 100644
index 0000000000..cf8942e525
--- /dev/null
+++ b/engines/bbvs/walk.cpp
@@ -0,0 +1,464 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bbvs/bbvs.h"
+#include "bbvs/gamemodule.h"
+
+namespace Bbvs {
+
+static const int8 kTurnInfo[8][8] = {
+ { 0, 1, 1, 1, 1, -1, -1, -1},
+ {-1, 0, 1, 1, 1, 1, -1, -1},
+ {-1, -1, 0, 1, 1, 1, 1, -1},
+ {-1, -1, -1, 0, 1, 1, 1, 1},
+ { 1, -1, -1, -1, 0, 1, 1, 1},
+ { 1, 1, -1, -1, -1, 0, 1, 1},
+ { 1, 1, 1, -1, -1, -1, 0, 1},
+ { 1, 1, 1, 1, -1, -1, -1, 0}
+};
+
+static const int8 kWalkAnimTbl[32] = {
+ 3, 0, 0, 0, 2, 1, 1, 1,
+ 15, 12, 14, 13, 0, 0, 0, 0,
+ 7, 9, 4, 8, 6, 10, 5, 11,
+ 3, 0, 2, 1, 15, 12, 14, 13
+};
+
+void BbvsEngine::startWalkObject(SceneObject *sceneObject) {
+ if (_buttheadObject != sceneObject && _beavisObject != sceneObject)
+ return;
+
+ initWalkAreas(sceneObject);
+ _sourceWalkAreaPt.x = sceneObject->x >> 16;
+ _sourceWalkAreaPt.y = sceneObject->y >> 16;
+
+ _sourceWalkArea = getWalkAreaAtPos(_sourceWalkAreaPt);
+ if (!_sourceWalkArea)
+ return;
+
+ _destWalkAreaPt = sceneObject->walkDestPt;
+
+ _destWalkArea = getWalkAreaAtPos(_destWalkAreaPt);
+ if (!_destWalkArea)
+ return;
+
+ if (_sourceWalkArea != _destWalkArea) {
+ _currWalkDistance = kMaxDistance;
+ walkFindPath(_sourceWalkArea, 0);
+ _destWalkAreaPt = _currWalkDistance == kMaxDistance ? _sourceWalkAreaPt : _finalWalkPt;
+ }
+
+ walkObject(sceneObject, _destWalkAreaPt, sceneObject->sceneObjectDef->walkSpeed);
+
+}
+
+void BbvsEngine::updateWalkObject(SceneObject *sceneObject) {
+ int animIndex;
+
+ if (sceneObject->walkCount > 0 && (sceneObject->xIncr != 0 || sceneObject->yIncr != 0)) {
+ if (ABS(sceneObject->xIncr) <= ABS(sceneObject->yIncr))
+ sceneObject->turnValue = sceneObject->yIncr >= 0 ? 0 : 4;
+ else
+ sceneObject->turnValue = sceneObject->xIncr >= 0 ? 6 : 2;
+ animIndex = sceneObject->sceneObjectDef->animIndices[kWalkAnimTbl[sceneObject->turnValue]];
+ sceneObject->turnCount = 0;
+ sceneObject->turnTicks = 0;
+ } else {
+ animIndex = sceneObject->sceneObjectDef->animIndices[kWalkTurnTbl[sceneObject->turnValue]];
+ }
+
+ Animation *anim = 0;
+ if (animIndex > 0)
+ anim = _gameModule->getAnimation(animIndex);
+
+ if (sceneObject->anim != anim) {
+ if (anim) {
+ sceneObject->anim = anim;
+ sceneObject->animIndex = animIndex;
+ sceneObject->frameTicks = 1;
+ sceneObject->frameIndex = anim->frameCount - 1;
+ } else {
+ sceneObject->anim = 0;
+ sceneObject->animIndex = 0;
+ sceneObject->frameTicks = 0;
+ sceneObject->frameIndex = 0;
+ }
+ }
+
+}
+
+void BbvsEngine::walkObject(SceneObject *sceneObject, const Common::Point &destPt, int walkSpeed) {
+ int deltaX = destPt.x - (sceneObject->x >> 16);
+ int deltaY = destPt.y - (sceneObject->y >> 16);
+ float distance = sqrt((double)(deltaX * deltaX + deltaY * deltaY));
+ // NOTE The original doesn't have this check but without it the whole pathfinding breaks
+ if (distance > 0.0) {
+ sceneObject->walkCount = distance / ((((float)ABS(deltaX) / distance) + 1.0) * ((float)walkSpeed / 120));
+ sceneObject->xIncr = ((float)deltaX / sceneObject->walkCount) * 65536.0;
+ sceneObject->yIncr = ((float)deltaY / sceneObject->walkCount) * 65536.0;
+ sceneObject->x = (sceneObject->x & 0xFFFF0000) | 0x8000;
+ sceneObject->y = (sceneObject->y & 0xFFFF0000) | 0x8000;
+ } else
+ sceneObject->walkCount = 0;
+}
+
+void BbvsEngine::turnObject(SceneObject *sceneObject) {
+ if (sceneObject->turnTicks > 0) {
+ --sceneObject->turnTicks;
+ } else {
+ int turnDir = kTurnInfo[sceneObject->turnValue][sceneObject->turnCount & 0x7F];
+ if (turnDir) {
+ sceneObject->turnValue = (sceneObject->turnValue + turnDir) & 7;
+ int turnAnimIndex = sceneObject->sceneObjectDef->animIndices[kWalkTurnTbl[sceneObject->turnValue]];
+ if (turnAnimIndex) {
+ Animation *anim = _gameModule->getAnimation(turnAnimIndex);
+ if (anim) {
+ sceneObject->anim = anim;
+ sceneObject->animIndex = turnAnimIndex;
+ sceneObject->turnTicks = 4;
+ sceneObject->frameTicks = 1;
+ sceneObject->frameIndex = anim->frameCount - 1;
+ }
+ }
+ } else {
+ sceneObject->turnCount = 0;
+ }
+ }
+}
+
+int BbvsEngine::rectSubtract(const Common::Rect &rect1, const Common::Rect &rect2, Common::Rect *outRects) {
+ int count = 0;
+ Common::Rect workRect = rect1.findIntersectingRect(rect2);
+ if (!workRect.isEmpty()) {
+ count = 0;
+ outRects[count] = Common::Rect(rect2.width(), workRect.top - rect2.top);
+ if (!outRects[count].isEmpty()) {
+ outRects[count].translate(rect2.left, rect2.top);
+ ++count;
+ }
+ outRects[count] = Common::Rect(workRect.left - rect2.left, workRect.height());
+ if (!outRects[count].isEmpty()) {
+ outRects[count].translate(rect2.left, workRect.top);
+ ++count;
+ }
+ outRects[count] = Common::Rect(rect2.right - workRect.right, workRect.height());
+ if (!outRects[count].isEmpty()) {
+ outRects[count].translate(workRect.right, workRect.top);
+ ++count;
+ }
+ outRects[count] = Common::Rect(rect2.width(), rect2.bottom - workRect.bottom);
+ if (!outRects[count].isEmpty()) {
+ outRects[count].translate(rect2.left, workRect.bottom);
+ ++count;
+ }
+ } else {
+ outRects[0] = rect2;
+ count = 1;
+ }
+ return count;
+}
+
+WalkInfo *BbvsEngine::addWalkInfo(int16 x, int16 y, int delta, int direction, int16 midPtX, int16 midPtY, int walkAreaIndex) {
+ WalkInfo *walkInfo = &_walkInfos[_walkInfosCount++];
+ walkInfo->walkAreaIndex = walkAreaIndex;
+ walkInfo->direction = direction;
+ walkInfo->x = x;
+ walkInfo->y = y;
+ walkInfo->delta = delta;
+ walkInfo->midPt.x = midPtX;
+ walkInfo->midPt.y = midPtY;
+ return walkInfo;
+}
+
+void BbvsEngine::initWalkAreas(SceneObject *sceneObject) {
+ int16 objX = sceneObject->x >> 16;
+ int16 objY = sceneObject->y >> 16;
+ Common::Rect rect;
+ bool doRect = false;
+ Common::Rect *workWalkableRects;
+
+ if (_buttheadObject == sceneObject && _beavisObject->anim) {
+ rect = _beavisObject->anim->frameRects2[_beavisObject->frameIndex];
+ rect.translate(_beavisObject->x >> 16, 1 + (_beavisObject->y >> 16));
+ doRect = !rect.isEmpty();
+ } else if (_buttheadObject->anim) {
+ rect = _buttheadObject->anim->frameRects2[_buttheadObject->frameIndex];
+ rect.translate(_buttheadObject->x >> 16, 1 + (_buttheadObject->y >> 16));
+ doRect = !rect.isEmpty();
+ }
+
+ workWalkableRects = _walkableRects;
+
+ _walkAreasCount = _walkableRectsCount;
+
+ if (doRect && !rect.contains(objX, objY)) {
+ _walkAreasCount = 0;
+ for (int i = 0; i < _walkableRectsCount; ++i)
+ _walkAreasCount += rectSubtract(rect, _walkableRects[i], &_tempWalkableRects1[_walkAreasCount]);
+ workWalkableRects = _tempWalkableRects1;
+ }
+
+ for (int i = 0; i < _walkAreasCount; ++i) {
+ _walkAreas[i].x = workWalkableRects[i].left;
+ _walkAreas[i].y = workWalkableRects[i].top;
+ _walkAreas[i].width = workWalkableRects[i].width();
+ _walkAreas[i].height = workWalkableRects[i].height();
+ _walkAreas[i].checked = false;
+ _walkAreas[i].linksCount = 0;
+ }
+
+ _walkInfosCount = 0;
+
+ // Find connections between the walkRects
+
+ for (int i = 0; i < _walkAreasCount; ++i) {
+ WalkArea *walkArea1 = &_walkAreas[i];
+ int xIter = walkArea1->x + walkArea1->width;
+ int yIter = walkArea1->y + walkArea1->height;
+
+ for (int j = 0; j < _walkAreasCount; ++j) {
+ WalkArea *walkArea2 = &_walkAreas[j];
+
+ if (i == j)
+ continue;
+
+ if (walkArea2->y == yIter) {
+ int wa1x = MAX(walkArea1->x, walkArea2->x);
+ int wa2x = MIN(walkArea2->x + walkArea2->width, xIter);
+ if (wa2x > wa1x) {
+ debug(5, "WalkArea %d connected to %d by Y", i, j);
+ WalkInfo *walkInfo1 = addWalkInfo(wa1x, yIter - 1, wa2x - wa1x, 0, wa1x + (wa2x - wa1x) / 2, yIter - 1, i);
+ WalkInfo *walkInfo2 = addWalkInfo(wa1x, yIter, wa2x - wa1x, 0, wa1x + (wa2x - wa1x) / 2, yIter, j);
+ walkArea1->linksD1[walkArea1->linksCount] = walkInfo1;
+ walkArea1->linksD2[walkArea1->linksCount] = walkInfo2;
+ walkArea1->links[walkArea1->linksCount++] = walkArea2;
+ walkArea2->linksD1[walkArea2->linksCount] = walkInfo2;
+ walkArea2->linksD2[walkArea2->linksCount] = walkInfo1;
+ walkArea2->links[walkArea2->linksCount++] = walkArea1;
+ }
+ }
+
+ if (walkArea2->x == xIter) {
+ int wa1y = MAX(walkArea1->y, walkArea2->y);
+ int wa2y = MIN(walkArea2->y + walkArea2->height, yIter);
+ if (wa2y > wa1y) {
+ debug(5, "WalkArea %d connected to %d by X", i, j);
+ WalkInfo *walkInfo1 = addWalkInfo(xIter - 1, wa1y, wa2y - wa1y, 1, xIter - 1, wa1y + (wa2y - wa1y) / 2, i);
+ WalkInfo *walkInfo2 = addWalkInfo(xIter, wa1y, wa2y - wa1y, 1, xIter, wa1y + (wa2y - wa1y) / 2, j);
+ walkArea1->linksD1[walkArea1->linksCount] = walkInfo1;
+ walkArea1->linksD2[walkArea1->linksCount] = walkInfo2;
+ walkArea1->links[walkArea1->linksCount++] = walkArea2;
+ walkArea2->linksD1[walkArea2->linksCount] = walkInfo2;
+ walkArea2->linksD2[walkArea2->linksCount] = walkInfo1;
+ walkArea2->links[walkArea2->linksCount++] = walkArea1;
+ }
+ }
+
+ }
+
+ }
+
+}
+
+WalkArea *BbvsEngine::getWalkAreaAtPos(const Common::Point &pt) {
+ for (int i = 0; i < _walkAreasCount; ++i) {
+ WalkArea *walkArea = &_walkAreas[i];
+ if (walkArea->contains(pt))
+ return walkArea;
+ }
+ return 0;
+}
+
+bool BbvsEngine::canButtheadWalkToDest(const Common::Point &destPt) {
+ Common::Point srcPt;
+
+ _walkReachedDestArea = false;
+ initWalkAreas(_buttheadObject);
+ srcPt.x = _buttheadObject->x >> 16;
+ srcPt.y = _buttheadObject->y >> 16;
+ _sourceWalkArea = getWalkAreaAtPos(srcPt);
+ if (_sourceWalkArea) {
+ _destWalkArea = getWalkAreaAtPos(destPt);
+ if (_destWalkArea)
+ canWalkToDest(_sourceWalkArea, 0);
+ }
+ return _walkReachedDestArea;
+}
+
+void BbvsEngine::canWalkToDest(WalkArea *walkArea, int infoCount) {
+
+ if (_destWalkArea == walkArea) {
+ _walkReachedDestArea = true;
+ return;
+ }
+
+ if (_gameModule->getFieldC() <= 320 || infoCount <= 20) {
+ walkArea->checked = true;
+ for (int linkIndex = 0; linkIndex < walkArea->linksCount; ++linkIndex) {
+ if (!walkArea->links[linkIndex]->checked) {
+ canWalkToDest(walkArea->links[linkIndex], infoCount + 2);
+ if (_walkReachedDestArea)
+ break;
+ }
+ }
+ walkArea->checked = false;
+ }
+
+}
+
+bool BbvsEngine::walkTestLineWalkable(const Common::Point &sourcePt, const Common::Point &destPt, WalkInfo *walkInfo) {
+ const float ptDeltaX = destPt.x - sourcePt.x;
+ const float ptDeltaY = destPt.y - sourcePt.y;
+ const float wDeltaX = walkInfo->x - sourcePt.x;
+ const float wDeltaY = walkInfo->y - sourcePt.y;
+ if (destPt.x == sourcePt.x)
+ return true;
+ if (walkInfo->direction) {
+ const float nDeltaY = wDeltaX * ptDeltaY / ptDeltaX + (float)sourcePt.y - (float)walkInfo->y;
+ return (nDeltaY >= 0.0) && (nDeltaY < (float)walkInfo->delta);
+ } else {
+ const float nDeltaX = wDeltaY / ptDeltaX * ptDeltaY + (float)sourcePt.x - (float)walkInfo->x;
+ return (nDeltaX >= 0.0) && (nDeltaX < (float)walkInfo->delta);
+ }
+ return false;
+}
+
+void BbvsEngine::walkFindPath(WalkArea *sourceWalkArea, int infoCount) {
+ if (_destWalkArea == sourceWalkArea) {
+ walkFoundPath(infoCount);
+ } else if (_gameModule->getFieldC() <= 320 || infoCount <= 20) {
+ sourceWalkArea->checked = true;
+ for (int linkIndex = 0; linkIndex < sourceWalkArea->linksCount; ++linkIndex) {
+ if (!sourceWalkArea->links[linkIndex]->checked) {
+ _walkInfoPtrs[infoCount + 0] = sourceWalkArea->linksD1[linkIndex];
+ _walkInfoPtrs[infoCount + 1] = sourceWalkArea->linksD2[linkIndex];
+ walkFindPath(sourceWalkArea->links[linkIndex], infoCount + 2);
+ }
+ }
+ sourceWalkArea->checked = false;
+ }
+}
+
+int BbvsEngine::calcDistance(const Common::Point &pt1, const Common::Point &pt2) {
+ return (int)sqrt((double)(pt1.x - pt2.x) * (pt1.x - pt2.x) + (pt1.y - pt2.y) * (pt1.y - pt2.y));
+}
+
+void BbvsEngine::walkFoundPath(int count) {
+ debug(5, "BbvsEngine::walkFoundPath(%d)", count);
+
+ Common::Point midPt = _sourceWalkAreaPt;
+ int totalMidPtDistance = 0;
+
+ if (count > 0) {
+ Common::Point lastMidPt;
+ int halfCount = (count + 1) >> 1;
+ for (int i = 0; i < halfCount; ++i) {
+ lastMidPt = midPt;
+ midPt = _walkInfoPtrs[i * 2]->midPt;
+ totalMidPtDistance += calcDistance(midPt, lastMidPt);
+ }
+ }
+
+ int distance = calcDistance(midPt, _destWalkAreaPt) + totalMidPtDistance;
+
+ debug(5, "BbvsEngine::walkFoundPath() distance: %d; _currWalkDistance: %d", distance, _currWalkDistance);
+
+ if (distance >= _currWalkDistance)
+ return;
+
+ debug(5, "BbvsEngine::walkFoundPath() distance smaller");
+
+ _currWalkDistance = distance;
+
+ Common::Point destPt = _destWalkAreaPt, newDestPt;
+
+ while (1) {
+
+ int index = 0;
+ if (count > 0) {
+ do {
+ if (!walkTestLineWalkable(_sourceWalkAreaPt, destPt, _walkInfoPtrs[index]))
+ break;
+ ++index;
+ } while (index < count);
+ }
+
+ if (index == count)
+ break;
+
+ WalkInfo *walkInfo = _walkInfoPtrs[--count];
+ destPt.x = walkInfo->x;
+ destPt.y = walkInfo->y;
+
+ if (walkInfo->direction) {
+ newDestPt.x = walkInfo->x;
+ newDestPt.y = walkInfo->y + walkInfo->delta - 1;
+ } else {
+ newDestPt.x = walkInfo->x + walkInfo->delta - 1;
+ newDestPt.y = walkInfo->y;
+ }
+
+ if ((newDestPt.x - _destWalkAreaPt.x) * (newDestPt.x - _destWalkAreaPt.x) +
+ (newDestPt.y - _destWalkAreaPt.y) * (newDestPt.y - _destWalkAreaPt.y) <
+ (destPt.x - _destWalkAreaPt.x) * (destPt.x - _destWalkAreaPt.x) +
+ (destPt.y - _destWalkAreaPt.y) * (destPt.y - _destWalkAreaPt.y))
+ destPt = newDestPt;
+
+ }
+
+ debug(5, "BbvsEngine::walkFoundPath() destPt: (%d, %d)", destPt.x, destPt.y);
+
+ _finalWalkPt = destPt;
+
+ debug(5, "BbvsEngine::walkFoundPath() OK");
+
+}
+
+void BbvsEngine::updateWalkableRects() {
+ // Go through all walkable rects and subtract all scene object rects
+ Common::Rect *rectsList1 = _tempWalkableRects1;
+ Common::Rect *rectsList2 = _gameModule->getWalkRects();
+ _walkableRectsCount = _gameModule->getWalkRectsCount();
+ for (int i = 0; i < _gameModule->getSceneObjectDefsCount(); ++i) {
+ SceneObject *sceneObject = &_sceneObjects[i];
+ Animation *anim = sceneObject->anim;
+ if (anim && _buttheadObject != sceneObject && _beavisObject != sceneObject) {
+ Common::Rect rect = sceneObject->anim->frameRects2[sceneObject->frameIndex];
+ rect.translate(sceneObject->x >> 16, sceneObject->y >> 16);
+ int count = _walkableRectsCount;
+ _walkableRectsCount = 0;
+ for (int j = 0; j < count; ++j)
+ _walkableRectsCount += rectSubtract(rect, rectsList2[j], &rectsList1[_walkableRectsCount]);
+ if (rectsList1 == _tempWalkableRects1) {
+ rectsList1 = _tempWalkableRects2;
+ rectsList2 = _tempWalkableRects1;
+ } else {
+ rectsList1 = _tempWalkableRects1;
+ rectsList2 = _tempWalkableRects2;
+ }
+ }
+ }
+ for (int i = 0; i < _walkableRectsCount; ++i)
+ _walkableRects[i] = rectsList2[i];
+}
+
+} // End of namespace Bbvs
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 5acd111c97..536db5e73b 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -293,6 +293,7 @@ bool Bitmap::solidAt(int16 x, int16 y) {
switch (t) {
case kBmpEOI:
r--;
+ // No break on purpose
case kBmpSKP:
w = 0;
break;
diff --git a/engines/cge/bitmap.h b/engines/cge/bitmap.h
index 3de05ac2fd..2768271b23 100644
--- a/engines/cge/bitmap.h
+++ b/engines/cge/bitmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index af7e91f7eb..3f7aa4abc9 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -50,12 +50,68 @@ CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription)
DebugMan.addDebugChannel(kCGEDebugFile, "file", "CGE IO debug channel");
DebugMan.addDebugChannel(kCGEDebugEngine, "engine", "CGE Engine debug channel");
- _startupMode = 1;
- _oldLev = 0;
- _pocPtr = 0;
- _bitmapPalette = NULL;
+ _bitmapPalette = nullptr;
+ _pocLight = nullptr;
+ _keyboard = nullptr;
+ _mouse = nullptr;
+ _sprite = nullptr;
+ _miniScene = nullptr;
+ _shadow = nullptr;
+ _horzLine = nullptr;
+ _infoLine = nullptr;
+ _debugLine = nullptr;
+ _sceneLight = nullptr;
+ _commandHandler = nullptr;
+ _commandHandlerTurbo = nullptr;
+ _eventManager = nullptr;
+ _fx = nullptr;
+ _sound = nullptr;
+ _resman = nullptr;
+ for (int i = 0; i < 8; i++)
+ _pocket[i] = nullptr;
+ _hero = nullptr;
+ _text = nullptr;
+ _talk = nullptr;
+ _midiPlayer = nullptr;
+ _miniShp = nullptr;
+ _miniShpList = nullptr;
+ _console = nullptr;
+ _sprTv = nullptr;
+ _sprK1 = nullptr;
+ _sprK2 = nullptr;
+ _sprK3 = nullptr;
+ _font = nullptr;
+ _vga = nullptr;
+ _sys = nullptr;
+
_quitFlag = false;
_showBoundariesFl = false;
+ _music = true;
+ _dark = false;
+ _game = false;
+ _endGame = false;
+ for (int i = 0; i < 4; i++)
+ _flag[i] = false;
+
+ _startupMode = 1;
+ _oldLev = 0;
+ _pocPtr = 0;
+ _startGameSlot = -1;
+ _recentStep = -2;
+ _lastFrame = 0;
+ _lastTick = 0;
+ _maxScene = 0;
+ _now = 1;
+ _lev = -1;
+ _mode = 0;
+ _gameCase2Cpt = 0;
+ _offUseCount = 0;
+ _volume[0] = 0;
+ _volume[1] = 0;
+ for (int i = 0; i < kPocketNX; i++)
+ _pocref[i] = -1;
+
+ initSceneValues();
}
void CGEEngine::initSceneValues() {
@@ -71,31 +127,30 @@ void CGEEngine::initSceneValues() {
}
void CGEEngine::init() {
- debugC(1, kCGEDebugEngine, "CGEEngine::setup()");
+ debugC(1, kCGEDebugEngine, "CGEEngine::init()");
+
+ // Initialize fields
+ _hero = nullptr;
+ _shadow = nullptr;
+ _miniScene = nullptr;
+ _miniShp = nullptr;
+ _miniShpList = nullptr;
+ _sprite = nullptr;
- // Initialise fields
- _lastFrame = 0;
- _lastTick = 0;
- _hero = NULL;
- _shadow = NULL;
- _miniScene = NULL;
- _miniShp = NULL;
- _miniShpList = NULL;
- _sprite = NULL;
_resman = new ResourceManager();
// Create debugger console
_console = new CGEConsole(this);
- // Initialise engine objects
+ // Initialize engine objects
_font = new Font(this, "CGE");
_text = new Text(this, "CGE");
- _talk = NULL;
+ _talk = nullptr;
_vga = new Vga(this);
_sys = new System(this);
_pocLight = new PocLight(this);
for (int i = 0; i < kPocketNX; i++)
- _pocket[i] = NULL;
+ _pocket[i] = nullptr;
_horzLine = new HorizLine(this);
_infoLine = new InfoLine(this, kInfoW);
_sceneLight = new SceneLight(this);
@@ -110,30 +165,6 @@ void CGEEngine::init() {
_sound = new Sound(this);
_offUseCount = atoi(_text->getText(kOffUseCount));
- _music = true;
-
- for (int i = 0; i < kPocketNX; i++)
- _pocref[i] = -1;
- _volume[0] = 0;
- _volume[1] = 0;
-
- initSceneValues();
-
- _maxScene = 0;
- _dark = false;
- _game = false;
- _endGame = false;
- _now = 1;
- _lev = -1;
- _recentStep = -2;
-
- for (int i = 0; i < 4; i++)
- _flag[i] = false;
-
- _mode = 0;
- _soundOk = 1;
- _sprTv = NULL;
- _gameCase2Cpt = 0;
_startGameSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
}
diff --git a/engines/cge/cge.h b/engines/cge/cge.h
index 61558c0989..a65069ff46 100644
--- a/engines/cge/cge.h
+++ b/engines/cge/cge.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef CGE_H
#define CGE_H
@@ -107,7 +107,6 @@ struct SavegameHeader {
Graphics::Surface *thumbnail;
int saveYear, saveMonth, saveDay;
int saveHour, saveMinutes;
- int totalFrames;
};
extern const char *savegameStr;
@@ -168,7 +167,6 @@ public:
int _now;
int _lev;
int _mode;
- int _soundOk;
int _gameCase2Cpt;
int _offUseCount;
Dac *_bitmapPalette;
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 602b36d6ef..e738b6ebb3 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -125,9 +125,8 @@ char *CGEEngine::mergeExt(char *buf, const char *name, const char *ext) {
}
int CGEEngine::takeEnum(const char **tab, const char *text) {
- const char **e;
if (text) {
- for (e = tab; *e; e++) {
+ for (const char **e = tab; *e; e++) {
if (scumm_stricmp(text, *e) == 0) {
return e - tab;
}
@@ -196,7 +195,6 @@ bool CGEEngine::loadGame(int slotNumber, SavegameHeader *header, bool tiny) {
debugC(1, kCGEDebugEngine, "CGEEngine::loadgame(%d, header, %s)", slotNumber, tiny ? "true" : "false");
Common::MemoryReadStream *readStream;
- SavegameHeader saveHeader;
if (slotNumber == -1) {
// Loading the data for the initial game state
@@ -232,6 +230,8 @@ bool CGEEngine::loadGame(int slotNumber, SavegameHeader *header, bool tiny) {
return false;
} else {
// Found header
+ SavegameHeader saveHeader;
+
if (!readSavegameHeader(readStream, saveHeader)) {
delete readStream;
return false;
@@ -398,7 +398,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt
}
} else {
// Loading game
- if (_soundOk == 1 && _mode == 0) {
+ if (_mode == 0) {
// Skip Digital and Midi volumes, useless under ScummVM
sndSetVolume();
}
@@ -425,7 +425,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt
}
bool CGEEngine::readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header) {
- header.thumbnail = NULL;
+ header.thumbnail = nullptr;
// Get the savegame version
header.version = in->readByte();
@@ -657,14 +657,15 @@ void CGEEngine::sceneUp() {
_vga->copyPage(0, 1);
selectPocket(-1);
- if (_hero)
+ if (_hero) {
_vga->_showQ->insert(_vga->_showQ->remove(_hero));
- if (_shadow) {
- _vga->_showQ->remove(_shadow);
- _shadow->makeXlat(_vga->glass(_vga->_sysPal, 204, 204, 204));
- _vga->_showQ->insert(_shadow, _hero);
- _shadow->_z = _hero->_z;
+ if (_shadow) {
+ _vga->_showQ->remove(_shadow);
+ _shadow->makeXlat(_vga->glass(_vga->_sysPal, 204, 204, 204));
+ _vga->_showQ->insert(_shadow, _hero);
+ _shadow->_z = _hero->_z;
+ }
}
feedSnail(_vga->_showQ->locate(BakRef + 999), kTake);
_vga->show();
@@ -1029,7 +1030,6 @@ void CGEEngine::loadSprite(const char *fname, int ref, int scene, int col = 0, i
bool east = false;
bool port = false;
bool tran = false;
- int i, lcnt = 0;
char tmpStr[kLineMax + 1];
Common::String line;
@@ -1041,6 +1041,7 @@ void CGEEngine::loadSprite(const char *fname, int ref, int scene, int col = 0, i
error("Bad SPR [%s]", tmpStr);
uint16 len;
+ int i, lcnt = 0;
for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
len = line.size();
lcnt++;
@@ -1483,25 +1484,6 @@ bool CGEEngine::showTitle(const char *name) {
selectPocket(-1);
_vga->sunrise(_vga->_sysPal);
- if (_mode < 2 && !_soundOk) {
- _vga->copyPage(1, 2);
- _vga->copyPage(0, 1);
- _vga->_showQ->append(_mouse);
- _mouse->on();
- for (; !_commandHandler->idle() || Vmenu::_addr;) {
- mainLoop();
- if (_quitFlag)
- return false;
- }
-
- _mouse->off();
- _vga->_showQ->clear();
- _vga->copyPage(0, 2);
- _soundOk = 2;
- if (_music)
- _midiPlayer->loadMidi(0);
- }
-
if (_mode < 2) {
// At this point the game originally set the protection variables
// used by the copy protection check
@@ -1540,7 +1522,7 @@ void CGEEngine::cge_main() {
if (_horzLine)
_horzLine->_flags._hide = true;
- if (_music && _soundOk)
+ if (_music)
_midiPlayer->loadMidi(0);
if (_startGameSlot != -1) {
diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h
index bde8306f36..e0438f7a39 100644
--- a/engines/cge/cge_main.h
+++ b/engines/cge/cge_main.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/console.cpp b/engines/cge/console.cpp
index 105f241944..447875c06f 100644
--- a/engines/cge/console.cpp
+++ b/engines/cge/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/console.h b/engines/cge/console.h
index ea36dfbaae..ad4471283f 100644
--- a/engines/cge/console.h
+++ b/engines/cge/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index c377970c51..4c2f81c1ae 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -24,10 +24,22 @@
#include "engines/advancedDetector.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "base/plugins.h"
#include "graphics/thumbnail.h"
#include "cge/cge.h"
+namespace CGE {
+
+struct CgeGameDescription {
+ ADGameDescription desc;
+ GameType gameType;
+};
+
+#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
+
+} // End of namespace CGE
+
static const PlainGameDescriptor CGEGames[] = {
{ "soltys", "Soltys" },
{ "sfinx", "Sfinx" },
@@ -36,11 +48,6 @@ static const PlainGameDescriptor CGEGames[] = {
namespace CGE {
-struct CgeGameDescription {
- ADGameDescription desc;
- GameType gameType;
-};
-
static const CgeGameDescription gameDescriptions[] = {
{
@@ -63,7 +70,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
AD_LISTEND
},
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSoltys
},
@@ -75,7 +82,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
AD_LISTEND
},
- Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO0()
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSoltys
},
@@ -87,7 +94,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
AD_LISTEND
},
- Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO0()
+ Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSoltys
},
@@ -99,7 +106,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
AD_LISTEND
},
- Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO0()
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSoltys
},
@@ -111,7 +118,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
AD_LISTEND
},
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSoltys
},
@@ -123,7 +130,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151},
AD_LISTEND
},
- Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO0()
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSoltys
},
@@ -136,7 +143,7 @@ static const CgeGameDescription gameDescriptions[] = {
{"vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844},
AD_LISTEND
},
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
kGameTypeSfinx
},
@@ -148,12 +155,25 @@ static const ADFileBasedFallback fileBasedFallback[] = {
{ &gameDescriptions[0].desc, { "vol.cat", "vol.dat", 0 } },
{ 0, { 0 } }
};
-
} // End of namespace CGE
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
+ {
+ _s("Color Blind Mode"),
+ _s("Enable Color Blind Mode by default"),
+ "enable_color_blind",
+ false
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class CGEMetaEngine : public AdvancedMetaEngine {
public:
- CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames) {
+ CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames, optionsList) {
_singleid = "soltys";
}
@@ -169,8 +189,6 @@ public:
return "Soltys (c) 1994-1996 L.K. Avalon";
}
-
-
virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
virtual int getMaximumSaveSlot() const;
@@ -208,10 +226,9 @@ SaveStateList CGEMetaEngine::listSaves(const char *target) const {
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- int slotNum = 0;
for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
- slotNum = atoi(filename->c_str() + filename->size() - 3);
+ int slotNum = atoi(filename->c_str() + filename->size() - 3);
if (slotNum >= 0 && slotNum <= 99) {
@@ -291,7 +308,7 @@ bool CGEMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
}
#if PLUGIN_ENABLED_DYNAMIC(CGE)
-REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine);
+ REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine);
#endif
diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp
index 89802058f4..24b3a270cf 100644
--- a/engines/cge/events.cpp
+++ b/engines/cge/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/events.h b/engines/cge/events.h
index ab8d87212d..63f02b7475 100644
--- a/engines/cge/events.h
+++ b/engines/cge/events.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/fileio.cpp b/engines/cge/fileio.cpp
index 8ee726c46d..2b1f74db02 100644
--- a/engines/cge/fileio.cpp
+++ b/engines/cge/fileio.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -93,13 +93,11 @@ ResourceManager::~ResourceManager() {
delete _buff[i]._page;
}
-uint16 ResourceManager::XCrypt(byte *buf, uint16 length) {
+void ResourceManager::XCrypt(byte *buf, uint16 length) {
byte *b = buf;
for (uint16 i = 0; i < length; i++)
*b++ ^= kCryptSeed;
-
- return kCryptSeed;
}
bool ResourceManager::seek(int32 offs, int whence) {
@@ -118,7 +116,7 @@ uint16 ResourceManager::read(byte *buf, uint16 length) {
}
BtPage *ResourceManager::getPage(int level, uint16 pageId) {
- debugC(1, kCGEDebugFile, "IoHand::getPage(%d, %d)", level, pageId);
+ debugC(1, kCGEDebugFile, "ResourceManager::getPage(%d, %d)", level, pageId);
if (_buff[level]._pageNo != pageId) {
int32 pos = pageId * kBtSize;
@@ -142,7 +140,7 @@ BtPage *ResourceManager::getPage(int level, uint16 pageId) {
}
BtKeypack *ResourceManager::find(const char *key) {
- debugC(1, kCGEDebugFile, "IoHand::find(%s)", key);
+ debugC(1, kCGEDebugFile, "ResourceManager::find(%s)", key);
int lev = 0;
uint16 nxt = kBtValRoot;
diff --git a/engines/cge/fileio.h b/engines/cge/fileio.h
index 653aabae8f..059d2c9a44 100644
--- a/engines/cge/fileio.h
+++ b/engines/cge/fileio.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -86,13 +86,13 @@ class ResourceManager {
uint16 catRead(byte *buf, uint16 length);
Common::File *_catFile;
Common::File *_datFile;
- uint16 XCrypt(byte *buf, uint16 length);
+ void XCrypt(byte *buf, uint16 length);
public:
ResourceManager();
~ResourceManager();
uint16 read(byte *buf, uint16 length);
- bool seek(int32 offs, int whence = 0);
+ bool seek(int32 offs, int whence = SEEK_SET);
BtKeypack *find(const char *key);
bool exist(const char *name);
diff --git a/engines/cge/game.cpp b/engines/cge/game.cpp
index 851f6c59fb..49fe12f517 100644
--- a/engines/cge/game.cpp
+++ b/engines/cge/game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/game.h b/engines/cge/game.h
index 4d5acf7371..330eb20928 100644
--- a/engines/cge/game.h
+++ b/engines/cge/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/general.h b/engines/cge/general.h
index 9e3fc7f249..ac7c6f4da5 100644
--- a/engines/cge/general.h
+++ b/engines/cge/general.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/module.mk b/engines/cge/module.mk
index 5745aa5d48..1fa406f6c8 100644
--- a/engines/cge/module.mk
+++ b/engines/cge/module.mk
@@ -25,6 +25,6 @@ ifeq ($(ENABLE_CGE), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index b9030efb4d..1a6ca0789e 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -658,6 +658,9 @@ void CGEEngine::selectPocket(int n) {
void CGEEngine::pocFul() {
debugC(1, kCGEDebugEngine, "CGEEngine::pocFul()");
+ if (!_hero)
+ error("pocFul - Unexpected null _hero");
+
_hero->park();
_commandHandler->addCommand(kCmdWait, -1, -1, _hero);
_commandHandler->addCommand(kCmdSeq, -1, kSeqPocketFull, _hero);
diff --git a/engines/cge/snail.h b/engines/cge/snail.h
index 6a9e717441..2f56768fed 100644
--- a/engines/cge/snail.h
+++ b/engines/cge/snail.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp
index 892b826318..370b768bca 100644
--- a/engines/cge/sound.cpp
+++ b/engines/cge/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -228,6 +228,7 @@ MusicPlayer::MusicPlayer(CGEEngine *vm) : _vm(vm) {
_driver->setTimerCallback(this, &timerCallback);
}
+ _dataSize = -1;
}
MusicPlayer::~MusicPlayer() {
diff --git a/engines/cge/sound.h b/engines/cge/sound.h
index a3f4d4d777..dc67f9408b 100644
--- a/engines/cge/sound.h
+++ b/engines/cge/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp
index f5d570b389..e377a72601 100644
--- a/engines/cge/talk.cpp
+++ b/engines/cge/talk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/talk.h b/engines/cge/talk.h
index 66e3d85214..2f89881b8d 100644
--- a/engines/cge/talk.h
+++ b/engines/cge/talk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index 08ff005e1e..7d8c89befa 100644
--- a/engines/cge/text.cpp
+++ b/engines/cge/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/text.h b/engines/cge/text.h
index 13ce6bbfbb..9bd990f486 100644
--- a/engines/cge/text.h
+++ b/engines/cge/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 4954e638ab..d5e1be5122 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -26,6 +26,7 @@
*/
#include "common/array.h"
+#include "common/config-manager.h"
#include "common/rect.h"
#include "graphics/palette.h"
#include "cge/general.h"
@@ -210,10 +211,10 @@ Sprite *Sprite::expand() {
error("Bad SPR [%s]", fname);
Common::String line;
char tmpStr[kLineMax + 1];
- int len = 0, lcnt = 0;
+ int lcnt = 0;
for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
- len = line.size();
+ int len = line.size();
Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
lcnt++;
if (len == 0 || *tmpStr == '.')
@@ -637,6 +638,10 @@ Vga::Vga(CGEEngine *vm) : _frmCnt(0), _msg(NULL), _name(NULL), _setPal(false), _
_page[idx]->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
}
+ if (ConfMan.getBool("enable_color_blind"))
+ _mono = 1;
+
+
_oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
_newColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
getColors(_oldColors);
@@ -756,7 +761,7 @@ void Vga::setColors(Dac *tab, int lum) {
if (_mono) {
destP = _newColors;
for (int idx = 0; idx < kPalCount; idx++, destP++) {
- // Form a greyscalce colour from 30% R, 59% G, 11% B
+ // Form a greyscalce color from 30% R, 59% G, 11% B
uint8 intensity = (((int)destP->_r * 77) + ((int)destP->_g * 151) + ((int)destP->_b * 28)) >> 8;
destP->_r = intensity;
destP->_g = intensity;
diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h
index a816f7756f..9511559df0 100644
--- a/engines/cge/vga13h.h
+++ b/engines/cge/vga13h.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp
index 910e54d267..89f0039e02 100644
--- a/engines/cge/vmenu.cpp
+++ b/engines/cge/vmenu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/vmenu.h b/engines/cge/vmenu.h
index 928b48f11c..1cab57080d 100644
--- a/engines/cge/vmenu.h
+++ b/engines/cge/vmenu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/walk.cpp b/engines/cge/walk.cpp
index 22c06a17c1..1ab7574c0c 100644
--- a/engines/cge/walk.cpp
+++ b/engines/cge/walk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cge/walk.h b/engines/cge/walk.h
index 00ec080416..982c96dbaa 100644
--- a/engines/cge/walk.h
+++ b/engines/cge/walk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index 075a59cfb6..c6099447d8 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -287,7 +287,7 @@ void AnimData::load(byte *d, int type, uint16 w, uint16 h, int16 file,
_fileIdx = file;
_frameIdx = frame;
memset(_name, 0, sizeof(_name));
- strcpy(_name, n);
+ Common::strlcpy(_name, n, sizeof(_name));
_realWidth = w;
switch (type) {
diff --git a/engines/cine/anim.h b/engines/cine/anim.h
index c5130aab82..7b4daafa88 100644
--- a/engines/cine/anim.h
+++ b/engines/cine/anim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp
index 2bad2183f5..ce808e0f6a 100644
--- a/engines/cine/bg.cpp
+++ b/engines/cine/bg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -48,7 +48,7 @@ byte loadCtFW(const char *ctName) {
}
if (currentCtName != ctName)
- strcpy(currentCtName, ctName);
+ Common::strlcpy(currentCtName, ctName, sizeof(currentCtName));
ptr = dataPtr = readBundleFile(foundFileIdx);
@@ -75,7 +75,7 @@ byte loadCtOS(const char *ctName) {
}
if (currentCtName != ctName)
- strcpy(currentCtName, ctName);
+ Common::strlcpy(currentCtName, ctName, sizeof(currentCtName));
ptr = dataPtr = readBundleFile(foundFileIdx);
diff --git a/engines/cine/bg.h b/engines/cine/bg.h
index c464cd68be..ac884463cb 100644
--- a/engines/cine/bg.h
+++ b/engines/cine/bg.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/bg_list.cpp b/engines/cine/bg_list.cpp
index 36ecf53dea..d2f05a3fbd 100644
--- a/engines/cine/bg_list.cpp
+++ b/engines/cine/bg_list.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/bg_list.h b/engines/cine/bg_list.h
index c564b4b43f..3cfc33e274 100644
--- a/engines/cine/bg_list.h
+++ b/engines/cine/bg_list.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 63092a8ffd..a4af8f2201 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -55,6 +55,14 @@ CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc)
_console = new CineConsole(this);
g_cine = this;
+
+ for (int i = 0; i < NUM_FONT_CHARS; i++) {
+ _textHandler.fontParamTable[i].characterIdx = 0;
+ _textHandler.fontParamTable[i].characterWidth = 0;
+ }
+ _restartRequested = false;
+ _preLoad = false;
+ _timerDelayMultiplier = 12;
}
CineEngine::~CineEngine() {
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index 47edf51c30..e620d2ffa5 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/console.cpp b/engines/cine/console.cpp
index 46f0ea61d3..82197693d4 100644
--- a/engines/cine/console.cpp
+++ b/engines/cine/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/console.h b/engines/cine/console.h
index 7c19621e5f..9b901982b9 100644
--- a/engines/cine/console.h
+++ b/engines/cine/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index a3d36cfd97..4202bdc942 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h
index 224ebe5de2..6069e3a99b 100644
--- a/engines/cine/detection_tables.h
+++ b/engines/cine/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 636c0cf8d9..f6419ecafc 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -246,17 +246,16 @@ void FWRenderer::incrustSprite(const BGIncrust &incrust) {
* Draw command box on screen
*/
void FWRenderer::drawCommand() {
- unsigned int i;
- int x = 10, y = _cmdY;
-
if (disableSystemMenu == 0) {
+ int x = 10, y = _cmdY;
+
drawPlainBox(x, y, 301, 11, 0);
drawBorder(x - 1, y - 1, 302, 12, 2);
x += 2;
y += 2;
- for (i = 0; i < _cmd.size(); i++) {
+ for (unsigned int i = 0; i < _cmd.size(); i++) {
x = drawChar(_cmd[i], x, y);
}
}
@@ -458,12 +457,12 @@ void FWRenderer::drawDoubleBorder(int x, int y, int width, int height, byte colo
* @param y Character coordinate
*/
int FWRenderer::drawChar(char character, int x, int y) {
- int width, idx;
+ int width;
if (character == ' ') {
x += 5;
} else if ((width = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterWidth)) {
- idx = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterIdx;
+ int idx = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterIdx;
drawSpriteRaw(g_cine->_textHandler.textTable[idx][FONT_DATA], g_cine->_textHandler.textTable[idx][FONT_MASK], FONT_WIDTH, FONT_HEIGHT, _backBuffer, x, y);
x += width + 1;
}
@@ -481,12 +480,12 @@ int FWRenderer::drawChar(char character, int x, int y) {
* @param y Character coordinate
*/
int FWRenderer::undrawChar(char character, int x, int y) {
- int width, idx;
+ int width;
if (character == ' ') {
x += 5;
} else if ((width = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterWidth)) {
- idx = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterIdx;
+ int idx = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterIdx;
const byte *sprite = g_cine->_textHandler.textTable[idx][FONT_DATA];
for (uint i = 0; i < FONT_HEIGHT; ++i) {
byte *dst = _backBuffer + (y + i) * 320 + x;
@@ -731,7 +730,7 @@ void FWRenderer::loadBg16(const byte *bg, const char *name, unsigned int idx) {
assert(_background);
- strcpy(_bgName, name);
+ Common::strlcpy(_bgName, name, sizeof(_bgName));
// Load the 16 color palette
_backupPal.load(bg, kLowPalNumBytes, kLowPalFormat, kLowPalNumColors, CINE_BIG_ENDIAN);
@@ -997,11 +996,10 @@ void SelectionMenu::drawMenu(FWRenderer &r, bool top) {
}
int lineY = y + 4;
- int charX;
const int elemCount = getElementCount();
for (int i = 0; i < elemCount; ++i, lineY += 9) {
- charX = x + 4;
+ int charX = x + 4;
if (i == _selection) {
int color;
@@ -1228,12 +1226,12 @@ void OSRenderer::incrustSprite(const BGIncrust &incrust) {
* @param y Character coordinate
*/
int OSRenderer::drawChar(char character, int x, int y) {
- int width, idx;
+ int width;
if (character == ' ') {
x += 5;
} else if ((width = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterWidth)) {
- idx = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterIdx;
+ int idx = g_cine->_textHandler.fontParamTable[(unsigned char)character].characterIdx;
drawSpriteRaw2(g_cine->_textHandler.textTable[idx][FONT_DATA], 0, FONT_WIDTH, FONT_HEIGHT, _backBuffer, x, y);
x += width + 1;
}
@@ -1405,7 +1403,7 @@ void OSRenderer::loadBg16(const byte *bg, const char *name, unsigned int idx) {
assert(_bgTable[idx].bg);
- strcpy(_bgTable[idx].name, name);
+ Common::strlcpy(_bgTable[idx].name, name, sizeof(_bgTable[idx].name));
// Load the 16 color palette
_bgTable[idx].pal.load(bg, kLowPalNumBytes, kLowPalFormat, kLowPalNumColors, CINE_BIG_ENDIAN);
@@ -1443,7 +1441,7 @@ void OSRenderer::loadBg256(const byte *bg, const char *name, unsigned int idx) {
assert(_bgTable[idx].bg);
- strcpy(_bgTable[idx].name, name);
+ Common::strlcpy(_bgTable[idx].name, name, sizeof(_bgTable[idx].name));
_bgTable[idx].pal.load(bg, kHighPalNumBytes, kHighPalFormat, kHighPalNumColors, CINE_LITTLE_ENDIAN);
memcpy(_bgTable[idx].bg, bg + kHighPalNumBytes, _screenSize);
}
@@ -1834,7 +1832,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi
}
}
}
- it++;
+ ++it;
}
// now, draw with the mask we created
@@ -1887,7 +1885,6 @@ void maskBgOverlay(const byte *bgPtr, const byte *maskPtr, int16 width, int16 he
byte *page, int16 x, int16 y) {
int16 i, j, tmpWidth, tmpHeight;
Common::List<BGIncrust>::iterator it;
- byte *mask;
const byte *backup = maskPtr;
// background pass
@@ -1915,7 +1912,7 @@ void maskBgOverlay(const byte *bgPtr, const byte *maskPtr, int16 width, int16 he
for (it = g_cine->_bgIncrustList.begin(); it != g_cine->_bgIncrustList.end(); ++it) {
tmpWidth = g_cine->_animDataTable[it->frame]._realWidth;
tmpHeight = g_cine->_animDataTable[it->frame]._height;
- mask = (byte *)malloc(tmpWidth * tmpHeight);
+ byte *mask = (byte *)malloc(tmpWidth * tmpHeight);
if (it->param == 0) {
generateMask(g_cine->_animDataTable[it->frame].data(), mask, tmpWidth * tmpHeight, it->part);
diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h
index 8b8843fd72..bfb7dbde1d 100644
--- a/engines/cine/gfx.h
+++ b/engines/cine/gfx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index c822f1cabd..9ce683445f 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -254,7 +254,7 @@ void purgeSeqList() {
it = g_cine->_seqList.erase(it);
} else {
// Let the element be and jump to the next element
- it++;
+ ++it;
}
}
}
diff --git a/engines/cine/main_loop.h b/engines/cine/main_loop.h
index 4ab29149d8..98e8f8878a 100644
--- a/engines/cine/main_loop.h
+++ b/engines/cine/main_loop.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp
index b84982b19e..5366da4a05 100644
--- a/engines/cine/msg.cpp
+++ b/engines/cine/msg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/msg.h b/engines/cine/msg.h
index 8d6291e2df..dce70c4295 100644
--- a/engines/cine/msg.h
+++ b/engines/cine/msg.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp
index a75828abb1..f014843f9d 100644
--- a/engines/cine/object.cpp
+++ b/engines/cine/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/object.h b/engines/cine/object.h
index 8331cf9f89..9c44162d28 100644
--- a/engines/cine/object.h
+++ b/engines/cine/object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index 10077ecdc9..f3985c691e 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -62,9 +62,9 @@ int16 findPaletteFromName(const char *fileName) {
uint16 position = 0;
uint16 i;
- strcpy(buffer, fileName);
+ Common::strlcpy(buffer, fileName, sizeof(buffer));
- while (position < strlen(fileName)) {
+ while (position < strlen(buffer)) {
if (buffer[position] > 'a' && buffer[position] < 'z') {
buffer[position] += 'A' - 'a';
}
diff --git a/engines/cine/pal.h b/engines/cine/pal.h
index d41154aa0b..6dc56d8c19 100644
--- a/engines/cine/pal.h
+++ b/engines/cine/pal.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp
index 7c0ba3af0a..30d9461a6a 100644
--- a/engines/cine/part.cpp
+++ b/engines/cine/part.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -47,7 +47,7 @@ void loadPart(const char *partName) {
g_cine->_partFileHandle.readUint16BE(); // entry size
if (currentPartName != partName)
- strcpy(currentPartName, partName);
+ Common::strlcpy(currentPartName, partName, sizeof(currentPartName));
for (uint16 i = 0; i < g_cine->_partBuffer.size(); i++) {
g_cine->_partFileHandle.read(g_cine->_partBuffer[i].partName, 14);
diff --git a/engines/cine/part.h b/engines/cine/part.h
index 3d321f17e1..9886a4ab43 100644
--- a/engines/cine/part.h
+++ b/engines/cine/part.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/prc.cpp b/engines/cine/prc.cpp
index ba9ba70110..6c78274a09 100644
--- a/engines/cine/prc.cpp
+++ b/engines/cine/prc.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/prc.h b/engines/cine/prc.h
index ff0147d81e..262b129e1c 100644
--- a/engines/cine/prc.h
+++ b/engines/cine/prc.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/rel.cpp b/engines/cine/rel.cpp
index 0af9a2bc1f..09b8499618 100644
--- a/engines/cine/rel.cpp
+++ b/engines/cine/rel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/rel.h b/engines/cine/rel.h
index d102791f6b..f32f6301c4 100644
--- a/engines/cine/rel.h
+++ b/engines/cine/rel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp
index 51d2c1f6be..c707c60695 100644
--- a/engines/cine/saveload.cpp
+++ b/engines/cine/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/saveload.h b/engines/cine/saveload.h
index fd661904af..91c9452d60 100644
--- a/engines/cine/saveload.h
+++ b/engines/cine/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/script.h b/engines/cine/script.h
index a07c8d6cfc..ec8278065f 100644
--- a/engines/cine/script.h
+++ b/engines/cine/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index 2abe32f797..c0b0c1f5da 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1419,19 +1419,19 @@ int FWScript::o1_loadNewPrcName() {
switch (param1) {
case 0:
debugC(5, kCineDebugScript, "Line: %d: loadPrc(\"%s\")", _line, param2);
- strcpy(newPrcName, param2);
+ Common::strlcpy(newPrcName, param2, sizeof(newPrcName));
break;
case 1:
debugC(5, kCineDebugScript, "Line: %d: loadRel(\"%s\")", _line, param2);
- strcpy(newRelName, param2);
+ Common::strlcpy(newRelName, param2, sizeof(newRelName));
break;
case 2:
debugC(5, kCineDebugScript, "Line: %d: loadObject(\"%s\")", _line, param2);
- strcpy(newObjectName, param2);
+ Common::strlcpy(newObjectName, param2, sizeof(newObjectName));
break;
case 3:
debugC(5, kCineDebugScript, "Line: %d: loadMsg(\"%s\")", _line, param2);
- strcpy(newMsgName, param2);
+ Common::strlcpy(newMsgName, param2, sizeof(newMsgName));
break;
}
return 0;
diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp
index 84bb484369..07ed295eab 100644
--- a/engines/cine/script_os.cpp
+++ b/engines/cine/script_os.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp
index de6f91d8c3..069a4787ac 100644
--- a/engines/cine/sound.cpp
+++ b/engines/cine/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -813,7 +813,7 @@ bool PCSoundFxPlayer::load(const char *song) {
if (dot) {
*dot = '\0';
}
- strcat(instrument, _driver->getInstrumentExtension());
+ Common::strlcat(instrument, _driver->getInstrumentExtension(), sizeof(instrument));
uint32 instrumentSize;
_instrumentsData[i] = readBundleSoundFile(instrument, &instrumentSize);
if (!_instrumentsData[i]) {
diff --git a/engines/cine/sound.h b/engines/cine/sound.h
index fdb183ad34..efb3811f9a 100644
--- a/engines/cine/sound.h
+++ b/engines/cine/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp
index 998075c6ce..8d904cb1f2 100644
--- a/engines/cine/texte.cpp
+++ b/engines/cine/texte.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/texte.h b/engines/cine/texte.h
index 185dc53bfd..1e0944c312 100644
--- a/engines/cine/texte.h
+++ b/engines/cine/texte.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp
index f68fbbc02c..6741b07118 100644
--- a/engines/cine/unpack.cpp
+++ b/engines/cine/unpack.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h
index d22c4944a7..0fa58874df 100644
--- a/engines/cine/unpack.h
+++ b/engines/cine/unpack.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 99d93cfc09..8687699a44 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -557,12 +557,20 @@ int16 selectSubObject(int16 x, int16 y, int16 param) {
}
}
+ if (selectedObject >= 20)
+ error("Invalid value for selectedObject: %d", selectedObject);
return objListTab[selectedObject];
}
-// TODO: Make separate functions for Future Wars's and Operation Stealth's version of this function, this is getting too messy
-// TODO: Add support for using the different prepositions for different verbs (Doesn't work currently)
void makeCommandLine() {
+ if (g_cine->getGameType() == Cine::GType_FW)
+ makeFWCommandLine();
+ else
+ makeOSCommandLine();
+}
+
+// TODO: Add support for using the different prepositions for different verbs (Doesn't work currently)
+void makeOSCommandLine() {
uint16 x, y;
commandVar1 = 0;
@@ -578,28 +586,16 @@ void makeCommandLine() {
int16 si;
getMouseData(mouseUpdateStatus, &dummyU16, &x, &y);
-
- if (g_cine->getGameType() == Cine::GType_FW) {
- si = selectSubObject(x, y + 8, -2);
- } else {
- si = selectSubObject(x, y + 8, -subObjectUseTable[playerCommand]);
- }
+ si = selectSubObject(x, y + 8, -subObjectUseTable[playerCommand]);
if (si < 0) {
- if (g_cine->getGameType() == Cine::GType_OS) {
- canUseOnObject = 0;
- } else { // Future Wars
- playerCommand = -1;
- g_cine->_commandBuffer = "";
- }
+ canUseOnObject = 0;
} else {
- if (g_cine->getGameType() == Cine::GType_OS) {
- if (si >= 8000) {
- si -= 8000;
- canUseOnObject = canUseOnItemTable[playerCommand];
- } else {
- canUseOnObject = 0;
- }
+ if (si >= 8000) {
+ si -= 8000;
+ canUseOnObject = canUseOnItemTable[playerCommand];
+ } else {
+ canUseOnObject = 0;
}
commandVar3[0] = si;
@@ -607,27 +603,21 @@ void makeCommandLine() {
g_cine->_commandBuffer += " ";
g_cine->_commandBuffer += g_cine->_objectTable[commandVar3[0]].name;
g_cine->_commandBuffer += " ";
- if (g_cine->getGameType() == Cine::GType_OS) {
- g_cine->_commandBuffer += commandPrepositionTable[playerCommand];
- } else { // Future Wars
- g_cine->_commandBuffer += defaultCommandPreposition;
- }
+ g_cine->_commandBuffer += commandPrepositionTable[playerCommand];
}
}
- if (g_cine->getGameType() == Cine::GType_OS || !(playerCommand != -1 && choiceResultTable[playerCommand] == 2)) {
- if (playerCommand == 2) {
- getMouseData(mouseUpdateStatus, &dummyU16, &x, &y);
- CursorMan.showMouse(false);
- processInventory(x, y + 8);
- playerCommand = -1;
- commandVar1 = 0;
- g_cine->_commandBuffer = "";
- CursorMan.showMouse(true);
- }
+ if (playerCommand == 2) {
+ getMouseData(mouseUpdateStatus, &dummyU16, &x, &y);
+ CursorMan.showMouse(false);
+ processInventory(x, y + 8);
+ playerCommand = -1;
+ commandVar1 = 0;
+ g_cine->_commandBuffer = "";
+ CursorMan.showMouse(true);
}
- if (g_cine->getGameType() == Cine::GType_OS && playerCommand != 2) {
+ if (playerCommand != 2) {
if (playerCommand != -1 && canUseOnObject != 0) { // call use on sub object
int16 si;
@@ -665,7 +655,55 @@ void makeCommandLine() {
}
}
- if (g_cine->getGameType() == Cine::GType_OS || !disableSystemMenu) {
+ isDrawCommandEnabled = 1;
+ renderer->setCommand(g_cine->_commandBuffer);
+}
+
+// TODO: Add support for using the different prepositions for different verbs (Doesn't work currently)
+void makeFWCommandLine() {
+ uint16 x, y;
+
+ commandVar1 = 0;
+ commandVar2 = -10;
+
+ if (playerCommand != -1) {
+ g_cine->_commandBuffer = defaultActionCommand[playerCommand];
+ } else {
+ g_cine->_commandBuffer = "";
+ }
+
+ if ((playerCommand != -1) && (choiceResultTable[playerCommand] == 2)) { // need object selection?
+ int16 si;
+
+ getMouseData(mouseUpdateStatus, &dummyU16, &x, &y);
+ si = selectSubObject(x, y + 8, -2);
+
+ if (si < 0) {
+ playerCommand = -1;
+ g_cine->_commandBuffer = "";
+ } else {
+ commandVar3[0] = si;
+ commandVar1 = 1;
+ g_cine->_commandBuffer += " ";
+ g_cine->_commandBuffer += g_cine->_objectTable[commandVar3[0]].name;
+ g_cine->_commandBuffer += " ";
+ g_cine->_commandBuffer += defaultCommandPreposition;
+ }
+ }
+
+ if (!(playerCommand != -1 && choiceResultTable[playerCommand] == 2)) {
+ if (playerCommand == 2) {
+ getMouseData(mouseUpdateStatus, &dummyU16, &x, &y);
+ CursorMan.showMouse(false);
+ processInventory(x, y + 8);
+ playerCommand = -1;
+ commandVar1 = 0;
+ g_cine->_commandBuffer = "";
+ CursorMan.showMouse(true);
+ }
+ }
+
+ if (!disableSystemMenu) {
isDrawCommandEnabled = 1;
renderer->setCommand(g_cine->_commandBuffer);
}
diff --git a/engines/cine/various.h b/engines/cine/various.h
index 813619816d..eb6312997d 100644
--- a/engines/cine/various.h
+++ b/engines/cine/various.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -37,6 +37,8 @@ void initLanguage(Common::Language lang);
int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue = false);
void makeCommandLine();
+void makeFWCommandLine();
+void makeOSCommandLine();
void makeActionMenu();
void waitPlayerInput();
void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4);
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 10906480fe..471a29030b 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/composer.h b/engines/composer/composer.h
index f945df8bb1..47398fe36d 100644
--- a/engines/composer/composer.h
+++ b/engines/composer/composer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/console.cpp b/engines/composer/console.cpp
index 8c68b3205b..d4676b0de5 100644
--- a/engines/composer/console.cpp
+++ b/engines/composer/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/console.h b/engines/composer/console.h
index 0567d8bc6f..fc2583611f 100644
--- a/engines/composer/console.h
+++ b/engines/composer/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp
index 8411441c60..036c1e88d8 100644
--- a/engines/composer/detection.cpp
+++ b/engines/composer/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -420,7 +420,7 @@ bool Composer::ComposerEngine::hasFeature(EngineFeature f) const {
}
#if PLUGIN_ENABLED_DYNAMIC(COMPOSER)
-REGISTER_PLUGIN_DYNAMIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngine);
+ REGISTER_PLUGIN_STATIC(COMPOSER, PLUGIN_TYPE_ENGINE, ComposerMetaEngine);
#endif
diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp
index caf3ba3a40..87694636d8 100644
--- a/engines/composer/graphics.cpp
+++ b/engines/composer/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/graphics.h b/engines/composer/graphics.h
index e9d82920ba..a8f37ddf60 100644
--- a/engines/composer/graphics.h
+++ b/engines/composer/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/resource.cpp b/engines/composer/resource.cpp
index fa29cc886b..d867f734a9 100644
--- a/engines/composer/resource.cpp
+++ b/engines/composer/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/resource.h b/engines/composer/resource.h
index e0052cd868..b624da1776 100644
--- a/engines/composer/resource.h
+++ b/engines/composer/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/composer/scripting.cpp b/engines/composer/scripting.cpp
index 3a201c841a..94ca2c1bc8 100644
--- a/engines/composer/scripting.cpp
+++ b/engines/composer/scripting.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 94f620ed7b..ab3b581825 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/actor.h b/engines/cruise/actor.h
index b409bf7b7f..5d8cce1f99 100644
--- a/engines/cruise/actor.h
+++ b/engines/cruise/actor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index 9da5413013..a59db8ef95 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/background.h b/engines/cruise/background.h
index 7a8f2d5494..ea9e7bba87 100644
--- a/engines/cruise/background.h
+++ b/engines/cruise/background.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp
index ddda8dee45..3286cd6ebf 100644
--- a/engines/cruise/backgroundIncrust.cpp
+++ b/engines/cruise/backgroundIncrust.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/backgroundIncrust.h b/engines/cruise/backgroundIncrust.h
index 567df0a51e..f29e38edcf 100644
--- a/engines/cruise/backgroundIncrust.h
+++ b/engines/cruise/backgroundIncrust.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/cell.cpp b/engines/cruise/cell.cpp
index f0fb580ec1..b7cef41764 100644
--- a/engines/cruise/cell.cpp
+++ b/engines/cruise/cell.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/cell.h b/engines/cruise/cell.h
index 3620a0c945..7865f02fe1 100644
--- a/engines/cruise/cell.h
+++ b/engines/cruise/cell.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 2147419886..6dcb0b1432 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index 3e49e77770..c81e5dd5ec 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 911041c1a4..9227eca8cb 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/cruise_main.h b/engines/cruise/cruise_main.h
index 9afae4336b..caaaad2068 100644
--- a/engines/cruise/cruise_main.h
+++ b/engines/cruise/cruise_main.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index a7b6faec1c..b5151f3f7a 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/ctp.h b/engines/cruise/ctp.h
index 340832e6fb..93f7466c52 100644
--- a/engines/cruise/ctp.h
+++ b/engines/cruise/ctp.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index b2a319bb85..e38343c215 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/dataLoader.h b/engines/cruise/dataLoader.h
index 96188c7982..cf19145beb 100644
--- a/engines/cruise/dataLoader.h
+++ b/engines/cruise/dataLoader.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/debugger.cpp b/engines/cruise/debugger.cpp
index a74f600ddd..4ef66ee11e 100644
--- a/engines/cruise/debugger.cpp
+++ b/engines/cruise/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/debugger.h b/engines/cruise/debugger.h
index 3cef6b371d..a79773f37e 100644
--- a/engines/cruise/debugger.h
+++ b/engines/cruise/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/decompiler.cpp b/engines/cruise/decompiler.cpp
index 74a78201bc..0c83bd6968 100644
--- a/engines/cruise/decompiler.cpp
+++ b/engines/cruise/decompiler.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/delphine-unpack.cpp b/engines/cruise/delphine-unpack.cpp
index ee7dbd3c5e..84140fb896 100644
--- a/engines/cruise/delphine-unpack.cpp
+++ b/engines/cruise/delphine-unpack.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index bce3f184db..4ca88a08d6 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -286,7 +286,7 @@ bool CruiseMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
#if PLUGIN_ENABLED_DYNAMIC(CRUISE)
-REGISTER_PLUGIN_DYNAMIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngine);
+ REGISTER_PLUGIN_STATIC(CRUISE, PLUGIN_TYPE_ENGINE, CruiseMetaEngine);
#endif
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index 2fd86a11b7..80fb0e8a02 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -148,8 +148,6 @@ void initSystem() {
preloadData[i].nofree = 0;
}
- lowMemory = 0;
-
doFade = 0;
fadeFlag = 0;
scroll = 0;
diff --git a/engines/cruise/font.h b/engines/cruise/font.h
index 679faf194d..12745c5b59 100644
--- a/engines/cruise/font.h
+++ b/engines/cruise/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 610465e962..7af6b73238 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -606,7 +606,7 @@ int16 Op_InitializeState() {
}
int16 Op_GetlowMemory() {
- return lowMemory;
+ return 0;
}
int16 Op_AniDir() {
diff --git a/engines/cruise/function.h b/engines/cruise/function.h
index 4fba8d3c63..39e7e22506 100644
--- a/engines/cruise/function.h
+++ b/engines/cruise/function.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index aa2dbc5370..39385459d9 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/gfxModule.h b/engines/cruise/gfxModule.h
index ce58c65d34..a394ccfe97 100644
--- a/engines/cruise/gfxModule.h
+++ b/engines/cruise/gfxModule.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/linker.cpp b/engines/cruise/linker.cpp
index e8ef415fe7..817345d06e 100644
--- a/engines/cruise/linker.cpp
+++ b/engines/cruise/linker.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/linker.h b/engines/cruise/linker.h
index 25f4a5cc2a..85f65348f4 100644
--- a/engines/cruise/linker.h
+++ b/engines/cruise/linker.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 24f65500db..0863a2a84e 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/mainDraw.h b/engines/cruise/mainDraw.h
index bb21f515af..bb71b9759b 100644
--- a/engines/cruise/mainDraw.h
+++ b/engines/cruise/mainDraw.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 512259f7d7..8f162ee1ad 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/menu.h b/engines/cruise/menu.h
index d605903cdc..c6f607506e 100644
--- a/engines/cruise/menu.h
+++ b/engines/cruise/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/mouse.cpp b/engines/cruise/mouse.cpp
index 6248bd01d3..9e01044bb0 100644
--- a/engines/cruise/mouse.cpp
+++ b/engines/cruise/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/mouse.h b/engines/cruise/mouse.h
index a5f5c19073..4407718168 100644
--- a/engines/cruise/mouse.h
+++ b/engines/cruise/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp
index b4a3489c1d..3e61ff4d7d 100644
--- a/engines/cruise/object.cpp
+++ b/engines/cruise/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/object.h b/engines/cruise/object.h
index cbe5872a9d..954bed0687 100644
--- a/engines/cruise/object.h
+++ b/engines/cruise/object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index d618ab5599..61df716742 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/overlay.h b/engines/cruise/overlay.h
index 3b69f2acef..cfba75dd7a 100644
--- a/engines/cruise/overlay.h
+++ b/engines/cruise/overlay.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/perso.cpp b/engines/cruise/perso.cpp
index 85c9b1614f..3a599bca22 100644
--- a/engines/cruise/perso.cpp
+++ b/engines/cruise/perso.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/perso.h b/engines/cruise/perso.h
index e0ca479dff..6d8120793e 100644
--- a/engines/cruise/perso.h
+++ b/engines/cruise/perso.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/polys.cpp b/engines/cruise/polys.cpp
index 964540f802..bec03a06a6 100644
--- a/engines/cruise/polys.cpp
+++ b/engines/cruise/polys.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/polys.h b/engines/cruise/polys.h
index 8505f791a6..6add9c6ded 100644
--- a/engines/cruise/polys.h
+++ b/engines/cruise/polys.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 26bea0441c..a734db4b3b 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -182,11 +182,13 @@ static void syncFilesDatabase(Common::Serializer &s) {
s.syncAsUint16LE(fe.resType);
s.syncAsUint16LE(fe.height);
- // TODO: Have a look at the saving/loading of this pointer
+ // Remember whether this file database was open or not.
+ // Upon loading, loadSavegameData uses this information
+ // in order to re-open the file databases accordingly.
tmp = (fe.subData.ptr) ? 1 : 0;
s.syncAsUint32LE(tmp);
if (s.isLoading()) {
- fe.subData.ptr = (uint8 *)tmp;
+ fe.subData.ptr = tmp ? (uint8 *)1 : 0;
}
s.syncAsSint16LE(fe.subData.index);
@@ -195,11 +197,11 @@ static void syncFilesDatabase(Common::Serializer &s) {
s.syncAsSint16LE(fe.subData.transparency);
- // TODO: Have a look at the saving/loading of this pointer
+ // Treat fe.subData.ptrMask the same as fe.subData.ptr.
tmp = (fe.subData.ptrMask) ? 1 : 0;
s.syncAsUint32LE(tmp);
if (s.isLoading()) {
- fe.subData.ptrMask = (uint8 *)tmp;
+ fe.subData.ptrMask = tmp ? (uint8 *)1 : 0;
}
s.syncAsUint16LE(fe.subData.resourceType);
@@ -806,7 +808,6 @@ Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName)
}
Common::Error loadSavegameData(int saveGameIdx) {
- int lowMemorySave;
Common::String saveName;
cellStruct *currentcellHead;
@@ -878,20 +879,19 @@ Common::Error loadSavegameData(int saveGameIdx) {
lastAni[0] = 0;
- lowMemorySave = lowMemory;
-
for (int i = 0; i < NUM_FILE_ENTRIES; i++) {
if (filesDatabase[i].subData.ptr) {
int j;
int k;
- for (j = i + 1; j < NUM_FILE_ENTRIES && filesDatabase[j].subData.ptr && !strcmp(filesDatabase[i].subData.name, filesDatabase[j].subData.name) && (filesDatabase[j].subData.index == (j - i)); j++)
+ for (j = i + 1; j < NUM_FILE_ENTRIES &&
+ filesDatabase[j].subData.ptr &&
+ !strcmp(filesDatabase[i].subData.name, filesDatabase[j].subData.name) &&
+ (filesDatabase[j].subData.index == (j - i));
+ j++)
;
for (k = i; k < j; k++) {
- if (filesDatabase[k].subData.ptrMask)
- lowMemory = 0;
-
filesDatabase[k].subData.ptr = NULL;
filesDatabase[k].subData.ptrMask = NULL;
}
@@ -908,7 +908,6 @@ Common::Error loadSavegameData(int saveGameIdx) {
}
i = j - 1;
- lowMemory = lowMemorySave;
}
}
diff --git a/engines/cruise/saveload.h b/engines/cruise/saveload.h
index 695913f46f..6fb1f4b545 100644
--- a/engines/cruise/saveload.h
+++ b/engines/cruise/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index d753d938bd..65da84b9ce 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/script.h b/engines/cruise/script.h
index cba4f580f8..15f29e8921 100644
--- a/engines/cruise/script.h
+++ b/engines/cruise/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 21d9a75297..86146e3189 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/sound.h b/engines/cruise/sound.h
index c1975dc579..57035e2b11 100644
--- a/engines/cruise/sound.h
+++ b/engines/cruise/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/stack.cpp b/engines/cruise/stack.cpp
index 985fe8d7fd..e4ecf72133 100644
--- a/engines/cruise/stack.cpp
+++ b/engines/cruise/stack.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/stack.h b/engines/cruise/stack.h
index fe2d594c9e..1c96f430d9 100644
--- a/engines/cruise/stack.h
+++ b/engines/cruise/stack.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp
index 08ff4d7548..e9ba941ae0 100644
--- a/engines/cruise/staticres.cpp
+++ b/engines/cruise/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/staticres.h b/engines/cruise/staticres.h
index acf0b640be..3691260078 100644
--- a/engines/cruise/staticres.h
+++ b/engines/cruise/staticres.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/various.cpp b/engines/cruise/various.cpp
index 90b072b478..a7d701f9a1 100644
--- a/engines/cruise/various.cpp
+++ b/engines/cruise/various.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/various.h b/engines/cruise/various.h
index b59593961d..c2ff1e22bb 100644
--- a/engines/cruise/various.h
+++ b/engines/cruise/various.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp
index f381358356..9a59c8a714 100644
--- a/engines/cruise/vars.cpp
+++ b/engines/cruise/vars.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,7 +31,6 @@ uint8 selectColor = 3;
uint8 titleColor = 2;
uint8 subColor = 5;
-int16 lowMemory;
int16 scroll;
int16 switchPal;
char cmdLine[90];
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index ccbf149610..fe3f7d6303 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -59,7 +59,6 @@ extern uint8 selectColor;
extern uint8 titleColor;
extern uint8 subColor;
-extern int16 lowMemory;
extern int16 scroll;
extern int16 switchPal;
extern char cmdLine[90];
diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp
index 9fb6842882..5b125a5142 100644
--- a/engines/cruise/volume.cpp
+++ b/engines/cruise/volume.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/cruise/volume.h b/engines/cruise/volume.h
index 80e1f10db2..0caa894744 100644
--- a/engines/cruise/volume.h
+++ b/engines/cruise/volume.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 1713b99dd1..8498e50b8d 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "base/version.h"
diff --git a/engines/dialogs.h b/engines/dialogs.h
index 32174031cc..a38cf2f61e 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef GLOBAL_DIALOGS_H
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp
index 6e6f167fba..2528383f4f 100644
--- a/engines/draci/animation.cpp
+++ b/engines/draci/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/animation.h b/engines/draci/animation.h
index 8b2a3d98b8..c555e383ee 100644
--- a/engines/draci/animation.h
+++ b/engines/draci/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/barchive.cpp b/engines/draci/barchive.cpp
index 584367fdfb..0cd1097981 100644
--- a/engines/draci/barchive.cpp
+++ b/engines/draci/barchive.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/barchive.h b/engines/draci/barchive.h
index 52ce79ad2d..cb0619612a 100644
--- a/engines/draci/barchive.h
+++ b/engines/draci/barchive.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/console.cpp b/engines/draci/console.cpp
index 07f0ff5542..dc87b06cf4 100644
--- a/engines/draci/console.cpp
+++ b/engines/draci/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/console.h b/engines/draci/console.h
index 714871ffd3..a1a584bdb3 100644
--- a/engines/draci/console.h
+++ b/engines/draci/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/detection.cpp b/engines/draci/detection.cpp
index 98a74824c8..c7cfe227df 100644
--- a/engines/draci/detection.cpp
+++ b/engines/draci/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 06730cfba7..b40d61a04f 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/draci.h b/engines/draci/draci.h
index 55ebff083e..540c288d3d 100644
--- a/engines/draci/draci.h
+++ b/engines/draci/draci.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp
index b4e799deb7..c688f4292d 100644
--- a/engines/draci/font.cpp
+++ b/engines/draci/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/font.h b/engines/draci/font.h
index 3d150f733e..2c640837de 100644
--- a/engines/draci/font.h
+++ b/engines/draci/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 009f1bb3d2..3a335f249a 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -72,6 +72,7 @@ Game::Game(DraciEngine *vm) : _vm(vm), _walkingState(vm) {
_fadePhases = 0;
_fadePhase = 0;
_fadeTick = 0;
+ _isFadeOut = 1;
_mouseChangeTick = 0;
_enableQuickHero = 0;
_wantQuickHero = 0;
@@ -216,6 +217,7 @@ void Game::start() {
// init scripts. This flag was turned on to skip the rest of
// those programs. Don't call loop(), because the
// location may have changed.
+ fadePalette(true);
continue;
}
@@ -478,6 +480,7 @@ void Game::handleDialogueLoop() {
}
void Game::fadePalette(bool fading_out) {
+ _isFadeOut = fading_out;
const byte *startPal = NULL;
const byte *endPal = _currentRoom._palette >= 0
? _vm->_paletteArchive->getFile(_currentRoom._palette)->_data
@@ -551,6 +554,19 @@ void Game::advanceAnimationsAndTestLoopExit() {
_vm->_anims->drawScene(_vm->_screen->getSurface());
_vm->_screen->copyToScreen();
_vm->_system->delayMillis(kTimeUnit);
+ if(_isFadeOut) {
+ fadePalette(false);
+ // Set cursor state
+ // Need to do this after we set the palette since the cursors use it
+ if (_currentRoom._mouseOn) {
+ debugC(6, kDraciLogicDebugLevel, "Mouse: ON");
+ _vm->_mouse->cursorOn();
+ _vm->_mouse->setCursorType(kNormalCursor);
+ } else {
+ debugC(6, kDraciLogicDebugLevel, "Mouse: OFF");
+ _vm->_mouse->cursorOff();
+ }
+ }
// If the hero has arrived at his destination, after even the last
// phase was correctly animated, run the callback.
@@ -598,6 +614,8 @@ void Game::loop(LoopSubstatus substatus, bool shouldExit) {
break;
}
+ advanceAnimationsAndTestLoopExit();
+
if (_vm->_mouse->isCursorOn()) {
// Find animation under cursor and the game object
// corresponding to it
@@ -629,8 +647,6 @@ void Game::loop(LoopSubstatus substatus, bool shouldExit) {
}
}
- advanceAnimationsAndTestLoopExit();
-
} while (!shouldExitLoop());
setLoopSubstatus(kOuterLoop);
@@ -926,10 +942,12 @@ void Game::inventoryDraw() {
void Game::inventoryReload() {
// Make sure all items are loaded into memory (e.g., after loading a
// savegame) by re-putting them on the same spot in the inventory.
+ GameItem *tempItem = _currentItem;
for (uint i = 0; i < kInventorySlots; ++i) {
putItem(_inventory[i], i);
}
setPreviousItemPosition(0);
+ _currentItem = tempItem;
}
void Game::inventorySwitch(int keycode) {
@@ -1433,7 +1451,6 @@ void Game::enterNewRoom() {
_vm->_screen->setPalette(NULL, 0, kNumColors);
_vm->_anims->drawScene(_vm->_screen->getSurface());
_vm->_screen->copyToScreen();
- fadePalette(false);
// Run the program for the gate the dragon came through
debugC(6, kDraciLogicDebugLevel, "Running program for gate %d", _newGate);
@@ -1446,17 +1463,6 @@ void Game::enterNewRoom() {
// Don't immediately switch to the map or inventory even if the mouse
// position tell us to.
_mouseChangeTick = kMouseDoNotSwitch;
-
- // Set cursor state
- // Need to do this after we set the palette since the cursors use it
- if (_currentRoom._mouseOn) {
- debugC(6, kDraciLogicDebugLevel, "Mouse: ON");
- _vm->_mouse->cursorOn();
- _vm->_mouse->setCursorType(kNormalCursor);
- } else {
- debugC(6, kDraciLogicDebugLevel, "Mouse: OFF");
- _vm->_mouse->cursorOff();
- }
}
void Game::positionAnimAsHero(Animation *anim) {
@@ -1572,7 +1578,7 @@ Game::~Game() {
delete[] _items;
}
-void Game::DoSync(Common::Serializer &s) {
+void Game::DoSync(Common::Serializer &s, uint8 saveVersion) {
s.syncAsUint16LE(_currentRoom._roomNum);
for (uint i = 0; i < _info._numObjects; ++i) {
@@ -1603,6 +1609,25 @@ void Game::DoSync(Common::Serializer &s) {
s.syncAsSint16LE(_dialogueVars[i]);
}
+ if(saveVersion >= 2) {
+ setPositionLoaded(true);
+ if (s.isSaving()) {
+ s.syncAsSint16LE(_hero.x);
+ s.syncAsSint16LE(_hero.y);
+
+ int handItemID = _currentItem ? _currentItem->_absNum : -1;
+ s.syncAsSint16LE(handItemID);
+ } else {
+ s.syncAsSint16LE(_heroLoading.x);
+ s.syncAsSint16LE(_heroLoading.y);
+
+ int handItemID = -1;
+ s.syncAsSint16LE(handItemID);
+ _currentItem = getItem(handItemID);
+ }
+ } else {
+ _currentItem = 0;
+ }
}
static double real_to_double(byte real[6]) {
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 47821fcf86..638c979d61 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -215,6 +215,7 @@ public:
void walkHero(int x, int y, SightDirection dir); // start walking and leave callback as is
void setHeroPosition(const Common::Point &p);
const Common::Point &getHeroPosition() const { return _hero; }
+ const Common::Point &getHeroLoadingPosition() const { return _heroLoading; }
void positionAnimAsHero(Animation *anim);
void positionHeroAsAnim(Animation *anim);
@@ -290,6 +291,8 @@ public:
void setExitLoop(bool exit) { _shouldExitLoop = exit; }
bool isReloaded() const { return _isReloaded; }
void setIsReloaded(bool value) { _isReloaded = value; }
+ bool isPositionLoaded() { return _isPositionLoaded; }
+ void setPositionLoaded(bool value) { _isPositionLoaded = value; }
void setSpeechTiming(uint tick, uint duration);
void shiftSpeechAndFadeTick(int delta);
@@ -327,7 +330,7 @@ public:
void setEnableSpeedText(bool value) { _enableSpeedText = value; }
bool getEnableSpeedText() const { return _enableSpeedText; }
- void DoSync(Common::Serializer &s);
+ void DoSync(Common::Serializer &s, uint8 saveVersion);
private:
void updateOrdinaryCursor();
@@ -352,6 +355,7 @@ private:
GameInfo _info;
Common::Point _hero;
+ Common::Point _heroLoading;
int *_variables;
Person *_persons;
@@ -395,6 +399,7 @@ private:
bool _shouldQuit;
bool _shouldExitLoop;
bool _isReloaded;
+ bool _isPositionLoaded;
uint _speechTick;
uint _speechDuration;
@@ -408,6 +413,7 @@ private:
int _fadePhases;
int _fadePhase;
uint _fadeTick;
+ bool _isFadeOut;
int _mouseChangeTick;
bool _enableQuickHero;
diff --git a/engines/draci/module.mk b/engines/draci/module.mk
index e6c9511687..9bac1d9ddc 100644
--- a/engines/draci/module.mk
+++ b/engines/draci/module.mk
@@ -1,5 +1,5 @@
MODULE := engines/draci
-
+
MODULE_OBJS := \
animation.o \
barchive.o \
@@ -17,11 +17,11 @@ MODULE_OBJS := \
sprite.o \
surface.o \
walking.o
-
+
# This module can be built as a plugin
ifeq ($(ENABLE_DRACI), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
-
-# Include common rules
+
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp
index 90c04ed4c3..6bbdee787f 100644
--- a/engines/draci/mouse.cpp
+++ b/engines/draci/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/mouse.h b/engines/draci/mouse.h
index b934475ade..8806bd942d 100644
--- a/engines/draci/mouse.h
+++ b/engines/draci/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp
index 3179c79ca4..cda2007a8e 100644
--- a/engines/draci/music.cpp
+++ b/engines/draci/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/music.h b/engines/draci/music.h
index 62288a01dc..a3010c93ce 100644
--- a/engines/draci/music.h
+++ b/engines/draci/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp
index e3551c78b3..3e7f8651c1 100644
--- a/engines/draci/saveload.cpp
+++ b/engines/draci/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -45,7 +45,8 @@ bool readSavegameHeader(Common::InSaveFile *in, DraciSavegameHeader &header) {
return false;
header.version = in->readByte();
- if (header.version != DRACI_SAVEGAME_VERSION)
+ // Version 1 is compatible with Version 2
+ if (header.version > DRACI_SAVEGAME_VERSION)
return false;
// Read in the string
@@ -106,7 +107,7 @@ Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName,
} else {
// Create the remainder of the savegame
Common::Serializer s(NULL, f);
- vm._game->DoSync(s);
+ vm._game->DoSync(s, header.version);
f->finalize();
delete f;
@@ -140,7 +141,7 @@ Common::Error loadSavegameData(int saveGameIdx, DraciEngine *vm) {
// Synchronise the remaining data of the savegame
Common::Serializer s(f, NULL);
- vm->_game->DoSync(s);
+ vm->_game->DoSync(s, header.version);
delete f;
// Post-processing
diff --git a/engines/draci/saveload.h b/engines/draci/saveload.h
index 3cc13701db..6f951a3409 100644
--- a/engines/draci/saveload.h
+++ b/engines/draci/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -29,7 +29,7 @@
namespace Draci {
-#define DRACI_SAVEGAME_VERSION 1
+#define DRACI_SAVEGAME_VERSION 2
struct DraciSavegameHeader {
uint8 version;
diff --git a/engines/draci/screen.cpp b/engines/draci/screen.cpp
index e43e367300..2434a1312e 100644
--- a/engines/draci/screen.cpp
+++ b/engines/draci/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/screen.h b/engines/draci/screen.h
index 5a8297feba..55d2a9c171 100644
--- a/engines/draci/screen.h
+++ b/engines/draci/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index 504476869e..09c74f5e0d 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -634,8 +634,16 @@ void Script::stayOn(const Common::Array<int> &params) {
return;
}
- int x = params[0];
- int y = params[1];
+ int x, y;
+ Common::Point afterLoadingPos = _vm->_game->getHeroLoadingPosition();
+ if(_vm->_game->isPositionLoaded() == true) {
+ x = afterLoadingPos.x;
+ y = afterLoadingPos.y;
+ }
+ else {
+ x = params[0];
+ y = params[1];
+ }
SightDirection dir = static_cast<SightDirection> (params[2]);
// Jumps into the given position regardless of the walking map.
@@ -670,6 +678,11 @@ void Script::walkOnPlay(const Common::Array<int> &params) {
return;
}
+ if(_vm->_game->isPositionLoaded() == true) {
+ _vm->_game->setPositionLoaded(false);
+ return;
+ }
+
int x = params[0];
int y = params[1];
SightDirection dir = static_cast<SightDirection> (params[2]);
@@ -687,6 +700,10 @@ void Script::newRoom(const Common::Array<int> &params) {
return;
}
+ if(_vm->_game->isPositionLoaded() == true) {
+ _vm->_game->setPositionLoaded(false);
+ }
+
int room = params[0] - 1;
int gate = params[1] - 1;
diff --git a/engines/draci/script.h b/engines/draci/script.h
index 72d6f6c344..aa36a30408 100644
--- a/engines/draci/script.h
+++ b/engines/draci/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index d534f46a6e..cbc9eb983d 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/sound.h b/engines/draci/sound.h
index 358c228604..d8d19e62e2 100644
--- a/engines/draci/sound.h
+++ b/engines/draci/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp
index 9a78904d25..8b5e5a918a 100644
--- a/engines/draci/sprite.cpp
+++ b/engines/draci/sprite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/sprite.h b/engines/draci/sprite.h
index c86728914e..5831f7772e 100644
--- a/engines/draci/sprite.h
+++ b/engines/draci/sprite.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/surface.cpp b/engines/draci/surface.cpp
index 4156398070..4b438880ad 100644
--- a/engines/draci/surface.cpp
+++ b/engines/draci/surface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/surface.h b/engines/draci/surface.h
index 71a3722a2a..fa2d931a43 100644
--- a/engines/draci/surface.h
+++ b/engines/draci/surface.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/walking.cpp b/engines/draci/walking.cpp
index 195b968860..1467ecee35 100644
--- a/engines/draci/walking.cpp
+++ b/engines/draci/walking.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/draci/walking.h b/engines/draci/walking.h
index 7e4a3184f5..ee2b48d083 100644
--- a/engines/draci/walking.h
+++ b/engines/draci/walking.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -111,7 +111,7 @@ public:
_turningFinished = 0;
_callbackOffset = 0;
- stopWalking();
+ stopWalking();
}
~WalkingState() {}
diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp
index e0983809fa..51148bbc05 100644
--- a/engines/drascula/actors.cpp
+++ b/engines/drascula/actors.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index ee981c36da..b158969f46 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/console.cpp b/engines/drascula/console.cpp
index c0d2748ec3..50e96c8757 100644
--- a/engines/drascula/console.cpp
+++ b/engines/drascula/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/console.h b/engines/drascula/console.h
index 894c85ff42..01a5e8cba7 100644
--- a/engines/drascula/console.h
+++ b/engines/drascula/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp
index b3749445ec..48317289d5 100644
--- a/engines/drascula/converse.cpp
+++ b/engines/drascula/converse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 1917bc879d..833363669d 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 14cb4be5a0..35461f1d71 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 53fce9c212..762add50a5 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index fe954279c3..077047a6eb 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index f0b6d12027..07f192cd4c 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index 519e919433..cd7d502194 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp
index 500333badf..1bd9a03c14 100644
--- a/engines/drascula/palette.cpp
+++ b/engines/drascula/palette.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/resource.cpp b/engines/drascula/resource.cpp
index 95a95e3487..5e0e2fe9cc 100644
--- a/engines/drascula/resource.cpp
+++ b/engines/drascula/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 25f3da0080..8691bd2cb4 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index 61d6f0b4af..d0f16aa941 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp
index 59b5e1d237..148dae76f5 100644
--- a/engines/drascula/sound.cpp
+++ b/engines/drascula/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index 6aabd91c6a..ed29dc5fe4 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index 5ccc68704a..783c5e349a 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/console.cpp b/engines/dreamweb/console.cpp
index 532bf815ef..62c02b8617 100644
--- a/engines/dreamweb/console.cpp
+++ b/engines/dreamweb/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/console.h b/engines/dreamweb/console.h
index a90794e94e..5517d7ffa8 100644
--- a/engines/dreamweb/console.h
+++ b/engines/dreamweb/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
index f2e2f42216..01cfc7e506 100644
--- a/engines/dreamweb/detection.cpp
+++ b/engines/dreamweb/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h
index ec54484d28..cb9bebb304 100644
--- a/engines/dreamweb/detection_tables.h
+++ b/engines/dreamweb/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 7323dfc4a8..94a2e60ef1 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -199,7 +199,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_saveLoadPage = 0;
_currentSlot = 0;
_cursorPos = 0;
- _colourPos = 0;
+ _colorPos = 0;
_fadeDirection = 0;
_numToFade = 0;
_fadeCount = 0;
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 87a9f5423f..e39f8c0d51 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -415,7 +415,7 @@ public:
uint8 _saveLoadPage;
uint8 _currentSlot;
uint8 _cursorPos;
- uint8 _colourPos;
+ uint8 _colorPos;
uint8 _fadeDirection;
uint8 _numToFade;
uint8 _fadeCount;
@@ -515,8 +515,8 @@ public:
int findCommand(const char *const cmdList[]);
// from newplace.cpp
- void getUnderCentre();
- void putUnderCentre();
+ void getUnderCenter();
+ void putUnderCenter();
void showArrows();
uint8 getLocation(uint8 index);
void setLocation(uint8 index);
@@ -996,7 +996,7 @@ public:
void useDryer();
void callEdensDLift();
void callEdensLift();
- void openYourNeighbour();
+ void openYourNeighbor();
void openRyan();
void openPoolBoss();
void openEden();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 7bbca2b979..50e452eb82 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 108f9d2b60..5f0566c8ba 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/mouse.cpp b/engines/dreamweb/mouse.cpp
index 77d907611d..fe5c580738 100644
--- a/engines/dreamweb/mouse.cpp
+++ b/engines/dreamweb/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index 6b1f9d097b..3834a114e5 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -113,7 +113,7 @@ void DreamWebEngine::lookAtPlace() {
delPointer();
delTextLine();
- getUnderCentre();
+ getUnderCenter();
showFrame(_newplaceGraphics3, 60, 72, 0, 0);
showFrame(_newplaceGraphics3, 60, 72 + 55, 4, 0);
if (_foreignRelease)
@@ -127,15 +127,15 @@ void DreamWebEngine::lookAtPlace() {
hangOnP(500);
_pointerMode = 0;
_pointerFrame = 0;
- putUnderCentre();
+ putUnderCenter();
workToScreenM();
}
-void DreamWebEngine::getUnderCentre() {
+void DreamWebEngine::getUnderCenter() {
multiGet(_mapStore, 58, 72, 254, 110);
}
-void DreamWebEngine::putUnderCentre() {
+void DreamWebEngine::putUnderCenter() {
multiPut(_mapStore, 58, 72, 254, 110);
}
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index bee3a6d511..181987d721 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp
index 64cffde4de..8351a3798a 100644
--- a/engines/dreamweb/pathfind.cpp
+++ b/engines/dreamweb/pathfind.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 53f04d482b..6e47513a21 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index bec58322d5..c119f284cc 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/rain.cpp b/engines/dreamweb/rain.cpp
index b636b7def7..4f68811a3e 100644
--- a/engines/dreamweb/rain.cpp
+++ b/engines/dreamweb/rain.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 8a0791d19b..ce89dae732 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index 570f76f2f9..d3b417de90 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/sound.h b/engines/dreamweb/sound.h
index 1ab06dc694..6553a81b62 100644
--- a/engines/dreamweb/sound.h
+++ b/engines/dreamweb/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 1fa2e7d6a4..633db73bcd 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index 24b67e317a..cc300e8931 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 057a0c847a..68b223392c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2566,14 +2566,14 @@ void DreamWebEngine::showGun() {
greyscaleSum();
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
hangOn(130);
endPalToStart();
clearEndPal();
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
hangOn(200);
_roomsSample = 34;
@@ -2749,7 +2749,7 @@ void DreamWebEngine::entryAnims() {
// Make doors open
removeSetObject(4);
placeSetObject(5);
- } else if (_vars._location == 47) { // Dream centre
+ } else if (_vars._location == 47) { // Dream center
placeSetObject(4);
placeSetObject(5);
} else if (_vars._location == 38) { // Car park
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 2629c23355..8bb469b8fd 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp
index 4e4faa75a0..bd0957c1bd 100644
--- a/engines/dreamweb/titles.cpp
+++ b/engines/dreamweb/titles.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 476f847c40..c393fa1173 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -73,7 +73,7 @@ void DreamWebEngine::useRoutine() {
{ &DreamWebEngine::openLouis, "ENTA" },
{ &DreamWebEngine::openRyan, "ENTB" },
{ &DreamWebEngine::openPoolBoss, "ENTE" },
- { &DreamWebEngine::openYourNeighbour, "ENTC" },
+ { &DreamWebEngine::openYourNeighbor, "ENTC" },
{ &DreamWebEngine::openEden, "ENTD" },
{ &DreamWebEngine::openSarters, "ENTH" },
{ &DreamWebEngine::wearWatch, "WWAT" },
@@ -458,7 +458,7 @@ void DreamWebEngine::callEdensDLift() {
}
}
-void DreamWebEngine::openYourNeighbour() {
+void DreamWebEngine::openYourNeighbor() {
enterCode(255, 255, 255, 255);
_getBack = 1;
}
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index d1e2480f70..65930aef7d 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -72,11 +72,11 @@ void DreamWebEngine::doFade() {
return;
processEvents();
- uint8 *src = _startPal + 3 * _colourPos;
- setPalette(src, _colourPos, _numToFade);
+ uint8 *src = _startPal + 3 * _colorPos;
+ setPalette(src, _colorPos, _numToFade);
- _colourPos += _numToFade;
- if (_colourPos == 0)
+ _colorPos += _numToFade;
+ if (_colorPos == 0)
fadeCalculation();
}
@@ -109,7 +109,7 @@ void DreamWebEngine::fadeUpYellows() {
memset(_endPal + 246 * 3, 0, 1 * 3);
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
hangOn(128);
}
@@ -121,7 +121,7 @@ void DreamWebEngine::fadeUpMonFirst() {
memset(_startPal + 246 * 3, 0, 1 * 3);
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
hangOn(64);
_sound->playChannel1(26);
@@ -136,7 +136,7 @@ void DreamWebEngine::fadeDownMon() {
memset(_endPal + 246 * 3, 0, 1 * 3);
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
hangOn(64);
}
@@ -148,7 +148,7 @@ void DreamWebEngine::fadeUpMon() {
memset(_startPal + 246 * 3, 0, 1 * 3);
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
hangOn(128);
}
@@ -166,7 +166,7 @@ void DreamWebEngine::fadeScreenUp() {
palToEndPal();
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
}
@@ -175,7 +175,7 @@ void DreamWebEngine::fadeScreenUps() {
palToEndPal();
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 64;
}
@@ -184,7 +184,7 @@ void DreamWebEngine::fadeScreenUpHalf() {
palToEndPal();
_fadeDirection = 1;
_fadeCount = 31;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 32;
}
@@ -193,7 +193,7 @@ void DreamWebEngine::fadeScreenDown() {
clearEndPal();
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 128;
}
@@ -202,7 +202,7 @@ void DreamWebEngine::fadeScreenDowns() {
clearEndPal();
_fadeDirection = 1;
_fadeCount = 63;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 64;
}
@@ -222,7 +222,7 @@ void DreamWebEngine::fadeScreenDownHalf() {
_fadeDirection = 1;
_fadeCount = 31;
- _colourPos = 0;
+ _colorPos = 0;
_numToFade = 32;
}
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index d8984d312b..c59d3e3ad5 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -23,7 +23,7 @@
#include "dreamweb/dreamweb.h"
#include "engines/util.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pcx.h"
+#include "image/pcx.h"
namespace DreamWeb {
@@ -161,7 +161,7 @@ void DreamWebEngine::showPCX(const Common::String &suffix) {
return;
}
- Graphics::PCXDecoder pcx;
+ Image::PCXDecoder pcx;
if (!pcx.loadStream(pcxFile)) {
warning("showpcx: Could not process '%s'", name.c_str());
return;
@@ -235,7 +235,7 @@ void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y
void DreamWebEngine::showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height) {
if (effectsFlag) {
- if (effectsFlag & 128) { //centred
+ if (effectsFlag & 128) { //centered
x -= width / 2;
y -= height / 2;
}
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 8326a1fe89..c63437f800 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
diff --git a/engines/engine.h b/engines/engine.h
index 33416dda44..e325cc1ba2 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef ENGINES_ENGINE_H
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index 75cb027d7a..14e9c33bdf 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -83,7 +83,7 @@ void BehaviorManager::updateBehaviors() {
if (!_isActive)
return;
- debug(0, "BehaviorManager::updateBehaviors()");
+ debug(4, "BehaviorManager::updateBehaviors()");
for (uint i = 0; i < _behaviors.size(); i++) {
BehaviorInfo *beh = _behaviors[i];
@@ -122,7 +122,7 @@ void BehaviorManager::updateBehaviors() {
}
void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry) {
- debug(0, "BehaviorManager::updateBehavior() %d", entry->_itemsCount);
+ debug(4, "BehaviorManager::updateBehavior() %d", entry->_itemsCount);
for (int i = 0; i < entry->_itemsCount; i++) {
BehaviorEntryInfo *bhi = entry->_items[i];
if (!(bhi->_flags & 1)) {
@@ -144,7 +144,7 @@ void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *
}
void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *bhe) {
- debug(0, "BehaviorManager::updateStaticAniBehavior(%s)", transCyrillic((byte *)ani->_objectName));
+ debug(4, "BehaviorManager::updateStaticAniBehavior(%s)", transCyrillic((byte *)ani->_objectName));
MessageQueue *mq = 0;
@@ -236,7 +236,7 @@ void BehaviorInfo::clear() {
}
void BehaviorInfo::initAmbientBehavior(GameVar *var, Scene *sc) {
- debug(0, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName));
+ debug(4, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName));
clear();
_itemsCount = 1;
@@ -260,7 +260,7 @@ void BehaviorInfo::initAmbientBehavior(GameVar *var, Scene *sc) {
}
void BehaviorInfo::initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *ani) {
- debug(0, "BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName));
+ debug(4, "BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName));
clear();
diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h
index 90bb38dc9b..1ec98d5bf2 100644
--- a/engines/fullpipe/behavior.h
+++ b/engines/fullpipe/behavior.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/console.cpp b/engines/fullpipe/console.cpp
index 2d27fc2ddd..cb76345d66 100644
--- a/engines/fullpipe/console.cpp
+++ b/engines/fullpipe/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/console.h b/engines/fullpipe/console.h
index af2b5114ac..24f213a50f 100644
--- a/engines/fullpipe/console.h
+++ b/engines/fullpipe/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index dfc2146332..f76a12fb2b 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -39,12 +39,19 @@ namespace Fullpipe {
#define MSG_MANSHADOWSOFF 5196
#define MSG_MANSHADOWSON 5197
#define MV_FLY_FLY 4917
+#define MV_LFT_CLOSE 1053
+#define MV_LFT_OPEN 1048
#define MV_MAN_GOLADDER 451
#define MV_MAN_GOLADDER2 2844
+#define MV_MAN_HMRKICK 1028
+#define MV_MAN_HMRKICK_COINLESS 1445
+#define MV_MAN_LIFTDOWN 1052
+#define MV_MAN_LIFTUP 1051
#define MV_MAN_LOOKUP 4773
#define rMV_MAN_LOOKUP 4775
#define MV_MAN_TOLADDER 448
#define MV_MAN_TOLADDER2 2841
+#define MV_MAN_STARTD 478
#define MV_MAN_STARTLADDER 452
#define MV_MAN_STARTLADDER2 2842
#define MV_MAN_STOPLADDER 454
@@ -83,6 +90,7 @@ namespace Fullpipe {
#define PIC_CSR_ITN_RED 5329
#define PIC_CSR_LIFT 5176
#define PIC_CSR_MAP 5339
+#define PIC_HLP_BGR 3562
#define PIC_IN1_GAMETITLE 5169
#define PIC_IN1_PIPETITLE 5167
#define PIC_INV_MENU 991
@@ -210,35 +218,52 @@ namespace Fullpipe {
#define SC_INTRO2 3907
#define SC_INV 858
#define SC_LDR 635
+#define SC_MAINMENU 4620
#define SC_MAP 5222
#define SC_TITLES 5166
+#define SND_CMN_015 3139
#define SND_CMN_031 3516
+#define SND_CMN_032 3517
+#define SND_CMN_054 4762
+#define SND_CMN_055 4763
#define SND_CMN_060 4921
#define SND_CMN_061 4922
#define SND_CMN_070 5199
#define SND_INTR_019 5220
#define ST_EGTR_SLIMSORROW 340
#define ST_FLY_FLY 4918
+#define ST_LBN_0H 2835
+#define ST_LBN_1H 2791
+#define ST_LBN_2H 2793
+#define ST_LBN_3H 2795
+#define ST_LBN_4H 2797
+#define ST_LBN_5H 2799
+#define ST_LBN_6H 2801
+#define ST_LBN_7H 2803
+#define ST_LBN_8H 2805
+#define ST_LBN_9H 2807
#define ST_LBN_0N 2832
-#define ST_LBN_0P 2833
#define ST_LBN_1N 2753
-#define ST_LBN_1P 2754
#define ST_LBN_2N 2756
-#define ST_LBN_2P 2757
#define ST_LBN_3N 2759
-#define ST_LBN_3P 2760
#define ST_LBN_4N 2762
-#define ST_LBN_4P 2763
#define ST_LBN_5N 2765
-#define ST_LBN_5P 2766
#define ST_LBN_6N 2768
-#define ST_LBN_6P 2769
#define ST_LBN_7N 2771
-#define ST_LBN_7P 2772
#define ST_LBN_8N 2774
-#define ST_LBN_8P 2775
#define ST_LBN_9N 2777
+#define ST_LBN_0P 2833
+#define ST_LBN_1P 2754
+#define ST_LBN_2P 2757
+#define ST_LBN_3P 2760
+#define ST_LBN_4P 2763
+#define ST_LBN_5P 2766
+#define ST_LBN_6P 2769
+#define ST_LBN_7P 2772
+#define ST_LBN_8P 2775
#define ST_LBN_9P 2778
+#define ST_LFT_CLOSED 1049
+#define ST_LFT_OPEN_NEW 1071
#define ST_MAN_EMPTY 476
#define ST_MAN_GOU 459
#define ST_MAN_RIGHT 325
@@ -246,6 +271,27 @@ namespace Fullpipe {
#define TrubaLeft 474
#define TrubaUp 680
+// Main Menu
+#define PIC_MNU_AUTHORS_L 4624
+#define PIC_MNU_CONTINUE_L 4626
+#define PIC_MNU_DEBUG_L 4632
+#define PIC_MNU_EXIT_L 4622
+#define PIC_MNU_LOAD_L 4628
+#define PIC_MNU_MUSICSLIDER_D 4914
+#define PIC_MNU_MUSICSLIDER_L 4915
+#define PIC_MNU_RESTART_L 5299
+#define PIC_MNU_SAVE_L 4630
+#define PIC_MNU_SLIDER_D 4913
+#define PIC_MNU_SLIDER_L 4912
+
+// Query dialog
+#define PIC_MEX_BGR 5300
+#define PIC_MEX_CANCEL 5302
+#define PIC_MEX_OK 5301
+#define PIC_MOV_BGR 5343
+#define PIC_MOV_CANCEL 5345
+#define PIC_MOV_OK 5344
+
// Intro
#define ANI_IN1MAN 5110
#define MSG_INTR_ENDINTRO 5139
@@ -565,6 +611,37 @@ namespace Fullpipe {
#define ST_MAN8_STAND 774
#define ST_VMT_MIN 766
+// Scene 9
+#define ANI_BALL9 933
+#define ANI_GLOTATEL 924
+#define ANI_GRIT_9 2719
+#define ANI_PLEVATEL 919
+#define ANI_VISUNCHIK 904
+#define MSG_SC9_EATBALL 941
+#define MSG_SC9_FLOWN 943
+#define MSG_SC9_FROMLADDER 4207
+#define MSG_SC9_PLVCLICK 965
+#define MSG_SC9_SETSCROLL 964
+#define MSG_SC9_SHOWBALL 936
+#define MSG_SC9_STARTTIOTIA 4942
+#define MSG_SC9_TOLADDER 4206
+#define MV_BALL9_EXPLODE 939
+#define MV_GLT_FLYAWAY 931
+#define MV_MAN9_SHOOT 922
+#define MV_VSN_CYCLE2 2987
+#define PIC_SC9_LADDER_R 2700
+#define QU_SC9_BALLEXPLODE 938
+#define QU_SC9_EATBALL 942
+#define QU_TTA9_GOL 4937
+#define SND_9_006 3650
+#define SND_9_018 4200
+#define SND_9_019 4201
+#define ST_GLT_SIT 926
+#define ST_GRT9_GRIT 2722
+#define ST_GRT9_NORM 2721
+#define ST_PLV_SIT 921
+#define ST_VSN_NORMAL 906
+
// Scene 10
#define ANI_GUM 978
#define ANI_NADUVATEL 944
@@ -821,10 +898,70 @@ namespace Fullpipe {
#define ST_SMG_SIT 1399
// Scene 18
+#define ANI_BOY18 1477
+#define ANI_DOMINO_18 3174
+#define ANI_GIRL18 1484
+#define ANI_KRESLO 1459
+#define ANI_WHIRLIGIG_18 829
+#define MSG_SC18_CLICKBOARD 3297
+#define MSG_SC18_MANCLIMBEDDOWN 1540
+#define MSG_SC18_MANCLIMBEDUP 1539
+#define MSG_SC18_MANREADY 1507
+#define MSG_SC18_SHOWBOYJUMP 1495
+#define MSG_SC18_SHOWBOYJUMPTO 1497
+#define MSG_SC18_SHOWGIRLJUMP 1496
+#define MSG_SC18_SHOWGIRLJUMPTO 1499
+#define MSG_SC18_SHOWMANJUMP 1510
+#define MSG_SC18_SHOWMANJUMPTO 1508
+#define MV_BOY18_JUMPFROM 1478
+#define MV_BOY18_JUMPTO 1481
+#define MV_GRL18_JUMPFROM 1485
+#define MV_GRL18_JUMPTO 1488
+#define MV_KSL_CALMDOWN 1476
+#define MV_KSL_INBOY 1491
+#define MV_KSL_INGIRL 1493
+#define MV_KSL_INMAN 1504
+#define MV_KSL_JUMPBOY 1473
+#define MV_KSL_JUMPGIRL 1475
+#define MV_KSL_JUMPMAN 1509
+#define MV_KSL_SWING 1460
+#define MV_KSL_SWINGBOY 1462
+#define MV_KSL_SWINGGIRL 1464
+#define MV_KSL_SWINGMAN 1502
+#define MV_MAN18_JUMPTOTRUBA 1511
+#define MV_MAN18_STANDKRESLO 1500
+#define MV_WHR18_SPIN 1300
+#define PIC_SC18_DOMIN 5184
+#define PIC_SC18_LADDER1 1471
+#define PIC_SC18_LADDER2 1472
+#define PIC_SC18_LADDER3 3299
#define PIC_SC18_RTRUBA 1520
+#define QU_SC19_MANJUMP1 1516
+#define QU_SC19_MANJUMP2 1517
+#define QU_SC19_MANJUMP3 1518
+#define SND_18_006 3906
+#define SND_18_010 4994
+#define ST_KSL_BOY 1463
+#define ST_KSL_GIRL 1465
+#define ST_KSL_JUMPBOY 1492
+#define ST_KSL_JUMPGIRL 1494
+#define ST_KSL_JUMPMAN 1505
+#define ST_KSL_MAN 1503
+#define ST_KSL_REACT 1474
// Scene 19
+#define ANI_CORDIE 1529
+#define ANI_WHIRLGIG_19 1302
+#define MSG_SC19_UPDATENUMRIDES 5203
+#define MV_WHR19_SPIN 1317
+#define PIC_SC19_RTRUBA1 1513
+#define PIC_SC19_RTRUBA2 1514
#define PIC_SC19_RTRUBA3 1515
+#define PIC_SC19_RTRUBA31 5320
+#define SND_19_015 3928
+#define SND_19_016 4995
+#define ST_CDI_EMPTY2 1543
+#define ST_KSL_NORM 1461
// Scene 20
#define ANI_GRANDMA_20 2427
@@ -1063,6 +1200,52 @@ namespace Fullpipe {
#define ST_VNT26_RIGHT2 3348
#define ST_VNT26_UP2 1948
+// Scene 27
+#define ANI_BITA 2026
+#define ANI_BITAHANDLER 3349
+#define ANI_MAID 2015
+#define ANI_VODILLA 1994
+#define MSG_SC27_CLICKBET 2048
+#define MSG_SC27_HANDLERTOBACK 3372
+#define MSG_SC27_HANDLERTOFRONT 3371
+#define MSG_SC27_SHOWNEXTBET 3369
+#define MSG_SC27_STARTBET 2047
+#define MSG_SC27_STARTWIPE 2057
+#define MSG_SC27_TAKEVENT 4584
+#define MV_BTA_FALL 2049
+#define MV_BTH_1_0 3366
+#define MV_BTH_2_1 3364
+#define MV_BTH_3_2 3362
+#define MV_BTH_4_3 3360
+#define MV_BTH_5_4 3358
+#define MV_MAN27_FLOW 1990
+#define MV_MAN27_THROWBET 1989
+#define PIC_SC27_HITZONE2 4756
+#define QU_DRV_GIVEVENT 2040
+#define QU_DRV_PUSHBUTTON 2056
+#define QU_DRV_PUSHBUTTON_NOVENT 4578
+#define QU_MID_CLEANVENT 4583
+#define QU_MID_SWITCHBACK 2044
+#define QU_SC27_RESTARTBETS 3370
+#define QU_SC27_SHOWBET 3368
+#define SND_27_026 4127
+#define SND_27_027 4128
+#define SND_27_044 4687
+#define ST_BTA_FALL 2054
+#define ST_BTA_HILITE 2052
+#define ST_BTA_NORM 2028
+#define ST_BTH_1 3365
+#define ST_BTH_2 3363
+#define ST_BTH_3 3361
+#define ST_BTH_4 3359
+#define ST_BTH_5 3357
+#define ST_DRV_SITNOVENT 1999
+#define ST_DRV_VENT 1996
+#define ST_MID_BROOM 2022
+#define ST_MID_SPADE 3489
+#define ST_MID_SWAB 2017
+#define ST_MID_SWAB2 2019
+
// Scene 28
#define ANI_LIFT 982
#define ANI_LIFT_28 4238
@@ -1119,6 +1302,65 @@ namespace Fullpipe {
#define QU_SC28_WMN_START 3452
#define ST_MAN28_RIGHT 4249
+// Scene 29
+#define ANI_ASS 2120
+#define ANI_PORTER 2082
+#define ANI_SHELL_GREEN 2116
+#define ANI_SHELL_RED 2130
+#define ANI_SHOOTER1 2108
+#define ANI_SHOOTER2 2111
+#define MSG_SC29_DISABLEPORTER 2097
+#define MSG_SC29_DISABLERIDEBACK 2106
+#define MSG_SC29_ENABLEPORTER 2096
+#define MSG_SC29_ENABLERIDEBACK 2105
+#define MSG_SC29_LAUGH 4760
+#define MSG_SC29_SHOOTGREEN 2119
+#define MSG_SC29_SHOOTRED 2137
+#define MSG_SC29_SHOWLASTGREEN 2730
+#define MSG_SC29_SHOWLASTRED 2731
+#define MSG_SC29_STOPRIDE 2107
+#define MV_ASS_HITGREEN 2138
+#define MV_ASS_HITRED 2139
+#define MV_BRDCMN_GOR 4735
+#define MV_MAN29_BEND 2091
+#define MV_MAN29_HIT 2088
+#define MV_MAN29_JUMP 2090
+#define MV_MAN29_RUN 2095
+#define MV_MAN29_STANDUP 2092
+#define MV_MAN29_STANDUP_NORM 2093
+#define MV_PTR_MOVEFAST 2102
+#define MV_SHG_HITASS 2151
+#define MV_SHG_HITMAN 2147
+#define MV_SHG_NORM 2117
+#define MV_SHR_HITASS 2152
+#define MV_SHR_HITMAN 2149
+#define MV_SHR_NORM 2131
+#define MV_STR1_SHOOT 2109
+#define MV_STR2_SHOOT 2112
+#define PIC_SC29_LTRUBA 2081
+#define QU_SC29_BRD1 4741
+#define QU_SC29_BRD2 4742
+#define QU_SC29_BRDOUT1 4743
+#define QU_SC29_BRDOUT2 4744
+#define QU_SC29_ESCAPE 2129
+#define QU_SC29_MANFROM_L 2101
+#define QU_SC29_MANFROM_R 2104
+#define QU_SC29_MANTO_L 2103
+#define QU_SC29_MANTO_R 2100
+#define SND_29_014 4348
+#define SND_29_027 4757
+#define SND_29_028 4758
+#define SND_29_029 4759
+#define ST_ASS_NORM 2122
+#define ST_BRDCMN_GOR 4734
+#define ST_BRDCMN_RIGHT 4732
+#define ST_MAN29_RUNR 2140
+#define ST_MAN29_SITR 2141
+#define ST_STR1_RIGHT 2143
+#define ST_STR2_RIGHT 2144
+#define ST_STR1_STAND 2110
+#define ST_STR2_STAND 2113
+
// Scene 30
#define ANI_LEG 2322
#define MSG_SC30_UPDATEPATH 2358
diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp
index 8c4a422333..62c5dd3b80 100644
--- a/engines/fullpipe/detection.cpp
+++ b/engines/fullpipe/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp
index 9e5ca7b3f1..eb29706f72 100644
--- a/engines/fullpipe/floaters.cpp
+++ b/engines/fullpipe/floaters.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/floaters.h b/engines/fullpipe/floaters.h
index 3ecbbeea9c..bd7b7ffd2c 100644
--- a/engines/fullpipe/floaters.h
+++ b/engines/fullpipe/floaters.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 1c319d3660..5369c05de7 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -71,6 +71,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_flgSoundList = true;
_sfxVolume = 0;
+ _musicVolume = 0;
_inputController = 0;
_inputDisabled = false;
@@ -82,12 +83,20 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_modalObject = 0;
+ _liftEnterMQ = 0;
+ _liftExitMQ = 0;
+ _lift = 0;
+ _lastLiftButton = 0;
+ _liftX = 0;
+ _liftY = 0;
+
_gameContinue = true;
_needRestart = false;
_flgPlayIntro = true;
_gamePaused = false;
_inputArFlag = false;
_recordEvents = false;
+ _mainMenu_debugEnabled = false;
_flgGameIsRunning = true;
@@ -95,6 +104,18 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_musicAllowed = -1;
_musicGameVar = 0;
+ _musicMinDelay = 0;
+ _musicMaxDelay = 0;
+ _musicLocal = 0;
+ _trackStartDelay = 0;
+
+ memset(_sceneTracks, 0, sizeof(_sceneTracks));
+ memset(_trackName, 0, sizeof(_trackName));
+ memset(_sceneTracksCurrentTrack, 0, sizeof(_sceneTracksCurrentTrack));
+
+ _numSceneTracks = 0;
+ _sceneTrackHasSequence = false;
+ _sceneTrackIsPlaying = false;
_aniMan = 0;
_aniMan2 = 0;
@@ -183,6 +204,10 @@ void FullpipeEngine::initialize() {
_mgm = new MGM;
}
+void FullpipeEngine::restartGame() {
+ warning("STUB: FullpipeEngine::restartGame()");
+}
+
Common::Error FullpipeEngine::run() {
const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
// Initialize backend
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 0fc69c2de3..27505252ab 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -60,6 +60,7 @@ class GameProject;
class GameObject;
class GlobalMessageQueueList;
struct MessageHandler;
+class MessageQueue;
struct MovTable;
class MGM;
class NGIArchive;
@@ -90,6 +91,7 @@ public:
GUI::Debugger *getDebugger() { return _console; }
void initialize();
+ void restartGame();
void setMusicAllowed(int val) { _musicAllowed = val; }
@@ -124,6 +126,7 @@ public:
bool _flgGameIsRunning;
bool _inputArFlag;
bool _recordEvents;
+ bool _mainMenu_debugEnabled;
Common::Rect _sceneRect;
int _sceneWidth;
@@ -148,18 +151,32 @@ public:
int _currSoundListCount;
bool _soundEnabled;
bool _flgSoundList;
+ char _sceneTracks[10][260];
+ int _numSceneTracks;
+ bool _sceneTrackHasSequence;
+ int _musicMinDelay;
+ int _musicMaxDelay;
+ int _musicLocal;
+ char _trackName[2600];
+ int _trackStartDelay;
+ char _sceneTracksCurrentTrack[260];
+ bool _sceneTrackIsPlaying;
void stopAllSounds();
void toggleMute();
void playSound(int id, int flag);
void playTrack(GameVar *sceneVar, const char *name, bool delayed);
+ int getSceneTrack();
void startSceneTrack();
+ void startSoundStream1(char *trackName);
void stopSoundStream2();
void stopAllSoundStreams();
void stopAllSoundInstances(int id);
void updateSoundVolume();
+ void setMusicVolume(int vol);
int _sfxVolume;
+ int _musicVolume;
GlobalMessageQueueList *_globalMessageQueueList;
MessageHandler *_messageHandlers;
@@ -269,21 +286,33 @@ public:
void getAllInventory();
+ StaticANIObject *_lastLiftButton;
+ MessageQueue *_liftEnterMQ;
+ MessageQueue *_liftExitMQ;
+ StaticANIObject *_lift;
+ int _liftX;
+ int _liftY;
+
int lift_getButtonIdP(int objid);
+ int lift_getButtonIdH(int objid);
+ int lift_getButtonIdN(int objid);
void lift_setButton(const char *name, int state);
- void lift_sub5(Scene *sc, int qu1, int qu2);
- void lift_sub7(Scene *sc, int buttonId);
+ void lift_init(Scene *sc, int qu1, int qu2);
+ void lift_setButtonStatics(Scene *sc, int buttonId);
void lift_exitSeq(ExCommand *ex);
void lift_closedoorSeq();
- void lift_animation3();
+ void lift_clickButton();
+ void lift_walkAndGo();
void lift_goAnimation();
- void lift_sub1(StaticANIObject *ani);
+ void lift_animateButton(StaticANIObject *button);
void lift_startExitQueue();
- void lift_sub05(ExCommand *ex);
+ void lift_hoverButton(ExCommand *ex);
bool lift_checkButton(const char *varname);
+ void lift_openLift();
GameVar *_musicGameVar;
Audio::SoundHandle _sceneTrackHandle;
+
public:
bool _isSaveAllowed;
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 845655dded..d9f7327a6b 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -272,7 +272,7 @@ bool preloadCallback(PreloadItem &pre, int flag) {
g_fp->_currSoundList1[0] = g_fp->accessScene(SC_COMMON)->_soundList;
}
- g_vars->scene18_var01 = 0;
+ g_vars->scene18_inScene18p1 = false;
if ((pre.preloadId1 != SC_18 || pre.sceneId != SC_19) && (pre.preloadId1 != SC_19 || (pre.sceneId != SC_18 && pre.sceneId != SC_19))) {
if (g_fp->_scene3) {
@@ -282,9 +282,9 @@ bool preloadCallback(PreloadItem &pre, int flag) {
g_fp->_scene3 = 0;
}
} else {
- scene19_preload(g_fp->accessScene(pre.preloadId1), pre.keyCode);
+ scene19_setMovements(g_fp->accessScene(pre.preloadId1), pre.keyCode);
- g_vars->scene18_var01 = 1;
+ g_vars->scene18_inScene18p1 = true;
if (pre.preloadId1 == SC_18) {
g_fp->_gameLoader->saveScenePicAniInfos(SC_18);
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index 85bd6ab0fb..a79c0e11b4 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 2d68600dbb..7c66a9a747 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -90,7 +90,16 @@ Background::Background() {
}
Background::~Background() {
- warning("STUB: Background::~Background()");
+ _picObjList.clear();
+
+ for (int i = 0; i < _bigPictureArray1Count; i++) {
+ for (int j = 0; j < _bigPictureArray2Count; j++)
+ delete _bigPictureArray[i][j];
+
+ free(_bigPictureArray[i]);
+ }
+
+ free(_bigPictureArray);
}
bool Background::load(MfcArchive &file) {
@@ -159,7 +168,9 @@ PictureObject::PictureObject() {
}
PictureObject::~PictureObject() {
- warning("STUB: PictureObject::~PictureObject()");
+ delete _picture;
+ _pictureObject2List->clear();
+ delete _pictureObject2List;
}
PictureObject::PictureObject(PictureObject *src) : GameObject(src) {
@@ -979,6 +990,9 @@ void Bitmap::putDibCB(int32 *palette) {
byte *srcPtr = &_pixels[pitch * (endy - _y)];
+ if (endy - _y < _height)
+ srcPtr = &_pixels[pitch * (_height - 1)];
+
int starty = _y;
if (starty < 0) {
starty = 0;
@@ -992,7 +1006,7 @@ void Bitmap::putDibCB(int32 *palette) {
}
if (_flags & 0x1000000) {
- for (int y = starty; y < endy; srcPtr -= pitch, y++) {
+ for (int y = starty; y <= endy; srcPtr -= pitch, y++) {
curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y);
copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format);
}
diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h
index d640decc80..b3e22b610b 100644
--- a/engines/fullpipe/gfx.h
+++ b/engines/fullpipe/gfx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp
index 8de37b5c9e..9602803010 100644
--- a/engines/fullpipe/init.cpp
+++ b/engines/fullpipe/init.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -96,7 +96,7 @@ void FullpipeEngine::initObjectStates() {
setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull));
setObjectState(sO_Board_25, getObjectEnumState(sO_Board_25, sO_NearDudesStairs));
setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering));
- setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop));
+ setObjectState(sO_Maid, getObjectEnumState(sO_Maid, sO_WithSwab));
setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_IsClosed));
setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_IsClosed));
setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel));
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp
index 5294c4b4ea..7c97461a24 100644
--- a/engines/fullpipe/input.cpp
+++ b/engines/fullpipe/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -275,6 +275,8 @@ void FullpipeEngine::updateCursorCommon() {
}
void FullpipeEngine::initArcadeKeys(const char *varname) {
+ _arcadeKeys.clear();
+
GameVar *var = getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("KEYPOS");
if (!var)
@@ -294,6 +296,37 @@ void FullpipeEngine::initArcadeKeys(const char *varname) {
}
}
+void FullpipeEngine::processArcade(ExCommand *cmd) {
+ if (!g_fp->_aniMan2)
+ return;
+
+ int idx;
+
+ if (cmd->_sceneClickX <= g_fp->_aniMan2->_ox) {
+ for (idx = (int)_arcadeKeys.size() - 1; idx >= 0; idx--) {
+ if (_arcadeKeys[idx]->x < g_fp->_aniMan2->_ox)
+ break;
+ }
+
+ if (idx < 0)
+ return;
+ } else {
+ for (idx = 0; idx < (int)_arcadeKeys.size(); idx++) {
+ if (_arcadeKeys[idx]->x > g_fp->_aniMan2->_ox)
+ break;
+ }
+
+ if (idx >= (int)_arcadeKeys.size())
+ return;
+ }
+
+ cmd->_sceneClickX = _arcadeKeys[idx]->x;
+ cmd->_sceneClickY = _arcadeKeys[idx]->y;
+
+ cmd->_x = cmd->_sceneClickX - g_fp->_sceneRect.left;
+ cmd->_y = cmd->_sceneClickY - g_fp->_sceneRect.top;
+}
+
void FullpipeEngine::setArcadeOverlay(int picId) {
Common::Point point;
Common::Point point2;
diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h
index bfd547ae2f..6a1d0f8b07 100644
--- a/engines/fullpipe/input.h
+++ b/engines/fullpipe/input.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index 59b01a1777..84e9688e30 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -56,7 +56,9 @@ bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId) {
}
InteractionController::~InteractionController() {
- warning("STUB: InteractionController::~InteractionController()");
+ _interactions.clear();
+
+ removeMessageHandler(124, -1);
}
bool InteractionController::load(MfcArchive &file) {
@@ -427,7 +429,14 @@ Interaction::Interaction() {
}
Interaction::~Interaction() {
- warning("STUB: Interaction::~Interaction()");
+ if (_messageQueue) {
+ while (_messageQueue->getExCommandByIndex(0))
+ _messageQueue->deleteExCommandByIndex(0, 1);
+ }
+
+ delete _messageQueue;
+
+ free(_actionName);
}
bool Interaction::load(MfcArchive &file) {
diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h
index 7d9ee0bd51..cb1eac002a 100644
--- a/engines/fullpipe/interaction.h
+++ b/engines/fullpipe/interaction.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index f5af0611cb..e79f9c54df 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,7 +31,7 @@
namespace Fullpipe {
Inventory::~Inventory() {
- warning("STUB: Inventory::~Inventory()");
+ _itemsPool.clear();
}
bool Inventory::load(MfcArchive &file) {
@@ -90,7 +90,7 @@ Inventory2::Inventory2() {
}
Inventory2::~Inventory2() {
- warning("STUB: Inventory2::~Inventory2()");
+ removeMessageHandler(125, -1);
}
bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartially
@@ -123,7 +123,25 @@ void Inventory2::removeItem(int itemId, int count) {
}
void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
- warning("STUB: void removeItem2(sc, %d, %d, %d, %d)", itemId, x, y, priority);
+ int idx = getInventoryItemIndexById(itemId);
+
+ if (idx >= 0) {
+ if (_inventoryItems[idx]->itemId >> 16) {
+ removeItem(itemId, 1);
+
+ Scene *sc = g_fp->accessScene(_sceneId);
+
+ if (sc) {
+ StaticANIObject *ani = new StaticANIObject(sc->getStaticANIObject1ById(itemId, -1));
+
+ sceneObj->addStaticANIObject(ani, 1);
+
+ ani->_statics = (Statics *)ani->_staticsList[0];
+ ani->setOXY(x, y);
+ ani->_priority = priority;
+ }
+ }
+ }
}
int Inventory2::getCountItemsWithId(int itemId) {
@@ -201,7 +219,7 @@ void Inventory2::rebuildItemRects() {
InventoryIcon *icn = new InventoryIcon();
icn->inventoryItemId = _itemsPool[idx]->id;
-
+
icn->pictureObjectNormal = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectNormal, 0);
icn->pictureObjectHover = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectHover, 0);
icn->pictureObjectSelected = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectSelected, 0);
@@ -334,7 +352,7 @@ bool Inventory2::handleLeftClick(ExCommand *cmd) {
bool res = false;
for (uint i = 0; i < _inventoryIcons.size(); i++) {
- if (cmd->_x >= _inventoryIcons[i]->x1 && cmd->_x <= _inventoryIcons[i]->x2 &&
+ if (cmd->_x >= _inventoryIcons[i]->x1 && cmd->_x <= _inventoryIcons[i]->x2 &&
cmd->_y >= _inventoryIcons[i]->y1 && cmd->_y <= _inventoryIcons[i]->y2) {
if (getSelectedItemId()) {
if (getSelectedItemId() != _inventoryIcons[i]->inventoryItemId)
@@ -429,6 +447,15 @@ int Inventory2::getHoveredItem(Common::Point *point) {
return 0;
}
+void Inventory2::clear() {
+ unselectItem(0);
+
+ for (uint i = 0; i < _inventoryItems.size(); i++)
+ getInventoryPoolItemFieldCById(_inventoryItems[i]->itemId);
+
+ _inventoryItems.clear();
+}
+
void FullpipeEngine::getAllInventory() {
Inventory2 *inv = getGameLoaderInventory();
diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h
index bc5847312b..46b55c5669 100644
--- a/engines/fullpipe/inventory.h
+++ b/engines/fullpipe/inventory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -129,6 +129,8 @@ class Inventory2 : public Inventory {
bool unselectItem(bool flag);
void draw();
+
+ void clear();
};
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index e5c566ebcf..9a3d91540a 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -26,43 +26,142 @@
#include "fullpipe/objectnames.h"
#include "fullpipe/constants.h"
+#include "fullpipe/scene.h"
+#include "fullpipe/statics.h"
+#include "fullpipe/messages.h"
+#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
+
namespace Fullpipe {
int FullpipeEngine::lift_getButtonIdP(int objid) {
switch (objid) {
case ST_LBN_0N:
return ST_LBN_0P;
- break;
+
case ST_LBN_1N:
return ST_LBN_1P;
- break;
+
case ST_LBN_2N:
return ST_LBN_2P;
- break;
+
case ST_LBN_3N:
return ST_LBN_3P;
- break;
+
case ST_LBN_4N:
return ST_LBN_4P;
- break;
+
case ST_LBN_5N:
return ST_LBN_5P;
- break;
+
case ST_LBN_6N:
return ST_LBN_6P;
- break;
+
case ST_LBN_7N:
return ST_LBN_7P;
- break;
+
case ST_LBN_8N:
return ST_LBN_8P;
- break;
+
case ST_LBN_9N:
return ST_LBN_9P;
- break;
+
+ default:
+ return 0;
+ }
+}
+
+int FullpipeEngine::lift_getButtonIdH(int objid) {
+ switch (objid) {
+ case ST_LBN_0P:
+ return ST_LBN_0H;
+
+ case ST_LBN_1P:
+ return ST_LBN_1H;
+
+ case ST_LBN_2P:
+ return ST_LBN_2H;
+
+ case ST_LBN_3P:
+ return ST_LBN_3H;
+
+ case ST_LBN_4P:
+ return ST_LBN_4H;
+
+ case ST_LBN_5P:
+ return ST_LBN_5H;
+
+ case ST_LBN_6P:
+ return ST_LBN_6H;
+
+ case ST_LBN_7P:
+ return ST_LBN_7H;
+
+ case ST_LBN_8P:
+ return ST_LBN_8H;
+
+ case ST_LBN_9P:
+ return ST_LBN_9H;
+
+ default:
+ return 0;
+ }
+}
+
+int FullpipeEngine::lift_getButtonIdN(int objid) {
+ switch (objid) {
+ case ST_LBN_0H:
+ case ST_LBN_0N:
+ case ST_LBN_0P:
+ return ST_LBN_0N;
+
+ case ST_LBN_1H:
+ case ST_LBN_1N:
+ case ST_LBN_1P:
+ return ST_LBN_1N;
+
+ case ST_LBN_2H:
+ case ST_LBN_2N:
+ case ST_LBN_2P:
+ return ST_LBN_2N;
+
+ case ST_LBN_3H:
+ case ST_LBN_3N:
+ case ST_LBN_3P:
+ return ST_LBN_3N;
+
+ case ST_LBN_4H:
+ case ST_LBN_4N:
+ case ST_LBN_4P:
+ return ST_LBN_4N;
+
+ case ST_LBN_5H:
+ case ST_LBN_5N:
+ case ST_LBN_5P:
+ return ST_LBN_5N;
+
+ case ST_LBN_6H:
+ case ST_LBN_6N:
+ case ST_LBN_6P:
+ return ST_LBN_6N;
+
+ case ST_LBN_7H:
+ case ST_LBN_7N:
+ case ST_LBN_7P:
+ return ST_LBN_7N;
+
+ case ST_LBN_8H:
+ case ST_LBN_8N:
+ case ST_LBN_8P:
+ return ST_LBN_8N;
+
+ case ST_LBN_9H:
+ case ST_LBN_9N:
+ case ST_LBN_9P:
+ return ST_LBN_9N;
+
default:
return 0;
- break;
}
}
@@ -73,46 +172,346 @@ void FullpipeEngine::lift_setButton(const char *name, int state) {
var->setSubVarAsInt(name, state);
}
-void FullpipeEngine::lift_sub5(Scene *sc, int qu1, int qu2) {
- warning("STUB: FullpipeEngine::lift_sub5()");
+void FullpipeEngine::lift_init(Scene *sc, int enterSeq, int exitSeq) {
+ _lastLiftButton = 0;
+
+ _liftEnterMQ = sc->getMessageQueueById(enterSeq);
+ if (!_liftEnterMQ)
+ return;
+
+ _liftExitMQ = sc->getMessageQueueById(exitSeq);
+
+ if (!_liftExitMQ)
+ return;
+
+ ExCommand *ex = _liftEnterMQ->getExCommandByIndex(0);
+
+ if (!ex)
+ return;
+
+ _liftX = ex->_x;
+ _liftY = ex->_y;
+
+ _lift = sc->getStaticANIObject1ById(ANI_LIFT, -1);
+
+ for (uint i = 0; i < sc->_staticANIObjectList1.size(); i++) {
+ StaticANIObject *ani = (StaticANIObject *)sc->_staticANIObjectList1[i];
+
+ if (ani->_id == ANI_LIFTBUTTON)
+ ani->_statics = ani->getStaticsById(lift_getButtonIdP(ani->_statics->_staticsId));
+ }
+
+ GameVar *var = getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
+ if (var) {
+ for (var = var->_subVars; var; var = var->_nextVarObj) {
+ for (uint i = 0; i < sc->_staticANIObjectList1.size(); i++) {
+ StaticANIObject *ani = (StaticANIObject *)sc->_staticANIObjectList1[i];
+
+ if (ani->_id == ANI_LIFTBUTTON) {
+ int id = lift_getButtonIdN(ani->_statics->_staticsId);
+
+ if (id == var->_value.intValue)
+ ani->_statics = ani->getStaticsById(id);
+ }
+
+ }
+ }
+ }
}
-void FullpipeEngine::lift_exitSeq(ExCommand *ex) {
- warning("STUB: FullpipeEngine::lift_exitSeq()");
+void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
+ if (cmd) {
+ MessageQueue *mq = _globalMessageQueueList->getMessageQueueById(cmd->_parId);
+
+ if (mq)
+ mq->activateExCommandsByKind(34);
+ }
+
+ _lift->changeStatics2(ST_LFT_CLOSED);
+
+ MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+
+ ExCommand *ex = new ExCommand(_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_field_14 = 256;
+ ex->_messageNum = 256;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ if (!cmd) {
+ ex = new ExCommand(_aniMan->_id, 2, 40, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+
+ ex = new ExCommand(_lift->_id, 1, MV_LFT_OPEN, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _lift->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_aniMan->_id, 1, MV_MAN_STARTD, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_field_14 = 10;
+ ex->_x = -1;
+ ex->_y = -1;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ ex->_field_14 = 256;
+ ex->_messageNum = 0;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_LIFT_STARTEXITQUEUE, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_lift->_id, 1, MV_LFT_CLOSE, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _lift->_okeyCode;
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+
+ mq->chain(0);
}
void FullpipeEngine::lift_closedoorSeq() {
- warning("STUB: FullpipeEngine::lift_closedoorSeq()");
+ if (_lift->_movement) {
+ if (_lift->_movement->_id == MV_LFT_CLOSE) {
+ _lift->queueMessageQueue(0);
+ } else if (_lift->_movement->_id == MV_LFT_OPEN) {
+ int ph = _lift->_movement->_currDynamicPhaseIndex;
+
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+
+ if (_lift->_movement->_currMovement)
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_currMovement->_dynamicPhases.size() - ph);
+ else
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_dynamicPhases.size() - ph);
+ } else {
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+ }
+ } else {
+ if (_lift->_statics->_staticsId == ST_LFT_CLOSED ) {
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ } else {
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+ }
+ }
+
+ MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+ ExCommand *ex = new ExCommand(0, 17, MSG_LIFT_GO, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ if (!mq->chain(_lift))
+ delete mq;
}
-void FullpipeEngine::lift_animation3() {
- warning("STUB: FullpipeEngine::lift_animation3()");
+void FullpipeEngine::lift_walkAndGo() {
+ MessageQueue *mq;
+ ExCommand *ex;
+
+ if (abs(_liftX - _aniMan->_ox) > 1 || abs(_liftY - _aniMan->_oy) > 1 || _aniMan->_movement || _aniMan->_statics->_staticsId != ST_MAN_UP) {
+ mq = getCurrSceneSc2MotionController()->method34(_aniMan, _liftX, _liftY, 1, ST_MAN_UP);
+
+ if (mq) {
+ ex = new ExCommand(0, 17, MSG_LIFT_CLICKBUTTON, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+
+ mq->addExCommandToEnd(ex);
+ }
+ } else {
+ lift_openLift();
+
+ mq = new MessageQueue(_liftEnterMQ, 0, 0);
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ ex = new ExCommand(_aniMan->_id, 2, 15, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommand(ex);
+
+ ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_field_14 = _lift->_priority + 1;
+ ex->_x = -1;
+ ex->_y = -1;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_LIFT_CLOSEDOOR, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ mq->chain(0);
+
+ _aniMan->_flags |= 1;
+ }
}
-void FullpipeEngine::lift_goAnimation() {
- warning("STUB: FullpipeEngine::lift_goAnimation()");
+void FullpipeEngine::lift_openLift() {
+ if (_lift->_movement) {
+ if (_lift->_movement->_id == MV_LFT_OPEN) {
+ _lift->queueMessageQueue(0);
+ } else if (_lift->_movement->_id == MV_LFT_CLOSE) {
+ int idx = _lift->_movement->_currDynamicPhaseIndex;
+
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+
+ if (_lift->_movement->_currMovement)
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_currMovement->_dynamicPhases.size() - idx);
+ else
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_dynamicPhases.size() - idx);
+ } else {
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+ }
+ } else if (_lift->_statics->_staticsId == ST_LFT_OPEN_NEW) {
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+ } else {
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+ }
}
-void FullpipeEngine::lift_sub1(StaticANIObject *ani) {
- warning("STUB: FullpipeEngine::lift_sub1()");
+void FullpipeEngine::lift_clickButton() {
+ if (_lastLiftButton)
+ lift_walkAndGo();
+}
+
+void FullpipeEngine::lift_goAnimation() { if (_lastLiftButton) {
+ int parentId = _currentScene->_sceneId;
+ int buttonId = lift_getButtonIdN(_lastLiftButton->_statics->_staticsId);
+
+ if (!buttonId)
+ return;
+
+ int numItems = _gameLoader->_preloadItems.size();
+
+ for (int i = 0; i < numItems; i++) {
+ PreloadItem *pre = _gameLoader->_preloadItems[i];
+
+ if (pre->preloadId2 == buttonId && pre->preloadId1 == _currentScene->_sceneId) {
+ MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+
+ ExCommand *ex = new ExCommand(ANI_MAN, 1, (pre->keyCode != LiftDown ? MV_MAN_LIFTDOWN : MV_MAN_LIFTUP), 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_keyCode = -1;
+ ex->_field_24 = 1;
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(parentId, 17, 61, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_keyCode = buttonId;
+ ex->_excFlags |= 3;
+
+ mq->addExCommandToEnd(ex);
+
+ _aniMan->_flags &= 0xFEFF;
+
+ if (!mq->chain(_aniMan))
+ delete mq;
+
+ _aniMan->_flags |= 1;
+ }
+ }
+ }
+
+ lift_exitSeq(0);
+
+ if (_lastLiftButton) {
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(lift_getButtonIdN(_lastLiftButton->_statics->_staticsId));
+ _lastLiftButton = 0;
+ }
+}
+
+void FullpipeEngine::lift_animateButton(StaticANIObject *button) {
+ int butId = lift_getButtonIdP(button->_statics->_staticsId);
+
+ if (butId && butId != button->_statics->_staticsId) {
+ if (button == _lastLiftButton) {
+ playSound(SND_CMN_032, 0);
+ } else {
+ if (_lastLiftButton) {
+ int id = lift_getButtonIdN(_lastLiftButton->_statics->_staticsId);
+
+ if (id)
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(id);
+
+ _lastLiftButton = 0;
+ }
+
+ if (_aniMan->isIdle() && !(_aniMan->_flags & 0x100)) {
+ _lastLiftButton = button;
+ button->_statics = button->getStaticsById(butId);
+
+ ExCommand *ex = new ExCommand(0, 35, SND_CMN_032, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ ex->_field_14 = 1;
+ ex->postMessage();
+
+ int id = lift_getButtonIdH(_lastLiftButton->_statics->_staticsId);
+
+ if (id) {
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(id);
+
+ lift_walkAndGo();
+ }
+ }
+ }
+ }
}
void FullpipeEngine::lift_startExitQueue() {
- warning("STUB: FullpipeEngine::lift_startExitQueue()");
+ MessageQueue *mq = new MessageQueue(_liftExitMQ, 0, 0);
+
+ mq->chain(0);
}
-void FullpipeEngine::lift_sub05(ExCommand *ex) {
- warning("STUB: FullpipeEngine::lift_sub05()");
+void FullpipeEngine::lift_hoverButton(ExCommand *cmd) {
+ if (_lastLiftButton) {
+ if (!(cmd->_keyCode & 2) || _liftX != cmd->_x || _liftY != cmd->_y) {
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(lift_getButtonIdN(_lastLiftButton->_statics->_staticsId));
+ _lastLiftButton = 0;
+ }
+ }
}
-bool FullpipeEngine::lift_checkButton(const char *varname) {
- warning("STUB: FullpipeEngine::lift_checkButton(%s)", varname);
+bool FullpipeEngine::lift_checkButton(const char *varName) {
+ GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
+
+ if (var)
+ return lift_getButtonIdP(var->getSubVarByName(varName)->_value.intValue) > 0;
return false;
}
-void FullpipeEngine::lift_sub7(Scene *sc, int buttonId) {
- warning("STUB: lift_sub7()");
+void FullpipeEngine::lift_setButtonStatics(Scene *sc, int buttonId) {
+ for (uint i = 0; i < sc->_staticANIObjectList1.size(); i++) {
+ StaticANIObject *ani = (StaticANIObject *)sc->_staticANIObjectList1[i];
+
+ if (ani->_id == ANI_LIFTBUTTON) {
+ int id = lift_getButtonIdN(ani->_statics->_staticsId);
+
+ if (id == buttonId)
+ ani->_statics = ani->getStaticsById(id);
+ }
+ }
}
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index 44a3e4cb60..15aa78d342 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -34,11 +34,69 @@
namespace Fullpipe {
void global_messageHandler_KickStucco() {
- warning("STUB: global_messageHandler_KickStucco()");
+ Movement *mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK);
+ int end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+ bool flip = false;
+
+ for (int i = 0; i < end; i++) {
+ ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand;
+
+ if (ex)
+ if (ex->_messageKind == 35)
+ if (ex->_messageNum == SND_CMN_015) {
+ if (flip) {
+ ex->_messageNum = SND_CMN_055;
+ } else {
+ ex->_messageNum = SND_CMN_054;
+ flip = true;
+ }
+ }
+ }
+
+ mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK_COINLESS);
+ end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+ flip = false;
+
+ for (int i = 0; i < end; i++) {
+ ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand;
+
+ if (ex)
+ if (ex->_messageKind == 35)
+ if (ex->_messageNum == SND_CMN_015) {
+ if (flip) {
+ ex->_messageNum = SND_CMN_055;
+ } else {
+ ex->_messageNum = SND_CMN_054;
+ flip = true;
+ }
+ }
+ }
}
void global_messageHandler_KickMetal() {
- warning("STUB: global_messageHandler_KickMetal()");
+ Movement *mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK);
+ int end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ for (int i = 0; i < end; i++) {
+ ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand;
+
+ if (ex)
+ if (ex->_messageKind == 35)
+ if (ex->_messageNum == SND_CMN_054 || ex->_messageNum == SND_CMN_055)
+ ex->_messageNum = SND_CMN_015;
+ }
+
+ mov = g_fp->_aniMan->getMovementById(MV_MAN_HMRKICK_COINLESS);
+ end = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ for (int i = 0; i < end; i++) {
+ ExCommand *ex = mov->getDynamicPhaseByIndex(i)->_exCommand;
+
+ if (ex)
+ if (ex->_messageKind == 35)
+ if (ex->_messageNum == SND_CMN_054 || ex->_messageNum == SND_CMN_055)
+ ex->_messageNum = SND_CMN_015;
+ }
}
int global_messageHandler1(ExCommand *cmd) {
@@ -151,7 +209,7 @@ int global_messageHandler1(ExCommand *cmd) {
if (g_fp->_updateFlag && (invItem = g_fp->_inventory->getHoveredItem(&g_fp->_mouseScreenPos))) {
g_fp->_cursorId = PIC_CSR_ITN;
- if (!g_fp->_currSelectedInventoryItemId && !g_fp->_aniMan->_movement &&
+ if (!g_fp->_currSelectedInventoryItemId && !g_fp->_aniMan->_movement &&
!(g_fp->_aniMan->_flags & 0x100) && g_fp->_aniMan->isIdle()) {
int st = g_fp->_aniMan->_statics->_staticsId;
ExCommand *newex = 0;
@@ -528,9 +586,9 @@ int global_messageHandler4(ExCommand *cmd) {
ExCommand2 *cmd2 = (ExCommand2 *)cmd;
if (cmd->_excFlags & 1) {
- ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize >> 3, flags);
+ ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags);
} else {
- ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize >> 3, flags);
+ ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags);
}
break;
}
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 7dfdd06fc8..8257d1459f 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -47,7 +47,7 @@ ExCommand *ExCommand::createClone() {
return new ExCommand(this);
}
-ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11) :
+ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11) :
Message(parentId, messageKind, x, y, a7, a8, sceneClickX, sceneClickY, a11) {
_field_3C = 1;
_messageNum = messageNum;
@@ -182,7 +182,7 @@ ExCommand2 *ExCommand2::createClone() {
Message::Message() {
_messageKind = 0;
- _parentId = 0;
+ _parentId = 0;
_x = 0;
_y = 0;
@@ -610,6 +610,23 @@ void MessageQueue::changeParam28ForObjectId(int objId, int oldParam28, int newPa
}
}
+int MessageQueue::activateExCommandsByKind(int kind) {
+ int res = 0;
+
+ for (uint i = 0; i < getCount(); i++) {
+ ExCommand *ex = getExCommandByIndex(i);
+
+ if (ex->_messageKind == kind) {
+ ex->_messageKind = 0;
+ ex->_excFlags |= 1;
+
+ res++;
+ }
+ }
+
+ return res;
+}
+
MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) {
for (Common::Array<MessageQueue *>::iterator s = begin(); s != end(); ++s) {
if ((*s)->_id == id)
@@ -682,6 +699,10 @@ void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) {
push_back(msg);
}
+void clearGlobalMessageQueueList() {
+ g_fp->_globalMessageQueueList->clear();
+}
+
void clearGlobalMessageQueueList1() {
clearMessages();
@@ -883,7 +904,7 @@ void processMessages() {
}
void updateGlobalMessageQueue(int id, int objid) {
- MessageQueue *m = g_fp->_globalMessageQueueList->getMessageQueueById(id);
+ MessageQueue *m = g_fp->_globalMessageQueueList->getMessageQueueById(id);
if (m) {
m->update();
}
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index 33bb827888..e6f7f05150 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -158,6 +158,8 @@ class MessageQueue : public CObject {
int calcDuration(StaticANIObject *obj);
void changeParam28ForObjectId(int objId, int oldParam28, int newParam28);
+
+ int activateExCommandsByKind(int kind);
};
class GlobalMessageQueueList : public Common::Array<MessageQueue *> {
@@ -191,6 +193,7 @@ void clearMessageHandlers();
void processMessages();
void updateGlobalMessageQueue(int id, int objid);
void clearMessages();
+void clearGlobalMessageQueueList();
void clearGlobalMessageQueueList1();
bool chainQueue(int queueId, int flags);
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 2c2252811d..459c714984 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -21,12 +21,13 @@
*/
#include "fullpipe/fullpipe.h"
-#include "fullpipe/modal.h"
#include "fullpipe/messages.h"
#include "fullpipe/constants.h"
#include "fullpipe/motion.h"
#include "fullpipe/scenes.h"
#include "fullpipe/gameloader.h"
+#include "fullpipe/statics.h"
+#include "fullpipe/modal.h"
#include "fullpipe/constants.h"
@@ -383,7 +384,7 @@ void ModalMap::initMap() {
PictureObject *pic;
for (int i = 0; i < 200; i++) {
- if (!g_fp->_mapTable[i] >> 16)
+ if (!(g_fp->_mapTable[i] >> 16))
break;
pic = _mapScene->getPictureObjectById(g_fp->_mapTable[i] >> 16, 0);
@@ -718,7 +719,7 @@ bool ModalCredits::init(int counterdiff) {
g_fp->_modalObject = menu;
- menu->_field_34 = 1;
+ menu->_mfield_34 = 1;
}
return true;
@@ -750,17 +751,808 @@ void ModalCredits::update() {
}
ModalMainMenu::ModalMainMenu() {
- warning("STUB: ModalMainMenu::ModalMainMenu()");
+ _areas.clear();
+
+ _lastArea = 0;
+ _hoverAreaId = 0;
+ _mfield_34 = 0;
+ _scene = g_fp->accessScene(SC_MAINMENU);
+ _debugKeyCount = 0;
+ _sliderOffset = 0;
+ _screct.left = g_fp->_sceneRect.left;
+ _screct.top = g_fp->_sceneRect.top;
+ _screct.right = g_fp->_sceneRect.right;
+ _screct.bottom = g_fp->_sceneRect.bottom;
+
+ if (g_fp->_currentScene) {
+ _bgX = g_fp->_currentScene->_x;
+ _bgY = g_fp->_currentScene->_y;
+ } else {
+ _bgX = 0;
+ _bgY = 0;
+ }
+
+ g_fp->_sceneRect.top = 0;
+ g_fp->_sceneRect.left = 0;
+ g_fp->_sceneRect.right = 800;
+ g_fp->_sceneRect.bottom = 600;
+
+ MenuArea *area;
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_EXIT_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_CONTINUE_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+
+ if (isSaveAllowed()) {
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_SAVE_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+ }
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_LOAD_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_RESTART_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_AUTHORS_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_SLIDER_L;
+ area->picObjD = _scene->getPictureObjectById(PIC_MNU_SLIDER_D, 0);
+ area->picObjD->_flags |= 4;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+ _menuSliderIdx = _areas.size() - 1;
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_MUSICSLIDER_L;
+ area->picObjD = _scene->getPictureObjectById(PIC_MNU_MUSICSLIDER_D, 0);
+ area->picObjD->_flags |= 4;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+ _musicSliderIdx = _areas.size() - 1;
+
+ if (g_fp->_mainMenu_debugEnabled)
+ enableDebugMenuButton();
+
+ setSliderPos();
+}
+
+void ModalMainMenu::update() {
+ _scene->draw();
+}
+
+bool ModalMainMenu::handleMessage(ExCommand *message) {
+ if (message->_messageKind != 17)
+ return false;
+
+ Common::Point point;
+
+ if (message->_messageNum == 29) {
+ point.x = message->_x;
+ point.y = message->_y;
+
+ int numarea = checkHover(point);
+
+ if (numarea >= 0) {
+ if (numarea == _menuSliderIdx) {
+ _lastArea = _areas[_menuSliderIdx];
+ _sliderOffset = _lastArea->picObjL->_ox - point.x;
+
+ return false;
+ }
+
+ if (numarea == _musicSliderIdx) {
+ _lastArea = _areas[_musicSliderIdx];
+ _sliderOffset = _lastArea->picObjL->_ox - point.x;
+
+ return false;
+ }
+
+ _hoverAreaId = _areas[numarea]->picIdL;
+ }
+
+ return false;
+ }
+
+ if (message->_messageNum == 30) {
+ if (_lastArea)
+ _lastArea = 0;
+
+ return false;
+ }
+
+ if (message->_messageNum != 36)
+ return false;
+
+ if (message->_keyCode == 27)
+ _hoverAreaId = PIC_MNU_CONTINUE_L;
+ else
+ enableDebugMenu(message->_keyCode);
+
+ return false;
+}
+
+bool ModalMainMenu::init(int counterdiff) {
+ switch (_hoverAreaId) {
+ case PIC_MNU_RESTART_L:
+ g_fp->restartGame();
+
+ if (this == g_fp->_modalObject)
+ return false;
+
+ delete this;
+ break;
+
+ case PIC_MNU_EXIT_L:
+ {
+ ModalQuery *mq = new ModalQuery();
+
+ g_fp->_modalObject = mq;
+
+ mq->_parentObj = this;
+ mq->create(_scene, (PictureObject *)_scene->_picObjList[0], PIC_MEX_BGR);
+
+ _hoverAreaId = 0;
+
+ return true;
+ }
+
+ case PIC_MNU_DEBUG_L:
+ g_fp->_gameLoader->unloadScene(SC_MAINMENU);
+ g_fp->_sceneRect = _screct;
+
+ if (!g_fp->_currentScene)
+ error("ModalMainMenu::init: Bad state");
+
+ g_fp->_currentScene->_x = _bgX;
+ g_fp->_currentScene->_y = _bgY;
+
+ g_fp->_gameLoader->preloadScene(g_fp->_currentScene->_sceneId, SC_DBGMENU);
+
+ return false;
+
+ case PIC_MNU_CONTINUE_L:
+ if (!_mfield_34) {
+ g_fp->_gameLoader->unloadScene(SC_MAINMENU);
+ g_fp->_sceneRect = _screct;
+
+ if (g_fp->_currentScene) {
+ g_fp->_currentScene->_x = _bgX;
+ g_fp->_currentScene->_y = _bgY;
+ }
+
+ return false;
+ }
+
+ g_fp->restartGame();
+
+ if (this == g_fp->_modalObject)
+ return false;
+
+ delete this;
+ break;
+
+ case PIC_MNU_AUTHORS_L:
+ g_fp->_modalObject = new ModalCredits();
+ g_fp->_modalObject->_parentObj = this;
+
+ _hoverAreaId = 0;
+
+ return true;
+
+ case PIC_MNU_SAVE_L:
+ case PIC_MNU_LOAD_L:
+ {
+ ModalSaveGame *sg = new ModalSaveGame();
+
+ g_fp->_modalObject = sg;
+ g_fp->_modalObject->_parentObj = _parentObj;
+
+ int mode = 0;
+ if (_hoverAreaId == PIC_MNU_SAVE_L)
+ mode = 1;
+
+ sg->setup(g_fp->accessScene(SC_MAINMENU), mode);
+ sg->setScene(g_fp->accessScene(SC_MAINMENU));
+
+ sg->_rect = _screct;
+ sg->_oldBgX = _bgX;
+ sg->_oldBgY = _bgY;
+
+ delete this;
+ }
+
+ break;
+
+ default:
+ if (_lastArea) {
+ updateSliderPos();
+ } else {
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+
+ int idx = checkHover(g_fp->_mouseScreenPos);
+
+ if (idx < 0)
+ goto LABEL_40;
+
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+
+ if (idx != this->_menuSliderIdx && idx != this->_musicSliderIdx )
+ goto LABEL_40;
+ }
+
+ g_fp->_cursorId = PIC_CSR_LIFT;
+
+ LABEL_40:
+ g_fp->setCursor(g_fp->_cursorId);
+
+ updateVolume();
+
+ return true;
+ }
+
+ return true;
+}
+
+void ModalMainMenu::updateVolume() {
+ if (g_fp->_soundEnabled ) {
+ for (int s = 0; s < g_fp->_currSoundListCount; s++)
+ for (int i = 0; i < g_fp->_currSoundList1[s]->getCount(); i++) {
+ updateSoundVolume(g_fp->_currSoundList1[s]->getSoundByIndex(i));
+ }
+ }
+}
+
+void ModalMainMenu::updateSoundVolume(Sound *snd) {
+ if (!snd->_objectId)
+ return;
+
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(snd->_objectId, -1);
+ if (!ani)
+ return;
+
+ int a, b;
+
+ if (ani->_ox >= _screct.left) {
+ int par, pan;
+
+ if (ani->_ox <= _screct.right) {
+ int dx;
+
+ if (ani->_oy <= _screct.bottom) {
+ if (ani->_oy >= _screct.top) {
+ snd->setPanAndVolume(g_fp->_sfxVolume, 0);
+
+ return;
+ }
+ dx = _screct.top - ani->_oy;
+ } else {
+ dx = ani->_oy - _screct.bottom;
+ }
+
+ par = 0;
+
+ if (dx > 800) {
+ snd->setPanAndVolume(-3500, 0);
+ return;
+ }
+
+ pan = -3500;
+ a = g_fp->_sfxVolume - (-3500);
+ b = 800 - dx;
+ } else {
+ int dx = ani->_ox - _screct.right;
+
+ if (dx > 800) {
+ snd->setPanAndVolume(-3500, 0);
+ return;
+ }
+
+ pan = -3500;
+ par = dx * (-3500) / -800;
+ a = g_fp->_sfxVolume - (-3500);
+ b = 800 - dx;
+ }
+
+ int32 pp = b * a; //(0x51EB851F * b * a) >> 32) >> 8; // TODO FIXME
+
+ snd->setPanAndVolume(pan + (pp >> 31) + pp, par);
+
+ return;
+ }
+
+ int dx = _screct.left - ani->_ox;
+ if (dx <= 800) {
+ int32 s = 0x51EB851F * (800 - dx) * (g_fp->_sfxVolume - (-3500)); // TODO FIXME
+ int32 p = -3500 + (s >> 31) + (s >> 8);
+
+ if (p > g_fp->_sfxVolume)
+ p = g_fp->_sfxVolume;
+
+ snd->setPanAndVolume(p, dx * (-3500) / 800);
+ } else {
+ snd->setPanAndVolume(-3500, 0);
+ }
+
+ warning("STUB: ModalMainMenu::updateSoundVolume()");
+}
+
+void ModalMainMenu::updateSliderPos() {
+ if (_lastArea->picIdL == PIC_MNU_SLIDER_L) {
+ int x = g_fp->_mouseScreenPos.x + _sliderOffset;
+
+ if (x >= 65) {
+ if (x > 238)
+ x = 238;
+ } else {
+ x = 65;
+ }
+
+ _lastArea->picObjD->setOXY(x, _lastArea->picObjD->_oy);
+ _lastArea->picObjL->setOXY(x, _lastArea->picObjD->_oy);
+
+ int vol = 1000 * (3 * x - 195);
+ g_fp->_sfxVolume = vol / 173 - 3000;
+
+ if (!(vol / 173))
+ g_fp->_sfxVolume = -10000;
+
+ g_fp->updateSoundVolume();
+ } else if (_lastArea->picIdL == PIC_MNU_MUSICSLIDER_L) {
+ int x = g_fp->_mouseScreenPos.x + _sliderOffset;
+
+ if (x >= 65) {
+ if (x > 238)
+ x = 238;
+ } else {
+ x = 65;
+ }
+
+ _lastArea->picObjD->setOXY(x, _lastArea->picObjD->_oy);
+ _lastArea->picObjL->setOXY(x, _lastArea->picObjD->_oy);
+
+ g_fp->setMusicVolume(255 * (x - 65) / 173);
+ }
+}
+
+int ModalMainMenu::checkHover(Common::Point &point) {
+ for (uint i = 0; i < _areas.size(); i++) {
+ if (_areas[i]->picObjL->isPixelHitAtPos(point.x, point.y)) {
+ _areas[i]->picObjL->_flags |= 4;
+
+ return i;
+ } else {
+ _areas[i]->picObjL->_flags &= 0xFFFB;
+ }
+ }
+
+ if (isOverArea(_areas[_menuSliderIdx]->picObjL, &point)) {
+ _areas[_menuSliderIdx]->picObjL->_flags |= 4;
+
+ return _menuSliderIdx;
+ }
+
+ if (isOverArea(_areas[_musicSliderIdx]->picObjL, &point)) {
+ _areas[_musicSliderIdx]->picObjL->_flags |= 4;
+
+ return _musicSliderIdx;
+ }
- _field_34 = 0;
+ return -1;
}
+bool ModalMainMenu::isOverArea(PictureObject *obj, Common::Point *point) {
+ Common::Point p;
+
+ obj->getDimensions(&p);
+
+ int left = point->x - 8;
+ int right = point->x + 12;
+ int down = point->y - 11;
+ int up = point->y + 9;
+
+ if (left >= obj->_ox && right < obj->_ox + p.x && down >= obj->_oy && up < obj->_oy + p.y)
+ return true;
+
+ return false;
+}
+
+bool ModalMainMenu::isSaveAllowed() {
+ if (!g_fp->_isSaveAllowed)
+ return false;
+
+ if (g_fp->_aniMan->_flags & 0x100)
+ return false;
+
+ for (Common::Array<MessageQueue *>::iterator s = g_fp->_globalMessageQueueList->begin(); s != g_fp->_globalMessageQueueList->end(); ++s) {
+ if (!(*s)->_isFinished && ((*s)->getFlags() & 1))
+ return false;
+ }
+
+ return true;
+}
+
+void ModalMainMenu::enableDebugMenu(char c) {
+ const char deb[] = "DEBUGER";
+
+ if (c == deb[_debugKeyCount]) {
+ _debugKeyCount++;
+
+ if (deb[_debugKeyCount] )
+ return;
+
+ enableDebugMenuButton();
+ }
+
+ _debugKeyCount = 0;
+}
+
+void ModalMainMenu::enableDebugMenuButton() {
+ MenuArea *area;
+
+ for (uint i = 0; i < _areas.size(); i++)
+ if (_areas[i]->picIdL == PIC_MNU_DEBUG_L)
+ return;
+
+ area = new MenuArea();
+ area->picIdL = PIC_MNU_DEBUG_L;
+ area->picObjD = 0;
+ area->picObjL = _scene->getPictureObjectById(area->picIdL, 0);
+ area->picObjL->_flags &= 0xFFFB;
+ _areas.push_back(area);
+}
+
+void ModalMainMenu::setSliderPos() {
+ int x = 173 * (g_fp->_sfxVolume + 3000) / 3000 + 65;
+ PictureObject *obj = _areas[_menuSliderIdx]->picObjD;
+
+ if (x >= 65) {
+ if (x > 238)
+ x = 238;
+ } else {
+ x = 65;
+ }
+
+ obj->setOXY(x, obj->_oy);
+ _areas[_menuSliderIdx]->picObjL->setOXY(x, obj->_oy);
+
+ x = 173 * g_fp->_musicVolume / 255 + 65;
+ obj = _areas[_musicSliderIdx]->picObjD;
+
+ if (x >= 65) {
+ if (x > 238)
+ x = 238;
+ } else {
+ x = 65;
+ }
+
+ obj->setOXY(x, obj->_oy);
+ _areas[_musicSliderIdx]->picObjL->setOXY(x, obj->_oy);
+}
+
+ModalHelp::ModalHelp() {
+ _mainMenuScene = 0;
+ _bg = 0;
+ _isRunning = false;
+ _rect = g_fp->_sceneRect;
+ _hx = g_fp->_currentScene->_x;
+ _hy = g_fp->_currentScene->_y;
+
+ g_fp->_sceneRect.left = 0;
+ g_fp->_sceneRect.bottom = 600;
+ g_fp->_sceneRect.top = 0;
+ g_fp->_sceneRect.right = 800;
+}
+
+ModalHelp::~ModalHelp() {
+ g_fp->_gameLoader->unloadScene(SC_MAINMENU);
+
+ g_fp->_sceneRect = _rect;
+
+ g_fp->_currentScene->_x = _hx;
+ g_fp->_currentScene->_y = _hy;
+}
+
+bool ModalHelp::handleMessage(ExCommand *cmd) {
+ if (cmd->_messageKind == 17) {
+ int msg = cmd->_messageNum;
+
+ if (msg == 29 || msg == 36 || msg == 107) {
+ _isRunning = 0;
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool ModalHelp::init(int counterdiff) {
+ g_fp->setCursor(PIC_CSR_DEFAULT);
+
+ return _isRunning;
+}
+
+void ModalHelp::update() {
+ g_fp->_sceneRect.left = 0;
+ g_fp->_sceneRect.top = 0;
+ g_fp->_sceneRect.right = 800;
+ g_fp->_sceneRect.bottom = 600;
+
+ _bg->draw(0, 0, 0, 0);
+}
+
+void ModalHelp::launch() {
+ _mainMenuScene = g_fp->accessScene(SC_MAINMENU);
+
+ if (_mainMenuScene) {
+ _bg = _mainMenuScene->getPictureObjectById(PIC_HLP_BGR, 0)->_picture;
+ _isRunning = 1;
+ }
+}
+
+ModalQuery::ModalQuery() {
+ _picObjList = 0;
+ _bg = 0;
+ _okBtn = 0;
+ _cancelBtn = 0;
+ _queryResult = -1;
+}
+
+ModalQuery::~ModalQuery() {
+ _bg->_flags &= 0xFFFB;
+ _cancelBtn->_flags &= 0xFFFB;
+ _okBtn->_flags &= 0xFFFB;
+}
+
+bool ModalQuery::create(Scene *sc, PictureObject *picObjList, int id) {
+ if (id == PIC_MEX_BGR) {
+ _bg = sc->getPictureObjectById(PIC_MEX_BGR, 0);
+
+ if (!_bg)
+ return false;
+
+ _okBtn = sc->getPictureObjectById(PIC_MEX_OK, 0);
+
+ if (!_okBtn)
+ return false;
+
+ _cancelBtn = sc->getPictureObjectById(PIC_MEX_CANCEL, 0);
+
+ if (!_cancelBtn)
+ return 0;
+ } else {
+ if (id != PIC_MOV_BGR)
+ return false;
+
+ _bg = sc->getPictureObjectById(PIC_MOV_BGR, 0);
+
+ if (!_bg)
+ return false;
+
+ _okBtn = sc->getPictureObjectById(PIC_MOV_OK, 0);
+
+ if (!_okBtn)
+ return false;
+
+ _cancelBtn = sc->getPictureObjectById(PIC_MOV_CANCEL, 0);
+
+ if (!_cancelBtn)
+ return false;
+ }
+
+ _queryResult = -1;
+ _picObjList = picObjList;
+
+ return true;
+}
+
+void ModalQuery::update() {
+ if (_picObjList)
+ _picObjList->draw();
+
+ _bg->draw();
+
+ if (_okBtn->_flags & 4)
+ _okBtn->draw();
+
+ if (_cancelBtn->_flags & 4)
+ _cancelBtn->draw();
+}
+
+bool ModalQuery::handleMessage(ExCommand *cmd) {
+ if (cmd->_messageKind == 17) {
+ if (cmd->_messageNum == 29) {
+ if (_okBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) {
+ _queryResult = 1;
+
+ return false;
+ }
+
+ if (_cancelBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+ _queryResult = 0;
+ } else if (cmd->_messageNum == 36 && cmd->_keyCode == 27) {
+ _queryResult = 0;
+
+ return false;
+ }
+ }
+
+ return false;
+}
+
+bool ModalQuery::init(int counterdiff) {
+ if (_okBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+ _okBtn->_flags |= 4;
+ else
+ _okBtn->_flags &= 0xFFFB;
+
+ if (_cancelBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+ _cancelBtn->_flags |= 4;
+ else
+ _cancelBtn->_flags &= 0xFFFB;
+
+ if (_queryResult == -1) {
+ return true;
+ } else {
+ if (_bg->_id == PIC_MEX_BGR) {
+ _cancelBtn->_flags &= 0xFFFB;
+ _okBtn->_flags &= 0xFFFB;
+
+ if (_queryResult == 1) {
+ warning("STUB: ModalQuery::init()");
+ //sceneFade(g_vrtDrawHandle, (Scene *)this->_picObjList, 0);
+
+ //if (inputArFlag) {
+ // g_needRestart = 1;
+ // return 0;
+ //}
+ //SendMessageA(hwndCallback, WM_DESTROY, 0, 0);
+ }
+ }
+ }
+
+ return false;
+}
+
+ModalSaveGame::ModalSaveGame() {
+ _oldBgX = 0;
+ _oldBgY = 0;
+
+ _bgr = 0;
+ _okD = 0;
+ _okL = 0;
+ _cancelD = 0;
+ _cancelL = 0;
+ _emptyD = 0;
+ _emptyL = 0;
+ _queryRes = -1;
+ _rect = g_fp->_sceneRect;
+ _queryDlg = 0;
+ _mode = 1;
+}
+
+ModalSaveGame::~ModalSaveGame() {
+ g_fp->_sceneRect = _rect;
+
+ _arrayD.clear();
+ _arrayL.clear();
+
+ for (uint i = 0; i < _filenames.size(); i++)
+ free(_filenames[i]);
+
+ _filenames.clear();
+}
+
+void ModalSaveGame::setScene(Scene *sc) {
+ _queryRes = -1;
+ _menuScene = sc;
+}
+
+void ModalSaveGame::processKey(int key) {
+ if (key == 27)
+ _queryRes = 0;
+}
+
+bool ModalSaveGame::init(int counterdiff) {
+ if (_queryDlg) {
+ if (!_queryDlg->init(counterdiff)) {
+ if (!_queryDlg->getQueryResult())
+ _queryRes = -1;
+
+ delete _queryDlg;
+ _queryDlg = 0;
+ }
+
+ return true;
+ }
+
+ if (_queryRes == -1)
+ return true;
+
+ g_fp->_sceneRect = _rect;
+
+ if (g_fp->_currentScene) {
+ g_fp->_currentScene->_x = _oldBgX;
+ g_fp->_currentScene->_y = _oldBgY;
+ }
+
+ if (!_queryRes) {
+ ModalMainMenu *m = new ModalMainMenu;
+
+ g_fp->_modalObject = m;
+
+ m->_parentObj = _parentObj;
+ m->_screct = _rect;
+ m->_bgX = _oldBgX;
+ m->_bgY = _oldBgY;
+
+ delete this;
+
+ return true;
+ }
+
+ return false;
+}
+
+void ModalSaveGame::setup(Scene *sc, int mode) {
+ warning("STUB: ModalSaveGame::setup()");
+}
+
+char *ModalSaveGame::getSaveName() {
+ if (_queryRes < 0)
+ return 0;
+
+ return _filenames[_queryRes];
+}
+
+
void FullpipeEngine::openHelp() {
- warning("STUB: FullpipeEngine::openHelp()");
+ if (!_modalObject) {
+ ModalHelp *help = new ModalHelp;
+
+ _modalObject = help;
+
+ help->launch();
+ }
}
void FullpipeEngine::openMainMenu() {
- warning("STUB: FullpipeEngine::openMainMenu()");
+ ModalMainMenu *menu = new ModalMainMenu;
+
+ menu->_parentObj = g_fp->_modalObject;
+
+ g_fp->_modalObject = menu;
}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 438e341c1c..e2962ab595 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -26,6 +26,8 @@
namespace Fullpipe {
class PictureObject;
+class Picture;
+class Sound;
class BaseModalObject {
public:
@@ -146,19 +148,131 @@ class ModalCredits : public BaseModalObject {
virtual void saveload() {}
};
+struct MenuArea {
+ int picIdL;
+ PictureObject *picObjD;
+ PictureObject *picObjL;
+};
+
class ModalMainMenu : public BaseModalObject {
public:
- int _field_34;
+ Scene *_scene;
+ int _hoverAreaId;
+ Common::Array<MenuArea *> _areas;
+ int _menuSliderIdx;
+ int _musicSliderIdx;
+ MenuArea *_lastArea;
+ int _sliderOffset;
+ int _mfield_34;
+ Common::Rect _screct;
+ int _bgX;
+ int _bgY;
+ int _debugKeyCount;
public:
ModalMainMenu();
virtual ~ModalMainMenu() {}
virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message);
+ virtual bool init(int counterdiff);
+ virtual void update();
+ virtual void saveload() {}
+
+private:
+ bool isSaveAllowed();
+ void enableDebugMenuButton();
+ void setSliderPos();
+ void enableDebugMenu(char c);
+ int checkHover(Common::Point &point);
+ void updateVolume();
+ void updateSoundVolume(Sound *snd);
+ void updateSliderPos();
+ bool isOverArea(PictureObject *obj, Common::Point *point);
+};
+
+class ModalHelp : public BaseModalObject {
+public:
+ Scene *_mainMenuScene;
+ Picture *_bg;
+ bool _isRunning;
+ Common::Rect _rect;
+ int _hx;
+ int _hy;
+
+public:
+ ModalHelp();
+ virtual ~ModalHelp();
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message);
+ virtual bool init(int counterdiff);
+ virtual void update();
+ virtual void saveload() {}
+
+ void launch();
+};
+
+class ModalQuery : public BaseModalObject {
+public:
+ ModalQuery();
+ virtual ~ModalQuery();
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message);
+ virtual bool init(int counterdiff);
+ virtual void update();
+ virtual void saveload() {}
+
+ bool create(Scene *sc, PictureObject *picObjList, int picId);
+ int getQueryResult() { return _queryResult; }
+
+
+private:
+ PictureObject *_picObjList;
+ PictureObject *_bg;
+ PictureObject *_okBtn;
+ PictureObject *_cancelBtn;
+ int _queryResult;
+
+};
+
+class ModalSaveGame : public BaseModalObject {
+public:
+ ModalSaveGame();
+ virtual ~ModalSaveGame();
+
+ virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message) { return false; }
- virtual bool init(int counterdiff) { return true; }
+ virtual bool init(int counterdiff);
virtual void update() {}
virtual void saveload() {}
+
+ void setScene(Scene *sc);
+ void setup(Scene *sc, int mode);
+ void processKey(int key);
+
+ char *getSaveName();
+
+ Common::Rect _rect;
+ int _oldBgX;
+ int _oldBgY;
+ PictureObject *_bgr;
+ PictureObject *_okD;
+ PictureObject *_okL;
+ PictureObject *_cancelD;
+ PictureObject *_cancelL;
+ PictureObject *_emptyD;
+ PictureObject *_emptyL;
+ PictureObject *_fullD;
+ PictureObject *_fullL;
+ Scene *_menuScene;
+ int _mode;
+ ModalQuery *_queryDlg;
+ Common::Array <char *> _filenames;
+ Common::Array <PictureObject *> _arrayL;
+ Common::Array <PictureObject *> _arrayD;
+ int _queryRes;
};
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index f6a94de421..3962fe64ba 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -33,6 +33,7 @@ MODULE_OBJS = \
scenes/scene06.o \
scenes/scene07.o \
scenes/scene08.o \
+ scenes/scene09.o \
scenes/scene10.o \
scenes/scene11.o \
scenes/scene12.o \
@@ -49,7 +50,9 @@ MODULE_OBJS = \
scenes/scene24.o \
scenes/scene25.o \
scenes/scene26.o \
+ scenes/scene27.o \
scenes/scene28.o \
+ scenes/scene29.o \
scenes/scene30.o \
scenes/scene31.o \
scenes/scene32.o \
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index f0318581f1..35da154570 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -159,10 +159,72 @@ void MctlCompound::freeItems() {
_motionControllers[i]->_motionControllerObj->freeItems();
}
-MessageQueue *MctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
- warning("STUB: MctlCompound::method34()");
+MessageQueue *MctlCompound::method34(StaticANIObject *ani, int sourceX, int sourceY, int fuzzyMatch, int staticsId) {
+ int idx = -1;
+ int sourceIdx = -1;
- return 0;
+ if (!ani)
+ return 0;
+
+ for (uint i = 0; i < _motionControllers.size(); i++) {
+ if (_motionControllers[i]->_movGraphReactObj) {
+ if (_motionControllers[i]->_movGraphReactObj->pointInRegion(ani->_ox, ani->_oy)) {
+ idx = i;
+ break;
+ }
+ }
+ }
+
+ for (uint i = 0; i < _motionControllers.size(); i++) {
+ if (_motionControllers[i]->_movGraphReactObj) {
+ if (_motionControllers[i]->_movGraphReactObj->pointInRegion(sourceX, sourceY)) {
+ sourceIdx = i;
+ break;
+ }
+ }
+ }
+
+ if (idx == -1)
+ return 0;
+
+ if (sourceIdx == -1)
+ return 0;
+
+ if (idx == sourceIdx)
+ return _motionControllers[idx]->_motionControllerObj->method34(ani, sourceX, sourceY, fuzzyMatch, staticsId);
+
+ MctlConnectionPoint *cp = findClosestConnectionPoint(ani->_ox, ani->_oy, idx, sourceX, sourceY, sourceIdx, &sourceIdx);
+
+ if (!cp)
+ return 0;
+
+ MessageQueue *mq = _motionControllers[idx]->_motionControllerObj->doWalkTo(ani, cp->_connectionX, cp->_connectionY, 1, cp->_field_14);
+
+ if (!mq)
+ return 0;
+
+ for (uint i = 0; i < cp->_messageQueueObj->getCount(); i++) {
+ ExCommand *ex = new ExCommand(cp->_messageQueueObj->getExCommandByIndex(i));
+
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+ }
+
+ ExCommand *ex = new ExCommand(ani->_id, 51, 0, sourceX, sourceY, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 2;
+ ex->_field_20 = fuzzyMatch;
+ ex->_keyCode = ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex);
+
+ if (!mq->chain(ani)) {
+ delete mq;
+ return 0;
+ }
+
+ return mq;
}
MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
@@ -255,7 +317,7 @@ int MctlLadder::collisionDetection(StaticANIObject *man) {
if ((double)(man->_oy - _ladderY) / (double)_height < 0.0)
delta = -0.5;
- else
+ else
delta = 0.5;
int res = (int)((double)(man->_oy - _ladderY) / (double)_height + delta);
@@ -269,7 +331,7 @@ int MctlLadder::collisionDetection(StaticANIObject *man) {
void MctlLadder::addObject(StaticANIObject *obj) {
if (findObjectPos(obj) < 0) {
MctlLadderMovement *movement = new MctlLadderMovement;
-
+
if (initMovement(obj, movement)) {
_mgm.addItem(obj->_id);
_movements.push_back(movement);
@@ -598,6 +660,14 @@ void MovGraph::calcNodeDistancesAndAngles() {
}
}
+int MovGraph::getItemIndexByStaticAni(StaticANIObject *ani) {
+ for (uint i = 0; i < _items.size(); i++)
+ if (_items[i]->ani == ani)
+ return i;
+
+ return -1;
+}
+
int MovGraph2::getItemIndexByGameObjectId(int objectId) {
for (uint i = 0; i < _items2.size(); i++)
if (_items2[i]->_objectId == objectId)
@@ -1693,7 +1763,7 @@ double MovGraph2::findMinPath(LinkInfo *linkInfoSource, LinkInfo *linkInfoDest,
} else if (linkInfoSource->link) {
linkInfoWorkSource.node = linkInfoSource->link->_movGraphNode1;
linkInfoWorkSource.link = 0;
-
+
Common::Array<MovGraphLink *> tmpList;
double newDistance = findMinPath(&linkInfoWorkSource, linkInfoDest, &tmpList);
@@ -1709,9 +1779,9 @@ double MovGraph2::findMinPath(LinkInfo *linkInfoSource, LinkInfo *linkInfoDest,
linkInfoWorkSource.link = 0;
linkInfoWorkSource.node = linkInfoSource->link->_movGraphNode2;
-
+
tmpList.clear();
-
+
newDistance = findMinPath(&linkInfoWorkSource, linkInfoDest, &tmpList);
if (newDistance >= 0 && (minDistance < 0.0 || newDistance < minDistance)) {
@@ -1754,6 +1824,89 @@ void MGM::clear() {
_items.clear();
}
+MessageQueue *MGM::genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr) {
+ int idx = getItemIndexById(ani->_id);
+
+ if (idx == -1)
+ return 0;
+
+ int stid = staticsId;
+
+ if (!staticsId) {
+ if (ani->_movement) {
+ stid = ani->_movement->_staticsObj2->_staticsId;
+ } else {
+ if (!ani->_statics)
+ return 0;
+
+ stid = ani->_statics->_staticsId;
+ }
+ }
+
+ if (stid == staticsIndex)
+ return new MessageQueue(g_fp->_globalMessageQueueList->compact());
+
+ int startidx = getStaticsIndexById(idx, stid);
+ int endidx = getStaticsIndexById(idx, staticsIndex);
+ int subidx = startidx + endidx * _items[idx]->statics.size();
+
+ if (!_items[idx]->subItems[subidx]->movement) {
+ clearMovements2(idx);
+ recalcOffsets(idx, startidx, endidx, 0, 1);
+ }
+
+ if (!_items[idx]->subItems[subidx]->movement)
+ return 0;
+
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
+ Common::Point point;
+ ExCommand *ex;
+
+ int i = 0;
+ do {
+ subidx = startidx + endidx * _items[idx]->statics.size();
+
+ _items[idx]->subItems[subidx]->movement->calcSomeXY(point, 0);
+
+ if (pointArr) {
+ int sz;
+
+ if (_items[idx]->subItems[subidx]->movement->_currMovement)
+ sz = _items[idx]->subItems[subidx]->movement->_currMovement->_dynamicPhases.size();
+ else
+ sz = _items[idx]->subItems[subidx]->movement->_dynamicPhases.size();
+
+ ex = new ExCommand2(20, ani->_id, &pointArr[i], sz);
+
+ ex->_messageNum = _items[idx]->subItems[subidx]->movement->_id;
+ } else {
+ ex = new ExCommand(ani->_id, 1, _items[idx]->subItems[subidx]->movement->_id, 0, 0, 0, 1, 0, 0, 0);
+ }
+
+ ex->_keyCode = ani->_okeyCode;
+ ex->_field_3C = 1;
+ ex->_field_24 = 1;
+
+ mq->addExCommandToEnd(ex);
+
+ if (resStatId)
+ *resStatId = _items[idx]->subItems[subidx]->movement->_id;
+
+ startidx = _items[idx]->subItems[subidx]->staticsIndex;
+
+ uint step;
+
+ if (_items[idx]->subItems[subidx]->movement->_currMovement)
+ step = _items[idx]->subItems[subidx]->movement->_currMovement->_dynamicPhases.size();
+ else
+ step = _items[idx]->subItems[subidx]->movement->_dynamicPhases.size();
+
+ i += step;
+ } while (startidx != endidx);
+
+ return mq;
+}
+
MGMItem::MGMItem() {
objId = 0;
}
@@ -1811,11 +1964,228 @@ int MGM::getItemIndexById(int objId) {
}
MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
- warning("STUB: MGM::genMovement()");
+ if (!mgminfo->ani)
+ return 0;
- return 0;
+ Movement *mov = mgminfo->ani->_movement;
+
+ if (!mov && !mgminfo->ani->_statics)
+ return 0;
+
+ if (!(mgminfo->flags & 1)) {
+ if (mov)
+ mgminfo->staticsId1 = mov->_staticsObj2->_staticsId;
+ else
+ mgminfo->staticsId1 = mgminfo->ani->_statics->_staticsId;
+ }
+
+ Common::Point point;
+
+ if (!(mgminfo->flags & 0x10) || !(mgminfo->flags & 0x20)) {
+ int nx = mgminfo->ani->_ox;
+ int ny = mgminfo->ani->_oy;
+
+ if (mgminfo->ani->_movement) {
+ mgminfo->ani->calcNextStep(&point);
+
+ nx += point.x;
+ ny += point.y;
+ }
+
+ if (!(mgminfo->flags & 0x10))
+ mgminfo->x2 = nx;
+
+ if (!(mgminfo->flags & 0x20))
+ mgminfo->y2 = ny;
+ }
+
+ mov = mgminfo->ani->getMovementById(mgminfo->movementId);
+
+ if (!mov)
+ return 0;
+
+ int itemIdx = getItemIndexById(mgminfo->ani->_id);
+ int subIdx = getStaticsIndexById(itemIdx, mgminfo->staticsId1);
+ int st2idx = getStaticsIndexById(itemIdx, mov->_staticsObj1->_staticsId);
+ int st1idx = getStaticsIndexById(itemIdx, mov->_staticsObj2->_staticsId);
+ int subOffset = getStaticsIndexById(itemIdx, mgminfo->staticsId2);
+
+ clearMovements2(itemIdx);
+ recalcOffsets(itemIdx, subIdx, st2idx, 0, 1);
+ clearMovements2(itemIdx);
+ recalcOffsets(itemIdx, st1idx, subOffset, 0, 1);
+
+ MGMSubItem *sub1 = _items[itemIdx]->subItems[subIdx + st2idx * _items[itemIdx]->statics.size()];
+ MGMSubItem *sub2 = _items[itemIdx]->subItems[st1idx + subOffset * _items[itemIdx]->statics.size()];
+
+ if (subIdx != st2idx && !sub1->movement)
+ return 0;
+
+ if (st1idx != subOffset && !sub2->movement)
+ return 0;
+
+ int n1x = mgminfo->x1 - mgminfo->x2 - sub1->x - sub2->x;
+ int n1y = mgminfo->y1 - mgminfo->y2 - sub1->y - sub2->y;
+
+ Common::Point point1;
+
+ mov->calcSomeXY(point1, 0);
+
+ int n2x = point1.x;
+ int n2y = point1.y;
+ int mult;
+ int len;
+
+ if (mgminfo->flags & 0x40) {
+ mult = mgminfo->field_10;
+ len = -1;
+ n2x *= mult;
+ n2y *= mult;
+ } else {
+ calcLength(&point, mov, n1x, n1y, &mult, &len, 1);
+ n2x = point.x;
+ n2y = point.y;
+ }
+
+ if (!(mgminfo->flags & 2)) {
+ len = -1;
+ n2x = mult * point1.x;
+ n1x = mult * point1.x;
+ mgminfo->x1 = mgminfo->x2 + mult * point1.x + sub1->x + sub2->x;
+ }
+
+ if (!(mgminfo->flags & 4)) {
+ n2y = mult * point1.y;
+ n1y = mult * point1.y;
+ len = -1;
+ mgminfo->y1 = mgminfo->y2 + mult * point1.y + sub1->y + sub2->y;
+ }
+
+ int px = 0;
+ int py = 0;
+
+ if (sub1->movement) {
+ px = countPhases(itemIdx, subIdx, st2idx, 1);
+ py = countPhases(itemIdx, subIdx, st2idx, 2);
+ }
+
+ if (mult > 1) {
+ px += (mult - 1) * mov->countPhasesWithFlag(-1, 1);
+ py += (mult - 1) * mov->countPhasesWithFlag(-1, 2);
+ }
+
+ if (mult > 0) {
+ px += mov->countPhasesWithFlag(len, 1);
+ py += mov->countPhasesWithFlag(len, 2);
+ }
+
+ if (sub2->movement) {
+ px += countPhases(itemIdx, st1idx, subOffset, 1);
+ py += countPhases(itemIdx, st1idx, subOffset, 2);
+ }
+
+ int dx1 = n1x - n2x;
+ int dy1 = n1y - n2y;
+ int x1, y1;
+
+ if (px) {
+ x1 = (int)((double)dx1 / (double)px);
+ } else {
+ x1 = 0;
+ }
+
+ if (py) {
+ y1 = (int)((double)dy1 / (double)py);
+ } else {
+ y1 = 0;
+ }
+
+ Common::Point x2, y2;
+
+ y2.x = dx1 - px * x1;
+ y2.y = dy1 - py * y1;
+
+ if (n1x - n2x == px * x1)
+ x2.x = 0;
+ else
+ x2.x = (dx1 - px * x1) / abs(dx1 - px * x1);
+
+ if (dy1 == py * y1)
+ x2.y = 0;
+ else
+ x2.y = (dy1 - py * y1) / abs(dy1 - py * y1);
+
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
+ ExCommand2 *ex2;
+
+ for (int i = subIdx; i != st2idx;) {
+ MGMSubItem *s = _items[itemIdx]->subItems[i + subOffset * _items[itemIdx]->statics.size()];
+
+ ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2->_parId = mq->_id;
+ ex2->_keyCode = mgminfo->ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex2);
+
+ i = s->staticsIndex;
+ }
+
+ for (int i = 0; i < mult; ++i) {
+ int plen;
+
+ if (i == mult - 1)
+ plen = len;
+ else
+ plen = -1;
+
+ ex2 = buildExCommand2(mov, mgminfo->ani->_id, x1, y1, &x2, &y2, plen);
+ ex2->_parId = mq->_id;
+ ex2->_keyCode = mgminfo->ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex2);
+ }
+
+ for (int j = st1idx; j != subOffset;) {
+ MGMSubItem *s = _items[itemIdx]->subItems[j + subOffset * _items[itemIdx]->statics.size()];
+
+ ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2->_parId = mq->_id;
+ ex2->_keyCode = mgminfo->ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex2);
+
+ j = s->staticsIndex;
+ }
+
+ ExCommand *ex = new ExCommand(mgminfo->ani->_id, 5, -1, mgminfo->x1, mgminfo->y1, 0, 1, 0, 0, 0);
+
+ ex->_field_14 = mgminfo->field_1C;
+ ex->_keyCode = mgminfo->ani->_okeyCode;
+ ex->_field_24 = 0;
+ ex->_excFlags |= 3;
+
+ mq->addExCommandToEnd(ex);
+
+ return mq;
}
+int MGM::countPhases(int idx, int subIdx, int endIdx, int flag) {
+ int res = 0;
+
+ if (endIdx < 0)
+ return 0;
+
+ while (subIdx != endIdx) {
+ if (subIdx < 0)
+ break;
+
+ res += _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->movement->countPhasesWithFlag(-1, flag);
+
+ subIdx = _items[idx]->subItems[subIdx + 6 * endIdx * _items[idx]->statics.size()]->staticsIndex;
+ }
+
+ return res;
+}
void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
if (getItemIndexById(ani->_id) == -1)
return;
@@ -1914,39 +2284,129 @@ void MGM::clearMovements2(int idx) {
}
int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
- warning("STUB: MGM::recalcOffsets()");
+ MGMItem *item = _items[idx];
+ int subIdx = st1idx + st2idx * item->statics.size();
- return 0;
+ if (st1idx == st2idx) {
+ memset(&item->subItems[subIdx], 0, sizeof(item->subItems[subIdx]));
+ return 0;
+ }
+
+ if (item->subItems[subIdx])
+ return item->subItems[subIdx]->field_8;
+
+ Common::Point point;
+
+ for (uint i = 0; i < item->movements1.size(); i++) {
+ Movement *mov = item->movements1[i];
+
+ if (mov->_staticsObj1 == item->statics[st1idx]) {
+ if (!item->movements2[i] && (!flop || mov->_field_50)) {
+ item->movements2[i] = 1;
+
+ int stidx = getStaticsIndex(idx, item->movements1[i]->_staticsObj2);
+ int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
+ int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+ int newsz = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+
+ if (recalc >= 0) {
+ if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1 ||
+ (item->subItems[subIdx]->field_8 == recalc + 1 && item->subItems[subIdx]->field_C > newsz)) {
+ item->subItems[subIdx]->movement = mov;
+ item->subItems[subIdx]->staticsIndex = stidx;
+ item->subItems[subIdx]->field_8 = recalc + 1;
+ item->subItems[subIdx]->field_C = newsz;
+
+ mov->calcSomeXY(point, 0);
+
+ item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x + point.x;
+ item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y + point.y;
+ }
+ }
+ }
+ } else if (flip) {
+ if (mov->_staticsObj2 == item->statics[st1idx]) {
+ if (!item->movements2[i] && (!flop || mov->_field_50)) {
+ item->movements2[i] = 1;
+
+ int stidx = getStaticsIndex(idx, mov->_staticsObj1);
+ int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
+
+ if (recalc >= 0) {
+ if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1) {
+ item->subItems[subIdx]->movement = mov;
+ item->subItems[subIdx]->staticsIndex = stidx;
+ item->subItems[subIdx]->field_8 = recalc + 1;
+
+ int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
+
+ item->subItems[subIdx]->field_C = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+
+ mov->calcSomeXY(point, 0);
+
+ item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x - point.x;
+ item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y - point.y;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (item->subItems[subIdx]->movement)
+ return item->subItems[subIdx]->field_8;
+
+ return -1;
+}
+
+int MGM::refreshOffsets(int objectId, int idx1, int idx2) {
+ int idx = getItemIndexById(objectId);
+
+ if (idx != -1) {
+ int from = getStaticsIndexById(idx, idx1);
+ int to = getStaticsIndexById(idx, idx2);
+
+ MGMSubItem *sub = _items[idx]->subItems[from + to * _items[idx]->statics.size()];
+
+ if (sub->movement) {
+ idx = sub->field_8;
+ } else {
+ clearMovements2(idx);
+ idx = recalcOffsets(idx, from, to, 0, 1);
+ }
+ }
+
+ return idx;
}
-Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *x1, int *y1, int flag) {
+Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
Common::Point point;
mov->calcSomeXY(point, 0);
int p1x = point.x;
int p1y = point.y;
- int newx1 = 0;
- int oldy1 = *y1;
+ int newmult = 0;
+ int oldlen = *len;
if (abs(p1y) > abs(p1x)) {
if (mov->calcSomeXY(point, 0)->y)
- newx1 = (int)((double)y / point.y);
+ newmult = (int)((double)y / point.y);
} else if (mov->calcSomeXY(point, 0)->x) {
- newx1 = (int)((double)x / point.y);
+ newmult = (int)((double)x / point.y);
}
- if (newx1 < 0)
- newx1 = 0;
+ if (newmult < 0)
+ newmult = 0;
- *x1 = newx1;
+ *mult = newmult;
int phase = 1;
int sz;
if (flag) {
if (abs(p1y) > abs(p1x)) {
- while (abs(p1y * newx1 + mov->calcSomeXY(point, 0)->y) < abs(y)) {
+ while (abs(p1y * newmult + mov->calcSomeXY(point, 0)->y) < abs(y)) {
sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
if (phase >= sz) {
@@ -1958,7 +2418,7 @@ Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y,
phase++;
}
} else {
- while (abs(p1x * newx1 + mov->calcSomeXY(point, 0)->x) < abs(x)) {
+ while (abs(p1x * newmult + mov->calcSomeXY(point, 0)->x) < abs(x)) {
sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
if (phase >= sz) {
@@ -1971,19 +2431,19 @@ Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y,
}
}
- *y1 = phase - 1;
+ *len = phase - 1;
} else {
- *y1 = -1;
+ *len = -1;
}
int p2x = 0;
int p2y = 0;
- if (!oldy1)
- oldy1 = -1;
+ if (!oldlen)
+ oldlen = -1;
- if (oldy1 > 0) {
- ++*x1;
+ if (oldlen > 0) {
+ ++*mult;
mov->calcSomeXY(point, 0);
p2x = point.x;
@@ -1995,8 +2455,8 @@ Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y,
p2y = p1y;
}
- pRes->x = p2x + p1x * newx1;
- pRes->y = p2y + p1y * newx1;
+ pRes->x = p2x + p1x * newmult;
+ pRes->y = p2y + p1y * newmult;
return pRes;
}
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 6ad46e719a..4d92fd7fed 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -138,7 +138,7 @@ struct MGMItem {
Common::Array<MGMSubItem *> subItems;
Common::Array<Statics *> statics;
Common::Array<Movement *> movements1;
- Common::Array<Movement *> movements2;
+ Common::Array<int> movements2;
MGMItem();
};
@@ -176,8 +176,11 @@ public:
int getStaticsIndex(int idx, Statics *st);
void clearMovements2(int idx);
int recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop);
- Common::Point *calcLength(Common::Point *point, Movement *mov, int x, int y, int *x1, int *y1, int flag);
+ Common::Point *calcLength(Common::Point *point, Movement *mov, int x, int y, int *mult, int *len, int flag);
ExCommand2 *buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len);
+ MessageQueue *genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr);
+ int countPhases(int idx, int subIdx, int subOffset, int flag);
+ int refreshOffsets(int objectId, int idx1, int idx2);
};
struct MctlLadderMovementVars {
@@ -347,6 +350,7 @@ public:
double calcDistance(Common::Point *point, MovGraphLink *link, int fuzzyMatch);
void calcNodeDistancesAndAngles();
MovGraphNode *calcOffset(int ox, int oy);
+ int getItemIndexByStaticAni(StaticANIObject *ani);
};
class Movement;
diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h
index eafdb2a8e7..0baf83b175 100644
--- a/engines/fullpipe/objectnames.h
+++ b/engines/fullpipe/objectnames.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -192,7 +192,7 @@ namespace Fullpipe {
#define sO_WithPlunger "\xd1 \xe2\xe0\xed\xf2\xf3\xe7\xee\xec" // "С вантузом"
#define sO_WithJug "\xd1 \xe3\xee\xf0\xf8\xea\xee\xec" // "С горшком"
#define sO_WithGum "\xd1 \xe6\xe2\xe0\xf7\xea\xee\xe9" // "С жвачкой"
-#define sO_WithShovel "\xd1 \xeb\xee\xef\xe0\xf2\xee\xe9" // "С лопатой"
+#define sO_WithSpade "\xd1 \xeb\xee\xef\xe0\xf2\xee\xe9" // "С лопатой"
#define sO_WithSmall "\xd1 \xec\xe0\xeb\xfb\xec" // "С малым"
#define sO_WithHammer "\xd1 \xec\xee\xeb\xee\xf2\xea\xee\xec" // "С молотком"
#define sO_WithCoin "\xd1 \xec\xee\xed\xe5\xf2\xee\xe9" // "С монетой"
@@ -208,9 +208,9 @@ namespace Fullpipe {
#define sO_IsSitting "\xd1\xe8\xe4\xe8\xf2" // "Сидит"
#define sO_IsLaughing "\xd1\xec\xe5\xe5\xf2\xf1\xff" // "Смеется"
#define sO_WithAll "\xd1\xee \xe2\xf1\xe5\xec\xe8" // "Со всеми"
-#define sO_WithMop "\xd1\xee \xf8\xe2\xe0\xe1\xf0\xee\xe9" // "Со шваброй"
+#define sO_WithSwab "\xd1\xee \xf8\xe2\xe0\xe1\xf0\xee\xe9" // "Со шваброй"
#define sO_WithHose "\xd1\xee \xf8\xeb\xe0\xed\xe3\xee\xec" // "Со шлангом"
-#define sO_WithBrush "\xd1\xee \xf9\xe5\xf2\xea\xee\xe9" // "Со щеткой"
+#define sO_WithBroom "\xd1\xee \xf9\xe5\xf2\xea\xee\xe9" // "Со щеткой"
#define sO_IsSleeping "\xd1\xef\xe8\xf2" // "Спит"
#define sO_OnRight "\xd1\xef\xf0\xe0\xe2\xe0" // "Справа"
#define sO_IsStandingInBoots "\xd1\xf2\xee\xe8\xf2 \xe2 \xe1\xee\xf2\xe8\xed\xea\xe0\xf5" // "Стоит в ботинках"
@@ -229,7 +229,7 @@ namespace Fullpipe {
#define sO_NearPipeWithStool "\xd3 \xf2\xf0\xf3\xe1\xfb \xf1 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xee\xe9" // "У трубы с табуреткой"
#define sO_NearPipe "\xd3 \xf2\xf0\xf3\xe1\xfb" // "У трубы"
#define sO_Janitors "\xd3\xe1\xee\xf0\xf9\xe8\xea\xe8" // "Уборщики"
-#define sO_Janitress "\xd3\xe1\xee\xf0\xf9\xe8\xf6\xe0" // "Уборщица"
+#define sO_Maid "\xd3\xe1\xee\xf0\xf9\xe8\xf6\xe0" // "Уборщица"
#define sO_IsGone "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала"
#define sO_FallenTwice "\xd3\xef\xe0\xeb \xe4\xe2\xe0" // "Упал два"
#define sO_FallenOnce "\xd3\xef\xe0\xeb \xf0\xe0\xe7" // "Упал раз"
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h
index d13559429a..1849bcb96e 100644
--- a/engines/fullpipe/objects.h
+++ b/engines/fullpipe/objects.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 997d92ae1c..462401b3b2 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -334,6 +334,10 @@ void Scene::setPictureObjectsFlag4() {
}
}
+void Scene::stopAllSounds() {
+ warning("STUB: Scene:stopAllSounds()");
+}
+
PictureObject *Scene::getPictureObjectById(int objId, int flags) {
for (uint i = 0; i < _picObjList.size(); i++) {
if (((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_okeyCode == flags)
diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h
index fc04a877f5..8306974f7b 100644
--- a/engines/fullpipe/scene.h
+++ b/engines/fullpipe/scene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -78,6 +78,8 @@ class Scene : public Background {
void initObjectCursors(const char *name);
+ void stopAllSounds();
+
private:
static bool compareObjPriority(const void *p1, const void *p2);
void objectList_sortByPriority(PtrList &list, bool skipFirst = false);
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 71c8b1efb5..7420c1b1cf 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,6 +31,7 @@
#include "fullpipe/behavior.h"
#include "fullpipe/constants.h"
+#include "fullpipe/objectnames.h"
#include "fullpipe/scenes.h"
#include "fullpipe/interaction.h"
@@ -155,6 +156,28 @@ Vars::Vars() {
scene08_stairsVisible = true;
scene08_manOffsetY = 0;
+ scene09_flyingBall = 0;
+ scene09_numSwallenBalls = 0;
+ scene09_gulper = 0;
+ scene09_spitter = 0;
+ scene09_grit = 0;
+ scene09_dudeY = 0;
+ scene09_gulperIsPresent = true;
+ scene09_dudeIsOnLadder = false;
+ scene09_interactingHanger = -1;
+ scene09_intHangerPhase = -1;
+ scene09_intHangerMaxPhase = -1000;
+ scene09_numMovingHangers = 0;
+ scene09_clickY = 0;
+ scene09_hangerOffsets[0].x = 0;
+ scene09_hangerOffsets[0].y = -15;
+ scene09_hangerOffsets[1].x = 15;
+ scene09_hangerOffsets[1].y = 0;
+ scene09_hangerOffsets[2].x = 0;
+ scene09_hangerOffsets[2].y = 0;
+ scene09_hangerOffsets[3].x = 0;
+ scene09_hangerOffsets[3].y = 0;
+
scene10_gum = 0;
scene10_packet = 0;
scene10_packet2 = 0;
@@ -247,7 +270,38 @@ Vars::Vars() {
scene17_handPhase = false;
scene17_sceneEdgeX = 0;
- scene18_var01 = 0;
+ scene18_inScene18p1 = false;
+ scene18_whirlgig = 0;
+ scene18_wheelCenterX = 0;
+ scene18_wheelCenterY = 0;
+ scene18_bridgeIsConvoluted = false;
+ scene18_whirlgigMovMum = 0;
+ scene18_girlIsSwinging = false;
+ scene18_rotationCounter = 0;
+ scene18_manY = 0;
+ scene18_wheelFlipper = false;
+ scene18_wheelIsTurning = true;
+ scene18_kidIsOnWheel = -1;
+ scene18_boyIsOnWheel = 0;
+ scene18_girlIsOnWheel = 0;
+ scene18_boyJumpedOff = true;
+ scene18_jumpDistance = -1;
+ scene18_jumpAngle = -1;
+ scene18_manIsReady = false;
+ scene18_enteredTrubaRight = false;
+ scene18_manWheelPos = 0;
+ scene18_manWheelPosTo = -1;
+ scene18_kidWheelPos = 0;
+ scene18_kidWheelPosTo = 0;
+ scene18_boy = 0;
+ scene18_girl = 0;
+ scene18_domino = 0;
+ scene18_boyJumpX = 290;
+ scene18_boyJumpY = -363;
+ scene18_girlJumpX = 283;
+ scene18_girlJumpY = -350;
+
+ scene19_enteredTruba3 = false;
scene20_fliesCountdown = 0;
scene20_grandma = 0;
@@ -300,6 +354,22 @@ Vars::Vars() {
scene26_sock = 0;
scene26_activeVent = 0;
+ scene27_hitZone = 0;
+ scene27_driver = 0;
+ scene27_maid = 0;
+ scene27_batHandler = 0;
+ scene27_driverHasVent = true;
+ scene27_bat = 0;
+ scene27_dudeIsAiming = false;
+ scene27_maxPhaseReached = false;
+ scene27_wipeIsNeeded = false;
+ scene27_driverPushedButton = false;
+ scene27_numLostBats = 0;
+ scene27_knockCount = 0;
+ scene27_aimStartX = 0;
+ scene27_aimStartY = 0;
+ scene27_launchPhase = 0;
+
scene28_fliesArePresent = true;
scene28_beardedDirection = true;
scene28_darkeningObject = 0;
@@ -308,6 +378,23 @@ Vars::Vars() {
scene28_headBeardedFlipper = false;
scene28_lift6inside = false;
+ scene29_porter = 0;
+ scene29_shooter1 = 0;
+ scene29_shooter2 = 0;
+ scene29_ass = 0;
+ scene29_manIsRiding = false;
+ scene29_arcadeIsOn = false;
+ scene29_reachedFarRight = false;
+ scene29_rideBackEnabled = false;
+ scene29_shootCountdown = 0;
+ scene29_shootDistance = 75;
+ scene29_manIsHit = 0;
+ scene29_scrollSpeed = 0;
+ scene29_scrollingDisabled = 0;
+ scene29_hitBall = 0;
+ scene29_manX = 0;
+ scene29_manY = 0;
+
scene30_leg = 0;
scene30_liftFlag = 1;
@@ -618,7 +705,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
_updateCursorCallback = scene08_updateCursor;
break;
-#if 0
case SC_9:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_9");
scene->preloadMovements(sceneVar);
@@ -629,7 +715,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
insertMessageHandler(sceneHandler09, 2, 2);
_updateCursorCallback = scene09_updateCursor;
break;
-#endif
case SC_10:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_10");
@@ -722,16 +807,17 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
_updateCursorCallback = scene17_updateCursor;
break;
-#if 0
case SC_18:
- sub_40E1B0();
+ scene18_setupEntrance();
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_18");
scene->preloadMovements(sceneVar);
- sub_4062D0();
- if (dword_476C38)
+ g_fp->stopAllSounds();
+
+ if (g_vars->scene18_inScene18p1)
scene18_initScene1(scene);
else
scene18_initScene2(scene);
+
_behaviorManager->initBehavior(scene, sceneVar);
scene->initObjectCursors("SC_18");
setSceneMusicParameters(sceneVar);
@@ -740,30 +826,34 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
break;
case SC_19:
- if (!g_scene3) {
- g_scene3 = accessScene(SC_18);
- getGameLoader()->loadScene(SC_18);
- scene18_initScene2(g_scene3);
- sub_40C5F0();
- scene19_sub_420B10(g_scene3, entrance->field_4);
- dword_476C38 = 1;
+ if (!g_fp->_scene3) {
+ g_fp->_scene3 = accessScene(SC_18);
+ g_fp->_gameLoader->loadScene(SC_18);
+
+ scene18_initScene2(g_fp->_scene3);
+ scene18_preload();
+ scene19_setMovements(g_fp->_scene3, entrance->_field_4);
+
+ g_vars->scene18_inScene18p1 = true;
}
- sub_40C650();
+
+ scene19_preload();
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_19");
scene->preloadMovements(sceneVar);
- sub_4062D0();
- if (dword_476C38)
+ g_fp->stopAllSounds();
+
+ if (g_vars->scene18_inScene18p1)
scene18_initScene1(scene);
else
scene19_initScene2();
+
_behaviorManager->initBehavior(scene, sceneVar);
scene->initObjectCursors("SC_19");
setSceneMusicParameters(sceneVar);
addMessageHandler(sceneHandler19, 2);
- scene19_sub_4211D0(scene);
+ scene19_setSugarState(scene);
_updateCursorCallback = scene19_updateCursor;
break;
-#endif
case SC_20:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_20");
@@ -847,7 +937,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
_updateCursorCallback = scene26_updateCursor;
break;
-#if 0
case SC_27:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_27");
scene->preloadMovements(sceneVar);
@@ -858,7 +947,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
addMessageHandler(sceneHandler27, 2);
_updateCursorCallback = scene27_updateCursor;
break;
-#endif
case SC_28:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_28");
@@ -871,7 +959,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
_updateCursorCallback = scene28_updateCursor;
break;
-#if 0
case SC_29:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_29");
scene->preloadMovements(sceneVar);
@@ -882,7 +969,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
addMessageHandler(sceneHandler29, 2);
_updateCursorCallback = scene29_updateCursor;
break;
-#endif
case SC_30:
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_30");
@@ -1020,10 +1106,6 @@ int defaultUpdateCursor() {
return g_fp->_cursorId;
}
-void FullpipeEngine::processArcade(ExCommand *ex) {
- warning("STUB: FullpipeEngine::processArcade()");
-}
-
void FullpipeEngine::updateMapPiece(int mapId, int update) {
for (int i = 0; i < 200; i++) {
int hiWord = (_mapTable[i] >> 16) & 0xffff;
@@ -1211,7 +1293,7 @@ void FullpipeEngine::updateMap(PreloadItem *pre) {
break;
case SC_23:
- if (getObjectState("Верхний люк_23") == getObjectEnumState("Верхний люк_23", "Открыт")) {
+ if (getObjectState(sO_UpperHatch_23) == getObjectEnumState(sO_UpperHatch_23, sO_Opened)) {
updateMapPiece(PIC_MAP_S23_1, 0);
updateMapPiece(PIC_MAP_S23_2, 1);
updateMapPiece(PIC_MAP_P07, 1);
@@ -1284,7 +1366,7 @@ void FullpipeEngine::updateMap(PreloadItem *pre) {
case SC_31:
updateMapPiece(PIC_MAP_S31_2, 1);
- if (getObjectState("Кактус") == getObjectEnumState("Кактус", "Вырос"))
+ if (getObjectState(sO_Cactus) == getObjectEnumState(sO_Cactus, sO_HasGrown))
updateMapPiece(PIC_MAP_S31_1, 1);
if (pre->keyCode == TrubaRight)
@@ -1295,7 +1377,7 @@ void FullpipeEngine::updateMap(PreloadItem *pre) {
case SC_32:
updateMapPiece(PIC_MAP_S32_2, 1);
- if (getObjectState("Кактус") == getObjectEnumState("Кактус", "Вырос"))
+ if (getObjectState(sO_Cactus) == getObjectEnumState(sO_Cactus, sO_HasGrown))
updateMapPiece(PIC_MAP_S32_1, 1);
break;
@@ -1356,5 +1438,54 @@ void FullpipeEngine::updateMap(PreloadItem *pre) {
}
}
+void BallChain::init(Ball **ball) {
+ *ball = pTail;
+ pTail = (Ball *)ball;
+ numBalls--;
+
+ if (!numBalls) {
+ for (Ball *i = pHead; i; i = i->p0 )
+ ;
+ numBalls = 0;
+ pTail = 0;
+ field_8 = 0;
+ pHead = 0;
+ free(cPlex);
+ cPlex = 0;
+ }
+}
+
+Ball *BallChain::sub04(Ball *ballP, Ball *ballN) {
+ warning("STUB: BallChain::sub04");
+
+ return pTail;
+}
+
+void BallChain::removeBall(Ball *ball) {
+ if (ball == pHead)
+ pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == field_8)
+ field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ ball->p0 = pTail;
+ pTail = ball;
+
+ numBalls--;
+
+ if (!numBalls) {
+ numBalls = 0;
+ pTail = 0;
+ field_8 = 0;
+ pHead = 0;
+ free(cPlex);
+ cPlex = 0;
+ }
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 5f77f74706..0b7c4e7c8f 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -25,11 +25,15 @@
namespace Fullpipe {
+struct Bat;
struct BehaviorEntryInfo;
+struct Hanger;
class MGM;
class MctlLadder;
struct Ring;
class StaticANIObject;
+struct Swinger;
+struct WalkingBearder;
int defaultUpdateCursor();
@@ -69,6 +73,10 @@ void scene08_setupMusic();
int sceneHandler08(ExCommand *cmd);
int scene08_updateCursor();
+int scene09_updateCursor();
+void scene09_initScene(Scene *sc);
+int sceneHandler09(ExCommand *cmd);
+
void scene10_initScene(Scene *sc);
int sceneHandler10(ExCommand *cmd);
int scene10_updateCursor();
@@ -103,7 +111,19 @@ int sceneHandler17(ExCommand *cmd);
int scene17_updateCursor();
void scene18_preload();
-void scene19_preload(Scene *sc, int key);
+void scene18_setupEntrance();
+void scene18_initScene1(Scene *sc);
+void scene18_initScene2(Scene *sc);
+int sceneHandler18(ExCommand *cmd);
+int scene18_updateCursor();
+
+void scene19_preload();
+void scene19_setMovements(Scene *sc, int entranceId);
+void scene19_initScene2();
+void scene19_setMovements(Scene *sc, int key);
+int sceneHandler19(ExCommand *cmd);
+int scene19_updateCursor();
+void scene19_setSugarState(Scene *sc);
void scene20_initScene(Scene *sc);
int sceneHandler20(ExCommand *ex);
@@ -136,10 +156,18 @@ void scene26_setupDrop(Scene *sc);
int sceneHandler26(ExCommand *cmd);
int scene26_updateCursor();
+void scene27_initScene(Scene *sc);
+int sceneHandler27(ExCommand *ex);
+int scene27_updateCursor();
+
void scene28_initScene(Scene *sc);
- int sceneHandler28(ExCommand *ex);
+int sceneHandler28(ExCommand *ex);
int scene28_updateCursor();
+int scene29_updateCursor();
+void scene29_initScene(Scene *sc);
+int sceneHandler29(ExCommand *cmd);
+
int scene30_updateCursor();
void scene30_initScene(Scene *sc, int flag);
int sceneHandler30(ExCommand *cmd);
@@ -183,6 +211,31 @@ int sceneHandlerFinal(ExCommand *cmd);
void sceneDbgMenu_initScene(Scene *sc);
int sceneHandlerDbgMenu(ExCommand *cmd);
+struct Ball {
+ Ball *p0;
+ Ball *p1;
+ StaticANIObject *ani;
+
+ Ball() : p0(0), p1(0), ani(0) {}
+};
+
+struct BallChain {
+ Ball *pHead;
+ Ball *field_8;
+ int numBalls;
+ Ball *pTail;
+ byte *cPlex;
+ int cPlexLen;
+
+ BallChain() : pHead(0), field_8(0), pTail(0), numBalls(0), cPlex(0), cPlexLen(0) {}
+ ~BallChain() { free(cPlex); }
+
+ void init(Ball **ball);
+ Ball *sub04(Ball *ballP, Ball *ballN);
+ void removeBall(Ball *ball);
+ void reset() { pHead = 0; pTail = 0; field_8 = 0; numBalls = 0; free(cPlex); cPlex = 0; cPlexLen = 0; }
+};
+
class Vars {
public:
Vars();
@@ -314,6 +367,24 @@ public:
bool scene08_stairsVisible;
int scene08_manOffsetY;
+ int scene09_dudeY;
+ StaticANIObject *scene09_flyingBall;
+ int scene09_numSwallenBalls;
+ StaticANIObject *scene09_gulper;
+ StaticANIObject *scene09_spitter;
+ StaticANIObject *scene09_grit;
+ bool scene09_gulperIsPresent;
+ bool scene09_dudeIsOnLadder;
+ int scene09_interactingHanger;
+ int scene09_intHangerPhase;
+ int scene09_intHangerMaxPhase;
+ BallChain scene09_balls;
+ Common::Array<Hanger *> scene09_hangers;
+ BallChain scene09_flyingBalls;
+ int scene09_numMovingHangers;
+ int scene09_clickY;
+ Common::Point scene09_hangerOffsets[4];
+
StaticANIObject *scene10_gum;
StaticANIObject *scene10_packet;
StaticANIObject *scene10_packet2;
@@ -408,7 +479,39 @@ public:
bool scene17_handPhase;
int scene17_sceneEdgeX;
- int scene18_var01;
+ bool scene18_inScene18p1;
+ StaticANIObject *scene18_whirlgig;
+ Common::Array<Swinger *> scene18_swingers;
+ int scene18_wheelCenterX;
+ int scene18_wheelCenterY;
+ bool scene18_bridgeIsConvoluted;
+ int scene18_whirlgigMovMum;
+ bool scene18_girlIsSwinging;
+ int scene18_rotationCounter;
+ int scene18_manY;
+ bool scene18_wheelFlipper;
+ bool scene18_wheelIsTurning;
+ int scene18_kidIsOnWheel;
+ int scene18_boyIsOnWheel;
+ int scene18_girlIsOnWheel;
+ bool scene18_boyJumpedOff;
+ int scene18_manWheelPos;
+ int scene18_manWheelPosTo;
+ int scene18_kidWheelPos;
+ int scene18_kidWheelPosTo;
+ int scene18_jumpDistance;
+ int scene18_jumpAngle;
+ bool scene18_manIsReady;
+ bool scene18_enteredTrubaRight;
+ StaticANIObject *scene18_boy;
+ StaticANIObject *scene18_girl;
+ StaticANIObject *scene18_domino;
+ int scene18_boyJumpX;
+ int scene18_boyJumpY;
+ int scene18_girlJumpX;
+ int scene18_girlJumpY;
+
+ bool scene19_enteredTruba3;
int scene20_fliesCountdown;
StaticANIObject *scene20_grandma;
@@ -461,6 +564,25 @@ public:
StaticANIObject *scene26_sock;
StaticANIObject *scene26_activeVent;
+ PictureObject *scene27_hitZone;
+ StaticANIObject *scene27_driver;
+ StaticANIObject *scene27_maid;
+ StaticANIObject *scene27_batHandler;
+ bool scene27_driverHasVent;
+ StaticANIObject *scene27_bat;
+ bool scene27_dudeIsAiming;
+ bool scene27_maxPhaseReached;
+ bool scene27_wipeIsNeeded;
+ bool scene27_driverPushedButton;
+ int scene27_numLostBats;
+ int scene27_knockCount;
+ int scene27_aimStartX;
+ int scene27_aimStartY;
+ int scene27_launchPhase;
+ BallChain scene27_balls;
+ Common::Array<Bat *> scene27_bats;
+ Common::Array<Bat *> scene27_var07;
+
bool scene28_fliesArePresent;
bool scene28_beardedDirection;
PictureObject *scene28_darkeningObject;
@@ -469,6 +591,29 @@ public:
bool scene28_headBeardedFlipper;
bool scene28_lift6inside;
+ StaticANIObject *scene29_porter;
+ StaticANIObject *scene29_shooter1;
+ StaticANIObject *scene29_shooter2;
+ StaticANIObject *scene29_ass;
+ BallChain scene29_balls;
+ BallChain scene29_redBalls;
+ BallChain scene29_flyingRedBalls;
+ BallChain scene29_greenBalls;
+ bool scene29_manIsRiding;
+ bool scene29_arcadeIsOn;
+ bool scene29_reachedFarRight;
+ bool scene29_rideBackEnabled;
+ int scene29_shootCountdown;
+ int scene29_shootDistance;
+ int scene29_manIsHit;
+ int scene29_scrollSpeed;
+ bool scene29_scrollingDisabled;
+ int scene29_hitBall;
+ Common::Array<WalkingBearder *> scene29_bearders;
+ int scene29_manX;
+ int scene29_manY;
+ MGM scene29_mgm;
+
StaticANIObject *scene30_leg;
int scene30_liftFlag;
diff --git a/engines/fullpipe/scenes/scene01.cpp b/engines/fullpipe/scenes/scene01.cpp
index 6c8f26d209..e24eb1fa45 100644
--- a/engines/fullpipe/scenes/scene01.cpp
+++ b/engines/fullpipe/scenes/scene01.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene02.cpp b/engines/fullpipe/scenes/scene02.cpp
index 95cf1df7dd..109a20a07a 100644
--- a/engines/fullpipe/scenes/scene02.cpp
+++ b/engines/fullpipe/scenes/scene02.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index 40e70e2ea5..e6c9fa3bbd 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -59,7 +59,7 @@ void scene03_initScene(Scene *sc) {
g_fp->lift_setButton(sO_Level2, ST_LBN_2N);
- g_fp->lift_sub5(sc, QU_SC3_ENTERLIFT, QU_SC3_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC3_ENTERLIFT, QU_SC3_EXITLIFT);
}
void scene03_setEaterState() {
@@ -215,7 +215,7 @@ int sceneHandler03(ExCommand *ex) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC3_HIDEDOMINO:
@@ -239,14 +239,14 @@ int sceneHandler03(ExCommand *ex) {
break;
case 64:
- g_fp->lift_sub05(ex);
+ g_fp->lift_hoverButton(ex);
break;
case 29:
{
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
ex->_messageKind = 0;
return 0;
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 332935072c..b47553ef6f 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -263,8 +263,8 @@ void sceneHandler04_clickButton() {
StaticANIObject *but = g_fp->_currentScene->getStaticANIObject1ById(ANI_BUTTON, -1);
if (but) {
- if (!g_vars->scene04_clock->_movement ||
- (g_vars->scene04_clock->_movement->_id == MV_CLK_GO && g_vars->scene04_clock->_movement->_currDynamicPhaseIndex > 3 &&
+ if (!g_vars->scene04_clock->_movement ||
+ (g_vars->scene04_clock->_movement->_id == MV_CLK_GO && g_vars->scene04_clock->_movement->_currDynamicPhaseIndex > 3 &&
g_vars->scene04_clock->_movement->_currDynamicPhaseIndex < 105)) {
if (!g_vars->scene04_hand->_movement && !g_vars->scene04_bottleIsTaken) {
but->startAnim(MV_BTN_CLICK, 0, -1);
@@ -1196,7 +1196,7 @@ void sceneHandler04_takeBottle() {
void sceneHandler04_takeKozyawka() {
if (g_vars->scene04_kozyawkiAni.size() > 0) {
- if (g_vars->scene04_kozyawkiAni.size() == 1)
+ if (g_vars->scene04_kozyawkiAni.size() == 1)
g_vars->scene04_objectIsTaken = true;
StaticANIObject *koz = g_vars->scene04_kozyawkiAni.front();
@@ -1284,7 +1284,7 @@ int sceneHandler04(ExCommand *ex) {
case MSG_UPDATEBOTTLE:
sceneHandler04_updateBottle();
break;
-
+
case MSG_CLICKBOTTLE:
sceneHandler04_clickBottle();
break;
@@ -1486,7 +1486,7 @@ int sceneHandler04(ExCommand *ex) {
case MSG_SC4_DROPBOTTLE:
sceneHandler04_dropBottle();
break;
-
+
case MSG_SC4_COINOUT:
g_vars->scene04_clock->changeStatics2(ST_CLK_CLOSED);
g_vars->scene04_coinPut = false;
diff --git a/engines/fullpipe/scenes/scene05.cpp b/engines/fullpipe/scenes/scene05.cpp
index c6e21daf1e..8864794691 100644
--- a/engines/fullpipe/scenes/scene05.cpp
+++ b/engines/fullpipe/scenes/scene05.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -123,7 +123,7 @@ void sceneHandler05_makeWackoFeedback() {
}
void sceneHandler05_resetTicks() {
- if (g_fp->_aniMan->_movement && (g_fp->_aniMan->_movement->_id == MV_MANHDL_HANDLEUP
+ if (g_fp->_aniMan->_movement && (g_fp->_aniMan->_movement->_id == MV_MANHDL_HANDLEUP
|| g_fp->_aniMan->_movement->_id == MV_MANHDL_HANDLEDOWN))
g_vars->scene05_wackoTicker = g_fp->_updateTicks;
else
@@ -312,7 +312,7 @@ int sceneHandler05(ExCommand *ex) {
break;
case MSG_SC5_MAKEOTMFEEDBACK:
- if (!g_fp->_aniMan->_movement || (g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
+ if (!g_fp->_aniMan->_movement || (g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
&& g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
sceneHandler05_makeWackoFeedback();
g_vars->scene05_wackoTicker = 0;
@@ -341,7 +341,7 @@ int sceneHandler05(ExCommand *ex) {
sceneHandler05_testHatch(ex);
break;
- case 33:
+ case 33:
{
int res = 0;
if (g_fp->_aniMan2) {
@@ -356,7 +356,7 @@ int sceneHandler05(ExCommand *ex) {
if (g_vars->scene05_wackoTicker) {
if ((g_fp->_updateTicks - g_vars->scene05_wackoTicker) > 62) {
- if (!g_fp->_aniMan->_movement || (g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
+ if (!g_fp->_aniMan->_movement || (g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
&& g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
if (g_vars->scene05_handleFlipper % 2)
sceneHandler05_makeWackoFeedback();
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index c352d27dd6..d54ebf4514 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -531,7 +531,7 @@ void scene06_initScene(Scene *sc) {
g_vars->scene06_mumsy->hide();
g_fp->lift_setButton(sO_Level3, ST_LBN_3N);
- g_fp->lift_sub5(sc, QU_SC6_ENTERLIFT, QU_SC6_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC6_ENTERLIFT, QU_SC6_EXITLIFT);
g_fp->initArcadeKeys("SC_6");
sceneHandler06_setExits(sc);
@@ -590,7 +590,7 @@ int sceneHandler06(ExCommand *ex) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SPINHANDLE:
@@ -622,7 +622,7 @@ int sceneHandler06(ExCommand *ex) {
break;
case 64:
- g_fp->lift_sub05(ex);
+ g_fp->lift_hoverButton(ex);
break;
case MSG_SC6_TAKEBALL:
@@ -647,7 +647,7 @@ int sceneHandler06(ExCommand *ex) {
if (st) {
if (!g_vars->scene06_arcadeEnabled && st->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(st);
+ g_fp->lift_animateButton(st);
ex->_messageKind = 0;
return 0;
}
@@ -671,7 +671,7 @@ int sceneHandler06(ExCommand *ex) {
if (!pic || !canInteractAny(g_fp->_aniMan, pic, ex->_keyCode)) {
if ((g_fp->_sceneRect.right - ex->_sceneClickX < 47
- && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
+ && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
|| (ex->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) {
g_fp->processArcade(ex);
return 0;
diff --git a/engines/fullpipe/scenes/scene07.cpp b/engines/fullpipe/scenes/scene07.cpp
index 207189d151..6db8c30932 100644
--- a/engines/fullpipe/scenes/scene07.cpp
+++ b/engines/fullpipe/scenes/scene07.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index 716ca1f593..a5f5a8b389 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
new file mode 100644
index 0000000000..99cf0b20fd
--- /dev/null
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -0,0 +1,747 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "fullpipe/objectnames.h"
+#include "fullpipe/constants.h"
+
+#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/scenes.h"
+#include "fullpipe/statics.h"
+
+#include "fullpipe/interaction.h"
+#include "fullpipe/behavior.h"
+
+
+namespace Fullpipe {
+
+struct Hanger {
+ StaticANIObject *ani;
+ int field_4;
+ int field_8;
+ int phase;
+};
+
+void scene09_setupGrit(Scene *sc) {
+ if (g_vars->scene09_grit->_statics->_staticsId == ST_GRT9_GRIT) {
+ if (!getGameLoaderInventory()->getCountItemsWithId(ANI_INV_COIN)) {
+ if (g_fp->getObjectState(sO_CoinSlot_1) == g_fp->getObjectEnumState(sO_CoinSlot_1, sO_Empty)
+ && (g_vars->swallowedEgg1->_value.intValue == ANI_INV_EGGBOOT || g_vars->swallowedEgg2->_value.intValue == ANI_INV_EGGBOOT || g_vars->swallowedEgg3->_value.intValue == ANI_INV_EGGBOOT)) {
+ Scene *oldsc = g_fp->_currentScene;
+ g_fp->_currentScene = sc;
+ g_vars->scene09_grit->changeStatics2(ST_GRT9_NORM);
+ g_fp->_currentScene = oldsc;
+ }
+ }
+ }
+}
+
+void scene09_initScene(Scene *sc) {
+ g_vars->scene09_flyingBall = 0;
+ g_vars->scene09_numSwallenBalls = 0;
+ g_vars->scene09_gulper = sc->getStaticANIObject1ById(ANI_GLOTATEL, -1);
+ g_vars->scene09_spitter = sc->getStaticANIObject1ById(ANI_PLEVATEL, -1);
+ g_vars->scene09_grit = sc->getStaticANIObject1ById(ANI_GRIT_9, -1);
+ g_vars->scene09_gulperIsPresent = true;
+ g_vars->scene09_dudeIsOnLadder = false;
+ g_vars->scene09_interactingHanger = -1;
+ g_vars->scene09_intHangerPhase = -1;
+ g_vars->scene09_intHangerMaxPhase = -1000;
+
+ g_vars->scene09_balls.cPlexLen = 10;
+ g_vars->scene09_flyingBalls.cPlexLen = 10;
+
+ while (g_vars->scene09_balls.numBalls) {
+ Ball *b = g_vars->scene09_balls.pHead->p0;
+
+ g_vars->scene09_balls.pHead = g_vars->scene09_balls.pHead->p0;
+
+ if (g_vars->scene09_balls.pHead)
+ g_vars->scene09_balls.pHead->p0->p1 = 0;
+ else
+ g_vars->scene09_balls.field_8 = 0;
+
+ g_vars->scene09_balls.init(&b);
+ }
+
+ g_vars->scene09_hangers.clear();
+ g_vars->scene09_numMovingHangers = 4;
+
+ StaticANIObject *hanger = sc->getStaticANIObject1ById(ANI_VISUNCHIK, -1);
+ Hanger *hng = new Hanger;
+
+ hng->ani = hanger;
+ hng->phase = 0;
+ hng->field_4 = 0;
+ hng->field_8 = 0;
+
+ g_vars->scene09_hangers.push_back(hng);
+
+ int x = 75;
+
+ for (int i = 1; x < 300; i++, x += 75) {
+ StaticANIObject *ani = new StaticANIObject(hanger);
+
+ ani->show1(x + hanger->_ox, hanger->_oy, MV_VSN_CYCLE2, 0);
+ sc->addStaticANIObject(hanger, 1);
+
+ hng = new Hanger;
+
+ hng->ani = ani;
+ hng->phase = 0;
+ hng->field_4 = 0;
+ hng->field_8 = 0;
+
+ g_vars->scene09_hangers.push_back(hng);
+ }
+
+ while (g_vars->scene09_flyingBalls.numBalls) {
+ Ball *ohead = g_vars->scene09_flyingBalls.pHead;
+
+ g_vars->scene09_flyingBalls.pHead = g_vars->scene09_flyingBalls.pHead->p0;
+
+ if (g_vars->scene09_flyingBalls.pHead)
+ ohead->p0->p1 = 0;
+ else
+ g_vars->scene09_flyingBalls.field_8 = 0;
+
+ ohead->p0 = g_vars->scene09_flyingBalls.pTail;
+
+ g_vars->scene09_flyingBalls.pTail = ohead;
+
+ g_vars->scene09_flyingBalls.numBalls--;
+ }
+
+ g_vars->scene09_flyingBalls.reset();
+
+ Ball *b9 = g_vars->scene09_flyingBalls.sub04(g_vars->scene09_flyingBalls.field_8, 0);
+
+ b9->ani = sc->getStaticANIObject1ById(ANI_BALL9, -1);
+ b9->ani->setAlpha(0xc8);
+
+ if (g_vars->scene09_flyingBalls.field_8) {
+ g_vars->scene09_flyingBalls.field_8->p0 = b9;
+ g_vars->scene09_flyingBalls.field_8 = b9;
+ } else {
+ g_vars->scene09_flyingBalls.pHead = b9;
+ g_vars->scene09_flyingBalls.field_8 = b9;
+ }
+
+ for (int i = 0; i < 4; i++) {
+ StaticANIObject *newball = new StaticANIObject(b9->ani);
+
+ newball->setAlpha(0xc8);
+
+ Ball *runPtr = g_vars->scene09_flyingBalls.pTail;
+ Ball *lastP = g_vars->scene09_flyingBalls.field_8;
+
+ if (!g_vars->scene09_flyingBalls.pTail) {
+ g_vars->scene09_flyingBalls.cPlex = (byte *)calloc(g_vars->scene09_flyingBalls.cPlexLen, sizeof(Ball));
+
+ byte *p1 = g_vars->scene09_flyingBalls.cPlex + (g_vars->scene09_flyingBalls.cPlexLen - 1) * sizeof(Ball);
+
+ if (g_vars->scene09_flyingBalls.cPlexLen - 1 < 0) {
+ runPtr = g_vars->scene09_flyingBalls.pTail;
+ } else {
+ runPtr = g_vars->scene09_flyingBalls.pTail;
+
+ for (int j = 0; j < g_vars->scene09_flyingBalls.cPlexLen; j++) {
+ ((Ball *)p1)->p1 = runPtr;
+ runPtr = (Ball *)p1;
+
+ p1 -= sizeof(Ball);
+ }
+
+ g_vars->scene09_flyingBalls.pTail = runPtr;
+ }
+ }
+
+ g_vars->scene09_flyingBalls.pTail = runPtr->p0;
+ runPtr->p1 = lastP;
+ runPtr->p0 = 0;
+ runPtr->ani = newball;
+
+ g_vars->scene09_flyingBalls.numBalls++;
+
+ if (g_vars->scene09_flyingBalls.field_8)
+ g_vars->scene09_flyingBalls.field_8->p0 = runPtr;
+ else
+ g_vars->scene09_flyingBalls.pHead = runPtr;
+
+ g_vars->scene09_flyingBalls.field_8 = runPtr;
+
+ sc->addStaticANIObject(newball, 1);
+ }
+
+ g_fp->setObjectState(sO_RightStairs_9, g_fp->getObjectEnumState(sO_RightStairs_9, sO_IsClosed));
+
+ GameVar *eggvar = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
+
+ g_vars->swallowedEgg1 = eggvar->getSubVarByName(sO_Egg1);
+ g_vars->swallowedEgg2 = eggvar->getSubVarByName(sO_Egg2);
+ g_vars->swallowedEgg3 = eggvar->getSubVarByName(sO_Egg3);
+
+ scene09_setupGrit(sc);
+
+ g_fp->initArcadeKeys("SC_9");
+
+ g_fp->lift_setButton(sO_Level1, ST_LBN_1N);
+
+ g_fp->setArcadeOverlay(PIC_CSR_ARCADE4);
+}
+
+int sceneHandler09_updateScreenCallback() {
+ int res = g_fp->drawArcadeOverlay(g_fp->_objectIdAtCursor == ANI_VISUNCHIK || g_vars->scene09_interactingHanger >= 0);
+
+ if (!res)
+ g_fp->_updateScreenCallback = 0;
+
+ return res;
+}
+
+int scene09_updateCursor() {
+ g_fp->updateCursorCommon();
+
+ if (g_vars->scene09_interactingHanger < 0) {
+ if (g_fp->_objectIdAtCursor == ANI_VISUNCHIK) {
+ if (g_fp->_cursorId == PIC_CSR_ITN)
+ g_fp->_updateScreenCallback = sceneHandler09_updateScreenCallback;
+ } else {
+ if (g_fp->_objectIdAtCursor == PIC_SC9_LADDER_R && g_fp->_cursorId == PIC_CSR_ITN)
+ g_fp->_cursorId = (g_vars->scene09_dudeY < 350) ? PIC_CSR_GOD : PIC_CSR_GOU;
+ }
+ } else {
+ g_fp->_cursorId = PIC_CSR_ITN;
+ }
+
+ return g_fp->_cursorId;
+}
+
+void sceneHandler09_winArcade() {
+ if (g_vars->scene09_gulper->_flags & 4) {
+ g_vars->scene09_gulper->changeStatics2(ST_GLT_SIT);
+ g_vars->scene09_gulper->startAnim(MV_GLT_FLYAWAY, 0, -1);
+
+ g_fp->setObjectState(sO_Jug, g_fp->getObjectEnumState(sO_Jug, sO_Unblocked));
+ g_fp->setObjectState(sO_RightStairs_9, g_fp->getObjectEnumState(sO_RightStairs_9, sO_IsOpened));
+
+ g_vars->scene09_gulperIsPresent = false;
+ }
+}
+
+void sceneHandler09_startAuntie() {
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_TTA9_GOL), 0, 1);
+
+ mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.right + 30;
+ mq->chain(0);
+}
+
+void sceneHandler09_spitterClick() {
+ if (g_vars->scene09_spitter->_flags & 4) {
+ PicAniInfo info;
+
+ g_vars->scene09_spitter->getPicAniInfo(&info);
+ g_vars->scene09_spitter->_messageQueueId = 0;
+ g_vars->scene09_spitter->changeStatics2(ST_PLV_SIT);
+
+ int x = g_vars->scene09_spitter->_ox - 10;
+ int y = g_vars->scene09_spitter->_oy + 145;
+
+ g_vars->scene09_spitter->setPicAniInfo(&info);
+
+ if (ABS(x - g_fp->_aniMan->_ox) > 1 || ABS(y - g_fp->_aniMan->_oy) > 1) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, x, y, 1, ST_MAN_UP);
+
+ if (mq) {
+ ExCommand *ex = new ExCommand(0, 17, MSG_SC9_PLVCLICK, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags = 2;
+ mq->addExCommandToEnd(ex);
+
+ postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1);
+ }
+ } else {
+ if (!g_fp->_aniMan->_movement) {
+ g_vars->scene09_spitter->changeStatics2(ST_PLV_SIT);
+ g_vars->scene09_spitter->hide();
+
+ g_fp->_aniMan->startAnim(MV_MAN9_SHOOT, 0, -1);
+
+ g_fp->stopAllSoundInstances(SND_9_006);
+ }
+
+ g_fp->_aniMan2 = 0;
+
+ if (g_fp->_sceneRect.left < 800)
+ g_fp->_currentScene->_x = 800 - g_fp->_sceneRect.left;
+ }
+ }
+}
+
+void sceneHandler09_eatBall() {
+ if (g_vars->scene09_flyingBall) {
+ g_vars->scene09_flyingBall->hide();
+
+ Ball *ball = g_vars->scene09_balls.pHead;
+
+ if (ball) {
+ while (ball && ball->ani != g_vars->scene09_flyingBall)
+ ball = ball->p0;
+
+ if (ball) {
+ if (ball == g_vars->scene09_balls.pHead)
+ g_vars->scene09_balls.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene09_balls.field_8)
+ g_vars->scene09_balls.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ ball->p0 = g_vars->scene09_balls.pTail;
+ g_vars->scene09_balls.pTail = ball;
+
+ g_vars->scene09_balls.numBalls--;
+
+ if (!g_vars->scene09_balls.numBalls)
+ g_vars->scene09_balls.reset();
+ }
+ }
+
+ ball = g_vars->scene09_flyingBalls.sub04(g_vars->scene09_flyingBalls.field_8, 0);
+ ball->ani = g_vars->scene09_flyingBall;
+
+ if (g_vars->scene09_flyingBalls.field_8)
+ g_vars->scene09_flyingBalls.field_8->p0 = ball;
+ else
+ g_vars->scene09_flyingBalls.pHead = ball;
+
+ g_vars->scene09_flyingBalls.field_8 = ball;
+
+ g_vars->scene09_flyingBall = 0;
+ g_vars->scene09_numSwallenBalls++;
+
+ if (g_vars->scene09_numSwallenBalls >= 3) {
+ MessageQueue *mq = g_vars->scene09_gulper->getMessageQueue();
+
+ if (mq) {
+ ExCommand *ex = new ExCommand(ANI_GLOTATEL, 1, MV_GLT_FLYAWAY, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+ }
+
+ g_fp->setObjectState(sO_Jug, g_fp->getObjectEnumState(sO_Jug, sO_Unblocked));
+ g_fp->setObjectState(sO_RightStairs_9, g_fp->getObjectEnumState(sO_RightStairs_9, sO_IsOpened));
+
+ g_vars->scene09_gulperIsPresent = false;
+ }
+ }
+}
+
+void sceneHandler09_showBall() {
+ if (g_vars->scene09_flyingBalls.numBalls) {
+ StaticANIObject *ani = g_vars->scene09_flyingBalls.pHead->ani;
+ Ball *ph = g_vars->scene09_flyingBalls.pHead;
+ g_vars->scene09_flyingBalls.pHead = ph->p0;
+
+ if (g_vars->scene09_flyingBalls.pHead)
+ ph->p0->p1 = 0;
+ else
+ g_vars->scene09_flyingBalls.field_8 = 0;
+
+ ph->p0 = g_vars->scene09_flyingBalls.pTail;
+
+ g_vars->scene09_flyingBalls.pTail = ph;
+ g_vars->scene09_flyingBalls.numBalls--;
+
+ if (!g_vars->scene09_flyingBalls.numBalls) {
+ g_vars->scene09_flyingBalls.numBalls = 0;
+ g_vars->scene09_flyingBalls.pTail = 0;
+ g_vars->scene09_flyingBalls.field_8 = 0;
+ g_vars->scene09_flyingBalls.pHead = 0;
+
+ free(g_vars->scene09_flyingBalls.cPlex);
+ g_vars->scene09_flyingBalls.cPlex = 0;
+ }
+
+ Ball *ball = g_vars->scene09_balls.sub04(g_vars->scene09_balls.field_8, 0);
+ ball->ani = ani;
+
+ if (g_vars->scene09_balls.field_8)
+ g_vars->scene09_balls.field_8->p0 = ball;
+ else
+ g_vars->scene09_balls.pHead = ball;
+
+ g_vars->scene09_balls.field_8 = ball;
+
+ ani->show1(g_fp->_aniMan->_ox + 94, g_fp->_aniMan->_oy - 162, MV_BALL9_EXPLODE, 0);
+ }
+}
+
+void sceneHandler09_cycleHangers() {
+ for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {
+ Movement *mov = g_vars->scene09_hangers[i]->ani->_movement;
+
+ if (mov && mov->_id == MV_VSN_CYCLE2) {
+ int idx;
+
+ if (g_vars->scene09_hangers[i]->phase >= 0)
+ idx = 18 - g_vars->scene09_hangers[i]->phase / 5;
+ else
+ idx = 18 - g_vars->scene09_hangers[i]->phase * 10 / 43;
+
+ if (idx > 38)
+ idx = 38;
+
+ if (idx < 1)
+ idx = 1;
+
+ mov->setDynamicPhaseIndex(idx);
+ }
+ }
+}
+
+void sceneHandler09_limitHangerPhase() {
+ for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {
+ if (i != g_vars->scene09_interactingHanger) {
+ g_vars->scene09_hangers[i]->phase += g_vars->scene09_hangers[i]->field_8;
+
+ if (g_vars->scene09_hangers[i]->phase > 85)
+ g_vars->scene09_hangers[i]->phase = 85;
+
+ if (g_vars->scene09_hangers[i]->phase < -85)
+ g_vars->scene09_hangers[i]->phase = -85;
+
+ if (g_vars->scene09_hangers[i]->phase < 0)
+ g_vars->scene09_hangers[i]->field_8++;
+
+ if (g_vars->scene09_hangers[i]->phase > 0)
+ g_vars->scene09_hangers[i]->field_8--;
+ }
+ }
+}
+
+void sceneHandler09_collideBall(Ball *ball) {
+ if (g_vars->scene09_gulperIsPresent) {
+ g_vars->scene09_flyingBall = ball->ani;
+
+ if (g_vars->scene09_gulper) {
+ g_vars->scene09_gulper->changeStatics2(ST_GLT_SIT);
+
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC9_EATBALL), 0, 0);
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ if (!mq->chain(g_vars->scene09_gulper))
+ delete mq;
+ }
+ }
+}
+
+void sceneHandler09_ballExplode(Ball *ball) {
+ if (ball == g_vars->scene09_balls.pHead)
+ g_vars->scene09_balls.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene09_balls.field_8)
+ g_vars->scene09_balls.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ ball->p0 = g_vars->scene09_balls.pTail;
+
+ g_vars->scene09_balls.pTail = ball;
+ g_vars->scene09_balls.numBalls--;
+
+ if (!g_vars->scene09_balls.numBalls) {
+ g_vars->scene09_balls.pTail = 0;
+ g_vars->scene09_balls.field_8 = 0;
+ g_vars->scene09_balls.pHead = 0;
+ free(g_vars->scene09_balls.cPlex);
+ g_vars->scene09_balls.cPlex = 0;
+ }
+
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC9_BALLEXPLODE), 0, 1);
+
+ mq->replaceKeyCode(-1, ball->ani->_okeyCode);
+
+ if (!mq->chain(ball->ani))
+ delete mq;
+
+ Ball *runPtr = g_vars->scene09_flyingBalls.pTail;
+ Ball *lastP = g_vars->scene09_flyingBalls.field_8;
+
+ if (!g_vars->scene09_flyingBalls.pTail) {
+ g_vars->scene09_flyingBalls.cPlex = (byte *)calloc(g_vars->scene09_flyingBalls.cPlexLen, sizeof(Ball));
+
+ byte *p1 = g_vars->scene09_flyingBalls.cPlex + (g_vars->scene09_flyingBalls.cPlexLen - 1) * sizeof(Ball);
+
+ if (g_vars->scene09_flyingBalls.cPlexLen - 1 < 0) {
+ runPtr = g_vars->scene09_flyingBalls.pTail;
+ } else {
+ runPtr = g_vars->scene09_flyingBalls.pTail;
+
+ for (int j = 0; j < g_vars->scene09_flyingBalls.cPlexLen; j++) {
+ ((Ball *)p1)->p1 = runPtr;
+ runPtr = (Ball *)p1;
+
+ p1 -= sizeof(Ball);
+ }
+
+ g_vars->scene09_flyingBalls.pTail = runPtr;
+ }
+ }
+
+ g_vars->scene09_flyingBalls.pTail = runPtr->p0;
+ runPtr->p1 = lastP;
+ runPtr->p0 = 0;
+ runPtr->ani = ball->ani;
+
+ g_vars->scene09_flyingBalls.numBalls++;
+
+ if (g_vars->scene09_flyingBalls.field_8) {
+ g_vars->scene09_flyingBalls.field_8->p0 = runPtr;
+ g_vars->scene09_flyingBalls.field_8 = runPtr;
+ } else {
+ g_vars->scene09_flyingBalls.pHead = runPtr;
+ g_vars->scene09_flyingBalls.field_8 = runPtr;
+ }
+}
+
+void sceneHandler09_checkHangerCollide() {
+ for (Ball *ball = g_vars->scene09_balls.pHead; ball; ball = ball->p0) {
+ int newx = ball->ani->_ox + 5;
+
+ ball->ani->setOXY(newx, ball->ani->_oy);
+
+ if (newx <= 1398 || g_vars->scene09_flyingBall) {
+ if (g_vars->scene09_gulperIsPresent)
+ goto LABEL_11;
+ } else if (g_vars->scene09_gulperIsPresent) {
+ sceneHandler09_collideBall(ball);
+ continue;
+ }
+
+ if (newx > 1600) {
+ sceneHandler09_ballExplode(ball);
+ continue;
+ }
+
+ LABEL_11:
+ int pixel;
+
+ for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {
+ for (int j = 0; j < 4; j++) {
+ g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->ani->_oy + g_vars->scene09_hangerOffsets[j].y, &pixel);
+
+ if (pixel) {
+ sceneHandler09_ballExplode(ball);
+ break;
+ }
+ }
+ }
+ }
+}
+
+void sceneHandler09_hangerStartCycle() {
+ StaticANIObject *ani = g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->ani;
+
+ if (ani->_movement) {
+ ani->startAnim(MV_VSN_CYCLE2, 0, -1);
+ g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->field_8 = 0;
+ g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase = g_vars->scene09_intHangerPhase + (g_fp->_mouseScreenPos.y - g_vars->scene09_clickY) / 2;
+
+ if (g_vars->scene09_intHangerMaxPhase != -1000 && g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase != g_vars->scene09_intHangerMaxPhase) {
+ ExCommand *ex = new ExCommand(0, 35, SND_9_019, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_field_14 = 1;
+ ex->_excFlags |= 2;
+ ex->postMessage();
+
+ g_vars->scene09_intHangerMaxPhase = -1000;
+ }
+ } else {
+ g_vars->scene09_interactingHanger = -1;
+ }
+}
+
+int sceneHandler09(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_CMN_WINARCADE:
+ sceneHandler09_winArcade();
+ break;
+
+ case MSG_SC9_STARTTIOTIA:
+ sceneHandler09_startAuntie();
+ break;
+
+ case MSG_SC9_FROMLADDER:
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+
+ g_vars->scene09_dudeIsOnLadder = false;
+ break;
+
+ case MSG_SC9_TOLADDER:
+ getCurrSceneSc2MotionController()->clearEnabled();
+ getGameLoaderInteractionController()->disableFlag24();
+
+ g_vars->scene09_dudeIsOnLadder = true;
+ break;
+
+ case MSG_SC9_PLVCLICK:
+ sceneHandler09_spitterClick();
+ break;
+
+ case MSG_SC9_FLOWN:
+ g_vars->scene09_gulperIsPresent = false;
+ break;
+
+ case MSG_SC9_EATBALL:
+ sceneHandler09_eatBall();
+ break;
+
+ case MSG_SC9_SHOWBALL:
+ sceneHandler09_showBall();
+ break;
+
+ case 33:
+ {
+ int res = 0;
+
+ if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ g_vars->scene09_dudeY = g_fp->_aniMan2->_oy;
+
+ if (x < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = x - g_fp->_sceneRect.left - 300;
+
+ if (x > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300;
+
+ res = 1;
+ } else {
+ if (g_fp->_aniMan->_movement && g_fp->_aniMan->_movement->_id != MV_MAN9_SHOOT)
+ g_fp->_aniMan2 = g_fp->_aniMan;
+ }
+
+ sceneHandler09_cycleHangers();
+ sceneHandler09_limitHangerPhase();
+ sceneHandler09_checkHangerCollide();
+
+ if (g_vars->scene09_interactingHanger >= 0)
+ sceneHandler09_hangerStartCycle();
+
+ g_fp->_behaviorManager->updateBehaviors();
+
+ g_fp->startSceneTrack();
+
+ return res;
+ }
+
+ case 30:
+ if (g_vars->scene09_interactingHanger >= 0) {
+ if (ABS(g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->phase) < 15) {
+ g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->ani->_callback2 = 0;
+ g_vars->scene09_hangers[g_vars->scene09_interactingHanger]->ani->changeStatics2(ST_VSN_NORMAL);
+ }
+ }
+
+ g_vars->scene09_interactingHanger = -1;
+
+ break;
+
+ case 29:
+ {
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);
+
+ if (ani) {
+ if (ani->_id == ANI_PLEVATEL) {
+ sceneHandler09_spitterClick();
+ break;
+ }
+
+ if (ani->_id == ANI_VISUNCHIK) {
+ if (g_vars->scene09_numMovingHangers > 0) {
+ int hng = 0;
+
+ while (g_vars->scene09_hangers[hng]->ani != ani) {
+ ++hng;
+
+ if (hng >= g_vars->scene09_numMovingHangers)
+ break;
+ }
+
+ g_vars->scene09_interactingHanger = hng;
+ g_vars->scene09_intHangerPhase = g_vars->scene09_hangers[hng]->phase;
+ g_vars->scene09_intHangerMaxPhase = g_vars->scene09_hangers[hng]->phase;
+
+ g_vars->scene09_clickY = cmd->_y;
+
+ if (!g_vars->scene09_hangers[hng]->ani->_movement || g_vars->scene09_hangers[hng]->ani->_movement->_id != MV_VSN_CYCLE2) {
+ g_vars->scene09_hangers[hng]->ani->changeStatics2(ST_VSN_NORMAL);
+ g_vars->scene09_hangers[hng]->ani->startAnim(MV_VSN_CYCLE2, 0, -1);
+ g_vars->scene09_hangers[hng]->ani->_callback2 = 0;
+ }
+
+ ExCommand *ex = new ExCommand(0, 35, SND_9_018, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_field_14 = 1;
+ ex->_excFlags |= 2;
+ ex->postMessage();
+ }
+
+ break;
+ }
+ }
+
+ if (g_vars->scene09_dudeIsOnLadder && g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY) == PIC_SC9_LADDER_R
+ && !cmd->_keyCode && !g_fp->_aniMan->_movement) {
+ handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC9_LADDER_R, 0), 0);
+ }
+
+ if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_keyCode)) {
+ int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0);
+
+ if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_keyCode)) {
+ if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1) || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0))
+ g_fp->processArcade(cmd);
+ }
+ }
+
+ break;
+ }
+ }
+
+ return 0;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes/scene10.cpp b/engines/fullpipe/scenes/scene10.cpp
index f8d16b2759..8c9e0b67d0 100644
--- a/engines/fullpipe/scenes/scene10.cpp
+++ b/engines/fullpipe/scenes/scene10.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -43,7 +43,7 @@ void scene10_initScene(Scene *sc) {
g_vars->scene10_ladder = sc->getPictureObjectById(PIC_SC10_LADDER, 0);
g_fp->lift_setButton(sO_Level1, ST_LBN_1N);
- g_fp->lift_sub5(sc, QU_SC10_ENTERLIFT, QU_SC10_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC10_ENTERLIFT, QU_SC10_EXITLIFT);
if (g_fp->getObjectState(sO_Inflater) == g_fp->getObjectEnumState(sO_Inflater, sO_WithGum)) {
g_vars->scene10_hasGum = 1;
@@ -140,7 +140,7 @@ int sceneHandler10(ExCommand *ex) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC10_LADDERTOBACK:
@@ -170,7 +170,7 @@ int sceneHandler10(ExCommand *ex) {
break;
case 64:
- g_fp->lift_sub05(ex);
+ g_fp->lift_hoverButton(ex);
break;
case 29:
@@ -185,7 +185,7 @@ int sceneHandler10(ExCommand *ex) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
ex->_messageKind = 0;
return 0;
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index e7ed947a00..0ce82f5d5f 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene12.cpp b/engines/fullpipe/scenes/scene12.cpp
index 0295efcaf5..f63bb9a9fd 100644
--- a/engines/fullpipe/scenes/scene12.cpp
+++ b/engines/fullpipe/scenes/scene12.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index 0a0c2f3906..c7b3c96b93 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp
index 4a09bc9cb6..21dbe8101f 100644
--- a/engines/fullpipe/scenes/scene14.cpp
+++ b/engines/fullpipe/scenes/scene14.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -72,7 +72,7 @@ void scene14_initScene(Scene *sc) {
}
g_fp->lift_setButton(sO_Level4, ST_LBN_4N);
- g_fp->lift_sub5(sc, QU_SC14_ENTERLIFT, QU_SC14_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC14_ENTERLIFT, QU_SC14_EXITLIFT);
g_fp->initArcadeKeys("SC_14");
g_fp->setArcadeOverlay(PIC_CSR_ARCADE6);
@@ -665,7 +665,7 @@ int sceneHandler14(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC14_SHOWBALLGMAHIT:
@@ -749,7 +749,7 @@ int sceneHandler14(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 33:
@@ -820,7 +820,7 @@ int sceneHandler14(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
break;
}
diff --git a/engines/fullpipe/scenes/scene15.cpp b/engines/fullpipe/scenes/scene15.cpp
index 046e9c9adc..452f2edeca 100644
--- a/engines/fullpipe/scenes/scene15.cpp
+++ b/engines/fullpipe/scenes/scene15.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -88,7 +88,7 @@ void scene15_initScene(Scene *sc) {
g_fp->_currentScene = oldsc;
g_fp->lift_setButton(sO_Level5, ST_LBN_5N);
- g_fp->lift_sub5(sc, QU_SC15_ENTERLIFT, QU_SC15_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC15_ENTERLIFT, QU_SC15_EXITLIFT);
}
int scene15_updateCursor() {
@@ -144,7 +144,7 @@ int sceneHandler15(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC15_PULL:
@@ -156,7 +156,7 @@ int sceneHandler15(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 29:
@@ -171,7 +171,7 @@ int sceneHandler15(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
}
diff --git a/engines/fullpipe/scenes/scene16.cpp b/engines/fullpipe/scenes/scene16.cpp
index b1e261287a..9ed355fdd9 100644
--- a/engines/fullpipe/scenes/scene16.cpp
+++ b/engines/fullpipe/scenes/scene16.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene17.cpp b/engines/fullpipe/scenes/scene17.cpp
index 73bf7ab1c0..d40f8cf816 100644
--- a/engines/fullpipe/scenes/scene17.cpp
+++ b/engines/fullpipe/scenes/scene17.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene18and19.cpp b/engines/fullpipe/scenes/scene18and19.cpp
index a965cfb98e..4f6677876b 100644
--- a/engines/fullpipe/scenes/scene18and19.cpp
+++ b/engines/fullpipe/scenes/scene18and19.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -36,14 +36,897 @@
namespace Fullpipe {
+struct Swinger {
+ StaticANIObject *ani;
+ int sfield_4;
+ double angle;
+ int sx;
+ int sy;
+ int ix;
+ int iy;
+ int sflags;
+ int sfield_24;
+};
+
+
+#define ANGLE(x) ((x) * M_PI / 180)
+
void scene18_preload() {
- warning("WARNING: scene18_preload()");
+ g_fp->_scene3 = 0;
+
+ for (SceneTagList::iterator s = g_fp->_gameProject->_sceneTagList->begin(); s != g_fp->_gameProject->_sceneTagList->end(); ++s) {
+ if (s->_sceneId == SC_18) {
+ g_fp->_scene3 = s->_scene;
+ s->_scene = 0;
+
+ g_fp->_scene3->getStaticANIObject1ById(ANI_WHIRLIGIG_18, -1)->freeMovementsPixelData();
+
+ break;
+ }
+ }
+}
+
+void scene18_setupEntrance() {
+ GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
+
+ if (var->getSubVarAsInt("Entrance") == TrubaRight)
+ var->setSubVarAsInt("Entrance", TrubaLeft);
+}
+
+void scene19_setSugarState(Scene *sc) {
+ if (g_fp->getObjectState(sO_Sugar) != g_fp->getObjectEnumState(sO_Sugar, sO_Present)) {
+ Scene *oldsc = g_fp->_currentScene;
+
+ g_fp->_currentScene = sc;
+ sc->getStaticANIObject1ById(ANI_CORDIE, -1)->changeStatics2(ST_CDI_EMPTY2);
+ g_fp->_currentScene = oldsc;
+ }
+}
+
+void scene19_setMovements(Scene *sc, int entranceId) {
+ if (entranceId == TrubaRight) {
+ g_vars->scene18_enteredTrubaRight = true;
+ } else {
+ g_vars->scene18_enteredTrubaRight = false;
+ g_vars->scene19_enteredTruba3 = (entranceId == PIC_SC19_RTRUBA3);
+ }
+
+ for (uint i = 0; i < g_vars->scene18_swingers.size(); i++) {
+ if (!g_vars->scene18_enteredTrubaRight && (g_vars->scene18_swingers[i]->sflags & 0x20)) {
+ Scene *oldsc = g_fp->_currentScene;
+
+ g_vars->scene18_swingers[i]->sflags = 1;
+
+ g_fp->_currentScene = sc;
+ g_vars->scene18_swingers[i]->ani->changeStatics2(ST_KSL_NORM);
+ g_vars->scene18_swingers[i]->ani->_priority = 30;
+ g_fp->_currentScene = oldsc;
+ }
+
+ sc->deleteStaticANIObject(g_vars->scene18_swingers[i]->ani);
+ }
+
+ if (g_vars->scene18_whirlgig->_movement) {
+ g_vars->scene18_whirlgigMovMum = g_vars->scene18_whirlgig->_movement->_currDynamicPhaseIndex + 1;
+
+ int mx;
+
+ if (g_vars->scene18_whirlgig->_movement->_currMovement)
+ mx = g_vars->scene18_whirlgig->_movement->_currMovement->_dynamicPhases.size();
+ else
+ mx = g_vars->scene18_whirlgig->_movement->_dynamicPhases.size();
+
+ if (g_vars->scene18_whirlgigMovMum > mx - 1)
+ g_vars->scene18_whirlgigMovMum = -1;
+ } else {
+ g_vars->scene18_whirlgigMovMum = 0;
+ }
+
+ sc->deleteStaticANIObject(g_vars->scene18_boy);
+ sc->deleteStaticANIObject(g_vars->scene18_girl);
+ sc->stopAllSounds();
+}
+
+void scene19_preload() {
+ for (SceneTagList::iterator s = g_fp->_gameProject->_sceneTagList->begin(); s != g_fp->_gameProject->_sceneTagList->end(); ++s) {
+ if (s->_sceneId == SC_18) {
+ s->_scene = g_fp->_scene3;
+
+ break;
+ }
+ }
}
-void scene19_preload(Scene *sc, int key) {
- warning("WARNING: scene19_preload()");
+void scene18_setupSwingers(StaticANIObject *ani, Scene *sc) {
+ Swinger *swinger;
+
+ g_vars->scene18_swingers.clear();
+
+ Scene *oldsc = g_fp->_currentScene;
+ g_fp->_currentScene = sc;
+
+ for (int i = 0; i < 8; i++) {
+ swinger = new Swinger;
+
+ swinger->angle = (double)i * ANGLE(45);
+ swinger->sx = g_vars->scene18_wheelCenterX - (int)(cos(swinger->angle) * -575.0);
+ swinger->sy = g_vars->scene18_wheelCenterY - (int)(sin(swinger->angle) * -575.0) + 87;
+ swinger->ix = swinger->sx;
+ swinger->iy = swinger->sy;
+
+ if (i) {
+ StaticANIObject *newani = new StaticANIObject(ani);
+
+ ani = newani;
+
+ swinger->ani = newani;
+ swinger->sflags = 2;
+
+ sc->addStaticANIObject(newani, 1);
+ } else {
+ swinger->ani = ani;
+ swinger->sflags = g_vars->scene18_girlIsSwinging ? 4 : 1;
+ }
+
+ ani->_statics = ani->getStaticsById(ST_KSL_NORM);
+ //ani->_movement = 0;
+ ani->setOXY(swinger->sx, swinger->sy);
+ ani->_priority = 30;
+ ani->_flags |= 4;
+
+ if (swinger->sflags & 2)
+ ani->startAnim(MV_KSL_SWINGBOY, 0, -1);
+ else if (swinger->sflags & 4)
+ ani->startAnim(MV_KSL_SWINGGIRL, 0, -1);
+ else
+ ani->startAnim(MV_KSL_SWING, 0, -1);
+
+ ani->_movement->setDynamicPhaseIndex(g_fp->_rnd->getRandomNumber(17));
+
+ g_vars->scene18_swingers.push_back(swinger);
+ }
+
+ g_fp->_currentScene = oldsc;
}
+void scene18_initScene1(Scene *sc) {
+ PicAniInfo info;
+
+ int oldx = g_vars->scene18_wheelCenterX;
+ int oldy = g_vars->scene18_wheelCenterY;
+
+ g_vars->scene18_girlIsSwinging = (g_fp->getObjectState(sO_Girl) == g_fp->getObjectEnumState(sO_Girl, sO_IsSwinging));
+
+ if (sc->_sceneId == SC_18) {
+ g_vars->scene18_whirlgig = sc->getStaticANIObject1ById(ANI_WHIRLIGIG_18, -1);
+ g_vars->scene18_wheelCenterX = 1032;
+ g_vars->scene18_wheelCenterY = -318;
+ } else {
+ g_vars->scene18_whirlgig = sc->getStaticANIObject1ById(ANI_WHIRLGIG_19, -1);
+ g_vars->scene18_wheelCenterX = 1024;
+ g_vars->scene18_wheelCenterY = 242;
+ }
+
+ int newx = g_vars->scene18_wheelCenterX - oldx;
+ int newy = g_vars->scene18_wheelCenterY - oldy;
+
+ g_vars->scene18_boyJumpX += newx;
+ g_vars->scene18_boyJumpY += newy;
+ g_vars->scene18_girlJumpX += newx;
+ g_vars->scene18_girlJumpY += newy;
+
+ for (uint i = 0; i < g_vars->scene18_swingers.size(); i++) {
+ g_vars->scene18_swingers[i]->ani->getPicAniInfo(&info);
+ sc->addStaticANIObject(g_vars->scene18_swingers[i]->ani, 1);
+ g_vars->scene18_swingers[i]->ani->setPicAniInfo(&info);
+
+ g_vars->scene18_swingers[i]->sx += newx;
+ g_vars->scene18_swingers[i]->sy += newy;
+ g_vars->scene18_swingers[i]->ix += newx;
+ g_vars->scene18_swingers[i]->iy += newy;
+
+ GameObject *go;
+
+ if (g_vars->scene18_swingers[i]->ani->_movement)
+ go = g_vars->scene18_swingers[i]->ani->_movement;
+ else
+ go = g_vars->scene18_swingers[i]->ani;
+
+ go->setOXY(newx + go->_ox, newy + go->_oy);
+ }
+
+ if (g_vars->scene18_bridgeIsConvoluted && g_vars->scene18_whirlgigMovMum != -1) {
+ g_vars->scene18_whirlgig->startAnim(sc->_sceneId != SC_18 ? MV_WHR19_SPIN : MV_WHR18_SPIN, 0, -1);
+ g_vars->scene18_whirlgig->_movement->setDynamicPhaseIndex(g_vars->scene18_whirlgigMovMum);
+ }
+
+ int sndid;
+
+ if (sc->_sceneId == SC_19) {
+ if (g_vars->scene18_bridgeIsConvoluted)
+ sndid = SND_19_015;
+ else
+ sndid = SND_19_016;
+ } else {
+ if (g_vars->scene18_bridgeIsConvoluted)
+ sndid = SND_18_006;
+ else
+ sndid = SND_18_010;
+ }
+
+ g_fp->playSound(sndid, 1);
+
+ g_vars->scene18_boy->getPicAniInfo(&info);
+ sc->addStaticANIObject(g_vars->scene18_boy, 1);
+ g_vars->scene18_boy->setPicAniInfo(&info);
+
+ int x, y;
+
+ if (g_vars->scene18_boy->_movement) {
+ x = g_vars->scene18_boy->_movement->_ox;
+ y = g_vars->scene18_boy->_movement->_oy;
+ } else {
+ x = g_vars->scene18_boy->_ox;
+ y = g_vars->scene18_boy->_oy;
+ }
+
+ g_vars->scene18_boy->setOXY(newx + x, newy + y);
+
+ g_vars->scene18_girl->getPicAniInfo(&info);
+ sc->addStaticANIObject(g_vars->scene18_girl, 1);
+ g_vars->scene18_girl->setPicAniInfo(&info);
+
+ if (g_vars->scene18_girl->_movement) {
+ x = g_vars->scene18_girl->_movement->_ox;
+ y = g_vars->scene18_girl->_movement->_oy;
+ } else {
+ x = g_vars->scene18_girl->_ox;
+ y = g_vars->scene18_girl->_oy;
+ }
+
+ g_vars->scene18_girl->setOXY(newx + x, newy + y);
+
+ g_vars->scene18_wheelFlipper = false;
+ g_vars->scene18_jumpDistance = -1;
+ g_vars->scene18_jumpAngle = -1;
+
+ if (g_vars->scene18_enteredTrubaRight) {
+ if (sc->_sceneId == SC_19)
+ g_fp->_aniMan2 = 0;
+ else
+ g_fp->_aniMan2 = g_vars->scene18_swingers[g_vars->scene18_manWheelPosTo]->ani;
+ } else {
+ g_fp->_aniMan2 = g_fp->_aniMan;
+ }
+}
+
+void scene18_initScene2(Scene *sc) {
+ g_vars->scene18_whirlgig = sc->getStaticANIObject1ById(ANI_WHIRLIGIG_18, -1);
+ g_vars->scene18_wheelCenterX = 1032;
+ g_vars->scene18_wheelCenterY = -318;
+
+ StaticANIObject *armchair = sc->getStaticANIObject1ById(ANI_KRESLO, -1);
+
+ armchair->loadMovementsPixelData();
+
+ g_vars->scene18_girlIsSwinging = (g_fp->getObjectState(sO_Girl) == g_fp->getObjectEnumState(sO_Girl, sO_IsSwinging));
+
+ if (g_fp->getObjectState(sO_Bridge) == g_fp->getObjectEnumState(sO_Bridge, sO_Convoluted)) {
+ g_vars->scene18_bridgeIsConvoluted = true;
+ g_fp->playSound(SND_18_006, 1);
+ } else {
+ g_vars->scene18_bridgeIsConvoluted = false;
+ g_fp->playSound(SND_18_010, 1);
+ }
+
+ scene18_setupSwingers(armchair, sc);
+
+ g_vars->scene18_rotationCounter = 0;
+ g_vars->scene18_wheelFlipper = false;
+ g_vars->scene18_wheelIsTurning = true;
+ g_vars->scene18_kidIsOnWheel = -1;
+ g_vars->scene18_boyIsOnWheel = 0;
+ g_vars->scene18_girlIsOnWheel = 0;
+ g_vars->scene18_boyJumpedOff = true;
+ g_vars->scene18_manWheelPosTo = -1;
+ g_vars->scene18_jumpDistance = -1;
+ g_vars->scene18_jumpAngle = -1;
+ g_vars->scene18_manIsReady = false;
+ g_vars->scene18_enteredTrubaRight = 0;
+ g_vars->scene18_boy = sc->getStaticANIObject1ById(ANI_BOY18, -1);
+ g_vars->scene18_girl = sc->getStaticANIObject1ById(ANI_GIRL18, -1);
+ g_vars->scene18_domino = sc->getStaticANIObject1ById(ANI_DOMINO_18, -1);
+ g_vars->scene18_boyJumpX = 290;
+ g_vars->scene18_boyJumpY = -363;
+ g_vars->scene18_girlJumpX = 283;
+ g_vars->scene18_girlJumpY = -350;
+
+ g_fp->initArcadeKeys("SC_18");
+}
+
+void scene19_initScene2() {
+ g_fp->_aniMan2 = 0;
+}
+
+int scene18_updateCursor() {
+ if (g_vars->scene18_enteredTrubaRight) {
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ } else {
+ g_fp->updateCursorCommon();
+
+ if (g_fp->_cursorId == PIC_CSR_ITN) {
+ if (g_fp->_objectIdAtCursor == PIC_SC18_LADDER1) {
+ g_fp->_cursorId = (g_vars->scene18_manY <= 250) ? PIC_CSR_GOD : PIC_CSR_GOU;
+ } else if (g_fp->_objectIdAtCursor == PIC_SC18_LADDER2 || g_fp->_objectIdAtCursor == PIC_SC18_LADDER3) {
+ g_fp->_cursorId = PIC_CSR_GOU;
+ }
+ } else if (g_fp->_cursorId == PIC_CSR_DEFAULT && g_fp->_objectIdAtCursor == PIC_SC18_DOMIN && g_vars->scene18_domino && (g_vars->scene18_domino->_flags & 4)) {
+ g_fp->_cursorId = PIC_CSR_ITN;
+ }
+ }
+
+ return g_fp->_cursorId;
+}
+
+int scene19_updateCursor() {
+ g_fp->updateCursorCommon();
+
+ if (g_fp->_objectIdAtCursor == PIC_SC19_RTRUBA31)
+ g_fp->_cursorId = g_vars->scene19_enteredTruba3 ? PIC_CSR_GOR : PIC_CSR_DEFAULT;
+
+ return g_fp->_cursorId;
+}
+
+void sceneHandler18_clickBoard() {
+ if (ABS(967 - g_fp->_aniMan->_ox) > 1 || ABS(379 - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 967, 379, 1, ST_MAN_RIGHT);
+ ExCommand *ex = new ExCommand(0, 17, MSG_SC18_MANREADY, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags = 2;
+
+ mq->addExCommandToEnd(ex);
+
+ postExCommand(g_fp->_aniMan->_id, 2, 967, 379, 0, -1);
+ } else {
+ g_vars->scene18_manIsReady = true;
+ }
+}
+
+void sceneHandler18_showManJumpTo() {
+ g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT);
+ g_fp->_aniMan->_flags &= 0xFFFB;
+ g_fp->_aniMan->_flags &= 0xFEFF;
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPosTo]->sflags = 0x20;
+
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPosTo]->ani->changeStatics2(ST_KSL_JUMPMAN);
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPosTo]->ani->startAnim(MV_KSL_INMAN, 0, -1);
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPosTo]->ani->_priority = 20;
+
+ g_vars->scene18_manIsReady = false;
+ g_vars->scene18_enteredTrubaRight = true;
+
+ g_fp->_aniMan2 = g_vars->scene18_swingers[g_vars->scene18_manWheelPosTo]->ani;
+}
+
+void sceneHandler18and19_showManJump() {
+ int x, y;
+
+ if (g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->_movement) {
+ x = g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->_movement->_ox;
+ y = g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->_movement->_oy;
+ } else {
+ x = g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->_ox;
+ y = g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->_oy;
+ }
+
+ g_fp->_aniMan->show1(x + 62, y + 5, MV_MAN18_JUMPTOTRUBA, 0);
+ g_fp->_aniMan->_priority = 35;
+
+ int mqid = 0;
+
+ if (g_vars->scene18_jumpDistance == 1) {
+ mqid = QU_SC19_MANJUMP1;
+ } else if (g_vars->scene18_jumpDistance == 2) {
+ mqid = QU_SC19_MANJUMP2;
+ } else if (g_vars->scene18_jumpDistance == 3) {
+ mqid = QU_SC19_MANJUMP3;
+ }
+
+ if (mqid) {
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(mqid), 0, 0);
+
+ g_fp->_aniMan2 = g_fp->_aniMan;
+ g_vars->scene18_enteredTrubaRight = false;
+
+ mq->setFlags(mq->getFlags() | 1);
+ mq->chain(0);
+ }
+
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->sflags = 1;
+
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->changeStatics2(ST_KSL_NORM);
+ g_vars->scene18_swingers[g_vars->scene18_manWheelPos]->ani->_priority = 30;
+}
+
+void sceneHandler18and19_showGirlJumpTo() {
+ g_vars->scene18_girl->stopAnim_maybe();
+ g_vars->scene18_girl->hide();
+
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPosTo]->sflags = 4;
+
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPosTo]->ani->changeStatics2(ST_KSL_JUMPGIRL);
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPosTo]->ani->startAnim(MV_KSL_INGIRL, 0, -1);
+
+ g_vars->scene18_kidIsOnWheel--;
+ g_vars->scene18_girlIsOnWheel--;
+}
+
+void sceneHandler18and19_showGirlJump() {
+ StaticANIObject *ani = g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->ani;
+ int x, y;
+
+ if (ani->_movement) {
+ x = ani->_movement->_ox;
+ y = ani->_movement->_oy;
+ } else {
+ x = ani->_ox;
+ y = ani->_oy;
+ }
+
+ g_vars->scene18_girl->show1(x - 62, y - 10, MV_GRL18_JUMPFROM, 0);
+ g_vars->scene18_girl->_priority = 50;
+ g_vars->scene18_girl->startAnim(MV_GRL18_JUMPFROM, 0, -1);
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->sflags = 1;
+
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->ani->changeStatics2(ST_KSL_REACT);
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->ani->startAnim(MV_KSL_CALMDOWN, 0, -1);
+
+ g_vars->scene18_kidIsOnWheel = 1;
+ g_vars->scene18_girlIsOnWheel++;
+}
+
+void sceneHandler18and19_showBoyJumpTo() {
+ g_vars->scene18_boy->stopAnim_maybe();
+ g_vars->scene18_boy->hide();
+
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPosTo]->sflags = 2;
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPosTo]->ani->changeStatics2(ST_KSL_JUMPBOY);
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPosTo]->ani->startAnim(MV_KSL_INBOY, 0, -1);
+
+ g_vars->scene18_kidIsOnWheel--;
+ g_vars->scene18_boyIsOnWheel--;
+}
+
+void sceneHandler18and19_showBoyJump() {
+ StaticANIObject *ani = g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->ani;
+ int x, y;
+
+ if (ani->_movement) {
+ x = ani->_movement->_ox;
+ y = ani->_movement->_oy;
+ } else {
+ x = ani->_ox;
+ y = ani->_oy;
+ }
+
+ g_vars->scene18_boy->show1(x - 48, y + 8, MV_BOY18_JUMPFROM, 0);
+ g_vars->scene18_boy->_priority = 50;
+ g_vars->scene18_boy->startAnim(MV_BOY18_JUMPFROM, 0, -1);
+
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->sflags = 1;
+
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->ani->changeStatics2(ST_KSL_REACT);
+ g_vars->scene18_swingers[g_vars->scene18_kidWheelPos]->ani->startAnim(MV_KSL_CALMDOWN, 0, -1);
+
+ g_vars->scene18_boyJumpedOff = true;
+}
+
+void sceneHandler18and19_boyJumpTo() {
+ g_vars->scene18_boy->stopAnim_maybe();
+ g_vars->scene18_boy->show1(g_vars->scene18_boyJumpX, g_vars->scene18_boyJumpY, MV_BOY18_JUMPTO, 0);
+ g_vars->scene18_boy->_priority = 50;
+ g_vars->scene18_boy->startAnim(MV_BOY18_JUMPTO, 0, -1);
+}
+
+void sceneHandler18and19_girlJumpTo() {
+ g_vars->scene18_girl->stopAnim_maybe();
+ g_vars->scene18_girl->show1(g_vars->scene18_girlJumpX, g_vars->scene18_girlJumpY, MV_GRL18_JUMPTO, 0);
+ g_vars->scene18_girl->_priority = 50;
+ g_vars->scene18_girl->startAnim(MV_GRL18_JUMPTO, 0, -1);
+}
+
+void sceneHandler18and19_manStandArmchair() {
+ g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT);
+ g_fp->_aniMan->_flags |= 1;
+ g_fp->_aniMan->_priority = 35;
+ g_fp->_aniMan->startAnim(MV_MAN18_STANDKRESLO, 0, -1);
+}
+
+void sceneHandler18and19_drawRiders() {
+ g_vars->scene18_rotationCounter++;
+
+ if (g_vars->scene18_rotationCounter >= 359)
+ g_vars->scene18_rotationCounter = 0;
+
+ for (uint i = 0; i < g_vars->scene18_swingers.size(); i++) {
+ Swinger *swinger = g_vars->scene18_swingers[i];
+
+ double oldangle = swinger->angle;
+
+ swinger->angle += ANGLE(1);
+
+ if (swinger->angle > ANGLE(360)) {
+ swinger->angle -= ANGLE(360);
+ oldangle -= ANGLE(360);
+ }
+
+ int ix = g_vars->scene18_wheelCenterX - (int)(cos(swinger->angle) * -575.0);
+ int iy = g_vars->scene18_wheelCenterY - (int)(sin(swinger->angle) * -575.0) + 87;
+
+ if (!g_vars->scene18_rotationCounter) {
+ ix = swinger->sx;
+ iy = swinger->sy;
+ swinger->angle = (double)i * ANGLE(45);
+ }
+
+ if (swinger->ani->_movement)
+ swinger->ani->setOXY(ix - swinger->ix + swinger->ani->_movement->_ox, iy - swinger->iy + swinger->ani->_movement->_oy);
+ else
+ swinger->ani->setOXY(ix - swinger->ix + swinger->ani->_ox, iy - swinger->iy + swinger->ani->_oy);
+
+ swinger->ix = ix;
+ swinger->iy = iy;
+
+ if (!swinger->ani->_movement) {
+ int mv = 0;
+
+ if (swinger->sflags & 2) {
+ mv = MV_KSL_SWINGBOY;
+ } else if (swinger->sflags & 4) {
+ mv = MV_KSL_SWINGGIRL;
+ } else if (swinger->sflags & 0x20) {
+ mv = MV_KSL_SWINGMAN;
+ } else if (swinger->sflags & 1) {
+ mv = MV_KSL_SWING;
+ }
+
+ if (mv)
+ swinger->ani->startAnim(mv, 0, -1);
+
+ if (swinger->ani->_movement)
+ swinger->ani->_movement->_counter = 0;
+ }
+
+ if (g_vars->scene18_wheelIsTurning) {
+ if ((swinger->sflags & 2) && swinger->angle >= ANGLE(160) && oldangle < ANGLE(160)) {
+ swinger->sflags = 8;
+ swinger->ani->changeStatics2(ST_KSL_BOY);
+ swinger->ani->startAnim(MV_KSL_JUMPBOY, 0, -1);
+ g_vars->scene18_kidWheelPos = i;
+ } else if ((swinger->sflags & 4) && swinger->angle >= ANGLE(162) && oldangle < ANGLE(162)) {
+ swinger->sflags = 16;
+ swinger->ani->changeStatics2(ST_KSL_GIRL);
+ swinger->ani->startAnim(MV_KSL_JUMPGIRL, 0, -1);
+ g_vars->scene18_kidWheelPos = i;
+ } else if (g_vars->scene18_kidIsOnWheel) {
+ if (g_vars->scene18_boyIsOnWheel > 0 && (swinger->sflags & 1) && swinger->angle >= ANGLE(185) && oldangle < ANGLE(185)) {
+ g_vars->scene18_kidWheelPosTo = i;
+ sceneHandler18and19_boyJumpTo();
+ }
+ } else if (g_vars->scene18_girlIsOnWheel > 0 && (swinger->sflags & 1) && swinger->angle >= ANGLE(187) && oldangle < ANGLE(187)) {
+ g_vars->scene18_kidWheelPosTo = i;
+ sceneHandler18and19_girlJumpTo();
+ }
+
+ if (swinger->angle >= ANGLE(200) && oldangle < ANGLE(200)) {
+ if (g_vars->scene18_boyJumpedOff)
+ g_vars->scene18_boyIsOnWheel++;
+
+ g_vars->scene18_boyJumpedOff = false;
+ }
+ }
+
+ if (g_vars->scene18_manIsReady && (swinger->sflags & 1) && swinger->angle >= ANGLE(83) && oldangle < ANGLE(83)) {
+ g_vars->scene18_manWheelPosTo = i;
+ sceneHandler18and19_manStandArmchair();
+ }
+
+ if (!g_vars->scene18_enteredTrubaRight)
+ continue;
+
+ if ((int)i == g_vars->scene18_manWheelPosTo) {
+ if (swinger->angle >= ANGLE(170) && oldangle < ANGLE(170)) {
+ g_fp->_gameLoader->preloadScene(SC_18, TrubaRight);
+ } else if (swinger->angle >= ANGLE(25) && oldangle < ANGLE(25)) {
+ g_fp->_gameLoader->preloadScene(SC_19, TrubaRight);
+ } else if (swinger->angle >= ANGLE(270) && oldangle < ANGLE(270)) {
+ g_fp->_sceneRect.translate(1200, 0);
+ }
+ }
+
+ if (g_vars->scene18_jumpDistance > 0) {
+ if (swinger->sflags & 0x20) {
+ double newa = (double)g_vars->scene18_jumpAngle * ANGLE(1);
+
+ if (newa <= swinger->angle && oldangle < newa) {
+ swinger->ani->changeStatics2(ST_KSL_MAN);
+ swinger->ani->startAnim(MV_KSL_JUMPMAN, 0, -1);
+ swinger->ani->_priority = 35;
+
+ g_vars->scene18_manWheelPos = i;
+ }
+ }
+ }
+ }
+}
+
+void sceneHandler18and19_animateRiders() {
+ for (uint i = 0; i < g_vars->scene18_swingers.size(); i++) {
+ Swinger *swinger = g_vars->scene18_swingers[i];
+
+ if (!swinger->ani->_movement) {
+ int mv = 0;
+
+ if (swinger->sflags & 2)
+ mv = MV_KSL_SWINGBOY;
+ else if (swinger->sflags & 4)
+ mv = MV_KSL_SWINGGIRL;
+ else if (swinger->sflags & 0x20)
+ mv = MV_KSL_SWINGMAN;
+
+ if (mv)
+ swinger->ani->startAnim(mv, 0, -1);
+
+ if (swinger->ani->_movement)
+ swinger->ani->_movement->_counter = 0;
+ }
+ }
+}
+
+int sceneHandler18(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_SC18_CLICKBOARD:
+ sceneHandler18_clickBoard();
+ break;
+
+ case MSG_SC3_HIDEDOMINO:
+ g_vars->scene18_domino->_flags &= 0xFFFB;
+ break;
+
+ case MSG_SC18_SHOWMANJUMP:
+ sceneHandler18and19_showManJump();
+ break;
+
+ case MSG_SC18_MANREADY:
+ g_vars->scene18_manIsReady = true;
+ break;
+
+ case MSG_SC18_SHOWMANJUMPTO:
+ sceneHandler18_showManJumpTo();
+ break;
+
+ case MSG_SC18_SHOWGIRLJUMPTO:
+ sceneHandler18and19_showGirlJumpTo();
+ break;
+
+ case MSG_SC18_SHOWGIRLJUMP:
+ sceneHandler18and19_showGirlJump();
+ break;
+
+ case MSG_SC18_SHOWBOYJUMPTO:
+ sceneHandler18and19_showBoyJumpTo();
+ break;
+
+ case MSG_SC18_SHOWBOYJUMP:
+ sceneHandler18and19_showBoyJump();
+ break;
+
+ case 29:
+ {
+ if (g_vars->scene18_enteredTrubaRight) {
+ cmd->_messageKind = 0;
+
+ break;
+ }
+
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+
+ if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_keyCode)) {
+ int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0);
+
+ if (pic && pic->_id == PIC_SC18_DOMIN && g_vars->scene18_domino
+ && (g_vars->scene18_domino->_flags & 4) && g_fp->_aniMan->isIdle()) {
+ if (!(g_fp->_aniMan->_flags & 0x100) && g_fp->_msgObjectId2 != g_vars->scene18_domino->_id) {
+ handleObjectInteraction(g_fp->_aniMan, g_vars->scene18_domino, cmd->_keyCode);
+ cmd->_messageKind = 0;
+
+ break;
+ }
+ }
+
+ if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_keyCode)) {
+ if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
+ || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) {
+ g_fp->processArcade(cmd);
+
+ g_vars->scene18_manIsReady = false;
+
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ case 33:
+ if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ g_vars->scene18_manY = g_fp->_aniMan2->_oy;
+
+ if (x < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
+
+ if (x > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+ }
+
+ if (g_vars->scene18_manIsReady && g_fp->_aniMan->_movement)
+ g_vars->scene18_manIsReady = false;
+
+ if (g_vars->scene18_bridgeIsConvoluted) {
+ if (!g_vars->scene18_wheelFlipper)
+ sceneHandler18and19_drawRiders();
+
+ g_vars->scene18_wheelFlipper = !g_vars->scene18_wheelFlipper;
+
+ if (!g_vars->scene18_whirlgig->_movement) {
+ g_vars->scene18_whirlgig->startAnim(MV_WHR18_SPIN, 0, -1);
+ g_fp->_behaviorManager->updateBehaviors();
+
+ break;
+ }
+ } else {
+ sceneHandler18and19_animateRiders();
+ }
+
+ g_fp->_behaviorManager->updateBehaviors();
+
+ break;
+ }
+
+ return 0;
+}
+
+void sceneHandler19_updateNumRides() {
+ int numRides = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarAsInt(sO_DudeSwinged) + 1;
+
+ if (numRides > 1) {
+ g_fp->setObjectState(sO_Girl, g_fp->getObjectEnumState(sO_Girl, sO_IsSwinging));
+
+ g_vars->scene18_kidIsOnWheel = 1;
+ g_vars->scene18_girlIsOnWheel++;
+
+ numRides = 0;
+ }
+
+ g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->setSubVarAsInt(sO_DudeSwinged, numRides);
+}
+
+int sceneHandler19(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_SC18_SHOWMANJUMP:
+ sceneHandler18and19_showManJump();
+ break;
+
+ case MSG_SC19_UPDATENUMRIDES:
+ sceneHandler19_updateNumRides();
+ break;
+
+ case MSG_SC18_SHOWGIRLJUMPTO:
+ sceneHandler18and19_showGirlJumpTo();
+ break;
+
+ case MSG_SC18_SHOWBOYJUMPTO:
+ sceneHandler18and19_showBoyJumpTo();
+ break;
+
+ case MSG_SC18_SHOWGIRLJUMP:
+ sceneHandler18and19_showGirlJump();
+ break;
+
+ case MSG_SC18_SHOWBOYJUMP:
+ sceneHandler18and19_showBoyJump();
+ break;
+
+ case 29:
+ if (g_vars->scene18_enteredTrubaRight) {
+ switch (g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY)) {
+ case PIC_SC19_RTRUBA1:
+ g_vars->scene18_jumpDistance = 1;
+ g_vars->scene18_jumpAngle = 331;
+ cmd->_messageKind = 0;
+ break;
+
+ case PIC_SC19_RTRUBA2:
+ g_vars->scene18_jumpDistance = 2;
+ g_vars->scene18_jumpAngle = 350;
+ cmd->_messageKind = 0;
+ break;
+
+ case PIC_SC19_RTRUBA3:
+ g_vars->scene18_jumpDistance = 3;
+ g_vars->scene18_jumpAngle = 9;
+ cmd->_messageKind = 0;
+ break;
+
+ default:
+ g_vars->scene18_jumpDistance = -1;
+ g_vars->scene18_jumpAngle = -1;
+ cmd->_messageKind = 0;
+ break;
+ }
+ break;
+ }
+
+ if (g_vars->scene19_enteredTruba3) {
+ if (g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY) == PIC_SC19_RTRUBA3) {
+ if (g_fp->_aniMan->isIdle()) {
+ if (!(g_fp->_aniMan->_flags & 0x100)) {
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(PIC_SC19_RTRUBA31, 0);
+
+ handleObjectInteraction(g_fp->_aniMan, pic, cmd->_keyCode);
+ break;
+ }
+ }
+ }
+ }
+ break;
+
+ case 33:
+ if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ g_vars->scene18_manY = g_fp->_aniMan2->_oy;
+
+ if (x < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
+
+ if (x > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+ }
+
+ if (g_vars->scene18_bridgeIsConvoluted) {
+ if (!g_vars->scene18_wheelFlipper)
+ sceneHandler18and19_drawRiders();
+
+ g_vars->scene18_wheelFlipper = !g_vars->scene18_wheelFlipper;
+
+ if (!g_vars->scene18_whirlgig->_movement) {
+ g_vars->scene18_whirlgig->startAnim(MV_WHR19_SPIN, 0, -1);
+
+ g_fp->_behaviorManager->updateBehaviors();
+
+ break;
+ }
+ } else {
+ sceneHandler18and19_animateRiders();
+ }
+
+ g_fp->_behaviorManager->updateBehaviors();
+
+ break;
+ }
+
+ return 0;
+}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes/scene20.cpp b/engines/fullpipe/scenes/scene20.cpp
index 5fed24aabd..7f19f175cc 100644
--- a/engines/fullpipe/scenes/scene20.cpp
+++ b/engines/fullpipe/scenes/scene20.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene21.cpp b/engines/fullpipe/scenes/scene21.cpp
index 5a6509964d..8918515431 100644
--- a/engines/fullpipe/scenes/scene21.cpp
+++ b/engines/fullpipe/scenes/scene21.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp
index 13c9ab36e9..542834b51a 100644
--- a/engines/fullpipe/scenes/scene22.cpp
+++ b/engines/fullpipe/scenes/scene22.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene23.cpp b/engines/fullpipe/scenes/scene23.cpp
index 1f2587eba4..ccfbac9223 100644
--- a/engines/fullpipe/scenes/scene23.cpp
+++ b/engines/fullpipe/scenes/scene23.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene24.cpp b/engines/fullpipe/scenes/scene24.cpp
index 508f776573..2eb536df3f 100644
--- a/engines/fullpipe/scenes/scene24.cpp
+++ b/engines/fullpipe/scenes/scene24.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene25.cpp b/engines/fullpipe/scenes/scene25.cpp
index ba07c3e5b9..fae311efad 100644
--- a/engines/fullpipe/scenes/scene25.cpp
+++ b/engines/fullpipe/scenes/scene25.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene26.cpp b/engines/fullpipe/scenes/scene26.cpp
index 91679347e6..b9d9161e7d 100644
--- a/engines/fullpipe/scenes/scene26.cpp
+++ b/engines/fullpipe/scenes/scene26.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp
new file mode 100644
index 0000000000..1431ceffba
--- /dev/null
+++ b/engines/fullpipe/scenes/scene27.cpp
@@ -0,0 +1,759 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "fullpipe/objectnames.h"
+#include "fullpipe/constants.h"
+
+#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/scenes.h"
+#include "fullpipe/statics.h"
+
+#include "fullpipe/interaction.h"
+#include "fullpipe/behavior.h"
+
+#define DBG 0
+
+namespace Fullpipe {
+
+struct Bat {
+ StaticANIObject *ani;
+ int field_4;
+ double power;
+ double field_10;
+ double currX;
+ double currY;
+ double powerCos;
+ double powerSin;
+};
+
+void scene27_initScene(Scene *sc) {
+ g_vars->scene27_hitZone = sc->getPictureObjectById(PIC_SC27_HITZONE2, 0);
+ g_vars->scene27_driver = sc->getStaticANIObject1ById(ANI_VODILLA, -1);
+ g_vars->scene27_maid = sc->getStaticANIObject1ById(ANI_MAID, -1);
+ g_vars->scene27_batHandler = sc->getStaticANIObject1ById(ANI_BITAHANDLER, -1);
+
+ g_vars->scene27_balls.numBalls = 0;
+ g_vars->scene27_balls.pTail = 0;
+ g_vars->scene27_balls.field_8 = 0;
+ g_vars->scene27_balls.pHead = 0;
+ g_vars->scene27_balls.cPlexLen = 10;
+
+ free(g_vars->scene27_balls.cPlex);
+ g_vars->scene27_balls.cPlex = 0;
+
+ g_vars->scene27_bats.clear();
+ g_vars->scene27_var07.clear();
+
+ g_vars->scene27_driverHasVent = true;
+ g_vars->scene27_bat = sc->getStaticANIObject1ById(ANI_BITA, -1);
+
+ for (int i = 0; i < 4; i++) {
+ StaticANIObject *newbat = new StaticANIObject(g_vars->scene27_bat);
+
+ Ball *runPtr = g_vars->scene27_balls.pTail;
+ Ball *lastP = g_vars->scene27_balls.field_8;
+
+ if (!g_vars->scene27_balls.pTail) {
+ g_vars->scene27_balls.cPlex = (byte *)calloc(g_vars->scene27_balls.cPlexLen, sizeof(Ball));
+
+ byte *p1 = g_vars->scene27_balls.cPlex + (g_vars->scene27_balls.cPlexLen - 1) * sizeof(Ball);
+
+ if (g_vars->scene27_balls.cPlexLen - 1 < 0) {
+ runPtr = g_vars->scene27_balls.pTail;
+ } else {
+ runPtr = g_vars->scene27_balls.pTail;
+
+ for (int j = 0; j < g_vars->scene27_balls.cPlexLen; j++) {
+ ((Ball *)p1)->p1 = runPtr;
+ runPtr = (Ball *)p1;
+
+ p1 -= sizeof(Ball);
+ }
+
+ g_vars->scene27_balls.pTail = runPtr;
+ }
+ }
+
+ g_vars->scene27_balls.pTail = runPtr->p0;
+ runPtr->p1 = lastP;
+ runPtr->p0 = 0;
+ runPtr->ani = newbat;
+
+ g_vars->scene27_balls.numBalls++;
+
+ if (g_vars->scene27_balls.field_8)
+ g_vars->scene27_balls.field_8->p0 = runPtr;
+ else
+ g_vars->scene27_balls.pHead = runPtr;
+
+ g_vars->scene27_balls.field_8 = runPtr;
+
+ sc->addStaticANIObject(newbat, 1);
+ }
+
+ g_vars->scene27_dudeIsAiming = false;
+ g_vars->scene27_maxPhaseReached = false;
+ g_vars->scene27_wipeIsNeeded = false;
+ g_vars->scene27_driverPushedButton = false;
+ g_vars->scene27_numLostBats = 0;
+ g_vars->scene27_knockCount = 0;
+ g_vars->scene27_launchPhase = 0;
+
+ Scene *oldsc = g_fp->_currentScene;
+ g_fp->_currentScene = sc;
+
+ if (g_fp->getObjectState(sO_Maid) == g_fp->getObjectEnumState(sO_Maid, sO_WithSwab)) {
+ g_vars->scene27_maid->changeStatics2(ST_MID_SWAB2);
+ } else if (g_fp->getObjectState(sO_Maid) == g_fp->getObjectEnumState(sO_Maid, sO_WithBroom)) {
+ g_vars->scene27_maid->changeStatics2(ST_MID_BROOM);
+ } else if (g_fp->getObjectState(sO_Maid) == g_fp->getObjectEnumState(sO_Maid, sO_WithSpade)) {
+ g_vars->scene27_maid->changeStatics2(ST_MID_SPADE);
+ }
+
+ g_fp->_currentScene = oldsc;
+
+ g_fp->setArcadeOverlay(PIC_CSR_ARCADE7);
+}
+
+int scene27_updateCursor() {
+ g_fp->updateCursorCommon();
+
+ if (g_vars->scene27_dudeIsAiming) {
+ if (g_fp->_cursorId != PIC_CSR_DEFAULT_INV && g_fp->_cursorId != PIC_CSR_ITN_INV)
+ g_fp->_cursorId = PIC_CSR_ARCADE7_D;
+
+ } else if (g_fp->_objectIdAtCursor == ANI_MAN) {
+ if (g_vars->scene27_maxPhaseReached)
+ if (g_fp->_cursorId == PIC_CSR_DEFAULT)
+ g_fp->_cursorId = PIC_CSR_ITN;
+ }
+
+ return g_fp->_cursorId;
+}
+
+void sceneHandler27_driverGiveVent() {
+ g_vars->scene27_driver->changeStatics2(ST_DRV_VENT);
+ g_vars->scene27_driver->startMQIfIdle(QU_DRV_GIVEVENT, 1);
+
+ g_vars->scene27_driverHasVent = false;
+
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+
+ g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1);
+}
+
+void sceneHandler27_winArcade() {
+ if (g_fp->getObjectState(sO_Driver) == g_fp->getObjectEnumState(sO_Driver, sO_WithSteering)) {
+ g_vars->scene27_dudeIsAiming = false;
+
+ g_fp->_aniMan->_callback2 = 0;
+ g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT);
+
+ sceneHandler27_driverGiveVent();
+ }
+}
+
+void sceneHandler27_takeVent() {
+ if (g_fp->getObjectState(sO_Maid) == g_fp->getObjectEnumState(sO_Maid, sO_WithSwab)) {
+ if (g_vars->scene27_maid->isIdle()) {
+ if (g_vars->scene27_maid->_flags & 4) {
+ g_vars->scene27_maid->changeStatics2(ST_MID_SWAB2);
+ g_vars->scene27_maid->startMQIfIdle(QU_MID_CLEANVENT, 1);
+ }
+ }
+ }
+}
+
+void sceneHandler27_showNextBat() {
+ if (g_vars->scene27_bat) {
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC27_SHOWBET), 0, 1);
+
+ mq->replaceKeyCode(-1, g_vars->scene27_bat->_okeyCode);
+ mq->chain(0);
+ }
+
+ g_vars->scene27_batHandler->_priority = 1045;
+}
+
+int sceneHandler27_updateScreenCallback() {
+ int res;
+
+ res = g_fp->drawArcadeOverlay(getGameLoaderInteractionController()->_flag24 == 0);
+
+ if (!res)
+ g_fp->_updateScreenCallback = 0;
+
+ return res;
+}
+
+void sceneHandler27_aniManCallback(int *phase) {
+ if (!g_vars->scene27_maxPhaseReached) {
+ if (*phase >= 5)
+ g_vars->scene27_maxPhaseReached = true;
+ else
+ ++*phase;
+ }
+}
+
+void sceneHandler27_throwBat() {
+ if (getGameLoaderInteractionController()->_flag24)
+ g_fp->_updateScreenCallback = sceneHandler27_updateScreenCallback;
+
+ g_fp->_aniMan->_callback2 = sceneHandler27_aniManCallback;
+
+ g_fp->_aniMan->startAnim(MV_MAN27_THROWBET, 0, -1);
+
+ getCurrSceneSc2MotionController()->clearEnabled();
+ getGameLoaderInteractionController()->disableFlag24();
+
+ g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 0);
+
+ g_vars->scene27_maxPhaseReached = false;
+
+ g_vars->scene27_bat->hide();
+}
+
+void sceneHandler27_clickBat(ExCommand *cmd) {
+ int bx = g_vars->scene27_bat->_ox - 5;
+ int by = g_vars->scene27_bat->_oy - 71;
+
+#if DBG
+ sceneHandler27_throwBat();
+ return;
+#endif
+
+ if (ABS(bx - g_fp->_aniMan->_ox) > 1 || ABS(by - g_fp->_aniMan->_oy) > 1
+ || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, bx, by, 1, ST_MAN_RIGHT);
+
+ if (mq) {
+ mq->addExCommandToEnd(cmd->createClone());
+
+ postExCommand(g_fp->_aniMan->_id, 2, bx, by, 0, -1);
+ }
+ } else {
+ sceneHandler27_throwBat();
+ }
+}
+
+void sceneHandler27_maidSwab() {
+#if DBG
+ return;
+#endif
+ if (g_fp->getObjectState(sO_Maid) == g_fp->getObjectEnumState(sO_Maid, sO_WithSwab))
+ g_vars->scene27_maid->changeStatics2(ST_MID_SWAB);
+}
+
+void sceneHandler27_startBat(StaticANIObject *bat) {
+ Bat *newbat = new Bat;
+
+ newbat->power = g_vars->scene27_launchPhase * 2.5 + 8.0;
+ newbat->field_10 = 0;
+ newbat->ani = bat;
+ newbat->powerCos = newbat->power * cos(0.0);
+ newbat->powerSin = newbat->power * sin(0.0);
+ newbat->currX = newbat->powerCos + (double)g_fp->_aniMan->_ox + 42.0;
+ newbat->currY = newbat->powerSin + (double)g_fp->_aniMan->_oy + 58.0;
+
+ bat->_statics = (Statics *)bat->_staticsList[0];
+ bat->setOXY((int)newbat->currX, (int)newbat->currY);
+ bat->_flags |= 4;
+
+ g_vars->scene27_bats.push_back(newbat);
+
+ sceneHandler27_maidSwab();
+}
+
+void sceneHandler27_startAiming() {
+ g_vars->scene27_dudeIsAiming = false;
+ g_vars->scene27_maxPhaseReached = false;
+
+ g_fp->_aniMan->_callback2 = 0;
+
+ g_vars->scene27_launchPhase = g_fp->_aniMan->_movement->_currDynamicPhaseIndex - 6;
+
+ int phase = 21 - g_vars->scene27_launchPhase;
+
+ if (phase < 14)
+ phase = 14;
+
+ if (phase > 20)
+ phase = 20;
+
+ g_fp->playSound(SND_27_044, 0);
+
+ g_fp->_aniMan->_movement->setDynamicPhaseIndex(phase);
+}
+
+void sceneHandler27_initAiming(ExCommand *cmd) {
+ g_vars->scene27_aimStartX = cmd->_x;
+ g_vars->scene27_aimStartY = cmd->_y;
+ g_vars->scene27_dudeIsAiming = true;
+ g_vars->scene27_maxPhaseReached = false;
+}
+
+void sceneHandler27_aimDude() {
+ int phase = (g_vars->scene27_aimStartX - g_fp->_mouseScreenPos.x) / 20 + 6;
+
+ if (phase < 6)
+ phase = 6;
+
+ if (phase > 11)
+ phase = 11;
+
+ if (g_fp->_aniMan->_movement)
+ g_fp->_aniMan->_movement->setDynamicPhaseIndex(phase);
+}
+
+void sceneHandler27_wipeDo() {
+ for (uint i = 0; i < g_vars->scene27_bats.size(); i++) {
+ if (g_vars->scene27_bats[i]->currX < 800.0) {
+ g_vars->scene27_bats[i]->field_10 = atan2(800.0 - g_vars->scene27_bats[i]->currX, 520.0 - g_vars->scene27_bats[i]->currY);
+ g_vars->scene27_bats[i]->power += 1.0;
+ }
+ }
+}
+
+bool sceneHandler27_batFallLogic(uint batn) {
+ Bat *bat = g_vars->scene27_bats[batn];
+
+ int y = (bat->currY - 458.0) * 0.4848484848484849 + 734.0;
+
+ if (y >= bat->currX)
+ return false;
+
+ if (bat->currX - y > 15.0 || bat->ani->_statics->_staticsId == ST_BTA_FALL) {
+ bat->ani->_priority = 2020;
+
+ g_vars->scene27_var07.push_back(bat);
+
+ if (batn != g_vars->scene27_var07.size() - 1)
+ g_vars->scene27_var07.remove_at(batn);
+ } else if (!bat->ani->_movement) {
+ bat->ani->startAnim(MV_BTA_FALL, 0, -1);
+ }
+
+ return true;
+}
+
+bool sceneHandler27_batCalcDistance(int bat1, int bat2) {
+ double at = atan2(g_vars->scene27_bats[bat1]->currX - g_vars->scene27_bats[bat2]->currX, g_vars->scene27_bats[bat1]->currY - g_vars->scene27_bats[bat2]->currY);
+ double dy = g_vars->scene27_bats[bat1]->currY - g_vars->scene27_bats[bat2]->currY;
+ double dx = g_vars->scene27_bats[bat1]->currX - g_vars->scene27_bats[bat2]->currX;
+ double ay = cos(at);
+ double ax = sin(at);
+
+ return sqrt(ax * ax * 0.25 + ay * ay) * 54.0 > sqrt(dx * dx + dy * dy);
+}
+
+void sceneHandler27_knockBats(int bat1n, int bat2n) {
+ Bat *bat1 = g_vars->scene27_bats[bat1n];
+ Bat *bat2 = g_vars->scene27_bats[bat2n];
+
+ if (0.0 != bat1->power) {
+ double rndF = (double)g_fp->_rnd->getRandomNumber(32767) * 0.0000009155552842799158 - 0.015
+ + atan2(bat2->currX - bat1->currX, bat2->currY - bat1->currY);
+ double rndCos = cos(rndF);
+ double rndSin = sin(rndF);
+
+ double pow1x = cos(bat1->field_10 - rndF) * (double)((int)(bat2->currX - bat1->currX) >= 0 ? 1 : -1) * bat1->power;
+ double pow1y = sin(bat1->field_10 - rndF) * (double)((int)(bat2->currY - bat1->currY) >= 0 ? 1 : -1) * bat1->power;
+
+ bat1->powerCos -= pow1x * 1.1;
+ bat1->powerSin -= pow1y * 1.1;
+
+ rndF = ((double)g_fp->_rnd->getRandomNumber(32767) * 0.0000009155552842799158 - 0.015
+ + atan2(bat1->currX - bat2->currX, bat1->currY - bat2->currY));
+ double pow2x = cos(bat2->field_10 - rndF) * (double)((int)(bat1->currX - bat2->currX) >= 0 ? 1 : -1) * bat2->power;
+ double pow2y = sin(bat2->field_10 - rndF) * (double)((int)(bat1->currY - bat2->currY) >= 0 ? 1 : -1) * bat2->power;
+
+ bat2->powerCos -= pow2x * 1.1;
+ bat2->powerSin -= pow2y * 1.1;
+
+ double dy = bat1->currY - bat2->currY;
+ double dx = bat1->currX - bat2->currX;
+ double dist = (sqrt(rndSin * rndSin * 0.25 + rndCos * rndCos) * 54.0 - sqrt(dx * dx + dy * dy)) / cos(rndF - bat1->field_10);
+ bat1->currX -= cos(bat1->field_10) * (dist + 1.0);
+ bat1->currY -= sin(bat1->field_10) * (dist + 1.0);
+ bat1->powerCos += pow2x * 0.64;
+
+ if (bat1->currX <= 500.0)
+ bat1->powerSin = 0.0;
+ else
+ bat1->powerSin += pow2y * 0.64;
+
+ bat1->field_10 = atan2(bat1->powerCos, bat1->powerSin);
+ bat1->power = sqrt(bat1->powerCos * bat1->powerCos + bat1->powerSin * bat1->powerSin);
+ bat2->powerCos += pow1x * 0.64;
+
+ if (bat2->currX <= 500.0)
+ bat2->powerSin = 0;
+ else
+ bat2->powerSin += pow1y * 0.64;
+
+ bat2->field_10 = atan2(bat2->powerCos, bat2->powerSin);
+ bat2->power = sqrt(bat2->powerCos * bat2->powerCos + bat2->powerSin * bat2->powerSin);
+
+ g_fp->playSound(SND_27_026, 0);
+ }
+}
+
+void sceneHandler27_batSetColors(int batn) {
+ Bat *bat = g_vars->scene27_bats[batn];
+
+ if (g_vars->scene27_hitZone->isPixelHitAtPos((int)bat->currX, (int)bat->currY) ) {
+ if (bat->ani->_statics->_staticsId == ST_BTA_NORM) {
+ if (!bat->ani->_movement)
+ bat->ani->_statics = bat->ani->getStaticsById(ST_BTA_HILITE);
+ }
+ } else {
+ if (bat->ani->_statics->_staticsId == ST_BTA_HILITE) {
+ if (!bat->ani->_movement)
+ bat->ani->_statics = bat->ani->getStaticsById(ST_BTA_NORM);
+ }
+ }
+}
+
+void sceneHandler27_driverPushButton() {
+ if (g_fp->getObjectState(sO_Driver) == g_fp->getObjectEnumState(sO_Driver, sO_WithSteering)) {
+ g_vars->scene27_driver->changeStatics2(ST_DRV_VENT);
+ chainQueue(QU_DRV_PUSHBUTTON, 1);
+
+ g_vars->scene27_driverPushedButton = true;
+ } else {
+ g_vars->scene27_driver->changeStatics2(ST_DRV_SITNOVENT);
+
+
+ chainQueue(QU_DRV_PUSHBUTTON_NOVENT, 1);
+
+ g_vars->scene27_driverPushedButton = true;
+ }
+}
+
+void sceneHandler27_maidSwitchback() {
+#ifndef DBG
+ if (g_fp->getObjectState(sO_Maid) == g_fp->getObjectEnumState(sO_Maid, sO_WithSwab)) {
+ g_vars->scene27_maid->changeStatics2(ST_MID_SWAB);
+ g_vars->scene27_maid->startMQIfIdle(QU_MID_SWITCHBACK, 1);
+ }
+#endif
+}
+
+void sceneHandler27_batLogic() {
+ if (g_vars->scene27_balls.numBalls) {
+ g_vars->scene27_bat = g_vars->scene27_balls.pHead->ani;
+
+ g_vars->scene27_balls.pHead = g_vars->scene27_balls.pHead->p0;
+
+ if (g_vars->scene27_balls.pHead)
+ g_vars->scene27_balls.pHead->p0->p1 = 0;
+ else
+ g_vars->scene27_balls.field_8 = 0;
+
+ g_vars->scene27_balls.init(&g_vars->scene27_balls.pHead->p0);
+
+ int mv;
+
+ switch (g_vars->scene27_batHandler->_statics->_staticsId) {
+ case ST_BTH_5:
+ mv = MV_BTH_5_4;
+ break;
+
+ case ST_BTH_4:
+ mv = MV_BTH_4_3;
+ break;
+
+ case ST_BTH_3:
+ mv = MV_BTH_3_2;
+ break;
+
+ case ST_BTH_2:
+ mv = MV_BTH_2_1;
+ break;
+
+ case ST_BTH_1:
+ mv = MV_BTH_1_0;
+ break;
+
+ default:
+ chainQueue(QU_SC27_RESTARTBETS, 1);
+
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+
+ g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1);
+
+ return;
+ }
+
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ ExCommand *ex = new ExCommand(g_vars->scene27_batHandler->_id, 1, mv, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_SC27_CLICKBET, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ mq->chain(0);
+ } else {
+ g_vars->scene27_bat = 0;
+ }
+}
+
+void sceneHandler27_calcWinArcade() {
+ if (!g_vars->scene27_wipeIsNeeded && !g_vars->scene27_driverPushedButton) {
+ int numHilite = 0;
+
+ for (uint i = 0; i < g_vars->scene27_bats.size(); i++) {
+ if (g_vars->scene27_bats[i]->ani->_statics->_staticsId == ST_BTA_HILITE)
+ numHilite++;
+ }
+
+ if (numHilite >= 3) {
+ if (g_fp->getObjectState(sO_Driver) == g_fp->getObjectEnumState(sO_Driver, sO_WithSteering)) {
+ sceneHandler27_driverGiveVent();
+ sceneHandler27_maidSwitchback();
+
+ return;
+ }
+ }
+
+ if (!g_vars->scene27_balls.numBalls) {
+ sceneHandler27_driverPushButton();
+ sceneHandler27_maidSwitchback();
+ return;
+ }
+
+ sceneHandler27_batLogic();
+ }
+
+ sceneHandler27_maidSwitchback();
+}
+
+void sceneHandler27_regenBats() {
+ g_vars->scene27_wipeIsNeeded = false;
+
+ for (uint i = 0; i < g_vars->scene27_var07.size(); i++) {
+ g_vars->scene27_var07[i]->ani->hide();
+
+ Ball *runPtr = g_vars->scene27_balls.pTail;
+ Ball *lastP = g_vars->scene27_balls.field_8;
+ StaticANIObject *newbat = g_vars->scene27_var07[i]->ani;
+
+ if (!g_vars->scene27_balls.pTail) {
+ g_vars->scene27_balls.cPlex = (byte *)calloc(g_vars->scene27_balls.cPlexLen, sizeof(Ball));
+
+ byte *p1 = g_vars->scene27_balls.cPlex + (g_vars->scene27_balls.cPlexLen - 1) * sizeof(Ball);
+
+ if (g_vars->scene27_balls.cPlexLen - 1 < 0) {
+ runPtr = g_vars->scene27_balls.pTail;
+ } else {
+ runPtr = g_vars->scene27_balls.pTail;
+
+ for (int j = 0; j < g_vars->scene27_balls.cPlexLen; j++) {
+ ((Ball *)p1)->p1 = runPtr;
+ runPtr = (Ball *)p1;
+
+ p1 -= sizeof(Ball);
+ }
+
+ g_vars->scene27_balls.pTail = runPtr;
+ }
+ }
+
+ g_vars->scene27_balls.pTail = runPtr->p0;
+ runPtr->p1 = lastP;
+ runPtr->p0 = 0;
+ runPtr->ani = newbat;
+
+ g_vars->scene27_balls.numBalls++;
+
+ if (g_vars->scene27_balls.field_8)
+ g_vars->scene27_balls.field_8->p0 = runPtr;
+ else
+ g_vars->scene27_balls.pHead = runPtr;
+
+ g_vars->scene27_balls.field_8 = runPtr;
+ }
+
+ g_vars->scene27_var07.clear();
+
+ sceneHandler27_batLogic();
+
+ g_vars->scene27_driverPushedButton = false;
+}
+
+void sceneHandler27_animateBats() {
+ int oldCount = g_vars->scene27_knockCount;
+
+ g_vars->scene27_numLostBats = 0;
+ g_vars->scene27_knockCount = 0;
+
+ for (uint i = 0; i < g_vars->scene27_bats.size(); i++) {
+ Bat *bat = g_vars->scene27_bats[i];
+
+ bat->currX = cos(bat->field_10) * bat->power + bat->currX;
+ bat->currY = sin(bat->field_10) * bat->power + bat->currY;
+
+ bat->ani->setOXY((int)bat->currX, (int)bat->currY);
+ bat->ani->_priority = (int)(600.0 - bat->currY);
+
+ double powerDelta;
+
+ if (cos(bat->field_10) >= 0.0 || bat->currX >= 362.0)
+ powerDelta = bat->power * 0.035;
+ else
+ powerDelta = bat->power * 0.4;
+
+ bat->power -= powerDelta;
+ bat->powerCos = cos(bat->field_10) * bat->power;
+ bat->powerSin = sin(bat->field_10) * bat->power;
+
+ if (bat->power >= 0.5)
+ g_vars->scene27_knockCount++;
+ else
+ bat->power = 0;
+
+ sceneHandler27_batSetColors(i);
+
+ if (!sceneHandler27_batFallLogic(i) && !g_vars->scene27_wipeIsNeeded) {
+ for (uint j = 0; j < g_vars->scene27_bats.size(); j++) {
+ if (i != j && sceneHandler27_batCalcDistance(i, j))
+ sceneHandler27_knockBats(i, j);
+ }
+ }
+ }
+
+ for (uint i = 0; i < g_vars->scene27_var07.size(); i++) {
+ Bat *bat = g_vars->scene27_var07[i];
+
+ if (bat->currY >= 700.0) {
+ g_vars->scene27_numLostBats++;
+ } else {
+ bat->currX = bat->powerCos + bat->currX;
+ bat->currY = bat->powerSin + bat->currY;
+ bat->ani->setOXY((int)bat->currX, (int)bat->currY);
+ bat->powerSin = bat->powerSin + 1.0;
+ }
+ }
+
+ if (oldCount != g_vars->scene27_knockCount && !g_vars->scene27_knockCount)
+ sceneHandler27_calcWinArcade();
+
+ if (g_vars->scene27_wipeIsNeeded) {
+ if (g_vars->scene27_numLostBats == 5)
+ sceneHandler27_regenBats();
+ }
+}
+
+int sceneHandler27(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_CMN_WINARCADE:
+ sceneHandler27_winArcade();
+ break;
+
+ case MSG_SC27_TAKEVENT:
+ sceneHandler27_takeVent();
+ break;
+
+ case MSG_SC27_SHOWNEXTBET:
+ sceneHandler27_showNextBat();
+ break;
+
+ case MSG_SC27_HANDLERTOFRONT:
+ g_vars->scene27_batHandler->_priority = 1005;
+ break;
+
+ case MSG_SC27_STARTWIPE:
+ g_vars->scene27_wipeIsNeeded = true;
+
+ g_fp->playSound(SND_27_027, 0);
+
+ break;
+
+ case MSG_SC27_CLICKBET:
+ sceneHandler27_clickBat(cmd);
+ break;
+
+ case MSG_SC27_STARTBET:
+ if (g_vars->scene27_bat)
+ sceneHandler27_startBat(g_vars->scene27_bat);
+
+ break;
+
+ case 30:
+ if (g_vars->scene27_dudeIsAiming)
+ sceneHandler27_startAiming();
+
+ break;
+
+ case 29:
+ if (g_fp->_aniMan == g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y)
+ && g_vars->scene27_maxPhaseReached)
+ sceneHandler27_initAiming(cmd);
+
+ break;
+
+ case 33:
+ if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ if (x < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
+
+ if (x > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
+ }
+
+ if (g_vars->scene27_dudeIsAiming)
+ sceneHandler27_aimDude();
+
+ if (g_vars->scene27_wipeIsNeeded) {
+ sceneHandler27_wipeDo();
+
+ if (!g_fp->_aniMan->_movement && g_fp->_aniMan->_statics->_staticsId == ST_MAN_RIGHT)
+ g_fp->_aniMan->startAnim(MV_MAN27_FLOW, 0, -1);
+ }
+
+ sceneHandler27_animateBats();
+
+ g_fp->_behaviorManager->updateBehaviors();
+ g_fp->startSceneTrack();
+
+ break;
+ }
+
+ return 0;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes/scene28.cpp b/engines/fullpipe/scenes/scene28.cpp
index 62afd128c2..c21ce05502 100644
--- a/engines/fullpipe/scenes/scene28.cpp
+++ b/engines/fullpipe/scenes/scene28.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
new file mode 100644
index 0000000000..2d5127137d
--- /dev/null
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -0,0 +1,1125 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "fullpipe/objectnames.h"
+#include "fullpipe/constants.h"
+
+#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/scenes.h"
+#include "fullpipe/statics.h"
+
+#include "fullpipe/interaction.h"
+#include "fullpipe/behavior.h"
+
+
+namespace Fullpipe {
+
+struct WalkingBearder {
+ StaticANIObject *ani;
+ int wbflag;
+ int wbcounter;
+};
+
+void scene29_initScene(Scene *sc) {
+ g_vars->scene29_porter = sc->getStaticANIObject1ById(ANI_PORTER, -1);
+ g_vars->scene29_shooter1 = sc->getStaticANIObject1ById(ANI_SHOOTER1, -1);
+ g_vars->scene29_shooter2 = sc->getStaticANIObject1ById(ANI_SHOOTER2, -1);
+ g_vars->scene29_ass = sc->getStaticANIObject1ById(ANI_ASS, -1);
+
+ g_vars->scene29_balls.numBalls = 0;
+ g_vars->scene29_balls.pTail = 0;
+ g_vars->scene29_balls.field_8 = 0;
+ g_vars->scene29_balls.pHead = 0;
+
+ free(g_vars->scene29_balls.cPlex);
+ g_vars->scene29_balls.cPlex = 0;
+
+ StaticANIObject *ani;
+
+ g_vars->scene29_greenBalls.numBalls = 0;
+ g_vars->scene29_greenBalls.pTail = 0;
+ g_vars->scene29_greenBalls.field_8 = 0;
+ g_vars->scene29_greenBalls.pHead = 0;
+
+ free(g_vars->scene29_greenBalls.cPlex);
+ g_vars->scene29_greenBalls.cPlex = 0;
+
+ ani = sc->getStaticANIObject1ById(ANI_SHELL_GREEN, -1);
+ Ball *b = g_vars->scene29_balls.sub04(g_vars->scene29_balls.field_8, 0);
+ b->ani = ani;
+
+ if (g_vars->scene29_balls.field_8)
+ g_vars->scene29_balls.field_8->p0 = b;
+ else
+ g_vars->scene29_balls.pHead = b;
+
+ g_vars->scene29_balls.field_8 = b;
+
+ for (int i = 0; i < 2; i++) {
+ StaticANIObject *newani = new StaticANIObject(ani);
+
+ sc->addStaticANIObject(newani, 1);
+
+ b = g_vars->scene29_balls.sub04(g_vars->scene29_balls.field_8, 0);
+ b->ani = ani;
+
+ if (g_vars->scene29_balls.field_8)
+ g_vars->scene29_balls.field_8->p0 = b;
+ else
+ g_vars->scene29_balls.pHead = b;
+
+ g_vars->scene29_balls.field_8 = b;
+ }
+
+ g_vars->scene29_redBalls.numBalls = 0;
+ g_vars->scene29_redBalls.pTail = 0;
+ g_vars->scene29_redBalls.field_8 = 0;
+ g_vars->scene29_redBalls.pHead = 0;
+
+ free(g_vars->scene29_redBalls.cPlex);
+ g_vars->scene29_redBalls.cPlex = 0;
+
+ g_vars->scene29_flyingRedBalls.numBalls = 0;
+ g_vars->scene29_flyingRedBalls.pTail = 0;
+ g_vars->scene29_flyingRedBalls.field_8 = 0;
+ g_vars->scene29_flyingRedBalls.pHead = 0;
+
+ free(g_vars->scene29_flyingRedBalls.cPlex);
+ g_vars->scene29_flyingRedBalls.cPlex = 0;
+
+ ani = sc->getStaticANIObject1ById(ANI_SHELL_RED, -1);
+
+ b = g_vars->scene29_redBalls.sub04(g_vars->scene29_redBalls.field_8, 0);
+ b->ani = ani;
+
+ if (g_vars->scene29_redBalls.field_8)
+ g_vars->scene29_redBalls.field_8->p0 = b;
+ else
+ g_vars->scene29_redBalls.pHead = b;
+
+ g_vars->scene29_redBalls.field_8 = b;
+
+ for (int i = 0; i < 2; i++) {
+ StaticANIObject *newani = new StaticANIObject(ani);
+
+ sc->addStaticANIObject(newani, 1);
+
+ b = g_vars->scene29_redBalls.sub04(g_vars->scene29_redBalls.field_8, 0);
+ b->ani = ani;
+
+ if (g_vars->scene29_redBalls.field_8)
+ g_vars->scene29_redBalls.field_8->p0 = b;
+ else
+ g_vars->scene29_redBalls.pHead = b;
+
+ g_vars->scene29_redBalls.field_8 = b;
+ }
+
+ g_vars->scene29_bearders.clear();
+
+ ani = new StaticANIObject(g_fp->accessScene(SC_COMMON)->getStaticANIObject1ById(ANI_BEARDED_CMN, -1));
+
+ ani->_statics = ani->getStaticsById(ST_BRDCMN_EMPTY);
+
+ sc->addStaticANIObject(ani, 1);
+
+ WalkingBearder *wb = new WalkingBearder;
+
+ wb->ani = ani;
+ wb->wbflag = 0;
+ wb->wbcounter = 0;
+
+ g_vars->scene29_bearders.push_back(wb);
+
+ g_vars->scene29_manIsRiding = false;
+ g_vars->scene29_arcadeIsOn = false;
+ g_vars->scene29_reachedFarRight = false;
+ g_vars->scene29_rideBackEnabled = false;
+ g_vars->scene29_shootCountdown = 0;
+ g_vars->scene29_shootDistance = 75;
+ g_vars->scene29_manIsHit = false;
+ g_vars->scene29_scrollSpeed = 0;
+ g_vars->scene29_scrollingDisabled = false;
+ g_vars->scene29_hitBall = 0;
+
+ g_fp->setArcadeOverlay(PIC_CSR_ARCADE8);
+}
+
+void sceneHandler29_winArcade() {
+ if (g_vars->scene29_shooter2->_flags & 4) {
+ g_vars->scene29_shootCountdown = 0;
+
+ g_vars->scene29_shooter1->changeStatics2(ST_STR1_STAND);
+ g_vars->scene29_shooter2->changeStatics2(ST_STR2_STAND);
+
+ g_vars->scene29_shooter2->_flags &= 0xFFFB;
+
+ StaticANIObject *ani;
+ Ball *newball, *ball, *oldp0;
+
+ while (g_vars->scene29_greenBalls.numBalls) {
+ ball = g_vars->scene29_greenBalls.pHead;
+ ani = g_vars->scene29_greenBalls.pHead->ani;
+ oldp0 = g_vars->scene29_greenBalls.pHead->p0;
+ g_vars->scene29_greenBalls.pHead = g_vars->scene29_greenBalls.pHead->p0;
+
+ if (g_vars->scene29_greenBalls.pHead)
+ oldp0->p1 = 0;
+ else
+ g_vars->scene29_greenBalls.field_8 = 0;
+
+ ball->p0 = g_vars->scene29_greenBalls.pTail;
+ g_vars->scene29_greenBalls.pTail = ball;
+ g_vars->scene29_greenBalls.numBalls--;
+
+ if (!g_vars->scene29_greenBalls.numBalls)
+ g_vars->scene29_greenBalls.reset();
+
+ ani->hide();
+
+ newball = g_vars->scene29_balls.sub04(g_vars->scene29_balls.field_8, 0);
+ newball->ani = ani;
+
+ if (g_vars->scene29_balls.field_8)
+ g_vars->scene29_balls.field_8->p0 = newball;
+ else
+ g_vars->scene29_balls.pHead = newball;
+
+ g_vars->scene29_balls.field_8 = newball;
+ }
+
+ while (g_vars->scene29_flyingRedBalls.numBalls) {
+ ball = g_vars->scene29_flyingRedBalls.pHead;
+ ani = g_vars->scene29_flyingRedBalls.pHead->ani;
+ oldp0 = g_vars->scene29_flyingRedBalls.pHead->p0;
+ g_vars->scene29_flyingRedBalls.pHead = g_vars->scene29_flyingRedBalls.pHead->p0;
+
+ if (g_vars->scene29_flyingRedBalls.pHead)
+ oldp0->p1 = 0;
+ else
+ g_vars->scene29_flyingRedBalls.field_8 = 0;
+
+ ball->p0 = g_vars->scene29_flyingRedBalls.pTail;
+ g_vars->scene29_flyingRedBalls.pTail = ball;
+ g_vars->scene29_flyingRedBalls.numBalls--;
+
+ if (!g_vars->scene29_flyingRedBalls.numBalls) {
+ g_vars->scene29_flyingRedBalls.numBalls = 0;
+ g_vars->scene29_flyingRedBalls.pTail = 0;
+ g_vars->scene29_flyingRedBalls.field_8 = 0;
+ g_vars->scene29_flyingRedBalls.pHead = 0;
+
+ free(g_vars->scene29_flyingRedBalls.cPlex);
+
+ g_vars->scene29_flyingRedBalls.cPlex = 0;
+ }
+
+ ani->hide();
+
+ newball = g_vars->scene29_redBalls.sub04(g_vars->scene29_redBalls.field_8, 0);
+ newball->ani = ani;
+
+ if (g_vars->scene29_redBalls.field_8)
+ g_vars->scene29_redBalls.field_8->p0 = newball;
+ else
+ g_vars->scene29_redBalls.pHead = newball;
+
+ g_vars->scene29_redBalls.field_8 = newball;
+ }
+
+ g_vars->scene29_ass->queueMessageQueue(0);
+ g_vars->scene29_ass->_flags &= 0xFFFB;
+
+ chainQueue(QU_SC29_ESCAPE, 1);
+ }
+
+ g_fp->setObjectState(sO_LeftPipe_29, g_fp->getObjectEnumState(sO_LeftPipe_29, sO_IsOpened));
+}
+
+void sceneHandler29_shootGreen() {
+ if (g_vars->scene29_balls.numBalls) {
+ int x = g_vars->scene29_shooter1->_ox - 113;
+ int y = g_vars->scene29_shooter1->_oy - 48;
+ StaticANIObject *ani = g_vars->scene29_balls.pHead->ani;
+ Ball *oldhead = g_vars->scene29_balls.pHead;
+ Ball *oldp0 = g_vars->scene29_balls.pHead->p0;
+
+ g_vars->scene29_balls.pHead = g_vars->scene29_balls.pHead->p0;
+
+ if (g_vars->scene29_balls.pHead)
+ oldp0->p1 = 0;
+ else
+ g_vars->scene29_balls.field_8 = 0;
+
+ oldhead->p0 = g_vars->scene29_balls.pTail;
+
+ g_vars->scene29_balls.pTail = oldhead;
+ g_vars->scene29_balls.numBalls--;
+
+ if (!g_vars->scene29_balls.numBalls) {
+ g_vars->scene29_balls.numBalls = 0;
+ g_vars->scene29_balls.pTail = 0;
+ g_vars->scene29_balls.field_8 = 0;
+ g_vars->scene29_balls.pHead = 0;
+
+ free(g_vars->scene29_balls.cPlex);
+ g_vars->scene29_balls.cPlex = 0;
+ }
+
+ ani->show1(x, y, MV_SHG_NORM, 0);
+ ani->_priority = 5;
+
+ Ball *runPtr = g_vars->scene29_greenBalls.pTail;
+ Ball *lastP = g_vars->scene29_greenBalls.field_8;
+
+ if (!g_vars->scene29_greenBalls.pTail) {
+ g_vars->scene29_greenBalls.cPlex = (byte *)calloc(g_vars->scene29_greenBalls.cPlexLen, sizeof(Ball));
+
+ byte *p1 = g_vars->scene29_greenBalls.cPlex + (g_vars->scene29_greenBalls.cPlexLen - 1) * sizeof(Ball);
+
+ if (g_vars->scene29_greenBalls.cPlexLen - 1 < 0) {
+ runPtr = g_vars->scene29_greenBalls.pTail;
+ } else {
+ runPtr = g_vars->scene29_greenBalls.pTail;
+
+ for (int j = 0; j < g_vars->scene29_greenBalls.cPlexLen; j++) {
+ ((Ball *)p1)->p1 = runPtr;
+ runPtr = (Ball *)p1;
+
+ p1 -= sizeof(Ball);
+ }
+
+ g_vars->scene29_greenBalls.pTail = runPtr;
+ }
+ }
+ g_vars->scene29_greenBalls.pTail = runPtr->p0;
+ runPtr->p1 = lastP;
+ runPtr->p0 = 0;
+ runPtr->ani = ani;
+
+ g_vars->scene29_greenBalls.numBalls++;
+
+ if (g_vars->scene29_greenBalls.field_8) {
+ g_vars->scene29_greenBalls.field_8->p0 = runPtr;
+ g_vars->scene29_greenBalls.field_8 = runPtr;
+ } else {
+ g_vars->scene29_greenBalls.pHead = runPtr;
+ g_vars->scene29_greenBalls.field_8 = runPtr;
+ }
+ }
+}
+
+void sceneHandler29_shootRed() {
+ if (g_vars->scene29_balls.numBalls) {
+ int x = g_vars->scene29_shooter1->_ox - 101;
+ int y = g_vars->scene29_shooter1->_oy - 14;
+ StaticANIObject *ani = g_vars->scene29_balls.pHead->ani;
+ Ball *oldhead = g_vars->scene29_balls.pHead;
+ Ball *oldp0 = g_vars->scene29_balls.pHead->p0;
+
+ g_vars->scene29_balls.pHead = g_vars->scene29_balls.pHead->p0;
+
+ if (g_vars->scene29_balls.pHead)
+ oldp0->p1 = 0;
+ else
+ g_vars->scene29_balls.field_8 = 0;
+
+ oldhead->p0 = g_vars->scene29_balls.pTail;
+
+ g_vars->scene29_balls.pTail = oldhead;
+ g_vars->scene29_balls.numBalls--;
+
+ if (!g_vars->scene29_balls.numBalls) {
+ g_vars->scene29_balls.numBalls = 0;
+ g_vars->scene29_balls.pTail = 0;
+ g_vars->scene29_balls.field_8 = 0;
+ g_vars->scene29_balls.pHead = 0;
+
+ free(g_vars->scene29_balls.cPlex);
+ g_vars->scene29_balls.cPlex = 0;
+ }
+
+ ani->show1(x, y, MV_SHR_NORM, 0);
+ ani->_priority = 5;
+
+ Ball *runPtr = g_vars->scene29_flyingRedBalls.pTail;
+ Ball *lastP = g_vars->scene29_flyingRedBalls.field_8;
+
+ if (!g_vars->scene29_flyingRedBalls.pTail) {
+ g_vars->scene29_flyingRedBalls.cPlex = (byte *)calloc(g_vars->scene29_flyingRedBalls.cPlexLen, sizeof(Ball));
+
+ byte *p1 = g_vars->scene29_flyingRedBalls.cPlex + (g_vars->scene29_flyingRedBalls.cPlexLen - 1) * sizeof(Ball);
+
+ if (g_vars->scene29_flyingRedBalls.cPlexLen - 1 < 0) {
+ runPtr = g_vars->scene29_flyingRedBalls.pTail;
+ } else {
+ runPtr = g_vars->scene29_flyingRedBalls.pTail;
+
+ for (int j = 0; j < g_vars->scene29_flyingRedBalls.cPlexLen; j++) {
+ ((Ball *)p1)->p1 = runPtr;
+ runPtr = (Ball *)p1;
+
+ p1 -= sizeof(Ball);
+ }
+
+ g_vars->scene29_flyingRedBalls.pTail = runPtr;
+ }
+ }
+ g_vars->scene29_flyingRedBalls.pTail = runPtr->p0;
+ runPtr->p1 = lastP;
+ runPtr->p0 = 0;
+ runPtr->ani = ani;
+
+ g_vars->scene29_flyingRedBalls.numBalls++;
+
+ if (g_vars->scene29_flyingRedBalls.field_8) {
+ g_vars->scene29_flyingRedBalls.field_8->p0 = runPtr;
+ g_vars->scene29_flyingRedBalls.field_8 = runPtr;
+ } else {
+ g_vars->scene29_flyingRedBalls.pHead = runPtr;
+ g_vars->scene29_flyingRedBalls.field_8 = runPtr;
+ }
+ }
+}
+
+void sceneHandler29_manJump() {
+ if (!g_fp->_aniMan->_movement || g_fp->_aniMan->_movement->_id == MV_MAN29_RUN || g_fp->_aniMan->_movement->_id == MV_MAN29_STANDUP) {
+ g_vars->scene29_rideBackEnabled = false;
+ g_vars->scene29_manIsHit = false;
+ g_vars->scene29_reachedFarRight = true;
+
+ g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR);
+ g_fp->_aniMan->startAnim(MV_MAN29_JUMP, 0, -1);
+ }
+
+ g_vars->scene29_manX = g_fp->_aniMan->_ox;
+ g_vars->scene29_manY = g_fp->_aniMan->_oy;
+}
+
+void sceneHandler29_manBend() {
+ if (!g_fp->_aniMan->_movement || g_fp->_aniMan->_movement->_id == MV_MAN29_RUN || g_fp->_aniMan->_movement->_id == MV_MAN29_STANDUP) {
+ g_vars->scene29_rideBackEnabled = false;
+ g_vars->scene29_manIsHit = false;
+ g_vars->scene29_reachedFarRight = true;
+
+ g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR);
+ g_fp->_aniMan->startAnim(MV_MAN29_BEND, 0, -1);
+ }
+
+ g_vars->scene29_manX = g_fp->_aniMan->_ox;
+ g_vars->scene29_manY = g_fp->_aniMan->_oy;
+}
+
+bool sceneHandler29_checkRedBallHit(StaticANIObject *ani, int maxx) {
+ if (!g_vars->scene29_arcadeIsOn || g_vars->scene29_manIsHit)
+ return false;
+
+ if ((ani->_ox >= g_vars->scene29_manX + 42 || ani->_ox <= g_vars->scene29_manX + 8)
+ && (ani->_ox < g_vars->scene29_manX + 8 || maxx > g_vars->scene29_manX + 27))
+ return false;
+
+ if (!g_fp->_aniMan->_movement)
+ return true;
+
+ int phase = g_fp->_aniMan->_movement->_currDynamicPhaseIndex;
+
+ if (g_fp->_aniMan->_movement->_id != MV_MAN29_BEND && g_fp->_aniMan->_movement->_id != MV_MAN29_RUN
+ && (g_fp->_aniMan->_movement->_id != MV_MAN29_JUMP || (phase >= 3 && phase <= 6)))
+ return false;
+ else
+ return true;
+}
+
+bool sceneHandler29_checkGreenBallHit(StaticANIObject *ani, int maxx) {
+ if (!g_vars->scene29_arcadeIsOn || g_vars->scene29_manIsHit)
+ return false;
+
+ if (ani->_ox >= g_vars->scene29_manX + 40) {
+ if (maxx > g_vars->scene29_manX + 27)
+ return false;
+ } else {
+ if (ani->_ox <= g_vars->scene29_manX + 10) {
+ if (ani->_ox < g_vars->scene29_manX + 40)
+ return false;
+
+ if (maxx > g_vars->scene29_manX + 27)
+ return false;
+ }
+ }
+
+ if (!g_fp->_aniMan->_movement)
+ return true;
+
+ if (g_fp->_aniMan->_movement->_id == MV_MAN29_JUMP)
+ return true;
+
+ if (g_fp->_aniMan->_movement->_id == MV_MAN29_RUN)
+ return true;
+
+ if (g_fp->_aniMan->_movement->_id == MV_MAN29_BEND) {
+ if (g_fp->_aniMan->_movement->_currDynamicPhaseIndex < 1 || g_fp->_aniMan->_movement->_currDynamicPhaseIndex > 5)
+ return true;
+ }
+
+ return false;
+}
+
+void sceneHandler29_manHit() {
+ MGMInfo mgminfo;
+
+ g_vars->scene29_manIsHit = true;
+
+ g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR);
+ g_fp->_aniMan->setOXY(g_vars->scene29_manX, g_vars->scene29_manY);
+
+ mgminfo.ani = g_fp->_aniMan;
+ mgminfo.staticsId2 = ST_MAN29_SITR;
+ mgminfo.y1 = 463;
+ mgminfo.x1 = g_vars->scene29_manX <= 638 ? 351 : 0;
+ mgminfo.field_1C = 10;
+ mgminfo.field_10 = 1;
+ mgminfo.flags = (g_vars->scene29_manX <= 638 ? 2 : 0) | 0x44;
+ mgminfo.movementId = MV_MAN29_HIT;
+
+ MessageQueue *mq = g_vars->scene29_mgm.genMovement(&mgminfo);
+ ExCommand *ex;
+
+ if (mq) {
+ if (g_vars->scene29_manX <= 638) {
+ ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP_NORM, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags = 2;
+ ex->_keyCode = g_fp->_aniMan->_okeyCode;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_SC29_STOPRIDE, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags = 2;
+ mq->addExCommandToEnd(ex);
+
+ g_vars->scene29_manIsRiding = false;
+ g_vars->scene29_arcadeIsOn = false;
+ g_vars->scene29_reachedFarRight = false;
+ g_vars->scene29_rideBackEnabled = false;
+ } else {
+ ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags = 2;
+ ex->_keyCode = g_fp->_aniMan->_okeyCode;
+ mq->addExCommandToEnd(ex);
+ }
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ if (!mq->chain(g_fp->_aniMan))
+ delete mq;
+ }
+}
+
+void sceneHandler29_assHitRed() {
+ if (g_vars->scene29_ass->_statics->_staticsId == ST_ASS_NORM) {
+ g_vars->scene29_ass->changeStatics2(ST_ASS_NORM);
+ g_vars->scene29_ass->startAnim(MV_ASS_HITRED, 0, -1);
+ }
+}
+
+void sceneHandler29_assHitGreen() {
+ if (g_vars->scene29_ass->_statics->_staticsId == ST_ASS_NORM) {
+ g_vars->scene29_ass->changeStatics2(ST_ASS_NORM);
+ g_vars->scene29_ass->startAnim(MV_ASS_HITGREEN, 0, -1);
+ }
+}
+
+void sceneHandler29_ballHitCheck() {
+ Ball *ball = g_vars->scene29_greenBalls.pHead;
+ Ball *newball;
+ int x, y;
+
+ while (ball) {
+ x = ball->ani->_ox - 30;
+ y = ball->ani->_oy;
+
+ if (x >= 186) {
+ if (sceneHandler29_checkGreenBallHit(ball->ani, x)) {
+ newball = g_vars->scene29_balls.sub04(g_vars->scene29_balls.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_balls.field_8)
+ g_vars->scene29_balls.field_8->p0 = newball;
+ else
+ g_vars->scene29_balls.pHead = newball;
+
+ g_vars->scene29_balls.field_8 = newball;
+
+ if (ball == g_vars->scene29_greenBalls.pHead)
+ g_vars->scene29_greenBalls.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene29_greenBalls.field_8)
+ g_vars->scene29_greenBalls.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ g_vars->scene29_greenBalls.init(&ball);
+
+ sceneHandler29_manHit();
+
+ g_fp->playSound(SND_29_014, 0);
+
+ ball->ani->startAnim(MV_SHG_HITMAN, 0, -1);
+
+ g_vars->scene29_hitBall = ball->ani->_id;
+ } else {
+ ball->ani->setOXY(x, y);
+ }
+ } else {
+ newball = g_vars->scene29_balls.sub04(g_vars->scene29_balls.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_balls.field_8)
+ g_vars->scene29_balls.field_8->p0 = newball;
+ else
+ g_vars->scene29_balls.pHead = newball;
+
+ g_vars->scene29_balls.field_8 = newball;
+
+ ball->ani->hide();
+
+ if (ball == g_vars->scene29_greenBalls.pHead)
+ g_vars->scene29_greenBalls.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene29_greenBalls.field_8)
+ g_vars->scene29_greenBalls.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ g_vars->scene29_greenBalls.init(&ball);
+
+ sceneHandler29_assHitGreen();
+ }
+
+ ball = ball->p0;
+ }
+
+ ball = g_vars->scene29_flyingRedBalls.pHead;
+
+ while (ball) {
+ x = ball->ani->_ox - 30;
+ y = ball->ani->_oy;
+
+ if (x >= 147) {
+ if (sceneHandler29_checkRedBallHit(ball->ani, x)) {
+ newball = g_vars->scene29_redBalls.sub04(g_vars->scene29_redBalls.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_redBalls.field_8)
+ g_vars->scene29_redBalls.field_8->p0 = newball;
+ else
+ g_vars->scene29_redBalls.pHead = newball;
+
+ g_vars->scene29_redBalls.field_8 = newball;
+
+ g_vars->scene29_flyingRedBalls.removeBall(ball);
+
+ sceneHandler29_manHit();
+
+ g_fp->playSound(SND_29_027, 0);
+
+ ball->ani->startAnim(MV_SHR_HITMAN, 0, -1);
+
+ g_vars->scene29_hitBall = ball->ani->_id;
+ } else {
+ ball->ani->setOXY(x, y);
+ }
+ } else {
+ newball = g_vars->scene29_redBalls.sub04(g_vars->scene29_redBalls.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_redBalls.field_8)
+ g_vars->scene29_redBalls.field_8->p0 = newball;
+ else
+ g_vars->scene29_redBalls.pHead = newball;
+
+ g_vars->scene29_redBalls.field_8 = newball;
+
+ ball->ani->hide();
+
+ if (ball == g_vars->scene29_flyingRedBalls.pHead)
+ g_vars->scene29_flyingRedBalls.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene29_flyingRedBalls.field_8)
+ g_vars->scene29_flyingRedBalls.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ g_vars->scene29_flyingRedBalls.init(&ball);
+
+ sceneHandler29_assHitRed();
+ }
+
+ ball = ball->p0;
+ }
+}
+
+void sceneHandler29_manFromL() {
+ if (g_vars->scene29_manX < 497 && !g_vars->scene29_scrollingDisabled) {
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+
+ g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000);
+ chainQueue(QU_SC29_MANFROM_L, 1);
+
+ g_vars->scene29_scrollingDisabled = true;
+
+ g_fp->_scrollSpeed = g_vars->scene29_scrollSpeed;
+ }
+}
+
+void sceneHandler29_manFromR() {
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+
+ chainQueue(QU_SC29_MANFROM_R, 1);
+
+ g_vars->scene29_arcadeIsOn = false;
+ g_vars->scene29_rideBackEnabled = false;
+}
+
+int sceneHandler29_updateScreenCallback() {
+ int res;
+
+ res = g_fp->drawArcadeOverlay(g_vars->scene29_arcadeIsOn);
+
+ if (!res)
+ g_fp->_updateScreenCallback = 0;
+
+ return res;
+}
+
+void sceneHandler29_manToL() {
+ getCurrSceneSc2MotionController()->clearEnabled();
+ getGameLoaderInteractionController()->disableFlag24();
+
+ chainQueue(QU_SC29_MANTO_L, 1);
+
+ g_vars->scene29_arcadeIsOn = true;
+
+ g_vars->scene29_mgm.addItem(g_fp->_aniMan->_id);
+
+ g_fp->_updateScreenCallback = sceneHandler29_updateScreenCallback;
+
+ g_fp->_msgY = -1;
+ g_fp->_msgX = -1;
+}
+
+void sceneHandler29_manToR() {
+ getCurrSceneSc2MotionController()->clearEnabled();
+ getGameLoaderInteractionController()->disableFlag24();
+
+ chainQueue(QU_SC29_MANTO_R, 1);
+
+ g_vars->scene29_manIsRiding = true;
+ g_fp->_msgY = -1;
+ g_fp->_msgX = -1;
+
+ g_vars->scene29_scrollingDisabled = false;
+
+ g_vars->scene29_scrollSpeed = g_fp->_scrollSpeed;
+ g_fp->_scrollSpeed = 4;
+}
+
+void sceneHandler29_clickPorter(ExCommand *cmd) {
+ if (!g_fp->_aniMan->isIdle() || g_fp->_aniMan->_flags & 0x100) {
+ cmd->_messageKind = 0;
+
+ return;
+ }
+
+ if (g_vars->scene29_manX <= g_vars->scene29_porter->_ox) {
+ if (ABS(351 - g_vars->scene29_manX) > 1 || ABS(443 - g_vars->scene29_manY) > 1
+ || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) {
+ if (g_fp->_msgX != 351 || g_fp->_msgY != 443) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 351, 443, 1, ST_MAN_RIGHT);
+
+ if (mq) {
+ mq->addExCommandToEnd(cmd->createClone());
+
+ postExCommand(g_fp->_aniMan->_id, 2, 351, 443, 0, -1);
+ }
+ }
+ } else {
+ sceneHandler29_manToL();
+ }
+ } else {
+ g_vars->scene29_manX = g_fp->_aniMan->_ox;
+ g_vars->scene29_manY = g_fp->_aniMan->_oy;
+
+ if (ABS(1582 - g_vars->scene29_manX) > 1 || ABS(445 - g_fp->_aniMan->_oy) > 1
+ || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) {
+ if (g_fp->_msgX != 1582 || g_fp->_msgY != 445) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 1582, 445, 1, (0x4000 | ST_MAN_RIGHT));
+
+ if (mq) {
+ mq->addExCommandToEnd(cmd->createClone());
+
+ postExCommand(g_fp->_aniMan->_id, 2, 1582, 445, 0, -1);
+ }
+ }
+ } else {
+ sceneHandler29_manToR();
+ }
+ }
+}
+
+void sceneHandler29_shootersProcess() {
+ if (g_fp->_aniMan->_statics->_staticsId == ST_MAN29_RUNR) {
+ if (g_vars->scene29_manX > 1436) {
+ sceneHandler29_manFromR();
+ } else {
+ g_vars->scene29_shootDistance = (1310 - g_vars->scene29_manX) * 5213 / 100000 + 25;
+
+ if (!g_vars->scene29_manIsHit)
+ g_fp->_aniMan->startAnim(MV_MAN29_RUN, 0, -1);
+ }
+ }
+
+ g_vars->scene29_manX = g_fp->_aniMan->_ox;
+ g_vars->scene29_manY = g_fp->_aniMan->_oy;
+}
+
+void sceneHandler29_shootersEscape() {
+ if (g_vars->scene29_arcadeIsOn) {
+ g_vars->scene29_manX += 2;
+
+ g_fp->_aniMan->setOXY(g_vars->scene29_manX, g_vars->scene29_manY);
+
+ if (g_vars->scene29_manX > 1310 && !g_vars->scene29_shooter1->_movement && !g_vars->scene29_shooter2->_movement
+ && g_vars->scene29_shooter1->_statics->_staticsId == ST_STR1_RIGHT) {
+ g_vars->scene29_shootCountdown = 0;
+
+ g_vars->scene29_shooter1->changeStatics2(ST_STR1_STAND);
+ g_vars->scene29_shooter2->changeStatics2(ST_STR2_STAND);
+
+ chainQueue(QU_SC29_ESCAPE, 1);
+
+ g_vars->scene29_ass->queueMessageQueue(0);
+ g_vars->scene29_ass->hide();
+
+ g_fp->setObjectState(sO_LeftPipe_29, g_fp->getObjectEnumState(sO_LeftPipe_29, sO_IsOpened));
+ }
+ } else if (g_vars->scene29_manIsRiding) {
+ g_vars->scene29_manX -= 4;
+
+ g_fp->_aniMan->setOXY(g_vars->scene29_manX, g_vars->scene29_manY);
+ }
+}
+
+void sceneHandler29_manRideBack() {
+ g_vars->scene29_manX -= 2;
+
+ g_fp->_aniMan->setOXY(g_vars->scene29_manX, g_vars->scene29_manY);
+}
+
+void sceneHandler29_shoot() {
+ if (g_vars->scene29_arcadeIsOn && g_vars->scene29_manX < 1310) {
+ if (g_fp->_rnd->getRandomNumber(1) || g_vars->scene29_shooter1->_movement || g_vars->scene29_shooter1->_statics->_staticsId != ST_STR1_RIGHT) {
+ if (!g_vars->scene29_shooter2->_movement && g_vars->scene29_shooter2->_statics->_staticsId == ST_STR2_RIGHT) {
+ if (g_vars->scene29_shooter2->_flags & 4) {
+ g_vars->scene29_shooter2->startAnim(MV_STR2_SHOOT, 0, -1);
+
+ g_vars->scene29_shootCountdown = 0;
+ }
+ }
+ } else {
+ g_vars->scene29_shooter1->startAnim(MV_STR1_SHOOT, 0, -1);
+
+ g_vars->scene29_shootCountdown = 0;
+ }
+ }
+}
+
+void sceneHandler29_animBearded() {
+ MessageQueue *mq;
+
+ for (uint i = 0; i < g_vars->scene29_bearders.size(); i++) {
+ StaticANIObject *ani = g_vars->scene29_bearders[i]->ani;
+
+ if (g_vars->scene29_bearders[i]->wbflag) {
+ int x = ani->_ox;
+ int y = ani->_oy;
+
+ if (!ani->_movement && ani->_statics->_staticsId == (ST_BRDCMN_RIGHT | 0x4000)) {
+ x -= 4;
+
+ if (x - g_vars->scene29_manX < 100 || !g_vars->scene29_arcadeIsOn) {
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT1), 0, 1);
+
+ mq->replaceKeyCode(-1, ani->_okeyCode);
+ mq->chain(0);
+
+ g_vars->scene29_bearders[i]->wbflag = 0;
+ g_vars->scene29_bearders[i]->wbcounter = 0;
+ }
+ }
+
+ if (!ani->_movement && ani->_statics->_staticsId == ST_BRDCMN_GOR)
+ ani->startAnim(MV_BRDCMN_GOR, 0, -1);
+
+ if (ani->_movement) {
+ if (ani->_movement->_id == MV_BRDCMN_GOR) {
+ x -= 4;
+
+ if (g_vars->scene29_manX - x < 60 || x - g_vars->scene29_manX < -260 || !g_vars->scene29_arcadeIsOn) {
+ ani->changeStatics2(ST_BRDCMN_RIGHT);
+
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT2), 0, 1);
+
+ mq->replaceKeyCode(-1, ani->_okeyCode);
+ mq->chain(0);
+
+ g_vars->scene29_bearders[i]->wbflag = 0;
+ g_vars->scene29_bearders[i]->wbcounter = 0;
+ }
+ }
+ }
+
+ ani->setOXY(x, y);
+ continue;
+ }
+
+ if (g_vars->scene29_arcadeIsOn && g_vars->scene29_bearders[i]->wbcounter > 30) {
+ int newx;
+
+ if (g_fp->_rnd->getRandomNumber(1))
+ goto dostuff;
+
+ if (g_vars->scene29_manX <= 700) {
+ g_vars->scene29_bearders[i]->wbcounter++;
+ continue;
+ }
+
+ if (g_vars->scene29_manX >= 1100) {
+ dostuff:
+ if (g_vars->scene29_manX <= 700 || g_vars->scene29_manX >= 1350) {
+ g_vars->scene29_bearders[i]->wbcounter++;
+ continue;
+ }
+
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD2), 0, 1);
+
+ newx = g_vars->scene29_manX - 200;
+ } else {
+ mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD1), 0, 1);
+
+ newx = g_vars->scene29_manX + 350;
+ }
+
+ mq->getExCommandByIndex(0)->_x = newx;
+ mq->replaceKeyCode(-1, ani->_okeyCode);
+ mq->chain(0);
+
+ g_vars->scene29_bearders[i]->wbflag = 1;
+ g_vars->scene29_bearders[i]->wbcounter = 0;
+ }
+
+ g_vars->scene29_bearders[i]->wbcounter++;
+ }
+}
+
+
+
+int sceneHandler29(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_CMN_WINARCADE:
+ sceneHandler29_winArcade();
+ break;
+
+ case MSG_SC29_LAUGH:
+ if (g_vars->scene29_hitBall == ANI_SHELL_GREEN) {
+ g_fp->playSound(SND_29_028, 0);
+ break;
+ }
+
+ g_fp->playSound(SND_29_029, 0);
+
+ break;
+
+ case MSG_SC29_SHOWLASTRED:
+ if (g_vars->scene29_balls.numBalls) {
+ g_vars->scene29_redBalls.field_8->ani->show1(-1, -1, -1, 0);
+ g_vars->scene29_redBalls.field_8->ani->startAnim(MV_SHR_HITASS, 0, -1);
+ }
+
+ break;
+
+ case MSG_SC29_SHOOTGREEN:
+ sceneHandler29_shootGreen();
+ break;
+
+ case MSG_SC29_SHOOTRED:
+ sceneHandler29_shootRed();
+ break;
+
+ case MSG_SC29_SHOWLASTGREEN:
+ if (g_vars->scene29_balls.numBalls) {
+ g_vars->scene29_balls.field_8->ani->show1(-1, -1, -1, 0);
+ g_vars->scene29_balls.field_8->ani->startAnim(MV_SHG_HITASS, 0, -1);
+ }
+
+ break;
+
+ case MSG_SC29_STOPRIDE:
+ g_vars->scene29_manIsRiding = false;
+ g_vars->scene29_arcadeIsOn = false;
+ g_vars->scene29_reachedFarRight = false;
+ g_vars->scene29_rideBackEnabled = false;
+
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+ break;
+
+ case MSG_SC29_DISABLERIDEBACK:
+ g_vars->scene29_rideBackEnabled = false;
+ break;
+
+ case MSG_SC29_ENABLERIDEBACK:
+ g_vars->scene29_rideBackEnabled = true;
+ g_vars->scene29_reachedFarRight = false;
+ break;
+
+ case MSG_SC29_DISABLEPORTER:
+ g_vars->scene29_reachedFarRight = false;
+ break;
+
+ case MSG_SC29_ENABLEPORTER:
+ g_vars->scene29_reachedFarRight = true;
+ g_vars->scene29_rideBackEnabled = false;
+ g_vars->scene29_manIsHit = false;
+ break;
+
+ case 29:
+ if (!g_vars->scene29_manIsRiding || g_vars->scene29_arcadeIsOn) {
+ if (!g_vars->scene29_arcadeIsOn) {
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);
+
+ if (ani && ani == g_vars->scene29_porter) {
+ sceneHandler29_clickPorter(cmd);
+
+ cmd->_messageKind = 0;
+ break;
+ }
+ break;
+ }
+
+ sceneHandler29_manJump();
+
+ cmd->_messageKind = 0;
+ break;
+ }
+ break;
+
+ case 107:
+ if (g_vars->scene29_arcadeIsOn)
+ sceneHandler29_manBend();
+
+ break;
+
+ case 33:
+ if (g_vars->scene29_arcadeIsOn) {
+ if (g_vars->scene29_manX > g_fp->_sceneRect.right - 500)
+ g_fp->_currentScene->_x = g_fp->_sceneRect.right - g_vars->scene29_manX - 350;
+
+ if (g_vars->scene29_manX < g_fp->_sceneRect.left + 100)
+ g_fp->_currentScene->_x = g_vars->scene29_manX - g_fp->_sceneRect.left - 100;
+
+ } else if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ if (x < g_fp->_sceneRect.left + 300)
+ g_fp->_currentScene->_x = x - 400 - g_fp->_sceneRect.left;
+
+ if (x > g_fp->_sceneRect.right - 300)
+ g_fp->_currentScene->_x = x + 400 - g_fp->_sceneRect.right;
+ }
+
+ g_vars->scene29_manX = g_fp->_aniMan->_ox;
+ g_vars->scene29_manY = g_fp->_aniMan->_oy;
+
+ sceneHandler29_ballHitCheck();
+
+ if (!g_vars->scene29_porter->_movement)
+ g_vars->scene29_porter->startAnim(MV_PTR_MOVEFAST, 0, -1);
+
+ if (g_vars->scene29_manIsRiding)
+ sceneHandler29_manFromL();
+ else if (g_vars->scene29_arcadeIsOn && !g_fp->_aniMan->_movement)
+ sceneHandler29_shootersProcess();
+
+ if (g_vars->scene29_reachedFarRight)
+ sceneHandler29_shootersEscape();
+ else if (g_vars->scene29_rideBackEnabled)
+ sceneHandler29_manRideBack();
+
+ g_vars->scene29_shootCountdown++;
+
+ if (g_vars->scene29_shootCountdown > g_vars->scene29_shootDistance)
+ sceneHandler29_shoot();
+
+ sceneHandler29_animBearded();
+
+ g_fp->_behaviorManager->updateBehaviors();
+ g_fp->startSceneTrack();
+
+ break;
+ }
+
+ return 0;
+}
+
+int scene29_updateCursor() {
+ g_fp->updateCursorCommon();
+
+ if (g_vars->scene29_arcadeIsOn) {
+ if (g_fp->_cursorId != PIC_CSR_DEFAULT_INV && g_fp->_cursorId != PIC_CSR_ITN_INV)
+ g_fp->_cursorId = -1;
+ } else if (g_vars->scene29_manIsRiding) {
+ if (g_fp->_cursorId != PIC_CSR_DEFAULT_INV && g_fp->_cursorId != PIC_CSR_ITN_INV)
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ } else if (g_fp->_objectIdAtCursor == ANI_PORTER) {
+ if (g_fp->_cursorId == PIC_CSR_DEFAULT)
+ g_fp->_cursorId = PIC_CSR_ITN;
+ } else {
+ if (g_fp->_objectIdAtCursor == PIC_SC29_LTRUBA && g_fp->_cursorId == PIC_CSR_ITN)
+ g_fp->_cursorId = PIC_CSR_GOL;
+ }
+ return g_fp->_cursorId;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes/scene30.cpp b/engines/fullpipe/scenes/scene30.cpp
index 59cb83efcd..ca2324e647 100644
--- a/engines/fullpipe/scenes/scene30.cpp
+++ b/engines/fullpipe/scenes/scene30.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -73,7 +73,7 @@ void scene30_initScene(Scene *sc, int flag) {
g_fp->lift_setButton(sO_Level8, ST_LBN_8N);
- g_fp->lift_sub5(sc, QU_SC30_ENTERLIFT, QU_SC30_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC30_ENTERLIFT, QU_SC30_EXITLIFT);
}
int scene30_updateCursor() {
@@ -103,7 +103,7 @@ int sceneHandler30(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC30_UPDATEPATH:
@@ -111,7 +111,7 @@ int sceneHandler30(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case MSG_LIFT_GO:
@@ -123,7 +123,7 @@ int sceneHandler30(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
}
diff --git a/engines/fullpipe/scenes/scene31.cpp b/engines/fullpipe/scenes/scene31.cpp
index 587fc6aaef..3f507e62b7 100644
--- a/engines/fullpipe/scenes/scene31.cpp
+++ b/engines/fullpipe/scenes/scene31.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp
index c93e888e51..9279db7513 100644
--- a/engines/fullpipe/scenes/scene32.cpp
+++ b/engines/fullpipe/scenes/scene32.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -88,7 +88,7 @@ void scene32_initScene(Scene *sc) {
}
g_fp->lift_setButton(sO_Level9, ST_LBN_9N);
- g_fp->lift_sub5(sc, QU_SC32_ENTERLIFT, QU_SC32_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC32_ENTERLIFT, QU_SC32_EXITLIFT);
g_fp->initArcadeKeys("SC_32");
}
@@ -291,7 +291,7 @@ int sceneHandler32(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC33_TRYKUBIK:
@@ -339,7 +339,7 @@ int sceneHandler32(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case MSG_SC6_INSTHANDLE:
@@ -403,7 +403,7 @@ int sceneHandler32(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
break;
diff --git a/engines/fullpipe/scenes/scene33.cpp b/engines/fullpipe/scenes/scene33.cpp
index 209198c0f3..90ea0a4f3f 100644
--- a/engines/fullpipe/scenes/scene33.cpp
+++ b/engines/fullpipe/scenes/scene33.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene34.cpp b/engines/fullpipe/scenes/scene34.cpp
index 942a0abc6b..1c8c8b4855 100644
--- a/engines/fullpipe/scenes/scene34.cpp
+++ b/engines/fullpipe/scenes/scene34.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -92,7 +92,7 @@ void scene34_initScene(Scene *sc) {
g_fp->_floaters->init(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_34"));
g_fp->lift_setButton(sO_Level7, ST_LBN_7N);
- g_fp->lift_sub5(sc, QU_SC34_ENTERLIFT, QU_SC34_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC34_ENTERLIFT, QU_SC34_EXITLIFT);
g_fp->initArcadeKeys("SC_34");
}
@@ -216,7 +216,7 @@ void sceneHandler34_animateAction(ExCommand *cmd) {
int qId = 0;
if (ox == 887) {
- if (oy != 370)
+ if (oy != 370)
return;
qId = QU_SC34_FROMSTOOL;
@@ -317,7 +317,7 @@ int sceneHandler34(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC34_FROMCACTUS:
@@ -392,7 +392,7 @@ int sceneHandler34(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case MSG_LIFT_GO:
@@ -426,7 +426,7 @@ int sceneHandler34(ExCommand *cmd) {
}
if (ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index 290213c453..53381fd555 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -64,7 +64,7 @@ void scene35_initScene(Scene *sc) {
g_fp->playSound(sndId, 1);
g_fp->lift_setButton(sO_Level6, ST_LBN_6N);
- g_fp->lift_sub5(sc, QU_SC35_ENTERLIFT, QU_SC35_EXITLIFT);
+ g_fp->lift_init(sc, QU_SC35_ENTERLIFT, QU_SC35_EXITLIFT);
g_fp->initArcadeKeys("SC_35");
@@ -168,7 +168,7 @@ int sceneHandler35(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC35_STOPFLOW:
@@ -199,7 +199,7 @@ int sceneHandler35(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 29:
@@ -208,7 +208,7 @@ int sceneHandler35(ExCommand *cmd) {
if (ani)
if (ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
break;
}
diff --git a/engines/fullpipe/scenes/scene36.cpp b/engines/fullpipe/scenes/scene36.cpp
index 7d237fd395..44099faba0 100644
--- a/engines/fullpipe/scenes/scene36.cpp
+++ b/engines/fullpipe/scenes/scene36.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp
index 8324e00af7..09da01f138 100644
--- a/engines/fullpipe/scenes/scene37.cpp
+++ b/engines/fullpipe/scenes/scene37.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/scene38.cpp b/engines/fullpipe/scenes/scene38.cpp
index 198a88f25d..2bdae1ce66 100644
--- a/engines/fullpipe/scenes/scene38.cpp
+++ b/engines/fullpipe/scenes/scene38.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -82,8 +82,8 @@ void scene38_initScene(Scene *sc) {
g_vars->scene38_domino1->_flags &= 0xFFFB;
}
- g_fp->lift_sub5(sc, QU_SC38_ENTERLIFT, QU_SC38_EXITLIFT);
- g_fp->lift_sub7(sc, ST_LBN_0N);
+ g_fp->lift_init(sc, QU_SC38_ENTERLIFT, QU_SC38_EXITLIFT);
+ g_fp->lift_setButtonStatics(sc, ST_LBN_0N);
}
void sceneHandler38_tryTakeBottle() {
@@ -348,7 +348,7 @@ int sceneHandler38(ExCommand *cmd) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fp->lift_animation3();
+ g_fp->lift_clickButton();
break;
case MSG_SC38_POINT:
@@ -368,7 +368,7 @@ int sceneHandler38(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 29:
@@ -376,7 +376,7 @@ int sceneHandler38(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
}
diff --git a/engines/fullpipe/scenes/sceneDbg.cpp b/engines/fullpipe/scenes/sceneDbg.cpp
index 4a3751940f..bd53f5749f 100644
--- a/engines/fullpipe/scenes/sceneDbg.cpp
+++ b/engines/fullpipe/scenes/sceneDbg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/sceneFinal.cpp b/engines/fullpipe/scenes/sceneFinal.cpp
index e483e8bab7..d0040463ef 100644
--- a/engines/fullpipe/scenes/sceneFinal.cpp
+++ b/engines/fullpipe/scenes/sceneFinal.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/scenes/sceneIntro.cpp b/engines/fullpipe/scenes/sceneIntro.cpp
index c9f19f3724..5e69cf1d7a 100644
--- a/engines/fullpipe/scenes/sceneIntro.cpp
+++ b/engines/fullpipe/scenes/sceneIntro.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index fd25e2c903..3c13bad854 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -26,6 +26,7 @@
#include "fullpipe/scene.h"
#include "fullpipe/sound.h"
#include "fullpipe/ngiarchive.h"
+#include "fullpipe/messages.h"
#include "common/memstream.h"
#include "audio/audiostream.h"
#include "audio/decoders/vorbis.h"
@@ -73,6 +74,18 @@ bool SoundList::loadFile(const char *fname, char *libname) {
return load(archive, libname);
}
+Sound *SoundList::getSoundItemById(int id) {
+ if (_soundItemsCount == 0) {
+ return _soundItems[0]->getId() != id ? 0 : _soundItems[0];
+ }
+
+ for (int i = 0; i < _soundItemsCount; i++) {
+ if (_soundItems[i]->getId() == id)
+ return _soundItems[i];
+ }
+ return NULL;
+}
+
Sound::Sound() {
_id = 0;
_directSoundBuffer = 0;
@@ -80,10 +93,13 @@ Sound::Sound() {
_objectId = 0;
memset(_directSoundBuffers, 0, sizeof(_directSoundBuffers));
_description = 0;
+ _volume = 100;
}
Sound::~Sound() {
- warning("STUB: Sound::~Sound()");
+ freeSound();
+
+ free(_description);
}
bool Sound::load(MfcArchive &file, NGIArchive *archive) {
@@ -119,24 +135,157 @@ void Sound::setPanAndVolumeByStaticAni() {
debug(3, "STUB Sound::setPanAndVolumeByStaticAni()");
}
-void FullpipeEngine::setSceneMusicParameters(GameVar *var) {
+void Sound::setPanAndVolume(int vol, int pan) {
+ g_fp->_mixer->setChannelVolume(_handle, vol / 39); // 0..10000
+ g_fp->_mixer->setChannelBalance(_handle, pan / 78); // -10000..10000
+}
+
+void Sound::play(int flag) {
+ Audio::SoundHandle handle = getHandle();
+
+ if (g_fp->_mixer->isSoundHandleActive(handle))
+ return;
+
+ byte *soundData = loadData();
+ Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(soundData, getDataSize());
+ Audio::RewindableAudioStream *wav = Audio::makeWAVStream(dataStream, DisposeAfterUse::YES);
+ Audio::AudioStream *audioStream = new Audio::LoopingAudioStream(wav, (flag == 1) ? 0 : 1);
+
+ g_fp->_mixer->playStream(Audio::Mixer::kSFXSoundType, &handle, audioStream);
+}
+
+void Sound::freeSound() {
+ stop();
+
+ free(_soundData);
+}
+
+int Sound::getVolume() {
+ return g_fp->_mixer->getChannelVolume(_handle) * 39; // 0..10000
+}
+
+void Sound::stop() {
+ g_fp->_mixer->stopHandle(_handle);
+}
+
+void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) {
warning("STUB: FullpipeEngine::setSceneMusicParameters()");
- // TODO: Finish this (MINDELAY, MAXDELAY, LOCAL, SEQUENCE, STARTDELAY etc)
- stopAllSoundStreams();
+#if 0
+ stopSoundStream2();
+
+ if (soundStream3)
+ FSOUND_Stream_Stop(soundStream4);
+#endif
+
+ if (_musicLocal)
+ stopAllSoundStreams();
+
+ GameVar *var = gvar->getSubVarByName("MUSIC");
+
+ memset(_sceneTracks, 0, sizeof(_sceneTracks));
+
+ _numSceneTracks = 0;
+ _sceneTrackHasSequence = false;
+
+ if (!var)
+ return;
+
_musicGameVar = var;
+
+ GameVar *tr = var->getSubVarByName("TRACKS");
+ if (tr) {
+ GameVar *sub = tr->_subVars;
+
+ while (sub) {
+ if (_musicAllowed & sub->_value.intValue) {
+ strcpy(_sceneTracks[_numSceneTracks], sub->_varName);
+
+ _numSceneTracks++;
+ }
+
+ sub = sub->_nextVarObj;
+ }
+ }
+
+ _musicMinDelay = var->getSubVarAsInt("MINDELAY");
+ _musicMaxDelay = var->getSubVarAsInt("MAXDELAY");
+ _musicLocal = var->getSubVarAsInt("LOCAL");
+
+ GameVar *seq = var->getSubVarByName("SEQUENCE");
+
+ if (seq) {
+ _sceneTrackHasSequence = true;
+
+ strcpy(_trackName, seq->_value.stringValue);
+ }
+
+ if (_musicLocal)
+ stopAllSoundStreams();
+
+ if (!_sceneTrackIsPlaying || _musicLocal)
+ _trackStartDelay = var->getSubVarAsInt("STARTDELAY");
}
void FullpipeEngine::startSceneTrack() {
- // TODO: Finish this
-#ifdef USE_VORBIS
- if (g_fp->_mixer->isSoundHandleActive(_sceneTrackHandle))
- return;
+ if (!_sceneTrackIsPlaying && _numSceneTracks > 0) {
+ if (_trackStartDelay > 0) {
+ _trackStartDelay--;
+ } else {
+ int trackNum = getSceneTrack();
+
+ if (trackNum == -1) {
+ strcpy(_sceneTracksCurrentTrack, "silence");
+
+ _trackStartDelay = 2880;
+ _sceneTrackIsPlaying = 0;
+ } else {
+ strcpy(_sceneTracksCurrentTrack, _sceneTracks[trackNum]);
+
+ startSoundStream1(_sceneTracksCurrentTrack);
+
+ _sceneTrackIsPlaying = true;
+ }
+ }
+ }
+}
+
+int FullpipeEngine::getSceneTrack() {
+ int res;
+
+ if (_sceneTrackHasSequence) {
+ int num = _musicGameVar->getSubVarAsInt("TRACKS");
+
+ if (_trackName[num + 1] == 's') { // 'silence'
+ res = -1;
+ } else {
+ res = _trackName[num + 1] - '0';
- GameVar *musicTrackVar = _musicGameVar->getSubVarByName("MUSIC")->getSubVarByName("TRACKS")->_subVars;
- if (!musicTrackVar)
+ if (res < 0 || res >= _numSceneTracks)
+ res = 0;
+ }
+
+ int track = num + 1;
+
+ if (!_trackName[num + 2])
+ track = 0;
+
+ _musicGameVar->setSubVarAsInt("TRACKS", track);
+ } else {
+ res = _numSceneTracks * (_updateTicks % 10) / 10;
+ }
+
+ return res;
+}
+
+void FullpipeEngine::startSoundStream1(char *trackName) {
+ warning("STUB: FullpipeEngine::startSoundStream1(%s)", trackName);
+
+ stopAllSoundStreams();
+
+#ifdef USE_VORBIS
+ if (_mixer->isSoundHandleActive(_sceneTrackHandle))
return;
- char *trackName = musicTrackVar->_varName;
Common::File *track = new Common::File();
if (!track->open(trackName)) {
warning("Could not open %s", trackName);
@@ -144,40 +293,130 @@ void FullpipeEngine::startSceneTrack() {
return;
}
Audio::RewindableAudioStream *ogg = Audio::makeVorbisStream(track, DisposeAfterUse::YES);
- g_fp->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_sceneTrackHandle, ogg);
+ _mixer->playStream(Audio::Mixer::kMusicSoundType, &_sceneTrackHandle, ogg);
#endif
}
void FullpipeEngine::stopAllSounds() {
// TODO: Differences from stopAllSoundStreams()
- g_fp->_mixer->stopAll();
+ _mixer->stopAll();
}
void FullpipeEngine::toggleMute() {
- warning("STUB: FullpipeEngine::toggleMute()");
+ if (_soundEnabled) {
+ _sfxVolume = _sfxVolume != -10000 ? -10000 : 0;
+
+ updateSoundVolume();
+ }
}
void FullpipeEngine::playSound(int id, int flag) {
- SoundList *soundList = g_fp->_currentScene->_soundList;
- Sound *sound = soundList->getSoundById(id);
+ Sound *sound = 0;
+
+ for (int i = 0; i < _currSoundListCount; i++) {
+ sound = _currSoundList1[i]->getSoundItemById(id);
+
+ if (sound)
+ break;
+ }
+
if (!sound) {
warning("playSound: Can't find sound with ID %d", id);
return;
}
- byte *soundData = sound->loadData();
- Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(soundData, sound->getDataSize());
- Audio::RewindableAudioStream *wav = Audio::makeWAVStream(dataStream, DisposeAfterUse::YES);
- Audio::AudioStream *audioStream = new Audio::LoopingAudioStream(wav, (flag == 1) ? 0 : 1);
- Audio::SoundHandle handle = sound->getHandle();
- g_fp->_mixer->playStream(Audio::Mixer::kSFXSoundType, &handle, audioStream);
+
+ sound->play(flag);
}
void FullpipeEngine::playTrack(GameVar *sceneVar, const char *name, bool delayed) {
warning("STUB: FullpipeEngine::playTrack(var, %s, %d)", name, delayed);
+#if 0
+ stopSoundStream2();
+
+ if (soundStream3)
+ FSOUND_Stream_Stop(soundStream4);
+#endif
+
+ if (_musicLocal)
+ stopAllSoundStreams();
+
+ GameVar *var = sceneVar->getSubVarByName(name);
+
+ memset(_sceneTracks, 0, sizeof(_sceneTracks));
+
+ _numSceneTracks = 0;
+ _sceneTrackHasSequence = false;
+
+ if (!var)
+ return;
+
+ _musicGameVar = var;
+
+ GameVar *tr = var->getSubVarByName("TRACKS");
+ if (tr) {
+ GameVar *sub = tr->_subVars;
+
+ while (sub) {
+ if (_musicAllowed & sub->_value.intValue) {
+ strcpy(_sceneTracks[_numSceneTracks], sub->_varName);
+
+ _numSceneTracks++;
+ }
+
+ sub = sub->_nextVarObj;
+ }
+ }
+
+ _musicMinDelay = var->getSubVarAsInt("MINDELAY");
+ _musicMaxDelay = var->getSubVarAsInt("MAXDELAY");
+ _musicLocal = var->getSubVarAsInt("LOCAL");
+
+ GameVar *seq = var->getSubVarByName("SEQUENCE");
+
+ if (seq) {
+ _sceneTrackHasSequence = true;
+
+ strcpy(_trackName, seq->_value.stringValue);
+ }
+
+ if (delayed) {
+ if (_sceneTrackIsPlaying && _numSceneTracks == 1) {
+ if (strcmp(_sceneTracksCurrentTrack, _sceneTracks[0]))
+ stopAllSoundStreams();
+ }
+
+ _trackStartDelay = var->getSubVarAsInt("STARTDELAY");
+ }
}
void global_messageHandler_handleSound(ExCommand *cmd) {
- debug(0, "STUB: global_messageHandler_handleSound()");
+ if (!g_fp->_soundEnabled)
+ return;
+
+ Sound *snd = 0;
+
+ for (int i = 0; i < g_fp->_currSoundListCount; i++)
+ snd = g_fp->_currSoundList1[i]->getSoundItemById(cmd->_messageNum);
+
+ if (!snd)
+ return;
+
+ if (cmd->_field_14 & 1) {
+ if (!g_fp->_flgSoundList && (cmd->_field_14 & 4))
+ snd->freeSound();
+
+ snd->updateVolume();
+
+ if (snd->_objectId && g_fp->_currentScene->getStaticANIObject1ById(snd->_objectId, -1))
+ snd->setPanAndVolumeByStaticAni();
+ else
+ snd->setPanAndVolume(g_fp->_sfxVolume, 0);
+
+ if (snd->getVolume() > -3500)
+ snd->play(cmd->_keyCode);
+ } else if (cmd->_field_14 & 2) {
+ snd->stop();
+ }
}
void FullpipeEngine::stopSoundStream2() {
@@ -186,21 +425,29 @@ void FullpipeEngine::stopSoundStream2() {
void FullpipeEngine::stopAllSoundStreams() {
// TODO: Differences from stopAllSounds()
- g_fp->_mixer->stopAll();
+ _mixer->stopAll();
}
void FullpipeEngine::stopAllSoundInstances(int id) {
- SoundList *soundList = g_fp->_currentScene->_soundList;
- for (int i = 0; i < soundList->getCount(); i++) {
- Sound *sound = soundList->getSoundByIndex(i);
- if (sound->getId() == id) {
- g_fp->_mixer->stopHandle(sound->getHandle());
- }
+ for (int i = 0; i < _currSoundListCount; i++) {
+ Sound *sound = _currSoundList1[i]->getSoundItemById(id);
+
+ if (sound)
+ sound->stop();
}
}
void FullpipeEngine::updateSoundVolume() {
- debug(3, "STUB FullpipeEngine::updateSoundVolume()");
+ for (int i = 0; i < _currSoundListCount; i++)
+ for (int j = 0; i < _currSoundList1[i]->getCount(); j++) {
+ _currSoundList1[i]->getSoundByIndex(j)->setPanAndVolume(_sfxVolume, 0);
+ }
+}
+
+void FullpipeEngine::setMusicVolume(int vol) {
+ _musicVolume = vol;
+
+ debug(3, "STUB FullpipeEngine::setMusicVolume()");
}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h
index ca64832c04..14e766f5bb 100644
--- a/engines/fullpipe/sound.h
+++ b/engines/fullpipe/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,11 +28,14 @@ namespace Fullpipe {
class Sound : public MemoryObject {
int _id;
char *_description;
- int16 _objectId;
int _directSoundBuffer;
int _directSoundBuffers[7];
byte *_soundData;
Audio::SoundHandle _handle;
+ int _volume;
+
+public:
+ int16 _objectId;
public:
Sound();
@@ -44,7 +47,13 @@ public:
int getId() const { return _id; }
Audio::SoundHandle getHandle() const { return _handle; }
+ void play(int flag);
+ void freeSound();
+ int getVolume();
+ void stop();
+
void setPanAndVolumeByStaticAni();
+ void setPanAndVolume(int vol, int pan);
};
class SoundList : public CObject {
@@ -60,13 +69,7 @@ class SoundList : public CObject {
int getCount() { return _soundItemsCount; }
Sound *getSoundByIndex(int idx) { return _soundItems[idx]; }
- Sound *getSoundById(int id) {
- for (int i = 0; i < _soundItemsCount; i++) {
- if (_soundItems[i]->getId() == id)
- return _soundItems[i];
- }
- return NULL;
- }
+ Sound *getSoundItemById(int id);
};
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index ccf77ff81a..e36b196517 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 10d9b4dfdf..f1abac5778 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -105,6 +105,19 @@ bool StepArray::gotoNextPoint() {
}
}
+void StepArray::insertPoints(Common::Point **points, int pointsCount) {
+ if (_currPointIndex + pointsCount >= _pointsCount)
+ _points = (Common::Point **)realloc(_points, sizeof(Common::Point *) * (_currPointIndex + pointsCount));
+
+ _maxPointIndex = _currPointIndex + pointsCount;
+
+ for (int i = 0; i < pointsCount; i++) {
+ _points[_currPointIndex + i] = new Common::Point;
+
+ *_points[_currPointIndex + i] = *points[i];
+ }
+}
+
StaticANIObject::StaticANIObject() {
_shadowsOn = 1;
_field_30 = 0;
@@ -264,8 +277,11 @@ void StaticANIObject::deleteFromGlobalMessageQueue() {
}
}
-void StaticANIObject::queueMessageQueue(MessageQueue *mq) {
- if (isIdle() && !(_flags & 0x80)) {
+bool StaticANIObject::queueMessageQueue(MessageQueue *mq) {
+ if (_flags & 0x80)
+ return false;
+
+ if (isIdle()) {
deleteFromGlobalMessageQueue();
_messageQueueId = 0;
_messageNum = 0;
@@ -283,6 +299,8 @@ void StaticANIObject::queueMessageQueue(MessageQueue *mq) {
_messageQueueId = 0;
}
}
+
+ return true;
}
void StaticANIObject::restartMessageQueue(MessageQueue *mq) {
@@ -330,7 +348,35 @@ bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) {
}
void StaticANIObject::startMQIfIdle(int qId, int flag) {
- warning("STUB: StaticANIObject::startMQIfIdle()");
+ MessageQueue *msg = g_fp->_currentScene->getMessageQueueById(qId);
+
+ if (msg && isIdle() && !(_flags & 0x100)) {
+ MessageQueue *mq = new MessageQueue(msg, 0, 0);
+
+ mq->setFlags(mq->getFlags() | flag);
+
+ ExCommand *ex = mq->getExCommandByIndex(0);
+
+ if (ex) {
+ while (ex->_messageKind != 1 || ex->_parentId != _id) {
+ ex->_parId = 0;
+ ex->_excFlags |= 2;
+ ex->handleMessage();
+
+ mq->deleteExCommandByIndex(0, 0);
+
+ ex = mq->getExCommandByIndex(0);
+
+ if (!ex)
+ return;
+ }
+
+ if (ex) {
+ startAnim(ex->_messageNum, mq->_id, -1);
+ mq->deleteExCommandByIndex(0, 1);
+ }
+ }
+ }
}
bool StaticANIObject::isIdle() {
@@ -503,12 +549,16 @@ void Movement::draw(bool flipFlag, int angle) {
}
}
-
void StaticANIObject::loadMovementsPixelData() {
for (uint i = 0; i < _movements.size(); i++)
((Movement *)_movements[i])->loadPixelData();
}
+void StaticANIObject::freeMovementsPixelData() {
+ for (uint i = 0; i < _movements.size(); i++)
+ ((Movement *)_movements[i])->freePixelData();
+}
+
Statics *StaticANIObject::addReverseStatics(Statics *st) {
Statics *res = getStaticsById(st->_staticsId ^ 0x4000);
@@ -974,9 +1024,26 @@ void StaticANIObject::adjustSomeXY() {
}
MessageQueue *StaticANIObject::changeStatics1(int msgNum) {
- warning("STUB: StaticANIObject::changeStatics1(%d)", msgNum);
+ g_fp->_mgm->addItem(_id);
- return 0;
+ MessageQueue *mq = g_fp->_mgm->genMQ(this, msgNum, 0, 0, 0);
+
+ if (!mq)
+ return 0;
+
+ if (mq->getCount() <= 0) {
+ g_fp->_globalMessageQueueList->addMessageQueue(mq);
+
+ if (_flags & 1)
+ _messageQueueId = mq->_id;
+ } else {
+ if (!queueMessageQueue(mq))
+ return 0;
+
+ g_fp->_globalMessageQueueList->addMessageQueue(mq);
+ }
+
+ return mq;
}
void StaticANIObject::changeStatics2(int objId) {
@@ -1056,7 +1123,47 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) {
}
void StaticANIObject::show2(int x, int y, int movementId, int mqId) {
- warning("STUB: StaticANIObject::show2(%d, %d, %d, %d)", x, y, movementId, mqId);
+ if (movementId == -1) {
+ _flags |= 4u;
+ return;
+ }
+
+ if (!_messageQueueId) {
+ _messageQueueId = mqId;
+
+ Movement *mov = getMovementById(movementId);
+
+ if (mov) {
+ _statics = mov->_staticsObj1;
+ _movement = mov;
+ mov->gotoLastFrame();
+ mov->setOXY(x, y);
+ mov->gotoFirstFrame();
+
+ Common::Point point;
+
+ mov->getCurrDynamicPhaseXY(point);
+ _statics->_x = mov->_ox - point.x - mov->_mx;
+ _statics->_y = mov->_oy - point.y - mov->_my;
+
+ _statics->getSomeXY(point);
+ _flags |= 4;
+ _ox = _statics->_x + point.x;
+ _oy = _statics->_y + point.y;
+
+ if (mov->_currMovement) {
+ _flags |= 8;
+ } else {
+ if (_flags & 8)
+ _flags ^= 8;
+ }
+
+ if (_flags & 1)
+ _flags ^= 1;
+
+ _flags |= 0x20;
+ }
+ }
}
void StaticANIObject::playIdle() {
@@ -1065,7 +1172,85 @@ void StaticANIObject::playIdle() {
}
void StaticANIObject::startAnimSteps(int movementId, int messageQueueId, int x, int y, Common::Point **points, int pointsCount, int someDynamicPhaseIndex) {
- warning("STUB: StaticANIObject::startAnimSteps()");
+ Movement *mov = 0;
+
+ if (!(_flags & 0x80)) {
+ if (!_messageQueueId)
+ for (uint i = 0; i < _movements.size(); i++) {
+ if (((Movement *)_movements[i])->_id == movementId) {
+ mov = (Movement *)_movements[i];
+ break;
+ }
+ }
+ }
+
+ if (!mov) {
+ updateGlobalMessageQueue(messageQueueId, _id);
+
+ return;
+ }
+
+
+ if (_movement || !_statics)
+ return;
+
+ Common::Point point;
+
+ _statics->getSomeXY(point);
+
+ int newx = _ox - point.x;
+ int newy = _oy - point.y;
+
+ _movement = mov;
+
+ if (_flags & 0x40)
+ _movement->gotoLastFrame();
+ else
+ _movement->gotoFirstFrame();
+
+ _stepArray.clear();
+ _stepArray.insertPoints(points, pointsCount);
+
+ if (!(_flags & 0x40)) {
+ if (!_movement->_currDynamicPhaseIndex) {
+ _stepArray.getCurrPoint(&point);
+ newx += point.x + _movement->_mx;
+ newy += point.y + _movement->_my;
+ _stepArray.gotoNextPoint();
+
+ ExCommand *ex = _movement->_currDynamicPhase->getExCommand();
+
+ if (ex) {
+ if (ex->_messageKind == 35) {
+ ExCommand *newEx = ex->createClone();
+
+ newEx->_excFlags |= 2u;
+ newEx->sendMessage();
+ }
+ }
+ }
+ }
+
+ _movement->getCurrDynamicPhaseXY(point);
+ setOXY(point.x + newx, point.y + newy);
+
+ if ((_movement->_staticsObj2->_staticsId >> 8) & 0x40)
+ _flags |= 8;
+ else
+ _flags &= 0xFFF7;
+
+ _flags |= 1;
+ _messageQueueId = messageQueueId;
+ _movement->_currDynamicPhase->_countdown = _movement->_currDynamicPhase->_initialCountdown;
+ _movement->_counter = 0;
+ _counter = _initialCounter;
+ _someDynamicPhaseIndex = someDynamicPhaseIndex;
+
+ ExCommand *ex = new ExCommand(_id, 17, 23, 0, 0, movementId, 1, 0, 0, 0);
+
+ ex->_keyCode = _okeyCode;
+ ex->_excFlags = 2;
+ ex->postMessage();
}
bool StaticANIObject::startAnimEx(int movid, int parId, int flag1, int flag2) {
@@ -1184,6 +1369,31 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
return true;
}
+Common::Point *StaticANIObject::calcStepLen(Common::Point *p) {
+ if (_movement) {
+ Common::Point point;
+
+ _movement->calcSomeXY(point, 0);
+
+ p->x = point.x;
+ p->y = point.y;
+
+ int idx = _stepArray.getCurrPointIndex() - _movement->_currDynamicPhaseIndex - 1;
+
+ if (idx >= 0) {
+ _stepArray.getPoint(&point, idx, _movement->_currDynamicPhaseIndex + 2);
+
+ p->x += point.x;
+ p->y += point.y;
+ }
+ } else {
+ p->x = 0;
+ p->y = 0;
+ }
+
+ return p;
+}
+
Statics::Statics() {
_staticsId = 0;
_picture = 0;
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index a620daa528..d678957163 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -47,6 +47,7 @@ class StepArray : public CObject {
Common::Point *getCurrPoint(Common::Point *point);
Common::Point *getPoint(Common::Point *point, int index, int offset);
bool gotoNextPoint();
+ void insertPoints(Common::Point **points, int pointsCount);
};
class StaticPhase : public Picture {
@@ -216,7 +217,7 @@ public:
void setAlpha(int alpha);
void deleteFromGlobalMessageQueue();
- void queueMessageQueue(MessageQueue *msg);
+ bool queueMessageQueue(MessageQueue *msg);
void restartMessageQueue(MessageQueue *msg);
MessageQueue *getMessageQueue();
bool trySetMessageQueue(int msgNum, int qId);
@@ -224,6 +225,7 @@ public:
void initMovements();
void loadMovementsPixelData();
+ void freeMovementsPixelData();
void preloadMovements(MovTable *mt);
void setSomeDynamicPhaseIndex(int val) { _someDynamicPhaseIndex = val; }
@@ -244,6 +246,7 @@ public:
void draw2();
MovTable *countMovements();
+ Common::Point *calcStepLen(Common::Point *p);
void setSpeed(int speed);
void updateStepPos();
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index b3668ea362..0cc8bd83f4 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h
index 5714fd3b4c..72e746cd03 100644
--- a/engines/fullpipe/utils.h
+++ b/engines/fullpipe/utils.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/game.cpp b/engines/game.cpp
index 4bfd8f3bf2..85ad6fe2e8 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/game.h b/engines/game.h
index 3417203ea7..a9bec8f9e0 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/anifile.cpp b/engines/gob/anifile.cpp
index 3b6a7f61ed..8d4afdf94a 100644
--- a/engines/gob/anifile.cpp
+++ b/engines/gob/anifile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/anifile.h b/engines/gob/anifile.h
index c930aafc6b..e9ca9da43e 100644
--- a/engines/gob/anifile.h
+++ b/engines/gob/anifile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp
index 7e3668a0ce..905997f160 100644
--- a/engines/gob/aniobject.cpp
+++ b/engines/gob/aniobject.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h
index d8c8edc2b8..8120d2e0d5 100644
--- a/engines/gob/aniobject.h
+++ b/engines/gob/aniobject.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/backbuffer.cpp b/engines/gob/backbuffer.cpp
index 752042d46e..cee5db5a41 100644
--- a/engines/gob/backbuffer.cpp
+++ b/engines/gob/backbuffer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/backbuffer.h b/engines/gob/backbuffer.h
index c978689e9f..c724cd86c8 100644
--- a/engines/gob/backbuffer.h
+++ b/engines/gob/backbuffer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/cheater.cpp b/engines/gob/cheater.cpp
index 5c1f555389..63c84e1cd7 100644
--- a/engines/gob/cheater.cpp
+++ b/engines/gob/cheater.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/cheater.h b/engines/gob/cheater.h
index bf6c1372fb..a4cd621b58 100644
--- a/engines/gob/cheater.h
+++ b/engines/gob/cheater.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/cheater_geisha.cpp b/engines/gob/cheater_geisha.cpp
index 567333c12f..8c4deec370 100644
--- a/engines/gob/cheater_geisha.cpp
+++ b/engines/gob/cheater_geisha.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/cmpfile.cpp b/engines/gob/cmpfile.cpp
index 0c650a917e..67b378475d 100644
--- a/engines/gob/cmpfile.cpp
+++ b/engines/gob/cmpfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/cmpfile.h b/engines/gob/cmpfile.h
index 9c858238af..055de1b6b6 100644
--- a/engines/gob/cmpfile.h
+++ b/engines/gob/cmpfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/console.cpp b/engines/gob/console.cpp
index 76ccb70dca..b0f6006284 100644
--- a/engines/gob/console.cpp
+++ b/engines/gob/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/console.h b/engines/gob/console.h
index 5b6f0255dd..26a9cb69dd 100644
--- a/engines/gob/console.h
+++ b/engines/gob/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/databases.cpp b/engines/gob/databases.cpp
index 497de489ce..d8d1875371 100644
--- a/engines/gob/databases.cpp
+++ b/engines/gob/databases.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/databases.h b/engines/gob/databases.h
index cde123e6a8..8ef48b480f 100644
--- a/engines/gob/databases.h
+++ b/engines/gob/databases.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index 2071c0f1be..6deaef417e 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/dataio.h b/engines/gob/dataio.h
index adf0786389..00fe00e3f5 100644
--- a/engines/gob/dataio.h
+++ b/engines/gob/dataio.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/dbase.cpp b/engines/gob/dbase.cpp
index 41bd5308ec..5e44ec133e 100644
--- a/engines/gob/dbase.cpp
+++ b/engines/gob/dbase.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/dbase.h b/engines/gob/dbase.h
index 3da1ef7270..387f5029b3 100644
--- a/engines/gob/dbase.h
+++ b/engines/gob/dbase.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/decfile.cpp b/engines/gob/decfile.cpp
index 85b4c09ca3..3ea3773ec6 100644
--- a/engines/gob/decfile.cpp
+++ b/engines/gob/decfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/decfile.h b/engines/gob/decfile.h
index 48af740d41..f6946b9b79 100644
--- a/engines/gob/decfile.h
+++ b/engines/gob/decfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/demos/batplayer.cpp b/engines/gob/demos/batplayer.cpp
index 9c073f0e77..6aa62e3db0 100644
--- a/engines/gob/demos/batplayer.cpp
+++ b/engines/gob/demos/batplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/demos/batplayer.h b/engines/gob/demos/batplayer.h
index f406ea1bf8..a0a9f17c01 100644
--- a/engines/gob/demos/batplayer.h
+++ b/engines/gob/demos/batplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/demos/demoplayer.cpp b/engines/gob/demos/demoplayer.cpp
index 9aa7a4123d..4812301a6b 100644
--- a/engines/gob/demos/demoplayer.cpp
+++ b/engines/gob/demos/demoplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/demos/demoplayer.h b/engines/gob/demos/demoplayer.h
index 9ffdb71de1..63ef538b97 100644
--- a/engines/gob/demos/demoplayer.h
+++ b/engines/gob/demos/demoplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/demos/scnplayer.cpp b/engines/gob/demos/scnplayer.cpp
index 434c49c4bd..7b820d168a 100644
--- a/engines/gob/demos/scnplayer.cpp
+++ b/engines/gob/demos/scnplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/demos/scnplayer.h b/engines/gob/demos/scnplayer.h
index 8627f8ceeb..aef1b3eb2f 100644
--- a/engines/gob/demos/scnplayer.h
+++ b/engines/gob/demos/scnplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp
index 8fb0052a5b..3b26f63c39 100644
--- a/engines/gob/detection/detection.cpp
+++ b/engines/gob/detection/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables.h b/engines/gob/detection/tables.h
index 271f75af79..9b24203aa8 100644
--- a/engines/gob/detection/tables.h
+++ b/engines/gob/detection/tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -55,6 +55,7 @@ static const PlainGameDescriptor gobGames[] = {
{"ajworld", "A.J.'s World of Discovery"},
{"gob3", "Goblins Quest 3"},
{"gob3cd", "Goblins Quest 3 CD"},
+ {"crousti", "Croustibat"},
{"lit1", "Lost in Time Part 1"},
{"lit2", "Lost in Time Part 2"},
{"lit", "Lost in Time"},
@@ -110,6 +111,7 @@ static const GOBGameDescription gameDescriptions[] = {
#include "gob/detection/tables_adi4.h" // The ADI / Addy 4 series
#include "gob/detection/tables_adibou.h" // The Adibou / Addy Junior series
#include "gob/detection/tables_ajworld.h" // A.J.'s World of Discovery / ADI Jr.
+ #include "gob/detection/tables_crousti.h" // Croustibat
{ AD_TABLE_END_MARKER, kGameTypeNone, kFeaturesNone, 0, 0, 0}
};
diff --git a/engines/gob/detection/tables_adi2.h b/engines/gob/detection/tables_adi2.h
index e59552a554..0ca90e7d31 100644
--- a/engines/gob/detection/tables_adi2.h
+++ b/engines/gob/detection/tables_adi2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_adi4.h b/engines/gob/detection/tables_adi4.h
index 7147a84d7a..9921b9c974 100644
--- a/engines/gob/detection/tables_adi4.h
+++ b/engines/gob/detection/tables_adi4.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_adibou.h b/engines/gob/detection/tables_adibou.h
index e257ffdf8f..a995e8d1b3 100644
--- a/engines/gob/detection/tables_adibou.h
+++ b/engines/gob/detection/tables_adibou.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_ajworld.h b/engines/gob/detection/tables_ajworld.h
index 99d61c882e..5e2023333c 100644
--- a/engines/gob/detection/tables_ajworld.h
+++ b/engines/gob/detection/tables_ajworld.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_bargon.h b/engines/gob/detection/tables_bargon.h
index 5f7fa2ab6f..d8e2c53410 100644
--- a/engines/gob/detection/tables_bargon.h
+++ b/engines/gob/detection/tables_bargon.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_crousti.h b/engines/gob/detection/tables_crousti.h
new file mode 100644
index 0000000000..2e04bdeba8
--- /dev/null
+++ b/engines/gob/detection/tables_crousti.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/* Detection tables for Croustibat. */
+
+#ifndef GOB_DETECTION_TABLES_CROUSTI_H
+#define GOB_DETECTION_TABLES_CROUSTI_H
+
+// -- DOS VGA Floppy --
+
+{
+ {
+ "crousti",
+ "",
+ AD_ENTRY1s("intro.stk", "63fd795818fa72c32b903bbd99e18ea1", 851926),
+ PT_BRA,
+ kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
+ },
+ kGameTypeCrousti,
+ kFeaturesAdLib,
+ 0, 0, 0
+},
+
+#endif // GOB_DETECTION_TABLES_CROUSTI_H
diff --git a/engines/gob/detection/tables_dynasty.h b/engines/gob/detection/tables_dynasty.h
index 21e4ecc89f..80a3b7d543 100644
--- a/engines/gob/detection/tables_dynasty.h
+++ b/engines/gob/detection/tables_dynasty.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h
index 69a9e4fd6b..27b4d1bf75 100644
--- a/engines/gob/detection/tables_fallback.h
+++ b/engines/gob/detection/tables_fallback.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_fascin.h b/engines/gob/detection/tables_fascin.h
index b74a057db9..7c7c9a7a2f 100644
--- a/engines/gob/detection/tables_fascin.h
+++ b/engines/gob/detection/tables_fascin.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h
index e9a5cfb77f..01e2ec9ad0 100644
--- a/engines/gob/detection/tables_geisha.h
+++ b/engines/gob/detection/tables_geisha.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_gob1.h b/engines/gob/detection/tables_gob1.h
index 8ae72abf33..289e32e121 100644
--- a/engines/gob/detection/tables_gob1.h
+++ b/engines/gob/detection/tables_gob1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_gob2.h b/engines/gob/detection/tables_gob2.h
index f2449d086d..7c167593ca 100644
--- a/engines/gob/detection/tables_gob2.h
+++ b/engines/gob/detection/tables_gob2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_gob3.h b/engines/gob/detection/tables_gob3.h
index 29a76d2491..55c840f44e 100644
--- a/engines/gob/detection/tables_gob3.h
+++ b/engines/gob/detection/tables_gob3.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_inca2.h b/engines/gob/detection/tables_inca2.h
index 8ca9463277..30ed73eafa 100644
--- a/engines/gob/detection/tables_inca2.h
+++ b/engines/gob/detection/tables_inca2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_lit.h b/engines/gob/detection/tables_lit.h
index c4453312ec..f6df3162db 100644
--- a/engines/gob/detection/tables_lit.h
+++ b/engines/gob/detection/tables_lit.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_littlered.h b/engines/gob/detection/tables_littlered.h
index 55279f72b6..21aa9d4a04 100644
--- a/engines/gob/detection/tables_littlered.h
+++ b/engines/gob/detection/tables_littlered.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_onceupon.h b/engines/gob/detection/tables_onceupon.h
index c516719c55..f89a842176 100644
--- a/engines/gob/detection/tables_onceupon.h
+++ b/engines/gob/detection/tables_onceupon.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_playtoons.h b/engines/gob/detection/tables_playtoons.h
index 5bdc337eba..f249e3ffa6 100644
--- a/engines/gob/detection/tables_playtoons.h
+++ b/engines/gob/detection/tables_playtoons.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_urban.h b/engines/gob/detection/tables_urban.h
index 71c34c9d89..78fc0893ae 100644
--- a/engines/gob/detection/tables_urban.h
+++ b/engines/gob/detection/tables_urban.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_ween.h b/engines/gob/detection/tables_ween.h
index 89da5ba794..66a83aff0f 100644
--- a/engines/gob/detection/tables_ween.h
+++ b/engines/gob/detection/tables_ween.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/detection/tables_woodruff.h b/engines/gob/detection/tables_woodruff.h
index f6675a0981..b96065b14f 100644
--- a/engines/gob/detection/tables_woodruff.h
+++ b/engines/gob/detection/tables_woodruff.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index e1322c2831..3ee6d64bec 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -88,11 +88,6 @@ Draw::Draw(GobEngine *vm) : _vm(vm) {
_vgaPalette[i].blue = 0;
_vgaPalette[i].green = 0;
}
- for (int i = 0; i < 16; i++) {
- _vgaSmallPalette[i].red = 0;
- _vgaSmallPalette[i].blue = 0;
- _vgaSmallPalette[i].green = 0;
- }
_showCursor = 0;
_cursorIndex = 0;
diff --git a/engines/gob/draw.h b/engines/gob/draw.h
index b51c6466e0..eb12e85468 100644
--- a/engines/gob/draw.h
+++ b/engines/gob/draw.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -115,7 +115,6 @@ public:
int16 _unusedPalette1[18];
int16 _unusedPalette2[16];
Video::Color _vgaPalette[256];
- Video::Color _vgaSmallPalette[16];
// 0 (00b): No cursor
// 1 (01b): Cursor would be on _backSurface
diff --git a/engines/gob/draw_bargon.cpp b/engines/gob/draw_bargon.cpp
index a2a70927f6..34f8b06dbb 100644
--- a/engines/gob/draw_bargon.cpp
+++ b/engines/gob/draw_bargon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/draw_fascin.cpp b/engines/gob/draw_fascin.cpp
index 12009d7ee5..60b173de6c 100644
--- a/engines/gob/draw_fascin.cpp
+++ b/engines/gob/draw_fascin.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -882,8 +882,6 @@ bool Draw_Fascination::overlapWin(int16 idWin1, int16 idWin2) {
void Draw_Fascination::activeWin(int16 id) {
bool found = false;
int16 t[10], t2[10];
- int nextId = -1;
- int oldId = -1;
SurfacePtr tempSrf;
SurfacePtr oldSrf[10];
@@ -906,6 +904,8 @@ void Draw_Fascination::activeWin(int16 id) {
}
if (found) {
+ int nextId = -1;
+ int oldId = -1;
for (int i = 9; i >= 0; i--) {
if (t[i] != -1) {
if (nextId != -1)
diff --git a/engines/gob/draw_playtoons.cpp b/engines/gob/draw_playtoons.cpp
index 76e2ae591c..5fe5657270 100644
--- a/engines/gob/draw_playtoons.cpp
+++ b/engines/gob/draw_playtoons.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/draw_v1.cpp b/engines/gob/draw_v1.cpp
index 878c1dc265..d17aad5cad 100644
--- a/engines/gob/draw_v1.cpp
+++ b/engines/gob/draw_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index f5475278c4..9855b1ebd7 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/expression.cpp b/engines/gob/expression.cpp
index 5cea8c0485..1a99412530 100644
--- a/engines/gob/expression.cpp
+++ b/engines/gob/expression.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/expression.h b/engines/gob/expression.h
index ecce7c869d..7d4466509b 100644
--- a/engines/gob/expression.h
+++ b/engines/gob/expression.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp
index de0c3f2d5c..d8e39e6c38 100644
--- a/engines/gob/game.cpp
+++ b/engines/gob/game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/game.h b/engines/gob/game.h
index 995baa5629..1bcf0b1e2a 100644
--- a/engines/gob/game.h
+++ b/engines/gob/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/global.cpp b/engines/gob/global.cpp
index 87656a5fad..e943e1f023 100644
--- a/engines/gob/global.cpp
+++ b/engines/gob/global.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/global.h b/engines/gob/global.h
index 175331dd83..742771733c 100644
--- a/engines/gob/global.h
+++ b/engines/gob/global.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index fcf98f0355..5ab3271a8f 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -457,6 +457,7 @@ Common::Error GobEngine::initGameParts() {
case kGameTypeWeen:
case kGameTypeGob2:
+ case kGameTypeCrousti:
_init = new Init_v2(this);
_video = new Video_v2(this);
_inter = new Inter_v2(this);
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index df73404596..aefc63c707 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -55,6 +55,7 @@ class StaticTextWidget;
* - Bambou le sauveur de la jungle
* - Geisha
* - Once Upon A Time: Little Red Riding Hood
+ * - Croustibat
*/
namespace Gob {
@@ -134,7 +135,8 @@ enum GameType {
kGameTypeBabaYaga,
kGameTypeLittleRed,
kGameTypeOnceUponATime, // Need more inspection to see if Baba Yaga or Abracadabra
- kGameTypeAJWorld
+ kGameTypeAJWorld,
+ kGameTypeCrousti
};
enum Features {
diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp
index a032588a1f..5f697d21fb 100644
--- a/engines/gob/goblin.cpp
+++ b/engines/gob/goblin.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/goblin.h b/engines/gob/goblin.h
index 3d45da599d..ad41df8270 100644
--- a/engines/gob/goblin.h
+++ b/engines/gob/goblin.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/goblin_v1.cpp b/engines/gob/goblin_v1.cpp
index ea46b4b9a1..760e5e65a9 100644
--- a/engines/gob/goblin_v1.cpp
+++ b/engines/gob/goblin_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp
index 2dbdf39d7d..4dadf33883 100644
--- a/engines/gob/goblin_v2.cpp
+++ b/engines/gob/goblin_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/goblin_v3.cpp b/engines/gob/goblin_v3.cpp
index 38880bfdb6..7a64ba7671 100644
--- a/engines/gob/goblin_v3.cpp
+++ b/engines/gob/goblin_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/goblin_v4.cpp b/engines/gob/goblin_v4.cpp
index 0d6a995af9..908b4ef616 100644
--- a/engines/gob/goblin_v4.cpp
+++ b/engines/gob/goblin_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index cd00cd13d7..7aad47b314 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/hotspots.h b/engines/gob/hotspots.h
index bd7b281c10..912ac8a20e 100644
--- a/engines/gob/hotspots.h
+++ b/engines/gob/hotspots.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/iniconfig.cpp b/engines/gob/iniconfig.cpp
index 032231bd4d..885495d640 100644
--- a/engines/gob/iniconfig.cpp
+++ b/engines/gob/iniconfig.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/iniconfig.h b/engines/gob/iniconfig.h
index c1890170dc..3d4021f250 100644
--- a/engines/gob/iniconfig.h
+++ b/engines/gob/iniconfig.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp
index 814d4d1821..a986d696f2 100644
--- a/engines/gob/init.cpp
+++ b/engines/gob/init.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init.h b/engines/gob/init.h
index ac460fd654..6b7ce74950 100644
--- a/engines/gob/init.h
+++ b/engines/gob/init.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_fascin.cpp b/engines/gob/init_fascin.cpp
index e6d82faa68..d3d0394b2e 100644
--- a/engines/gob/init_fascin.cpp
+++ b/engines/gob/init_fascin.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_geisha.cpp b/engines/gob/init_geisha.cpp
index 01081a5af6..9de4ddb42b 100644
--- a/engines/gob/init_geisha.cpp
+++ b/engines/gob/init_geisha.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_v1.cpp b/engines/gob/init_v1.cpp
index a8e8cbe2c3..a48e096562 100644
--- a/engines/gob/init_v1.cpp
+++ b/engines/gob/init_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp
index 1540ff6601..6040a1a21d 100644
--- a/engines/gob/init_v2.cpp
+++ b/engines/gob/init_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_v3.cpp b/engines/gob/init_v3.cpp
index bfbe00849f..d47967557f 100644
--- a/engines/gob/init_v3.cpp
+++ b/engines/gob/init_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_v4.cpp b/engines/gob/init_v4.cpp
index ba92c2fc04..5f3061b096 100644
--- a/engines/gob/init_v4.cpp
+++ b/engines/gob/init_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_v6.cpp b/engines/gob/init_v6.cpp
index 6059ec89ed..4b09286619 100644
--- a/engines/gob/init_v6.cpp
+++ b/engines/gob/init_v6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/init_v7.cpp b/engines/gob/init_v7.cpp
index b5b51aad2a..69fbf8ae74 100644
--- a/engines/gob/init_v7.cpp
+++ b/engines/gob/init_v7.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp
index 4460274561..2a8539846c 100644
--- a/engines/gob/inter.cpp
+++ b/engines/gob/inter.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 2aa837e777..a5fa03c2a1 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -439,6 +439,7 @@ protected:
void o2_animPalInit(OpFuncParams &params);
void o2_addHotspot(OpFuncParams &params);
void o2_removeHotspot(OpFuncParams &params);
+ void o2_getTotTextItemPart(OpFuncParams &params);
void o2_goblinFunc(OpFuncParams &params);
void o2_stopSound(OpFuncParams &params);
void o2_loadSound(OpFuncParams &params);
@@ -540,7 +541,6 @@ protected:
virtual void setupOpcodesFunc();
virtual void setupOpcodesGob();
- void o3_getTotTextItemPart(OpFuncParams &params);
void o3_speakerOn(OpFuncParams &params);
void o3_speakerOff(OpFuncParams &params);
void o3_copySprite(OpFuncParams &params);
diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp
index 029f7c697b..f4a62a6a25 100644
--- a/engines/gob/inter_bargon.cpp
+++ b/engines/gob/inter_bargon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_fascin.cpp b/engines/gob/inter_fascin.cpp
index c3b5d98a58..c67143346b 100644
--- a/engines/gob/inter_fascin.cpp
+++ b/engines/gob/inter_fascin.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp
index 8d05cefa66..8102dbfa9b 100644
--- a/engines/gob/inter_geisha.cpp
+++ b/engines/gob/inter_geisha.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_inca2.cpp b/engines/gob/inter_inca2.cpp
index f868f18242..555fdfaf27 100644
--- a/engines/gob/inter_inca2.cpp
+++ b/engines/gob/inter_inca2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp
index 01aa4c2158..c817ce648f 100644
--- a/engines/gob/inter_littlered.cpp
+++ b/engines/gob/inter_littlered.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp
index b0bdde07ac..45f573efcd 100644
--- a/engines/gob/inter_playtoons.cpp
+++ b/engines/gob/inter_playtoons.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index dc533a210a..40134bbf17 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1125,7 +1125,7 @@ void Inter_v1::o1_palLoad(OpFuncParams &params) {
_vm->_draw->_vgaPalette[i].blue = _vm->_game->_script->readByte();
}
- memcpy(_vm->_draw->_vgaSmallPalette, _vm->_draw->_vgaPalette, 16 * 3);
+ memcpy(_vm->_draw->_vgaPalette, _vm->_draw->_vgaPalette, 16 * 3);
break;
case 53:
@@ -1183,7 +1183,7 @@ void Inter_v1::o1_palLoad(OpFuncParams &params) {
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0);
return;
}
- _vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaSmallPalette;
+ _vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0);
}
}
@@ -2489,21 +2489,21 @@ void Inter_v1::animPalette() {
_vm->_video->waitRetrace();
if (_animPalDir[0] == -1) {
- col = _vm->_draw->_vgaSmallPalette[_animPalLowIndex[0]];
+ col = _vm->_draw->_vgaPalette[_animPalLowIndex[0]];
for (i = _animPalLowIndex[0]; i < _animPalHighIndex[0]; i++)
- _vm->_draw->_vgaSmallPalette[i] = _vm->_draw->_vgaSmallPalette[i + 1];
+ _vm->_draw->_vgaPalette[i] = _vm->_draw->_vgaPalette[i + 1];
- _vm->_draw->_vgaSmallPalette[_animPalHighIndex[0]] = col;
+ _vm->_draw->_vgaPalette[_animPalHighIndex[0]] = col;
} else {
- col = _vm->_draw->_vgaSmallPalette[_animPalHighIndex[0]];
+ col = _vm->_draw->_vgaPalette[_animPalHighIndex[0]];
for (i = _animPalHighIndex[0]; i > _animPalLowIndex[0]; i--)
- _vm->_draw->_vgaSmallPalette[i] = _vm->_draw->_vgaSmallPalette[i - 1];
+ _vm->_draw->_vgaPalette[i] = _vm->_draw->_vgaPalette[i - 1];
- _vm->_draw->_vgaSmallPalette[_animPalLowIndex[0]] = col;
+ _vm->_draw->_vgaPalette[_animPalLowIndex[0]] = col;
}
- _vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaSmallPalette;
+ _vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
}
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 6b7a4f03bd..3aa7ad1664 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -124,6 +124,7 @@ void Inter_v2::setupOpcodesFunc() {
OPCODEFUNC(0x18, o2_addHotspot);
OPCODEFUNC(0x19, o2_removeHotspot);
+ OPCODEFUNC(0x1A, o2_getTotTextItemPart);
OPCODEFUNC(0x25, o2_goblinFunc);
@@ -1195,6 +1196,188 @@ void Inter_v2::o2_removeHotspot(OpFuncParams &params) {
_vm->_game->_hotspots->remove((stateType2 << 12) + id);
}
+void Inter_v2::o2_getTotTextItemPart(OpFuncParams &params) {
+ byte *totData;
+ int16 totTextItem;
+ int16 part, curPart = 0;
+ int16 offX = 0, offY = 0;
+ int16 collId = 0, collCmd;
+ uint32 stringStartVar, stringVar;
+ bool end;
+
+ totTextItem = _vm->_game->_script->readInt16();
+ stringStartVar = _vm->_game->_script->readVarIndex();
+ part = _vm->_game->_script->readValExpr();
+
+ stringVar = stringStartVar;
+ if (part == -1) {
+ warning("o2_getTotTextItemPart, part == -1");
+ _vm->_draw->_hotspotText = GET_VARO_STR(stringVar);
+ }
+
+ WRITE_VARO_UINT8(stringVar, 0);
+
+ TextItem *textItem = _vm->_game->_resources->getTextItem(totTextItem);
+ if (!textItem)
+ return;
+
+ totData = textItem->getData();
+
+ // Skip background rectangles
+ while (((int16) READ_LE_UINT16(totData)) != -1)
+ totData += 9;
+ totData += 2;
+
+ while (*totData != 1) {
+ switch (*totData) {
+ case 2:
+ case 5:
+ totData++;
+ offX = READ_LE_UINT16(totData);
+ offY = READ_LE_UINT16(totData + 2);
+ totData += 4;
+ break;
+
+ case 3:
+ case 4:
+ totData += 2;
+ break;
+
+ case 6:
+ totData++;
+
+ collCmd = *totData++;
+ if (collCmd & 0x80) {
+ collId = READ_LE_UINT16(totData);
+ totData += 2;
+ }
+
+ // Skip collision coordinates
+ if (collCmd & 0x40)
+ totData += 8;
+
+ if ((collCmd & 0x8F) && ((-collId - 1) == part)) {
+ int n = 0;
+
+ while (1) {
+ if ((*totData < 1) || (*totData > 7)) {
+ if (*totData >= 32) {
+ WRITE_VARO_UINT8(stringVar++, *totData++);
+ n++;
+ } else
+ totData++;
+ continue;
+ }
+
+ if ((n != 0) || (*totData == 1) ||
+ (*totData == 6) || (*totData == 7)) {
+ WRITE_VARO_UINT8(stringVar, 0);
+ delete textItem;
+ return;
+ }
+
+ switch (*totData) {
+ case 2:
+ case 5:
+ totData += 5;
+ break;
+
+ case 3:
+ case 4:
+ totData += 2;
+ break;
+ }
+ }
+
+ }
+ break;
+
+ case 7:
+ case 8:
+ case 9:
+ totData++;
+ break;
+
+ case 10:
+ if (curPart == part) {
+ WRITE_VARO_UINT8(stringVar++, 0xFF);
+ WRITE_VARO_UINT16(stringVar, offX);
+ WRITE_VARO_UINT16(stringVar + 2, offY);
+ WRITE_VARO_UINT16(stringVar + 4,
+ totData - _vm->_game->_resources->getTexts());
+ WRITE_VARO_UINT8(stringVar + 6, 0);
+ delete textItem;
+ return;
+ }
+
+ end = false;
+ while (!end) {
+ switch (*totData) {
+ case 2:
+ case 5:
+ if (ABS(offY - READ_LE_UINT16(totData + 3)) > 1)
+ end = true;
+ else
+ totData += 5;
+ break;
+
+ case 3:
+ totData += 2;
+ break;
+
+ case 10:
+ totData += totData[1] * 2 + 2;
+ break;
+
+ default:
+ if (*totData < 32)
+ end = true;
+ while (*totData >= 32)
+ totData++;
+ break;
+ }
+ }
+
+ if (part >= 0)
+ curPart++;
+ break;
+
+ default:
+ while (1) {
+
+ while (*totData >= 32)
+ WRITE_VARO_UINT8(stringVar++, *totData++);
+ WRITE_VARO_UINT8(stringVar, 0);
+
+ if (((*totData != 2) && (*totData != 5)) ||
+ (ABS(offY - READ_LE_UINT16(totData + 3)) > 1)) {
+
+ if (curPart == part) {
+ delete textItem;
+ return;
+ }
+
+ stringVar = stringStartVar;
+ WRITE_VARO_UINT8(stringVar, 0);
+
+ while (*totData >= 32)
+ totData++;
+
+ if (part >= 0)
+ curPart++;
+ break;
+
+ } else
+ totData += 5;
+
+ }
+ break;
+ }
+ }
+
+ delete textItem;
+}
+
void Inter_v2::o2_goblinFunc(OpFuncParams &params) {
OpGobParams gobParams;
int16 cmd;
diff --git a/engines/gob/inter_v3.cpp b/engines/gob/inter_v3.cpp
index edf56012d9..fd729b85be 100644
--- a/engines/gob/inter_v3.cpp
+++ b/engines/gob/inter_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -50,7 +50,6 @@ void Inter_v3::setupOpcodesDraw() {
void Inter_v3::setupOpcodesFunc() {
Inter_v2::setupOpcodesFunc();
- OPCODEFUNC(0x1A, o3_getTotTextItemPart);
OPCODEFUNC(0x22, o3_speakerOn);
OPCODEFUNC(0x23, o3_speakerOff);
OPCODEFUNC(0x32, o3_copySprite);
@@ -66,188 +65,6 @@ void Inter_v3::setupOpcodesGob() {
OPCODEGOB(100, o3_wobble);
}
-void Inter_v3::o3_getTotTextItemPart(OpFuncParams &params) {
- byte *totData;
- int16 totTextItem;
- int16 part, curPart = 0;
- int16 offX = 0, offY = 0;
- int16 collId = 0, collCmd;
- uint32 stringStartVar, stringVar;
- bool end;
-
- totTextItem = _vm->_game->_script->readInt16();
- stringStartVar = _vm->_game->_script->readVarIndex();
- part = _vm->_game->_script->readValExpr();
-
- stringVar = stringStartVar;
- if (part == -1) {
- warning("o3_getTotTextItemPart, part == -1");
- _vm->_draw->_hotspotText = GET_VARO_STR(stringVar);
- }
-
- WRITE_VARO_UINT8(stringVar, 0);
-
- TextItem *textItem = _vm->_game->_resources->getTextItem(totTextItem);
- if (!textItem)
- return;
-
- totData = textItem->getData();
-
- // Skip background rectangles
- while (((int16) READ_LE_UINT16(totData)) != -1)
- totData += 9;
- totData += 2;
-
- while (*totData != 1) {
- switch (*totData) {
- case 2:
- case 5:
- totData++;
- offX = READ_LE_UINT16(totData);
- offY = READ_LE_UINT16(totData + 2);
- totData += 4;
- break;
-
- case 3:
- case 4:
- totData += 2;
- break;
-
- case 6:
- totData++;
-
- collCmd = *totData++;
- if (collCmd & 0x80) {
- collId = READ_LE_UINT16(totData);
- totData += 2;
- }
-
- // Skip collision coordinates
- if (collCmd & 0x40)
- totData += 8;
-
- if ((collCmd & 0x8F) && ((-collId - 1) == part)) {
- int n = 0;
-
- while (1) {
- if ((*totData < 1) || (*totData > 7)) {
- if (*totData >= 32) {
- WRITE_VARO_UINT8(stringVar++, *totData++);
- n++;
- } else
- totData++;
- continue;
- }
-
- if ((n != 0) || (*totData == 1) ||
- (*totData == 6) || (*totData == 7)) {
- WRITE_VARO_UINT8(stringVar, 0);
- delete textItem;
- return;
- }
-
- switch (*totData) {
- case 2:
- case 5:
- totData += 5;
- break;
-
- case 3:
- case 4:
- totData += 2;
- break;
- }
- }
-
- }
- break;
-
- case 7:
- case 8:
- case 9:
- totData++;
- break;
-
- case 10:
- if (curPart == part) {
- WRITE_VARO_UINT8(stringVar++, 0xFF);
- WRITE_VARO_UINT16(stringVar, offX);
- WRITE_VARO_UINT16(stringVar + 2, offY);
- WRITE_VARO_UINT16(stringVar + 4,
- totData - _vm->_game->_resources->getTexts());
- WRITE_VARO_UINT8(stringVar + 6, 0);
- delete textItem;
- return;
- }
-
- end = false;
- while (!end) {
- switch (*totData) {
- case 2:
- case 5:
- if (ABS(offY - READ_LE_UINT16(totData + 3)) > 1)
- end = true;
- else
- totData += 5;
- break;
-
- case 3:
- totData += 2;
- break;
-
- case 10:
- totData += totData[1] * 2 + 2;
- break;
-
- default:
- if (*totData < 32)
- end = true;
- while (*totData >= 32)
- totData++;
- break;
- }
- }
-
- if (part >= 0)
- curPart++;
- break;
-
- default:
- while (1) {
-
- while (*totData >= 32)
- WRITE_VARO_UINT8(stringVar++, *totData++);
- WRITE_VARO_UINT8(stringVar, 0);
-
- if (((*totData != 2) && (*totData != 5)) ||
- (ABS(offY - READ_LE_UINT16(totData + 3)) > 1)) {
-
- if (curPart == part) {
- delete textItem;
- return;
- }
-
- stringVar = stringStartVar;
- WRITE_VARO_UINT8(stringVar, 0);
-
- while (*totData >= 32)
- totData++;
-
- if (part >= 0)
- curPart++;
- break;
-
- } else
- totData += 5;
-
- }
- break;
- }
- }
-
- delete textItem;
-}
-
void Inter_v3::o3_speakerOn(OpFuncParams &params) {
int16 frequency = _vm->_game->_script->readValExpr();
int32 length = -1;
diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp
index f89af0e45a..656ca6f5c3 100644
--- a/engines/gob/inter_v4.cpp
+++ b/engines/gob/inter_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index 24905b08d1..50176e0a27 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index 505993ee4d..66eade60f7 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index 1238c23e3b..fd9406054c 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -27,7 +27,8 @@
#include "graphics/cursorman.h"
#include "graphics/wincursor.h"
-#include "graphics/decoders/iff.h"
+
+#include "image/iff.h"
#include "gob/gob.h"
#include "gob/global.h"
@@ -547,7 +548,7 @@ void Inter_v7::o7_loadIFFPalette() {
return;
}
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.loadStream(*iffFile);
if (!decoder.getPalette() || decoder.getPaletteColorCount() != 256) {
warning("o7_loadIFFPalette(): Failed reading palette from IFF \"%s\"", file.c_str());
diff --git a/engines/gob/map.cpp b/engines/gob/map.cpp
index e58cd3c9a3..1015a779b2 100644
--- a/engines/gob/map.cpp
+++ b/engines/gob/map.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/map.h b/engines/gob/map.h
index 856cf356da..785b7342cd 100644
--- a/engines/gob/map.h
+++ b/engines/gob/map.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/map_v1.cpp b/engines/gob/map_v1.cpp
index ce3d584e7f..72e37bd5fc 100644
--- a/engines/gob/map_v1.cpp
+++ b/engines/gob/map_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp
index 1db461370f..cb5abe9644 100644
--- a/engines/gob/map_v2.cpp
+++ b/engines/gob/map_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/diving.cpp b/engines/gob/minigames/geisha/diving.cpp
index 56c7b5213c..37ef291a93 100644
--- a/engines/gob/minigames/geisha/diving.cpp
+++ b/engines/gob/minigames/geisha/diving.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -389,8 +389,7 @@ void Diving::initScreen() {
_vm->_util->setFrameRate(15);
// Set palette
- memcpy(_vm->_draw->_vgaPalette , kPalette, sizeof(kPalette));
- memcpy(_vm->_draw->_vgaSmallPalette, kPalette, sizeof(kPalette));
+ memcpy(_vm->_draw->_vgaPalette, kPalette, sizeof(kPalette));
// Draw background decal
_vm->_draw->_backSurface->clear();
diff --git a/engines/gob/minigames/geisha/diving.h b/engines/gob/minigames/geisha/diving.h
index 089d60b260..7f28fa7330 100644
--- a/engines/gob/minigames/geisha/diving.h
+++ b/engines/gob/minigames/geisha/diving.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/evilfish.cpp b/engines/gob/minigames/geisha/evilfish.cpp
index 05ae9d0ad4..cd47e689b1 100644
--- a/engines/gob/minigames/geisha/evilfish.cpp
+++ b/engines/gob/minigames/geisha/evilfish.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/evilfish.h b/engines/gob/minigames/geisha/evilfish.h
index 4c82629461..9013c722c9 100644
--- a/engines/gob/minigames/geisha/evilfish.h
+++ b/engines/gob/minigames/geisha/evilfish.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/meter.cpp b/engines/gob/minigames/geisha/meter.cpp
index 7ec3119866..29a5a20e9a 100644
--- a/engines/gob/minigames/geisha/meter.cpp
+++ b/engines/gob/minigames/geisha/meter.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/meter.h b/engines/gob/minigames/geisha/meter.h
index 30dc826de0..4127353173 100644
--- a/engines/gob/minigames/geisha/meter.h
+++ b/engines/gob/minigames/geisha/meter.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/mouth.cpp b/engines/gob/minigames/geisha/mouth.cpp
index 7ba9f86f8c..2a1fea13a5 100644
--- a/engines/gob/minigames/geisha/mouth.cpp
+++ b/engines/gob/minigames/geisha/mouth.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/mouth.h b/engines/gob/minigames/geisha/mouth.h
index 2e0cfcd5d0..ea3373162b 100644
--- a/engines/gob/minigames/geisha/mouth.h
+++ b/engines/gob/minigames/geisha/mouth.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/oko.cpp b/engines/gob/minigames/geisha/oko.cpp
index 7ad8be6fa2..29bdd50f47 100644
--- a/engines/gob/minigames/geisha/oko.cpp
+++ b/engines/gob/minigames/geisha/oko.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/oko.h b/engines/gob/minigames/geisha/oko.h
index 82c6f59be4..90ce25b5b6 100644
--- a/engines/gob/minigames/geisha/oko.h
+++ b/engines/gob/minigames/geisha/oko.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp
index c8c4f2bba7..0ebcd2c55b 100644
--- a/engines/gob/minigames/geisha/penetration.cpp
+++ b/engines/gob/minigames/geisha/penetration.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -840,8 +840,7 @@ void Penetration::setPalette() {
_vm->_palAnim->fade(0, 0, 0);
// Set palette
- memcpy(_vm->_draw->_vgaPalette , kPalettes[_floor], 3 * kPaletteSize);
- memcpy(_vm->_draw->_vgaSmallPalette, kPalettes[_floor], 3 * kPaletteSize);
+ memcpy(_vm->_draw->_vgaPalette, kPalettes[_floor], 3 * kPaletteSize);
_needFadeIn = true;
}
diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h
index 50004eba8e..332ff00502 100644
--- a/engines/gob/minigames/geisha/penetration.h
+++ b/engines/gob/minigames/geisha/penetration.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp
index bf15306e5a..9f7d2c696c 100644
--- a/engines/gob/minigames/geisha/submarine.cpp
+++ b/engines/gob/minigames/geisha/submarine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/minigames/geisha/submarine.h b/engines/gob/minigames/geisha/submarine.h
index a6eae57095..a82338667b 100644
--- a/engines/gob/minigames/geisha/submarine.h
+++ b/engines/gob/minigames/geisha/submarine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp
index b3d7ea6263..d4e3067c4e 100644
--- a/engines/gob/mult.cpp
+++ b/engines/gob/mult.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/mult.h b/engines/gob/mult.h
index 860e5a12e1..bef5f1728f 100644
--- a/engines/gob/mult.h
+++ b/engines/gob/mult.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index f6dddec71e..51471b55bb 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/palanim.cpp b/engines/gob/palanim.cpp
index f90b141725..eed97ecaa6 100644
--- a/engines/gob/palanim.cpp
+++ b/engines/gob/palanim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/palanim.h b/engines/gob/palanim.h
index 8d8a1e4388..658b22d319 100644
--- a/engines/gob/palanim.h
+++ b/engines/gob/palanim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/gctfile.cpp b/engines/gob/pregob/gctfile.cpp
index 08c32cda76..ca842707d6 100644
--- a/engines/gob/pregob/gctfile.cpp
+++ b/engines/gob/pregob/gctfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/gctfile.h b/engines/gob/pregob/gctfile.h
index ed6351b7a8..504634c0fd 100644
--- a/engines/gob/pregob/gctfile.h
+++ b/engines/gob/pregob/gctfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp
index 2cf6855ef8..8c72931996 100644
--- a/engines/gob/pregob/onceupon/abracadabra.cpp
+++ b/engines/gob/pregob/onceupon/abracadabra.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/abracadabra.h b/engines/gob/pregob/onceupon/abracadabra.h
index 8048213f5f..f50a2a306f 100644
--- a/engines/gob/pregob/onceupon/abracadabra.h
+++ b/engines/gob/pregob/onceupon/abracadabra.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp
index ef56b9dd0b..b556b8e4fb 100644
--- a/engines/gob/pregob/onceupon/babayaga.cpp
+++ b/engines/gob/pregob/onceupon/babayaga.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/babayaga.h b/engines/gob/pregob/onceupon/babayaga.h
index 0241f78f4e..5663751725 100644
--- a/engines/gob/pregob/onceupon/babayaga.h
+++ b/engines/gob/pregob/onceupon/babayaga.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/brokenstrings.h b/engines/gob/pregob/onceupon/brokenstrings.h
index 89acb1c6bd..4029b7572b 100644
--- a/engines/gob/pregob/onceupon/brokenstrings.h
+++ b/engines/gob/pregob/onceupon/brokenstrings.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/chargenchild.cpp b/engines/gob/pregob/onceupon/chargenchild.cpp
index ba099e4937..c04fa732ac 100644
--- a/engines/gob/pregob/onceupon/chargenchild.cpp
+++ b/engines/gob/pregob/onceupon/chargenchild.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/chargenchild.h b/engines/gob/pregob/onceupon/chargenchild.h
index 3b09ef112a..580d313e83 100644
--- a/engines/gob/pregob/onceupon/chargenchild.h
+++ b/engines/gob/pregob/onceupon/chargenchild.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp
index e4c2df34c0..a6e4da75e7 100644
--- a/engines/gob/pregob/onceupon/onceupon.cpp
+++ b/engines/gob/pregob/onceupon/onceupon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h
index 66ef877618..17bc20667e 100644
--- a/engines/gob/pregob/onceupon/onceupon.h
+++ b/engines/gob/pregob/onceupon/onceupon.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/palettes.h b/engines/gob/pregob/onceupon/palettes.h
index 952581041c..0234f85718 100644
--- a/engines/gob/pregob/onceupon/palettes.h
+++ b/engines/gob/pregob/onceupon/palettes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/parents.cpp b/engines/gob/pregob/onceupon/parents.cpp
index cdaee6a38d..a773d4c869 100644
--- a/engines/gob/pregob/onceupon/parents.cpp
+++ b/engines/gob/pregob/onceupon/parents.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/parents.h b/engines/gob/pregob/onceupon/parents.h
index f5c8307b73..4b3895e267 100644
--- a/engines/gob/pregob/onceupon/parents.h
+++ b/engines/gob/pregob/onceupon/parents.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/stork.cpp b/engines/gob/pregob/onceupon/stork.cpp
index 3c38037d08..b3ce261ee0 100644
--- a/engines/gob/pregob/onceupon/stork.cpp
+++ b/engines/gob/pregob/onceupon/stork.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/stork.h b/engines/gob/pregob/onceupon/stork.h
index ae57983000..dc7e986fd0 100644
--- a/engines/gob/pregob/onceupon/stork.h
+++ b/engines/gob/pregob/onceupon/stork.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/title.cpp b/engines/gob/pregob/onceupon/title.cpp
index a3905541a0..2e8fed80b3 100644
--- a/engines/gob/pregob/onceupon/title.cpp
+++ b/engines/gob/pregob/onceupon/title.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/onceupon/title.h b/engines/gob/pregob/onceupon/title.h
index 5e7ef76d40..a19d061fc0 100644
--- a/engines/gob/pregob/onceupon/title.h
+++ b/engines/gob/pregob/onceupon/title.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp
index 54eb3c6795..118bbbde83 100644
--- a/engines/gob/pregob/pregob.cpp
+++ b/engines/gob/pregob/pregob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h
index 632f85b88e..021cf2b3d6 100644
--- a/engines/gob/pregob/pregob.h
+++ b/engines/gob/pregob/pregob.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/seqfile.cpp b/engines/gob/pregob/seqfile.cpp
index 91973bbb85..7cf5b16724 100644
--- a/engines/gob/pregob/seqfile.cpp
+++ b/engines/gob/pregob/seqfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/seqfile.h b/engines/gob/pregob/seqfile.h
index 5e12962ef9..1b627aacdc 100644
--- a/engines/gob/pregob/seqfile.h
+++ b/engines/gob/pregob/seqfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/txtfile.cpp b/engines/gob/pregob/txtfile.cpp
index 3ff0d4b039..861a34855b 100644
--- a/engines/gob/pregob/txtfile.cpp
+++ b/engines/gob/pregob/txtfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/pregob/txtfile.h b/engines/gob/pregob/txtfile.h
index c623b58859..edb750acc6 100644
--- a/engines/gob/pregob/txtfile.h
+++ b/engines/gob/pregob/txtfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp
index a84f4ac4b8..dbed825977 100644
--- a/engines/gob/resources.cpp
+++ b/engines/gob/resources.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -209,6 +209,7 @@ void Resources::unload(bool del) {
_totResourceTable = 0;
_extResourceTable = 0;
_totTextTable = 0;
+ _totResStart = 0;
_totData = 0;
_totSize = 0;
_imData = 0;
@@ -233,6 +234,8 @@ bool Resources::loadTOTResourceTable() {
if (!stream)
return false;
+ _totResStart = totProps.scriptEnd;
+
if ((totProps.resourcesOffset == 0xFFFFFFFF) ||
(totProps.resourcesOffset == 0))
// No resources here
@@ -271,7 +274,6 @@ bool Resources::loadTOTResourceTable() {
item.type = kResourceTOT;
}
- _totResStart = totProps.scriptEnd;
_totSize = stream->size() - _totResStart;
if (_totSize <= 0)
diff --git a/engines/gob/resources.h b/engines/gob/resources.h
index 04b3b9d31e..8d4d8b15ee 100644
--- a/engines/gob/resources.h
+++ b/engines/gob/resources.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/rxyfile.cpp b/engines/gob/rxyfile.cpp
index 2ff8c121cd..5c8cc71b34 100644
--- a/engines/gob/rxyfile.cpp
+++ b/engines/gob/rxyfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/rxyfile.h b/engines/gob/rxyfile.h
index 4fd46c5e40..1bbb91438c 100644
--- a/engines/gob/rxyfile.h
+++ b/engines/gob/rxyfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveconverter.cpp b/engines/gob/save/saveconverter.cpp
index 2db3379aa7..1709e05e3a 100644
--- a/engines/gob/save/saveconverter.cpp
+++ b/engines/gob/save/saveconverter.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveconverter.h b/engines/gob/save/saveconverter.h
index d8cf723fd3..c03de147c7 100644
--- a/engines/gob/save/saveconverter.h
+++ b/engines/gob/save/saveconverter.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveconverter_v2.cpp b/engines/gob/save/saveconverter_v2.cpp
index 7661c47836..762f6e906a 100644
--- a/engines/gob/save/saveconverter_v2.cpp
+++ b/engines/gob/save/saveconverter_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveconverter_v3.cpp b/engines/gob/save/saveconverter_v3.cpp
index 2256575c4b..0e045178ad 100644
--- a/engines/gob/save/saveconverter_v3.cpp
+++ b/engines/gob/save/saveconverter_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveconverter_v4.cpp b/engines/gob/save/saveconverter_v4.cpp
index 2618a25f37..24e70c7fdb 100644
--- a/engines/gob/save/saveconverter_v4.cpp
+++ b/engines/gob/save/saveconverter_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/savefile.cpp b/engines/gob/save/savefile.cpp
index 0713c38684..2a32b7edcf 100644
--- a/engines/gob/save/savefile.cpp
+++ b/engines/gob/save/savefile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/savefile.h b/engines/gob/save/savefile.h
index 01825207e0..7d111f3c10 100644
--- a/engines/gob/save/savefile.h
+++ b/engines/gob/save/savefile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp
index 71de629f93..7a64582201 100644
--- a/engines/gob/save/savehandler.cpp
+++ b/engines/gob/save/savehandler.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/savehandler.h b/engines/gob/save/savehandler.h
index afc31f54f1..452cc8e815 100644
--- a/engines/gob/save/savehandler.h
+++ b/engines/gob/save/savehandler.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload.cpp b/engines/gob/save/saveload.cpp
index 6b2f710159..f6967a79ad 100644
--- a/engines/gob/save/saveload.cpp
+++ b/engines/gob/save/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h
index f20532dffa..cb6f0ed514 100644
--- a/engines/gob/save/saveload.h
+++ b/engines/gob/save/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_ajworld.cpp b/engines/gob/save/saveload_ajworld.cpp
index 727d071b3e..307a1783a3 100644
--- a/engines/gob/save/saveload_ajworld.cpp
+++ b/engines/gob/save/saveload_ajworld.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_fascin.cpp b/engines/gob/save/saveload_fascin.cpp
index cf1e7f0c0c..26a7f978ad 100644
--- a/engines/gob/save/saveload_fascin.cpp
+++ b/engines/gob/save/saveload_fascin.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_geisha.cpp b/engines/gob/save/saveload_geisha.cpp
index 3414c12dda..5ad9424e89 100644
--- a/engines/gob/save/saveload_geisha.cpp
+++ b/engines/gob/save/saveload_geisha.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_inca2.cpp b/engines/gob/save/saveload_inca2.cpp
index 4c3aaf5a0e..533875e44c 100644
--- a/engines/gob/save/saveload_inca2.cpp
+++ b/engines/gob/save/saveload_inca2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp
index 93c1b68b0c..406e5eb705 100644
--- a/engines/gob/save/saveload_playtoons.cpp
+++ b/engines/gob/save/saveload_playtoons.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_v2.cpp b/engines/gob/save/saveload_v2.cpp
index b25d4788f7..6f05d15803 100644
--- a/engines/gob/save/saveload_v2.cpp
+++ b/engines/gob/save/saveload_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_v3.cpp b/engines/gob/save/saveload_v3.cpp
index 3e7a3b9e48..1eb0730a3b 100644
--- a/engines/gob/save/saveload_v3.cpp
+++ b/engines/gob/save/saveload_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_v4.cpp b/engines/gob/save/saveload_v4.cpp
index 95283db336..516a22c310 100644
--- a/engines/gob/save/saveload_v4.cpp
+++ b/engines/gob/save/saveload_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp
index c524cad352..b6376df022 100644
--- a/engines/gob/save/saveload_v6.cpp
+++ b/engines/gob/save/saveload_v6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/save/saveload_v7.cpp b/engines/gob/save/saveload_v7.cpp
index 3753b4019f..aced4f50ba 100644
--- a/engines/gob/save/saveload_v7.cpp
+++ b/engines/gob/save/saveload_v7.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp
index 33fdfcaa2a..2d9021805a 100644
--- a/engines/gob/scenery.cpp
+++ b/engines/gob/scenery.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h
index d8312b1128..3aae8d5d6f 100644
--- a/engines/gob/scenery.h
+++ b/engines/gob/scenery.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/scenery_v1.cpp b/engines/gob/scenery_v1.cpp
index 46ceb35457..7c2adcdef1 100644
--- a/engines/gob/scenery_v1.cpp
+++ b/engines/gob/scenery_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/scenery_v2.cpp b/engines/gob/scenery_v2.cpp
index 16ce077169..85c7d36ae4 100644
--- a/engines/gob/scenery_v2.cpp
+++ b/engines/gob/scenery_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp
index c7e39f94af..d6e9841e0a 100644
--- a/engines/gob/script.cpp
+++ b/engines/gob/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/script.h b/engines/gob/script.h
index 0095ad0cb6..f4be190aa5 100644
--- a/engines/gob/script.h
+++ b/engines/gob/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp
index 2bf7f266a1..65b43cae7a 100644
--- a/engines/gob/sound/adlib.cpp
+++ b/engines/gob/sound/adlib.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h
index bd1778d2ed..8071249374 100644
--- a/engines/gob/sound/adlib.h
+++ b/engines/gob/sound/adlib.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/adlplayer.cpp b/engines/gob/sound/adlplayer.cpp
index ee23191c0d..384a928360 100644
--- a/engines/gob/sound/adlplayer.cpp
+++ b/engines/gob/sound/adlplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/adlplayer.h b/engines/gob/sound/adlplayer.h
index 9596447bbc..3edd238343 100644
--- a/engines/gob/sound/adlplayer.h
+++ b/engines/gob/sound/adlplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp
index daba72b2d5..21fb70278a 100644
--- a/engines/gob/sound/bgatmosphere.cpp
+++ b/engines/gob/sound/bgatmosphere.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h
index 23fcc8a71a..1cfc63c79a 100644
--- a/engines/gob/sound/bgatmosphere.h
+++ b/engines/gob/sound/bgatmosphere.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp
index 4ce3372562..eca6ca4c9e 100644
--- a/engines/gob/sound/cdrom.cpp
+++ b/engines/gob/sound/cdrom.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/cdrom.h b/engines/gob/sound/cdrom.h
index 09d4c94865..123e306e41 100644
--- a/engines/gob/sound/cdrom.h
+++ b/engines/gob/sound/cdrom.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/infogrames.cpp b/engines/gob/sound/infogrames.cpp
index febf91719b..016bbfb1ff 100644
--- a/engines/gob/sound/infogrames.cpp
+++ b/engines/gob/sound/infogrames.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/infogrames.h b/engines/gob/sound/infogrames.h
index ee5ffd1cff..c946357633 100644
--- a/engines/gob/sound/infogrames.h
+++ b/engines/gob/sound/infogrames.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/musplayer.cpp b/engines/gob/sound/musplayer.cpp
index 3e41dc6ed1..7001a5724b 100644
--- a/engines/gob/sound/musplayer.cpp
+++ b/engines/gob/sound/musplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/musplayer.h b/engines/gob/sound/musplayer.h
index 6cc2a2d2ca..c76c5aab38 100644
--- a/engines/gob/sound/musplayer.h
+++ b/engines/gob/sound/musplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/pcspeaker.cpp b/engines/gob/sound/pcspeaker.cpp
index bc031e279f..d0dcb9a871 100644
--- a/engines/gob/sound/pcspeaker.cpp
+++ b/engines/gob/sound/pcspeaker.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/pcspeaker.h b/engines/gob/sound/pcspeaker.h
index fe0ec872e3..ba2e00ce3e 100644
--- a/engines/gob/sound/pcspeaker.h
+++ b/engines/gob/sound/pcspeaker.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/protracker.cpp b/engines/gob/sound/protracker.cpp
index fbc03256bb..ce29100b85 100644
--- a/engines/gob/sound/protracker.cpp
+++ b/engines/gob/sound/protracker.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/protracker.h b/engines/gob/sound/protracker.h
index b4c3be1f61..ccd0d51552 100644
--- a/engines/gob/sound/protracker.h
+++ b/engines/gob/sound/protracker.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp
index a4c74642dd..d2b2d3d6e8 100644
--- a/engines/gob/sound/sound.cpp
+++ b/engines/gob/sound/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h
index bbc182d172..c959959755 100644
--- a/engines/gob/sound/sound.h
+++ b/engines/gob/sound/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp
index 4d6f6f0bf7..9514e93210 100644
--- a/engines/gob/sound/soundblaster.cpp
+++ b/engines/gob/sound/soundblaster.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h
index 3c4968d611..6a732dbec9 100644
--- a/engines/gob/sound/soundblaster.h
+++ b/engines/gob/sound/soundblaster.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp
index 7d876ec484..f981d0b385 100644
--- a/engines/gob/sound/sounddesc.cpp
+++ b/engines/gob/sound/sounddesc.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/sounddesc.h b/engines/gob/sound/sounddesc.h
index f9223de964..a2d39108c9 100644
--- a/engines/gob/sound/sounddesc.h
+++ b/engines/gob/sound/sounddesc.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp
index a9303bc927..b5c26898ba 100644
--- a/engines/gob/sound/soundmixer.cpp
+++ b/engines/gob/sound/soundmixer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/sound/soundmixer.h b/engines/gob/sound/soundmixer.h
index 2847c3de12..791f97eb74 100644
--- a/engines/gob/sound/soundmixer.h
+++ b/engines/gob/sound/soundmixer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index 870b0f15b3..42ac2b0d74 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,7 +31,8 @@
#include "graphics/primitives.h"
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
-#include "graphics/decoders/iff.h"
+
+#include "image/iff.h"
namespace Gob {
@@ -814,7 +815,7 @@ bool Surface::loadTGA(Common::SeekableReadStream &stream) {
}
bool Surface::loadIFF(Common::SeekableReadStream &stream) {
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.loadStream(stream);
if (!decoder.getSurface())
diff --git a/engines/gob/surface.h b/engines/gob/surface.h
index 8a1b502a95..c931731908 100644
--- a/engines/gob/surface.h
+++ b/engines/gob/surface.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp
index 4efe374793..04c744d965 100644
--- a/engines/gob/totfile.cpp
+++ b/engines/gob/totfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/totfile.h b/engines/gob/totfile.h
index 5a23912dbe..753e7b4a57 100644
--- a/engines/gob/totfile.h
+++ b/engines/gob/totfile.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 5ac4ef024e..19e6e35e0b 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/util.h b/engines/gob/util.h
index a4984c6207..2865fd5708 100644
--- a/engines/gob/util.h
+++ b/engines/gob/util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/variables.cpp b/engines/gob/variables.cpp
index efbf10af69..2ef7be2f90 100644
--- a/engines/gob/variables.cpp
+++ b/engines/gob/variables.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/variables.h b/engines/gob/variables.h
index 04775ff86c..a836e82557 100644
--- a/engines/gob/variables.h
+++ b/engines/gob/variables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index 64af34cf62..1dc51d994c 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/video.h b/engines/gob/video.h
index 122c1e47d5..2c547baca0 100644
--- a/engines/gob/video.h
+++ b/engines/gob/video.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/video_v1.cpp b/engines/gob/video_v1.cpp
index 397e2bef22..1e5d613294 100644
--- a/engines/gob/video_v1.cpp
+++ b/engines/gob/video_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/video_v2.cpp b/engines/gob/video_v2.cpp
index bf4823ec90..a6900b11bc 100644
--- a/engines/gob/video_v2.cpp
+++ b/engines/gob/video_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp
index 7fb3104162..bbc2f457c2 100644
--- a/engines/gob/video_v6.cpp
+++ b/engines/gob/video_v6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 155989ccee..e97848d27e 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index 129ccef67a..02ed510ec5 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/cell.cpp b/engines/groovie/cell.cpp
index 8241579156..24fac17e44 100644
--- a/engines/groovie/cell.cpp
+++ b/engines/groovie/cell.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/cell.h b/engines/groovie/cell.h
index 32c7b46547..d6f1ac97dc 100644
--- a/engines/groovie/cell.h
+++ b/engines/groovie/cell.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index cac78a95a3..080463a8b3 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/cursor.h b/engines/groovie/cursor.h
index 87d994b077..bf91112ea4 100644
--- a/engines/groovie/cursor.h
+++ b/engines/groovie/cursor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index 74fe22922c..8103e4f4c6 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/debug.h b/engines/groovie/debug.h
index 76f6d16c65..b99d6c6e1b 100644
--- a/engines/groovie/debug.h
+++ b/engines/groovie/debug.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 7c89114e83..a249b66858 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/detection.h b/engines/groovie/detection.h
index aa900cc54d..e49474474b 100644
--- a/engines/groovie/detection.h
+++ b/engines/groovie/detection.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/font.cpp b/engines/groovie/font.cpp
index a55d8fad95..21a3bd07ae 100644
--- a/engines/groovie/font.cpp
+++ b/engines/groovie/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/font.h b/engines/groovie/font.h
index 49cf4b7b06..23e060faf3 100644
--- a/engines/groovie/font.h
+++ b/engines/groovie/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp
index a4d8a4330c..b85277fac7 100644
--- a/engines/groovie/graphics.cpp
+++ b/engines/groovie/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/graphics.h b/engines/groovie/graphics.h
index c91d895c25..72ab01deb6 100644
--- a/engines/groovie/graphics.h
+++ b/engines/groovie/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 5ade442742..e65031ec38 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index 79abc13b1c..c3d3146cca 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/lzss.cpp b/engines/groovie/lzss.cpp
index a09f6e2311..2a185aeeab 100644
--- a/engines/groovie/lzss.cpp
+++ b/engines/groovie/lzss.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/lzss.h b/engines/groovie/lzss.h
index f60ea14815..06b07a946a 100644
--- a/engines/groovie/lzss.h
+++ b/engines/groovie/lzss.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index 95637fc407..390f47f084 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/music.h b/engines/groovie/music.h
index 92e9c8b487..4853840673 100644
--- a/engines/groovie/music.h
+++ b/engines/groovie/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp
index e2a1ff3d56..16cb3c47ff 100644
--- a/engines/groovie/player.cpp
+++ b/engines/groovie/player.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/player.h b/engines/groovie/player.h
index c9258ffdbd..b1aac963f2 100644
--- a/engines/groovie/player.h
+++ b/engines/groovie/player.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 42d76cabfa..8229d02d91 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/resource.h b/engines/groovie/resource.h
index 33e15e6b98..11a861dd5c 100644
--- a/engines/groovie/resource.h
+++ b/engines/groovie/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index e1ca7fb945..2776a0455d 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -32,7 +32,7 @@
#include "common/textconsole.h"
#include "graphics/palette.h"
-#include "graphics/decoders/jpeg.h"
+#include "image/jpeg.h"
#ifdef USE_RGB_COLOR
// Required for the YUV to RGB conversion
@@ -45,7 +45,7 @@ namespace Groovie {
ROQPlayer::ROQPlayer(GroovieEngine *vm) :
VideoPlayer(vm), _codingTypeCount(0),
- _fg(&_vm->_graphicsMan->_foreground), _bg(&_vm->_graphicsMan->_background) {
+ _bg(&_vm->_graphicsMan->_background) {
// Create the work surfaces
_currBuf = new Graphics::Surface();
@@ -435,20 +435,18 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) {
warning("Groovie::ROQ: JPEG frame (unfinished)");
- Graphics::JPEGDecoder *jpg = new Graphics::JPEGDecoder();
- jpg->setOutputColorSpace(Graphics::JPEGDecoder::kColorSpaceYUV);
+ Image::JPEGDecoder jpg;
+ jpg.setOutputColorSpace(Image::JPEGDecoder::kColorSpaceYUV);
uint32 startPos = _file->pos();
Common::SeekableSubReadStream subStream(_file, startPos, startPos + blockHeader.size, DisposeAfterUse::NO);
- jpg->loadStream(subStream);
+ jpg.loadStream(subStream);
- const Graphics::Surface *srcSurf = jpg->getSurface();
+ const Graphics::Surface *srcSurf = jpg.getSurface();
const byte *src = (const byte *)srcSurf->getPixels();
byte *ptr = (byte *)_currBuf->getPixels();
memcpy(ptr, src, _currBuf->w * _currBuf->h * srcSurf->format.bytesPerPixel);
- delete jpg;
-
_file->seek(startPos + blockHeader.size);
return true;
}
diff --git a/engines/groovie/roq.h b/engines/groovie/roq.h
index c5d3f255d3..cd5e91c82b 100644
--- a/engines/groovie/roq.h
+++ b/engines/groovie/roq.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -75,7 +75,7 @@ private:
byte _codebook4[256 * 4];
// Buffers
- Graphics::Surface *_fg, *_bg, *_thirdBuf;
+ Graphics::Surface *_bg;
Graphics::Surface *_currBuf, *_prevBuf;
void buildShowBuf();
byte _scaleX, _scaleY;
diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp
index 1a92c02e0e..78b79cfa26 100644
--- a/engines/groovie/saveload.cpp
+++ b/engines/groovie/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/saveload.h b/engines/groovie/saveload.h
index 15ce108c7d..6f20250e0a 100644
--- a/engines/groovie/saveload.h
+++ b/engines/groovie/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 8e3bef9945..25c421f699 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/script.h b/engines/groovie/script.h
index 8cd790af5e..35e52593de 100644
--- a/engines/groovie/script.h
+++ b/engines/groovie/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/stuffit.cpp b/engines/groovie/stuffit.cpp
index 60a57a0129..bbfcd3da82 100644
--- a/engines/groovie/stuffit.cpp
+++ b/engines/groovie/stuffit.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/stuffit.h b/engines/groovie/stuffit.h
index 44f593dbea..9b2bbd3543 100644
--- a/engines/groovie/stuffit.h
+++ b/engines/groovie/stuffit.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index 59d966a22f..4626a6f81b 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/groovie/vdx.h b/engines/groovie/vdx.h
index a9bfaa1eb4..328e6e4da5 100644
--- a/engines/groovie/vdx.h
+++ b/engines/groovie/vdx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index 2ec9cec009..8f2a18f741 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -668,7 +668,6 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
*/
void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl) {
byte *screenP;
- int frameNumber;
Common::File f;
if (_vm->shouldQuit())
@@ -708,7 +707,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
if (!_vm->_events->_escKeyFl) {
_vm->_events->_rateCounter = 0;
- frameNumber = 0;
+ int frameNumber = 0;
while (!_vm->shouldQuit()) {
_vm->_soundMan->playAnimSound(frameNumber++);
diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h
index bf9b55aaae..a273245097 100644
--- a/engines/hopkins/anim.h
+++ b/engines/hopkins/anim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index f9e3ecafcd..1307cd5796 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -675,15 +675,12 @@ void ComputerManager::displayBricks() {
_breakoutSpeed = 1;
int16 *level = _breakoutLevel;
- int cellLeft;
- int cellTop;
- int cellType;
for (int levelIdx = 0; ; levelIdx += 6) {
- cellLeft = (int16)FROM_LE_16(level[levelIdx]);
+ int cellLeft = (int16)FROM_LE_16(level[levelIdx]);
if (cellLeft == -1)
break;
- cellTop = FROM_LE_16(level[levelIdx + 1]);
- cellType = FROM_LE_16(level[levelIdx + 4]);
+ int cellTop = FROM_LE_16(level[levelIdx + 1]);
+ int cellType = FROM_LE_16(level[levelIdx + 4]);
if (cellType <= 6)
++_breakoutBrickNbr;
@@ -833,7 +830,6 @@ int ComputerManager::displayHiscores() {
_vm->_graphicsMan->setColorPercentage(254, 0, 0, 0);
int yp;
- int xp;
// Loop for displaying the scores
for (int scoreIndex = 0; scoreIndex <= 5; scoreIndex++) {
yp = 19 * scoreIndex;
@@ -853,7 +849,7 @@ int ComputerManager::displayHiscores() {
int buttonIndex = 0;
do {
_vm->_events->refreshEvents();
- xp = _vm->_events->getMouseX();
+ int xp = _vm->_events->getMouseX();
yp = _vm->_events->getMouseY();
if (_vm->_events->getMouseButton() == 1 && ABS(xp - 79) <= 33 && ABS(yp - 396) <= 13)
diff --git a/engines/hopkins/computer.h b/engines/hopkins/computer.h
index 1771bba7d6..e8857a234b 100644
--- a/engines/hopkins/computer.h
+++ b/engines/hopkins/computer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp
index f111eb50d3..14b1c183a8 100644
--- a/engines/hopkins/debugger.cpp
+++ b/engines/hopkins/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/debugger.h b/engines/hopkins/debugger.h
index 746c54a675..94a66af15b 100644
--- a/engines/hopkins/debugger.h
+++ b/engines/hopkins/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/detection.cpp b/engines/hopkins/detection.cpp
index c617a5aacf..a25b19e496 100644
--- a/engines/hopkins/detection.cpp
+++ b/engines/hopkins/detection.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "hopkins/hopkins.h"
@@ -29,6 +28,7 @@
#include "common/memstream.h"
#include "engines/advancedDetector.h"
#include "common/system.h"
+#include "common/translation.h"
#include "graphics/colormasks.h"
#include "graphics/surface.h"
@@ -69,6 +69,30 @@ static const PlainGameDescriptor hopkinsGames[] = {
#include "hopkins/detection_tables.h"
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_GORE_DEFAULT_OFF,
+ {
+ _s("Gore Mode"),
+ _s("Enable Gore Mode when available"),
+ "enable_gore",
+ false
+ }
+ },
+
+ {
+ GAMEOPTION_GORE_DEFAULT_ON,
+ {
+ _s("Gore Mode"),
+ _s("Enable Gore Mode when available"),
+ "enable_gore",
+ true
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
const static char *directoryGlobs[] = {
"voice",
"link",
@@ -77,7 +101,7 @@ const static char *directoryGlobs[] = {
class HopkinsMetaEngine : public AdvancedMetaEngine {
public:
- HopkinsMetaEngine() : AdvancedMetaEngine(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames) {
+ HopkinsMetaEngine() : AdvancedMetaEngine(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames, optionsList) {
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
}
@@ -190,7 +214,7 @@ SaveStateDescriptor HopkinsMetaEngine::querySaveMetaInfos(const char *target, in
#if PLUGIN_ENABLED_DYNAMIC(HOPKINS)
-REGISTER_PLUGIN_DYNAMIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
+ REGISTER_PLUGIN_STATIC(HOPKINS, PLUGIN_TYPE_ENGINE, HopkinsMetaEngine);
#endif
diff --git a/engines/hopkins/detection_tables.h b/engines/hopkins/detection_tables.h
index c3ff563f6f..aeb92d7411 100644
--- a/engines/hopkins/detection_tables.h
+++ b/engines/hopkins/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -22,6 +22,9 @@
namespace Hopkins {
+#define GAMEOPTION_GORE_DEFAULT_ON GUIO_GAMEOPTIONS1
+#define GAMEOPTION_GORE_DEFAULT_OFF GUIO_GAMEOPTIONS2
+
static const HopkinsGameDescription gameDescriptions[] = {
{
// Hopkins FBI Linux Demo UK 1.00 and 1.02
@@ -35,7 +38,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformLinux,
ADGF_DEMO,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -51,7 +54,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformOS2,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -66,7 +69,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformBeOS,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -81,7 +84,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -96,7 +99,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_OFF)
},
},
{
@@ -111,7 +114,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -126,7 +129,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformLinux,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -141,7 +144,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformLinux,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -156,11 +159,27 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
+ // Hopkins FBI Win95 Polish, provided by Paput in bug #6511
+ {
+ "hopkins",
+ 0,
+ {
+ {"RES_VAN.RES", 0, "f2fec5172e4a7a9d35cb2a5f948ef6a9", 39400865},
+ AD_LISTEND
+ },
+ Common::PL_POL,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_GORE_DEFAULT_OFF)
+ },
+ },
+
+ {
// Hopkins FBI Win95 Demo, provided by Strangerke
// CHECKME: No voice! a second file is required though... Also, it has multi-language support
{
@@ -173,7 +192,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_ON)
},
},
{
@@ -188,7 +207,7 @@ static const HopkinsGameDescription gameDescriptions[] = {
Common::PL_POL,
Common::kPlatformWindows,
ADGF_DEMO,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_GORE_DEFAULT_OFF)
},
},
{ AD_TABLE_END_MARKER }
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index 8c944167ae..fc613f892d 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/dialogs.h b/engines/hopkins/dialogs.h
index 246b80cd3e..822cf376dd 100644
--- a/engines/hopkins/dialogs.h
+++ b/engines/hopkins/dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index d0c1dcea4d..1ee495a111 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h
index f4dedce1c5..fde0106689 100644
--- a/engines/hopkins/events.h
+++ b/engines/hopkins/events.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp
index 2390ebbdf8..75f429f860 100644
--- a/engines/hopkins/files.cpp
+++ b/engines/hopkins/files.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -25,6 +25,7 @@
#include "hopkins/hopkins.h"
#include "hopkins/globals.h"
+#include "common/config-manager.h"
#include "common/system.h"
#include "common/debug.h"
#include "common/file.h"
@@ -68,20 +69,11 @@ int FileManager::readStream(Common::ReadStream &stream, void *buf, size_t nbytes
}
/**
- * Initialize censorship based on blood.dat file
+ * The original censorship was based on blood.dat file.
+ * It's now using the config manager and a per-engine GUI option.
*/
void FileManager::initCensorship() {
- _vm->_globals->_censorshipFl = false;
-
- // If file doesn't exist, fallback to uncensored
- if (fileExists("BLOOD.DAT")) {
- char *data = (char *)loadFile("BLOOD.DAT");
-
- if ((data[6] == 'u' && data[7] == 'k') || (data[6] == 'U' && data[7] == 'K'))
- _vm->_globals->_censorshipFl = true;
-
- _vm->_globals->freeMemory((byte *)data);
- }
+ _vm->_globals->_censorshipFl = ConfMan.getBool("enable_gore");
}
/**
diff --git a/engines/hopkins/files.h b/engines/hopkins/files.h
index 5e5eaa755c..0c117ccc10 100644
--- a/engines/hopkins/files.h
+++ b/engines/hopkins/files.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index ac0eee2866..7d57f564a9 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/font.h b/engines/hopkins/font.h
index 93e807ea4b..fe423edfe7 100644
--- a/engines/hopkins/font.h
+++ b/engines/hopkins/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index cd66a84b73..1f192748cd 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 94512c3d26..2e17389a45 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index a64e81fcc9..7227c3e833 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,7 +28,7 @@
#include "common/system.h"
#include "graphics/palette.h"
-#include "graphics/decoders/pcx.h"
+#include "image/pcx.h"
#include "common/file.h"
#include "common/rect.h"
#include "engines/util.h"
@@ -301,7 +301,7 @@ void GraphicsManager::fillSurface(byte *surface, byte *col, int size) {
void GraphicsManager::loadPCX640(byte *surface, const Common::String &file, byte *palette, bool typeFlag) {
Common::File f;
- Graphics::PCXDecoder pcxDecoder;
+ Image::PCXDecoder pcxDecoder;
// Clear the passed surface
memset(surface, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
@@ -439,9 +439,7 @@ void GraphicsManager::display8BitRect(const byte *surface, int xs, int ys, int w
}
void GraphicsManager::displayScaled8BitRect(const byte *surface, int xp, int yp, int width, int height, int destX, int destY) {
- int xCtr;
const byte *palette;
- int savedXCount;
byte *loopDestP;
const byte *loopSrcP;
int yCtr;
@@ -454,10 +452,10 @@ void GraphicsManager::displayScaled8BitRect(const byte *surface, int xp, int yp,
do {
yCtr = yCount;
- xCtr = xCount;
+ int xCtr = xCount;
loopSrcP = srcP;
loopDestP = destP;
- savedXCount = xCount;
+ int savedXCount = xCount;
palette = _palettePixels;
do {
diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h
index 8767f5ec4d..1ea6b89f2a 100644
--- a/engines/hopkins/graphics.h
+++ b/engines/hopkins/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 0e86fa26a9..9940391f64 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -232,7 +232,7 @@ bool HopkinsEngine::runWin95Demo() {
if (!_globals->_censorshipFl)
_animMan->playAnim("BANQUE.ANM", "BANKUK.ANM", 200, 28, 200);
else
- _animMan->playAnim("BANQUE.ANM", "BANKUK.ANM", 200, 28, 200);
+ _animMan->playAnim("BANKUK.ANM", "BANQUE.ANM", 200, 28, 200);
_soundMan->_specialSoundNum = 0;
_soundMan->removeSample(1);
_soundMan->removeSample(2);
@@ -2860,7 +2860,6 @@ void HopkinsEngine::syncSoundSettings() {
}
bool HopkinsEngine::displayAdultDisclaimer() {
- int xp, yp;
int buttonIndex;
_graphicsMan->_minX = 0;
@@ -2880,8 +2879,8 @@ bool HopkinsEngine::displayAdultDisclaimer() {
_events->_mouseSpriteId = 0;
do {
- xp = _events->getMouseX();
- yp = _events->getMouseY();
+ int xp = _events->getMouseX();
+ int yp = _events->getMouseY();
buttonIndex = 0;
if (xp >= 37 && xp <= 169 && yp >= 406 && yp <= 445)
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 615eace374..b782d103a8 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index aa708fdfb2..709f17a8b2 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -548,8 +548,6 @@ int LinesManager::avoidObstacleOnSegment(int lineIdx, int lineDataIdx, int route
bool LinesManager::MIRACLE(int fromX, int fromY, int lineIdx, int destLineIdx, int routeIdx) {
debugC(5, kDebugPath, "MIRACLE(%d, %d, %d, %d, %d)", fromX, fromY, lineIdx, destLineIdx, routeIdx);
- int newLinesDataIdx = 0;
- int newLinesIdx = 0;
int lineIdxLeft = 0;
int lineDataIdxLeft = 0;
int lineIdxRight = 0;
@@ -700,6 +698,8 @@ bool LinesManager::MIRACLE(int fromX, int fromY, int lineIdx, int destLineIdx, i
newDir = DIR_LEFT;
}
+ int newLinesDataIdx = 0;
+ int newLinesIdx = 0;
switch(newDir) {
case DIR_UP:
newLinesIdx = linesIdxUp;
@@ -1552,7 +1552,6 @@ void LinesManager::useRoute2(int idx, int curRouteIdx) {
int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int startLineIdx, int endLineIdx, int routeIdx) {
debugC(5, kDebugPath, "characterRoute(%d, %d, %d, %d, %d, %d, %d)", fromX, fromY, destX, destY, startLineIdx, endLineIdx, routeIdx);
int collDataIdxRoute2 = 0;
- bool colResult = false;
int curX = fromX;
int curY = fromY;
@@ -1603,7 +1602,6 @@ int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int
int collLineIdxRoute1 = -1;
int collLineIdxRoute2 = -1;
- int distX, distY;
int repeatFlag = 0;
int collDataIdxRoute0 = 0;
int collDataIdxRoute1 = 0;
@@ -1615,8 +1613,8 @@ int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int
useRoute0(idxRoute0, curRouteIdx);
return 1;
}
- distX = abs(curX - destX) + 1;
- distY = abs(curY - destY) + 1;
+ int distX = abs(curX - destX) + 1;
+ int distY = abs(curY - destY) + 1;
int maxDist;
if (distX > distY)
maxDist = distX;
@@ -1912,7 +1910,7 @@ int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int
posXRoute2 = _newPosX;
posYRoute2 = _newPosY;
- colResult = checkCollisionLine(_newPosX, _newPosY, &collDataIdxRoute2, &collLineIdxRoute2, 0, _lastLine);
+ bool colResult = checkCollisionLine(_newPosX, _newPosY, &collDataIdxRoute2, &collLineIdxRoute2, 0, _lastLine);
if (colResult && collLineIdxRoute2 <= _lastLine)
break;
}
@@ -2456,13 +2454,12 @@ bool LinesManager::PLAN_TEST(int paramX, int paramY, int superRouteIdx, int para
int LinesManager::testLine(int paramX, int paramY, int *testValue, int *foundLineIdx, int *foundDataIdx) {
debugC(5, kDebugPath, "testLine(%d, %d, testValue, foundLineIdx, foundDataIdx)", paramX, paramY);
int16 *lineData;
- int lineDataEndIdx;
int collLineIdx;
int collDataIdx;
for (int idx = _lastLine + 1; idx < _linesNumb + 1; idx++) {
lineData = _lineItem[idx]._lineData;
- lineDataEndIdx = _lineItem[idx]._lineDataEndIdx;
+ int lineDataEndIdx = _lineItem[idx]._lineDataEndIdx;
if (!lineData)
continue;
diff --git a/engines/hopkins/lines.h b/engines/hopkins/lines.h
index b32dc6e2a5..5e9ef8a7b0 100644
--- a/engines/hopkins/lines.h
+++ b/engines/hopkins/lines.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp
index 048d1b2cef..169b29a560 100644
--- a/engines/hopkins/menu.cpp
+++ b/engines/hopkins/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/menu.h b/engines/hopkins/menu.h
index e926c29dbd..4f78e73685 100644
--- a/engines/hopkins/menu.h
+++ b/engines/hopkins/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 347a6aabe8..b54b21bbc9 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -376,7 +376,6 @@ void ObjectsManager::addObject(int objIndex) {
void ObjectsManager::displaySprite() {
int clipX;
int clipY;
- bool loopCondFl;
uint16 arr[50];
// Handle copying any background areas that text are going to be drawn on
@@ -441,6 +440,7 @@ void ObjectsManager::displaySprite() {
for (int i = 1; i <= 48; i++)
arr[i] = i;
+ bool loopCondFl;
do {
loopCondFl = false;
for (int sortIdx = 1; sortIdx < _sortedDisplayCount; sortIdx++) {
@@ -3613,12 +3613,10 @@ void ObjectsManager::showSpecialActionAnimation(const byte *spriteData, const Co
realSpeed = speed / 3;
int spriteIndex = 0;
- bool completeTokenFl;
- char nextChar;
for (int idx = 0; ; idx++) {
- completeTokenFl = false;
- nextChar = animString[idx];
+ bool completeTokenFl = false;
+ char nextChar = animString[idx];
if (nextChar == ',') {
spriteIndex = atoi(tmpStr.c_str());
tmpStr = "";
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
index 5f1f5b1f59..dc56765431 100644
--- a/engines/hopkins/objects.h
+++ b/engines/hopkins/objects.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
index b0dea7e6d1..05c7fb8119 100644
--- a/engines/hopkins/saveload.cpp
+++ b/engines/hopkins/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/saveload.h b/engines/hopkins/saveload.h
index 5b77c11f12..7b4ec307f5 100644
--- a/engines/hopkins/saveload.h
+++ b/engines/hopkins/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index 09b0641a12..b0d8749c7f 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/script.h b/engines/hopkins/script.h
index 2a22e18ccb..1f8e45dc9a 100644
--- a/engines/hopkins/script.h
+++ b/engines/hopkins/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 92c5f51462..773c714899 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -200,14 +200,6 @@ SoundManager::SoundManager(HopkinsEngine *vm) {
_currentSoundIndex = 0;
_oldSoundNumber = 0;
_modPlayingFl = false;
-
- for (int i = 0; i < VOICE_COUNT; ++i)
- Common::fill((byte *)&_voice[i], (byte *)&_voice[i] + sizeof(VoiceItem), 0);
- for (int i = 0; i < SWAV_COUNT; ++i)
- Common::fill((byte *)&_sWav[i], (byte *)&_sWav[i] + sizeof(SwavItem), 0);
- for (int i = 0; i < SOUND_COUNT; ++i)
- Common::fill((byte *)&_sound[i], (byte *)&_sound[i] + sizeof(SoundItem), 0);
- Common::fill((byte *)&_music, (byte *)&_music + sizeof(MusicItem), 0);
}
SoundManager::~SoundManager() {
diff --git a/engines/hopkins/sound.h b/engines/hopkins/sound.h
index f1d047ae8b..97cdcdc1dd 100644
--- a/engines/hopkins/sound.h
+++ b/engines/hopkins/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -33,12 +33,16 @@ namespace Hopkins {
class VoiceItem {
public:
+ VoiceItem() : _status(false), _wavIndex(0) {}
+
bool _status;
int _wavIndex;
};
class SwavItem {
public:
+ SwavItem() : _active(false), _audioStream(NULL), _freeSampleFl(false) {}
+
bool _active;
Audio::RewindableAudioStream *_audioStream;
Audio::SoundHandle _soundHandle;
@@ -47,11 +51,15 @@ public:
class MusicItem {
public:
+ MusicItem() : _active(false) {}
+
bool _active;
};
class SoundItem {
public:
+ SoundItem() : _active(false) {}
+
bool _active;
};
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index c80ea15554..df7b26c82c 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -613,7 +613,6 @@ void TalkManager::displayBobDialogAnim(int idx) {
_vm->_objectsMan->_bob[idx]._flipFl = false;
_vm->_objectsMan->_bob[idx]._animData = _vm->_animMan->_animBqe[idx]._data;
_vm->_objectsMan->_bob[idx]._bobMode = 10;
- bqeData = _characterSprite;
_vm->_objectsMan->_bob[idx]._spriteData = _characterSprite;
_vm->_objectsMan->_bob[idx]._bobModeChange = newMode;
_vm->_objectsMan->_bob[idx]._modeChangeCtr = -1;
diff --git a/engines/hopkins/talk.h b/engines/hopkins/talk.h
index 678f52090a..49ee92d3b9 100644
--- a/engines/hopkins/talk.h
+++ b/engines/hopkins/talk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 414c86e1d4..56025bfbfd 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/console.h b/engines/hugo/console.h
index 16317e83d5..a35f2e3c0a 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp
index ede4ab2279..3907215746 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -184,13 +184,12 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
SaveStateList saveList;
char slot[3];
- int slotNum = 0;
for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
slot[0] = filename->c_str()[filename->size() - 6];
slot[1] = filename->c_str()[filename->size() - 5];
slot[2] = '\0';
// Obtain the last 2 digits of the filename (without extension), since they correspond to the save slot
- slotNum = atoi(slot);
+ int slotNum = atoi(slot);
if (slotNum >= 0 && slotNum <= getMaximumSaveSlot()) {
Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
if (file) {
@@ -276,9 +275,9 @@ void HugoMetaEngine::removeSaveState(const char *target, int slot) const {
} // End of namespace Hugo
#if PLUGIN_ENABLED_DYNAMIC(HUGO)
-REGISTER_PLUGIN_DYNAMIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngine);
+ REGISTER_PLUGIN_STATIC(HUGO, PLUGIN_TYPE_ENGINE, Hugo::HugoMetaEngine);
#endif
namespace Hugo {
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index 23e04dc479..8b145b78d8 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -21,9 +21,9 @@
*/
#include "common/substream.h"
-#include "graphics/decoders/bmp.h"
#include "gui/gui-manager.h"
#include "gui/ThemeEval.h"
+#include "image/bmp.h"
#include "hugo/hugo.h"
#include "hugo/display.h"
@@ -107,7 +107,6 @@ void TopMenu::reflowLayout() {
x += kButtonWidth + kButtonPad;
_inventButton->resize(x * scale, y * scale, kButtonWidth * scale, kButtonHeight * scale);
- x += kButtonWidth + kButtonPad;
// Set the graphics to the 'on' buttons, except for the variable ones
_whatButton->setGfx(_arrayBmp[4 * kMenuWhat + scale - 1]);
@@ -131,7 +130,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {
uint32 filPos = in.pos();
Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize);
- Graphics::BitmapDecoder bitmapDecoder;
+ Image::BitmapDecoder bitmapDecoder;
if (!bitmapDecoder.loadStream(stream))
error("TopMenu::loadBmpArr(): Could not load bitmap");
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index 114bcf56a9..55bb8f9fd0 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index 3dc9c9a1c3..a8a22fb4b9 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/display.h b/engines/hugo/display.h
index 00dc1b743c..e152a7f868 100644
--- a/engines/hugo/display.h
+++ b/engines/hugo/display.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index aa128048af..e2633977a8 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -34,11 +34,12 @@
#include "common/config-manager.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pcx.h"
#include "graphics/thumbnail.h"
#include "gui/saveload.h"
+#include "image/pcx.h"
+
#include "hugo/hugo.h"
#include "hugo/file.h"
#include "hugo/schedule.h"
@@ -110,7 +111,7 @@ Seq *FileManager::readPCX(Common::SeekableReadStream &f, Seq *seqPtr, byte *imag
error("Insufficient memory to run game.");
}
- Graphics::PCXDecoder pcx;
+ Image::PCXDecoder pcx;
if (!pcx.loadStream(f))
error("Error while reading PCX image");
diff --git a/engines/hugo/file.h b/engines/hugo/file.h
index 44f257a2af..d43528f0f8 100644
--- a/engines/hugo/file.h
+++ b/engines/hugo/file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp
index e42223fb13..b6b51eaa7b 100644
--- a/engines/hugo/file_v1d.cpp
+++ b/engines/hugo/file_v1d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp
index 002a1dc103..27db328ecf 100644
--- a/engines/hugo/file_v1w.cpp
+++ b/engines/hugo/file_v1w.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index 19c90980b0..5f748133ea 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/file_v2w.cpp b/engines/hugo/file_v2w.cpp
index 98a15526fa..4866ba9418 100644
--- a/engines/hugo/file_v2w.cpp
+++ b/engines/hugo/file_v2w.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index 5eb0cfc2c8..0cfb1dc162 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/game.h b/engines/hugo/game.h
index ed49ee8cbe..0ca6dcb111 100644
--- a/engines/hugo/game.h
+++ b/engines/hugo/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 88e2e4372b..8f89832f6b 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 6adb5f95d0..cc0fcc6ec2 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 5db6c39078..26ef65edf8 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h
index d5a5a4e4b4..7af53c8922 100644
--- a/engines/hugo/intro.h
+++ b/engines/hugo/intro.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp
index 03df997866..64609e6327 100644
--- a/engines/hugo/inventory.cpp
+++ b/engines/hugo/inventory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/inventory.h b/engines/hugo/inventory.h
index 5b55c3ec94..a57bff4b58 100644
--- a/engines/hugo/inventory.h
+++ b/engines/hugo/inventory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index 4ef3db3e2b..558a596b35 100644
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -160,7 +160,6 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in
return;
int16 inventObjId = _vm->_inventory->getInventoryObjId();
- bool foundFl = false; // TRUE if route found to object
// Check if this was over iconbar
if ((_vm->_inventory->getInventoryState() == kInventoryActive) && (cy < kInvDy + kDibOffY)) { // Clicked over iconbar object
if (inventObjId == -1)
@@ -172,12 +171,14 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in
} else { // Clicked over viewport object
Object *obj = &_vm->_object->_objects[objId];
int16 x, y;
- switch (obj->_viewx) { // Where to walk to
- case -1: // Walk to object position
+ switch (obj->_viewx) { // Where to walk to
+ case -1: { // Walk to object position
+ bool foundFl = false;
if (_vm->_object->findObjectSpace(obj, &x, &y))
- foundFl = _vm->_route->startRoute(kRouteGet, objId, x, y);
+ foundFl = _vm->_route->startRoute(kRouteGet, objId, x, y); // TRUE if route found to object
if (!foundFl) // Can't get there, try to use from here
_vm->_object->useObject(objId);
+ }
break;
case 0: // Immediate use
_vm->_object->useObject(objId); // Pick up or use object
diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h
index e20716f72c..f9d547ec86 100644
--- a/engines/hugo/mouse.h
+++ b/engines/hugo/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index 44f46d2d79..bbd2b93adc 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -134,19 +134,19 @@ void ObjectHandler::restoreSeq(Object *obj) {
void ObjectHandler::useObject(int16 objId) {
debugC(1, kDebugObject, "useObject(%d)", objId);
- const char *verb; // Background verb to use directly
int16 inventObjId = _vm->_inventory->getInventoryObjId();
- Object *obj = &_objects[objId]; // Ptr to object
+ Object *obj = &_objects[objId]; // Ptr to object
if (inventObjId == -1) {
+ const char *verb; // Background verb to use directly
// Get or use objid directly
if ((obj->_genericCmd & TAKE) || obj->_objValue) // Get collectible item
sprintf(_vm->_line, "%s %s", _vm->_text->getVerb(_vm->_take, 0), _vm->_text->getNoun(obj->_nounIndex, 0));
- else if (obj->_cmdIndex != 0) // Use non-collectible item if able
+ else if (obj->_cmdIndex != 0) // Use non-collectible item if able
sprintf(_vm->_line, "%s %s", _vm->_text->getVerb(_vm->_parser->getCmdDefaultVerbIdx(obj->_cmdIndex), 0), _vm->_text->getNoun(obj->_nounIndex, 0));
else if ((verb = _vm->_parser->useBG(_vm->_text->getNoun(obj->_nounIndex, 0))) != 0)
sprintf(_vm->_line, "%s %s", verb, _vm->_text->getNoun(obj->_nounIndex, 0));
else
- return; // Can't use object directly
+ return; // Can't use object directly
} else {
// Use status.objid on objid
// Default to first cmd verb
@@ -540,10 +540,8 @@ void ObjectHandler::setCarriedScreen(int screenNum) {
* Load _numObj from Hugo.dat
*/
void ObjectHandler::loadNumObj(Common::ReadStream &in) {
- int numElem;
-
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
- numElem = in.readUint16BE();
+ int numElem = in.readUint16BE();
if (varnt == _vm->_gameVariant)
_numObj = numElem;
}
diff --git a/engines/hugo/object.h b/engines/hugo/object.h
index fd0d731a98..59294e70ae 100644
--- a/engines/hugo/object.h
+++ b/engines/hugo/object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp
index 7f88e9e5b8..bfbdfd215b 100644
--- a/engines/hugo/object_v1d.cpp
+++ b/engines/hugo/object_v1d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp
index 61b0f2e48a..736128b006 100644
--- a/engines/hugo/object_v1w.cpp
+++ b/engines/hugo/object_v1w.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp
index 7cb6c20dd0..7acd05fe61 100644
--- a/engines/hugo/object_v2d.cpp
+++ b/engines/hugo/object_v2d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp
index 7bb4b95b4a..4805fde460 100644
--- a/engines/hugo/object_v3d.cpp
+++ b/engines/hugo/object_v3d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 57938ec371..998dd5df58 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index e72c46f591..5a2ac7d375 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp
index f29b0161f5..404a7bae80 100644
--- a/engines/hugo/parser_v1d.cpp
+++ b/engines/hugo/parser_v1d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp
index 3722ccc0e1..10f691866b 100644
--- a/engines/hugo/parser_v1w.cpp
+++ b/engines/hugo/parser_v1w.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp
index 6d71186f49..d8e91adec2 100644
--- a/engines/hugo/parser_v2d.cpp
+++ b/engines/hugo/parser_v2d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp
index a7e5896833..9bcc13e54e 100644
--- a/engines/hugo/parser_v3d.cpp
+++ b/engines/hugo/parser_v3d.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp
index dc3c41de9c..17c23ea785 100644
--- a/engines/hugo/route.cpp
+++ b/engines/hugo/route.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -384,9 +384,9 @@ bool Route::findRoute(const int16 cx, const int16 cy) {
_segment[_segmentNumb]._x2 = herox2;
_segmentNumb++;
- Common::Point *routeNode; // Ptr to route node
// Look in segments[] for straight lines from destination to hero
for (i = 0, _routeListIndex = 0; i < _segmentNumb - 1; i++) {
+ Common::Point *routeNode; // Ptr to route node
if ((routeNode = newNode()) == 0) // New node for new segment
return false; // Too many nodes
routeNode->y = _segment[i]._y;
@@ -438,7 +438,7 @@ bool Route::findRoute(const int16 cx, const int16 cy) {
void Route::processRoute() {
debugC(1, kDebugRoute, "processRoute");
- static bool turnedFl = false; // Used to get extra cylce for turning
+ static bool turnedFl = false; // Used to get extra cycle for turning
if (_routeIndex < 0)
return;
diff --git a/engines/hugo/route.h b/engines/hugo/route.h
index 71db1e2583..6d312ec1db 100644
--- a/engines/hugo/route.h
+++ b/engines/hugo/route.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index 17ffa9d391..36501d4a7d 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -254,9 +254,8 @@ void Scheduler::waitForRefresh() {
void Scheduler::loadAlNewscrIndex(Common::ReadStream &in) {
debugC(6, kDebugSchedule, "loadAlNewscrIndex(&in)");
- int numElem;
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
- numElem = in.readUint16BE();
+ int numElem = in.readUint16BE();
if (varnt == _vm->_gameVariant)
_alNewscrIndex = numElem;
}
@@ -568,9 +567,9 @@ void Scheduler::loadActListArr(Common::ReadStream &in) {
Act tmpAct;
- int numElem, numSubElem;
+ int numSubElem;
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
- numElem = in.readUint16BE();
+ int numElem = in.readUint16BE();
if (varnt == _vm->_gameVariant) {
_actListArrSize = numElem;
_actListArr = (Act **)malloc(sizeof(Act *) * _actListArrSize);
@@ -1214,8 +1213,6 @@ Event *Scheduler::doAction(Event *curEvent) {
Act *action = curEvent->_action;
Object *obj1;
int dx, dy;
- Event *wrkEvent; // Save ev_p->nextEvent for return
-
switch (action->_a0._actType) {
case ANULL: // Big NOP from DEL_EVENTS
break;
@@ -1444,7 +1441,7 @@ Event *Scheduler::doAction(Event *curEvent) {
if (action->_a0._actType == NEW_SCREEN) { // New_screen() deletes entire list
return nullptr; // nextEvent = nullptr since list now empty
} else {
- wrkEvent = curEvent->_nextEvent;
+ Event *wrkEvent = curEvent->_nextEvent;
delQueue(curEvent); // Return event to free list
return wrkEvent; // Return next event ptr
}
@@ -1601,10 +1598,9 @@ void Scheduler_v2d::promptAction(Act *action) {
debug(1, "doAction(act3), expecting answer %s", _vm->_file->fetchString(action->_a3._responsePtr[0]));
bool found = false;
- const char *tmpStr; // General purpose string ptr
for (int dx = 0; !found && (action->_a3._responsePtr[dx] != -1); dx++) {
- tmpStr = _vm->_file->fetchString(action->_a3._responsePtr[dx]);
+ const char *tmpStr = _vm->_file->fetchString(action->_a3._responsePtr[dx]);
if (response.contains(tmpStr))
found = true;
}
diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h
index 37851f1ebc..7f09904258 100644
--- a/engines/hugo/schedule.h
+++ b/engines/hugo/schedule.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 28dcdc83d6..8591709dc3 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h
index b00d93eeb1..6c3420918d 100644
--- a/engines/hugo/sound.h
+++ b/engines/hugo/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/text.cpp b/engines/hugo/text.cpp
index 538a0341e2..50b2b64260 100644
--- a/engines/hugo/text.cpp
+++ b/engines/hugo/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -91,16 +91,14 @@ char **TextHandler::getVerbArray(int idx1) const {
}
char **TextHandler::loadTextsVariante(Common::ReadStream &in, uint16 *arraySize) {
- int numTexts;
- int entryLen;
int len;
char **res = nullptr;
char *pos = nullptr;
char *posBck = nullptr;
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
- numTexts = in.readUint16BE();
- entryLen = in.readUint16BE();
+ int numTexts = in.readUint16BE();
+ int entryLen = in.readUint16BE();
pos = (char *)malloc(entryLen);
if (varnt == _vm->_gameVariant) {
if (arraySize)
diff --git a/engines/hugo/text.h b/engines/hugo/text.h
index 0ba8de9cdf..aa35f0a53f 100644
--- a/engines/hugo/text.h
+++ b/engines/hugo/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index fdc676e6a7..7b75bf2bc5 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/hugo/util.h b/engines/hugo/util.h
index d8634c88e0..3a76e3c6f4 100644
--- a/engines/hugo/util.h
+++ b/engines/hugo/util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index 59112504d6..7ce79cb7a0 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/animator_lok.cpp b/engines/kyra/animator_lok.cpp
index 945a51a4ec..ba6dc91e1f 100644
--- a/engines/kyra/animator_lok.cpp
+++ b/engines/kyra/animator_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/animator_lok.h b/engines/kyra/animator_lok.h
index 74b8305468..55c4d571fd 100644
--- a/engines/kyra/animator_lok.h
+++ b/engines/kyra/animator_lok.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index 83e774e2fc..3b9454ce56 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/animator_tim.cpp b/engines/kyra/animator_tim.cpp
index 90f4ad89ad..1d65ba7b1a 100644
--- a/engines/kyra/animator_tim.cpp
+++ b/engines/kyra/animator_tim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/animator_v2.cpp b/engines/kyra/animator_v2.cpp
index f7ae6749cf..5ac154bdce 100644
--- a/engines/kyra/animator_v2.cpp
+++ b/engines/kyra/animator_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index 80ff42e2c5..2454909440 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index a694a4aba5..71ae98e4db 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/darkmoon.h b/engines/kyra/darkmoon.h
index f0057ddd66..57eb46eb1c 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 99d73d19c7..e4806afb70 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index c1056a6cf3..aaf7c51c18 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index f59d173fe6..1ada9a87ba 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
namespace {
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index 405ea2129a..6a6b20baac 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/eob.h b/engines/kyra/eob.h
index b423b0da9d..09b6380c91 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index d477209e5b..38a5ab8440 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index 6421159dbe..1401d59dae 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index 1156b17957..e95d78c54d 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h
index 854f10e85d..3e2bdc04cd 100644
--- a/engines/kyra/gui.h
+++ b/engines/kyra/gui.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 9b4c09d7f4..9456e575db 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_eob.h b/engines/kyra/gui_eob.h
index 1b7bdf3482..e4daff6ada 100644
--- a/engines/kyra/gui_eob.h
+++ b/engines/kyra/gui_eob.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 3a2c07beff..8515cf51e0 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_hof.h b/engines/kyra/gui_hof.h
index c228c35551..9f6aaae2ca 100644
--- a/engines/kyra/gui_hof.h
+++ b/engines/kyra/gui_hof.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index 8e18ff910d..03b77bf677 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h
index d3e0beaa9e..76a5dc586b 100644
--- a/engines/kyra/gui_lok.h
+++ b/engines/kyra/gui_lok.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 8808c313fc..cfdf762bba 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_lol.h b/engines/kyra/gui_lol.h
index 79d4b6b4c9..6fa6571016 100644
--- a/engines/kyra/gui_lol.h
+++ b/engines/kyra/gui_lol.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index ee0303c8c3..7984dde662 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_mr.h b/engines/kyra/gui_mr.h
index 6303dff83f..62872a5355 100644
--- a/engines/kyra/gui_mr.h
+++ b/engines/kyra/gui_mr.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_rpg.cpp b/engines/kyra/gui_rpg.cpp
index ab25f95df8..8e77a6e141 100644
--- a/engines/kyra/gui_rpg.cpp
+++ b/engines/kyra/gui_rpg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp
index cec6562dd9..a75c14b071 100644
--- a/engines/kyra/gui_v1.cpp
+++ b/engines/kyra/gui_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_v1.h b/engines/kyra/gui_v1.h
index 260edae8e5..94be09037c 100644
--- a/engines/kyra/gui_v1.h
+++ b/engines/kyra/gui_v1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 1df4149d2e..afda573c61 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h
index bdbcce1c4f..34651e4c22 100644
--- a/engines/kyra/gui_v2.h
+++ b/engines/kyra/gui_v2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/item.h b/engines/kyra/item.h
index 4b236372a2..cf06aad8ba 100644
--- a/engines/kyra/item.h
+++ b/engines/kyra/item.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index 6c7ccf14dc..c9c632f60b 100644
--- a/engines/kyra/items_eob.cpp
+++ b/engines/kyra/items_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp
index e1d3c659de..2640af5188 100644
--- a/engines/kyra/items_hof.cpp
+++ b/engines/kyra/items_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp
index 8ee07e8271..55a23b2a1a 100644
--- a/engines/kyra/items_lok.cpp
+++ b/engines/kyra/items_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index f4024471d2..f2a9637dfe 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp
index 029f676538..397fab8d8f 100644
--- a/engines/kyra/items_mr.cpp
+++ b/engines/kyra/items_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp
index 2145a2c2f0..732fa7c8dd 100644
--- a/engines/kyra/items_v2.cpp
+++ b/engines/kyra/items_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index ce9b530dbe..9988899da8 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index 1b84e5b56f..1e500d4286 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 7d4e35092f..80511c674d 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index def5cbcf6f..a10b208389 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index a485ae47e4..834bda9454 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index d194fedd4d..787dd4c936 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index 4f7adcc6e5..635559dcfd 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_rpg.h b/engines/kyra/kyra_rpg.h
index cd36d2a5cd..69fc705ff2 100644
--- a/engines/kyra/kyra_rpg.h
+++ b/engines/kyra/kyra_rpg.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 9194b64155..c8993fea47 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index cd048563ca..c801829855 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 848fb18b6a..925dcf7bfe 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 563416bf1e..f00c4635b5 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 3695041b83..5500e8b95f 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 4002346d31..e060b307af 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index 2180c5359d..a435850e54 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 7a1abe8dd9..3c801ee923 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 5c179a7864..3ab08a4c7c 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -566,50 +566,50 @@ enum KyraResources {
kEoB2IntroStrings,
kEoB2IntroCPSFiles,
- kEob2IntroAnimData00,
- kEob2IntroAnimData01,
- kEob2IntroAnimData02,
- kEob2IntroAnimData03,
- kEob2IntroAnimData04,
- kEob2IntroAnimData05,
- kEob2IntroAnimData06,
- kEob2IntroAnimData07,
- kEob2IntroAnimData08,
- kEob2IntroAnimData09,
- kEob2IntroAnimData10,
- kEob2IntroAnimData11,
- kEob2IntroAnimData12,
- kEob2IntroAnimData13,
- kEob2IntroAnimData14,
- kEob2IntroAnimData15,
- kEob2IntroAnimData16,
- kEob2IntroAnimData17,
- kEob2IntroAnimData18,
- kEob2IntroAnimData19,
- kEob2IntroAnimData20,
- kEob2IntroAnimData21,
- kEob2IntroAnimData22,
- kEob2IntroAnimData23,
- kEob2IntroAnimData24,
- kEob2IntroAnimData25,
- kEob2IntroAnimData26,
- kEob2IntroAnimData27,
- kEob2IntroAnimData28,
- kEob2IntroAnimData29,
- kEob2IntroAnimData30,
- kEob2IntroAnimData31,
- kEob2IntroAnimData32,
- kEob2IntroAnimData33,
- kEob2IntroAnimData34,
- kEob2IntroAnimData35,
- kEob2IntroAnimData36,
- kEob2IntroAnimData37,
- kEob2IntroAnimData38,
- kEob2IntroAnimData39,
- kEob2IntroAnimData40,
- kEob2IntroAnimData41,
- kEob2IntroAnimData42,
- kEob2IntroAnimData43,
+ kEoB2IntroAnimData00,
+ kEoB2IntroAnimData01,
+ kEoB2IntroAnimData02,
+ kEoB2IntroAnimData03,
+ kEoB2IntroAnimData04,
+ kEoB2IntroAnimData05,
+ kEoB2IntroAnimData06,
+ kEoB2IntroAnimData07,
+ kEoB2IntroAnimData08,
+ kEoB2IntroAnimData09,
+ kEoB2IntroAnimData10,
+ kEoB2IntroAnimData11,
+ kEoB2IntroAnimData12,
+ kEoB2IntroAnimData13,
+ kEoB2IntroAnimData14,
+ kEoB2IntroAnimData15,
+ kEoB2IntroAnimData16,
+ kEoB2IntroAnimData17,
+ kEoB2IntroAnimData18,
+ kEoB2IntroAnimData19,
+ kEoB2IntroAnimData20,
+ kEoB2IntroAnimData21,
+ kEoB2IntroAnimData22,
+ kEoB2IntroAnimData23,
+ kEoB2IntroAnimData24,
+ kEoB2IntroAnimData25,
+ kEoB2IntroAnimData26,
+ kEoB2IntroAnimData27,
+ kEoB2IntroAnimData28,
+ kEoB2IntroAnimData29,
+ kEoB2IntroAnimData30,
+ kEoB2IntroAnimData31,
+ kEoB2IntroAnimData32,
+ kEoB2IntroAnimData33,
+ kEoB2IntroAnimData34,
+ kEoB2IntroAnimData35,
+ kEoB2IntroAnimData36,
+ kEoB2IntroAnimData37,
+ kEoB2IntroAnimData38,
+ kEoB2IntroAnimData39,
+ kEoB2IntroAnimData40,
+ kEoB2IntroAnimData41,
+ kEoB2IntroAnimData42,
+ kEoB2IntroAnimData43,
kEoB2IntroShapes00,
kEoB2IntroShapes01,
kEoB2IntroShapes04,
@@ -618,27 +618,27 @@ enum KyraResources {
kEoB2FinaleStrings,
kEoB2CreditsData,
kEoB2FinaleCPSFiles,
- kEob2FinaleAnimData00,
- kEob2FinaleAnimData01,
- kEob2FinaleAnimData02,
- kEob2FinaleAnimData03,
- kEob2FinaleAnimData04,
- kEob2FinaleAnimData05,
- kEob2FinaleAnimData06,
- kEob2FinaleAnimData07,
- kEob2FinaleAnimData08,
- kEob2FinaleAnimData09,
- kEob2FinaleAnimData10,
- kEob2FinaleAnimData11,
- kEob2FinaleAnimData12,
- kEob2FinaleAnimData13,
- kEob2FinaleAnimData14,
- kEob2FinaleAnimData15,
- kEob2FinaleAnimData16,
- kEob2FinaleAnimData17,
- kEob2FinaleAnimData18,
- kEob2FinaleAnimData19,
- kEob2FinaleAnimData20,
+ kEoB2FinaleAnimData00,
+ kEoB2FinaleAnimData01,
+ kEoB2FinaleAnimData02,
+ kEoB2FinaleAnimData03,
+ kEoB2FinaleAnimData04,
+ kEoB2FinaleAnimData05,
+ kEoB2FinaleAnimData06,
+ kEoB2FinaleAnimData07,
+ kEoB2FinaleAnimData08,
+ kEoB2FinaleAnimData09,
+ kEoB2FinaleAnimData10,
+ kEoB2FinaleAnimData11,
+ kEoB2FinaleAnimData12,
+ kEoB2FinaleAnimData13,
+ kEoB2FinaleAnimData14,
+ kEoB2FinaleAnimData15,
+ kEoB2FinaleAnimData16,
+ kEoB2FinaleAnimData17,
+ kEoB2FinaleAnimData18,
+ kEoB2FinaleAnimData19,
+ kEoB2FinaleAnimData20,
kEoB2FinaleShapes00,
kEoB2FinaleShapes03,
kEoB2FinaleShapes07,
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 4c413487ff..9ec955477f 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/resource_intern.h b/engines/kyra/resource_intern.h
index e63eab7d6a..530df51f35 100644
--- a/engines/kyra/resource_intern.h
+++ b/engines/kyra/resource_intern.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index bacfb62c16..2ae6420bd7 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp
index aa223414bc..cca8f3a0a4 100644
--- a/engines/kyra/saveload_eob.cpp
+++ b/engines/kyra/saveload_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload_hof.cpp b/engines/kyra/saveload_hof.cpp
index 1d28b6bc13..e8e76143bd 100644
--- a/engines/kyra/saveload_hof.cpp
+++ b/engines/kyra/saveload_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index f8cca1ab7b..1d729d0103 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index 6c83ebd51b..e02b8fb22c 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload_mr.cpp b/engines/kyra/saveload_mr.cpp
index c49a528d02..a938003a07 100644
--- a/engines/kyra/saveload_mr.cpp
+++ b/engines/kyra/saveload_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/saveload_rpg.cpp b/engines/kyra/saveload_rpg.cpp
index d22c50dbeb..8f44960753 100644
--- a/engines/kyra/saveload_rpg.cpp
+++ b/engines/kyra/saveload_rpg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index cfac5db8b3..84822c3fd2 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp
index 62690c4766..8ec14e4ac7 100644
--- a/engines/kyra/scene_hof.cpp
+++ b/engines/kyra/scene_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp
index ea09091af7..df9b11d5a2 100644
--- a/engines/kyra/scene_lok.cpp
+++ b/engines/kyra/scene_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 154606d46f..391de5e49c 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -620,14 +620,14 @@ void LoLEngine::updateCompass() {
if (_compassStep)
_compassStep -= (((ABS(_compassStep) >> 4) + 2) * dir);
- int16 d = _compassBroken ? (int8(_rnd.getRandomNumber(255)) - _compassDirection) : (_currentDirection << 6) - _compassDirection;
- if (d <= -128)
- d += 256;
- if (d >= 128)
- d -= 256;
+ int16 diff = _compassBroken ? (int8(_rnd.getRandomNumber(255)) - _compassDirection) : (_currentDirection << 6) - _compassDirection;
+ if (diff <= -128)
+ diff += 256;
+ if (diff >= 128)
+ diff -= 256;
- d >>= 2;
- _compassStep += d;
+ diff >>= 2;
+ _compassStep += diff;
_compassStep = CLIP(_compassStep, -24, 24);
_compassDirection += _compassStep;
@@ -636,14 +636,9 @@ void LoLEngine::updateCompass() {
if (_compassDirection > 255)
_compassDirection -= 256;
- if ((_compassDirection >> 6) == _currentDirection && _compassStep < 2) {
- int16 d2 = d >> 16;
- d ^= d2;
- d -= d2;
- if (d < 4) {
- _compassDirection = _currentDirection << 6;
- _compassStep = 0;
- }
+ if (((((_compassDirection + 3) & 0xFD) >> 6) == _currentDirection) && (_compassStep < 2) && (ABS(diff) < 4)) {
+ _compassDirection = _currentDirection << 6;
+ _compassStep = 0;
}
gui_drawCompass();
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index d2b4907b6a..38ee25f54a 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index 927d891a5f..dabc368a27 100644
--- a/engines/kyra/scene_rpg.cpp
+++ b/engines/kyra/scene_rpg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp
index 36798970e3..48958e5b90 100644
--- a/engines/kyra/scene_v1.cpp
+++ b/engines/kyra/scene_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp
index 9b6897f2ab..e4258836bc 100644
--- a/engines/kyra/scene_v2.cpp
+++ b/engines/kyra/scene_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 8c97e46a8f..eaa074ff0a 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index 156b5b9a7c..31b77b4179 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index ae62e522e7..6c1bd572e1 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_eob.h b/engines/kyra/screen_eob.h
index 934483d146..3634ae1a39 100644
--- a/engines/kyra/screen_eob.h
+++ b/engines/kyra/screen_eob.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index b7de7988b8..a80d91381c 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_hof.h b/engines/kyra/screen_hof.h
index 95f461677d..1ad2b3c93d 100644
--- a/engines/kyra/screen_hof.h
+++ b/engines/kyra/screen_hof.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp
index f028f93294..57601104ad 100644
--- a/engines/kyra/screen_lok.cpp
+++ b/engines/kyra/screen_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_lok.h b/engines/kyra/screen_lok.h
index 3cb92543e5..8f36ce7fb0 100644
--- a/engines/kyra/screen_lok.h
+++ b/engines/kyra/screen_lok.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 16a77c8fcb..6dd6080923 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h
index 8ceb8431bc..91d663d34f 100644
--- a/engines/kyra/screen_lol.h
+++ b/engines/kyra/screen_lol.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_mr.cpp b/engines/kyra/screen_mr.cpp
index 337860db30..fa820a79eb 100644
--- a/engines/kyra/screen_mr.cpp
+++ b/engines/kyra/screen_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_mr.h b/engines/kyra/screen_mr.h
index e10afcc5d2..ef982d4bcd 100644
--- a/engines/kyra/screen_mr.h
+++ b/engines/kyra/screen_mr.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 23eb94cb53..eabcdb2393 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index 6f4d67136a..06f7aa2d4a 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index 303cbb45aa..2452d7f41c 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script.h b/engines/kyra/script.h
index ccbe733e4d..12a44b0a03 100644
--- a/engines/kyra/script.h
+++ b/engines/kyra/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index 4a6a498173..455180b5e1 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_eob.h b/engines/kyra/script_eob.h
index 8e2dbd8423..b996e314d5 100644
--- a/engines/kyra/script_eob.h
+++ b/engines/kyra/script_eob.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifdef ENABLE_EOB
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index f6fde65109..f86d0e96bc 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index 22d5e9fd7c..380d7d551f 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 0bbe66f530..1a36527cdb 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index f656b162fd..5ba645f1be 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index ba0f62a2b4..e3b339cba6 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index aa512daae8..bd9c2645e5 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp
index aaa07e6d61..3ac174a5b9 100644
--- a/engines/kyra/script_v1.cpp
+++ b/engines/kyra/script_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index c38a144537..179d388109 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp
index 1f9097d09d..e1794b2416 100644
--- a/engines/kyra/seqplayer.cpp
+++ b/engines/kyra/seqplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/seqplayer.h b/engines/kyra/seqplayer.h
index 12d94e3f6d..155ed82a4e 100644
--- a/engines/kyra/seqplayer.h
+++ b/engines/kyra/seqplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_darkmoon.cpp b/engines/kyra/sequences_darkmoon.cpp
index 03b15d6950..53a30d0079 100644
--- a/engines/kyra/sequences_darkmoon.cpp
+++ b/engines/kyra/sequences_darkmoon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index 0fec386485..187295bd2c 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 9fcce4eb55..942cf16502 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1651,7 +1651,7 @@ void SeqPlayer_HOF::displayHoFTalkieScrollText(uint8 *data, const ScreenDim *d,
textData[1].text += strlen((char *)textData[1].text);
textData[1].text[0] = textData[1].unk1;
cnt--;
- memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
+ memmove(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
}
if (palCycle) {
diff --git a/engines/kyra/sequences_hof.h b/engines/kyra/sequences_hof.h
index 2558a68a6a..12fa4ffbc2 100644
--- a/engines/kyra/sequences_hof.h
+++ b/engines/kyra/sequences_hof.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 51f1ea51cf..8a41ee9a21 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index c8f97eb770..4c87ff1dd8 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_mr.cpp b/engines/kyra/sequences_mr.cpp
index 76badb63f5..0ac6b636b8 100644
--- a/engines/kyra/sequences_mr.cpp
+++ b/engines/kyra/sequences_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp
index e431e45f10..1bcbb7d874 100644
--- a/engines/kyra/sequences_v2.cpp
+++ b/engines/kyra/sequences_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index cb6faf2580..3c3aff6ea9 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 1d665709e5..f950f9d5aa 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -24,12 +24,12 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
-
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
-
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index 7292541594..598b5080a9 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index 518805c43e..a1600f6464 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp
index b2a9c2fd93..c356f2fb67 100644
--- a/engines/kyra/sound_lok.cpp
+++ b/engines/kyra/sound_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 7ac33967dd..8be0cb6ab9 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index fc6e92abd9..cd8bc2377c 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_pcspk.cpp b/engines/kyra/sound_pcspk.cpp
index 8664e2a22e..255d6b451a 100644
--- a/engines/kyra/sound_pcspk.cpp
+++ b/engines/kyra/sound_pcspk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index e4752f33de..725dedae3f 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -538,7 +538,8 @@ bool SoundTownsPC98_v2::init() {
// check if we have access to CD audio.
Resource *r = _vm->resource();
if (_musicEnabled &&
- (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")))
+ (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")
+ || r->exists("track01.mp3") || r->exists("track01.ogg") || r->exists("track01.flac") || r->exists("track01.fla")))
_musicEnabled = 2;
else
_musicEnabled = 1;
diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp
index f4cebf6470..540191e678 100644
--- a/engines/kyra/sprites.cpp
+++ b/engines/kyra/sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sprites.h b/engines/kyra/sprites.h
index 93cdcdbbcb..3319948707 100644
--- a/engines/kyra/sprites.h
+++ b/engines/kyra/sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index b96f2eca08..5a82cf604c 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index 4d4d596bac..b9ffe6cbdb 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/sprites_rpg.cpp b/engines/kyra/sprites_rpg.cpp
index 9c08bc8dd6..b190ad8f07 100644
--- a/engines/kyra/sprites_rpg.cpp
+++ b/engines/kyra/sprites_rpg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 522e12faa4..9b3b92b9c7 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -39,7 +39,7 @@
namespace Kyra {
-#define RESFILE_VERSION 84
+#define RESFILE_VERSION 85
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index e0a2862dea..54cc3066ec 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "kyra/eob.h"
@@ -1207,7 +1206,7 @@ void DarkMoonEngine::initStaticResource() {
_animIntro = new const DarkMoonAnimCommand*[44];
for (int i = 0; i < 44; i++)
- _animIntro[i] = _staticres->loadEoB2SeqData(kEob2IntroAnimData00 + i, temp);
+ _animIntro[i] = _staticres->loadEoB2SeqData(kEoB2IntroAnimData00 + i, temp);
_shapesIntro = new const DarkMoonShapeDef*[13];
memset(_shapesIntro, 0, sizeof(DarkMoonShapeDef *) * 13);
@@ -1222,7 +1221,7 @@ void DarkMoonEngine::initStaticResource() {
_animFinale = new const DarkMoonAnimCommand*[21];
for (int i = 0; i < 21; i++)
- _animFinale[i] = _staticres->loadEoB2SeqData(kEob2FinaleAnimData00 + i, temp);
+ _animFinale[i] = _staticres->loadEoB2SeqData(kEoB2FinaleAnimData00 + i, temp);
_shapesFinale = new const DarkMoonShapeDef*[13];
memset(_shapesFinale, 0, sizeof(DarkMoonShapeDef *) * 13);
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index c2cdcf9f51..9a4fc281d5 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/staticres_rpg.cpp b/engines/kyra/staticres_rpg.cpp
index a30cbf7d05..671d3dfd1d 100644
--- a/engines/kyra/staticres_rpg.cpp
+++ b/engines/kyra/staticres_rpg.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "kyra/resource.h"
diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp
index 2e3acffeb9..f88ba183ba 100644
--- a/engines/kyra/text.cpp
+++ b/engines/kyra/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text.h b/engines/kyra/text.h
index 199029469e..d5f423105e 100644
--- a/engines/kyra/text.h
+++ b/engines/kyra/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index f1933e9623..354eff03b9 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_hof.h b/engines/kyra/text_hof.h
index 414d02fe4b..aacdc97d76 100644
--- a/engines/kyra/text_hof.h
+++ b/engines/kyra/text_hof.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp
index a557940868..1ca5644b9d 100644
--- a/engines/kyra/text_lok.cpp
+++ b/engines/kyra/text_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index 6e77db1f8a..d8a36b954f 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_lol.h b/engines/kyra/text_lol.h
index e2b10e8d4d..ad3efadcaf 100644
--- a/engines/kyra/text_lol.h
+++ b/engines/kyra/text_lol.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp
index 10b0880f29..685d5447cd 100644
--- a/engines/kyra/text_mr.cpp
+++ b/engines/kyra/text_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_mr.h b/engines/kyra/text_mr.h
index 957415490f..5b6a7cd192 100644
--- a/engines/kyra/text_mr.h
+++ b/engines/kyra/text_mr.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index 24c523c856..03acde8497 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
diff --git a/engines/kyra/text_rpg.h b/engines/kyra/text_rpg.h
index eb8617a371..30d3463726 100644
--- a/engines/kyra/text_rpg.h
+++ b/engines/kyra/text_rpg.h
@@ -1,19 +1,19 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
- * are to numerous to list here. Please refer to the COPYRIGHT
+ * are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index 95c283f063..edca3ef5bf 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h
index 205be5957d..a753707b8a 100644
--- a/engines/kyra/timer.h
+++ b/engines/kyra/timer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp
index f7a4e23006..c5290790e7 100644
--- a/engines/kyra/timer_eob.cpp
+++ b/engines/kyra/timer_eob.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -347,7 +347,7 @@ void EoBCoreEngine::timerUpdateFoodStatus(int timerNum) {
}
void EoBCoreEngine::timerUpdateMonsterIdleAnim(int timerNum) {
- for (int i = 0; i < 18; i++) {
+ for (int i = 0; i < 30; i++) {
EoBMonsterInPlay *m = &_monsters[i];
if (m->mode == 7 || m->mode == 10 || (m->flags & 0x20) || (rollDice(1, 2, 0) != 1))
continue;
diff --git a/engines/kyra/timer_hof.cpp b/engines/kyra/timer_hof.cpp
index 96b14c28f5..bdfb93eebb 100644
--- a/engines/kyra/timer_hof.cpp
+++ b/engines/kyra/timer_hof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp
index 13f5403618..b046e92988 100644
--- a/engines/kyra/timer_lok.cpp
+++ b/engines/kyra/timer_lok.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp
index 9d0cc0dd72..1326eea754 100644
--- a/engines/kyra/timer_lol.cpp
+++ b/engines/kyra/timer_lol.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer_mr.cpp b/engines/kyra/timer_mr.cpp
index 7d8325cd05..58c75ac980 100644
--- a/engines/kyra/timer_mr.cpp
+++ b/engines/kyra/timer_mr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/timer_rpg.cpp b/engines/kyra/timer_rpg.cpp
index 02c2669436..b31c406480 100644
--- a/engines/kyra/timer_rpg.cpp
+++ b/engines/kyra/timer_rpg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/util.cpp b/engines/kyra/util.cpp
index f71978d03e..325f29ebd7 100644
--- a/engines/kyra/util.cpp
+++ b/engines/kyra/util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/util.h b/engines/kyra/util.h
index b91f84ad36..130768f89d 100644
--- a/engines/kyra/util.h
+++ b/engines/kyra/util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index d9564e1306..fb51c05e51 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h
index f3890107a8..d23704a9ea 100644
--- a/engines/kyra/vqa.h
+++ b/engines/kyra/vqa.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index f6aca2bb82..560ac8c332 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h
index 7dadc9319b..d00aa89af1 100644
--- a/engines/kyra/wsamovie.h
+++ b/engines/kyra/wsamovie.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index 832bcc2e26..148854e04d 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -39,7 +39,7 @@
namespace LastExpress {
-Animation::Animation() : _stream(NULL), _currentChunk(NULL), _overlay(NULL), _background1(NULL), _background2(NULL), _backgroundCurrent(0), _audio(NULL), _startTime(0), _changed(false), _flag(0) {
+Animation::Animation() : _stream(NULL), _currentChunk(NULL), _overlay(NULL), _background1(NULL), _background2(NULL), _backgroundCurrent(0), _audio(NULL), _startTime(0), _changed(false) {
}
Animation::~Animation() {
diff --git a/engines/lastexpress/data/animation.h b/engines/lastexpress/data/animation.h
index 293511b266..9523cddb78 100644
--- a/engines/lastexpress/data/animation.h
+++ b/engines/lastexpress/data/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -113,7 +113,6 @@ private:
uint32 _startTime;
bool _changed;
- int _flag;
};
} // End of namespace LastExpress
diff --git a/engines/lastexpress/data/archive.cpp b/engines/lastexpress/data/archive.cpp
index 908d58254a..f667da9e1c 100644
--- a/engines/lastexpress/data/archive.cpp
+++ b/engines/lastexpress/data/archive.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/archive.h b/engines/lastexpress/data/archive.h
index 011c830668..421220e6c7 100644
--- a/engines/lastexpress/data/archive.h
+++ b/engines/lastexpress/data/archive.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp
index 60379251a3..e1626213e0 100644
--- a/engines/lastexpress/data/background.cpp
+++ b/engines/lastexpress/data/background.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/background.h b/engines/lastexpress/data/background.h
index 74dad541aa..c4a3216171 100644
--- a/engines/lastexpress/data/background.h
+++ b/engines/lastexpress/data/background.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/cursor.cpp b/engines/lastexpress/data/cursor.cpp
index d176d963d1..fe1092a7ef 100644
--- a/engines/lastexpress/data/cursor.cpp
+++ b/engines/lastexpress/data/cursor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/cursor.h b/engines/lastexpress/data/cursor.h
index 0e11ec04b8..63932b3d7e 100644
--- a/engines/lastexpress/data/cursor.h
+++ b/engines/lastexpress/data/cursor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp
index 8ac1afce9a..fb1b26582e 100644
--- a/engines/lastexpress/data/font.cpp
+++ b/engines/lastexpress/data/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/font.h b/engines/lastexpress/data/font.h
index 7696829b3b..cc6f8e03e0 100644
--- a/engines/lastexpress/data/font.h
+++ b/engines/lastexpress/data/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp
index fdb1ac6d46..4e20e219d5 100644
--- a/engines/lastexpress/data/scene.cpp
+++ b/engines/lastexpress/data/scene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/scene.h b/engines/lastexpress/data/scene.h
index b99e56a74c..b9aff4da6b 100644
--- a/engines/lastexpress/data/scene.h
+++ b/engines/lastexpress/data/scene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index c7073b560c..f43e2afdef 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -76,7 +76,7 @@ void FrameInfo::read(Common::SeekableReadStream *in, bool isSequence) {
// AnimFrame
-AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f, bool ignoreSubtype) : _palette(NULL), _ignoreSubtype(ignoreSubtype) {
+AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f, bool /* ignoreSubtype */) : _palette(NULL) {
_palSize = 1;
// TODO: use just the needed rectangle
_image.create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h
index 610a55cebf..fd8b3cd27b 100644
--- a/engines/lastexpress/data/sequence.h
+++ b/engines/lastexpress/data/sequence.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -147,7 +147,6 @@ private:
uint16 _palSize;
uint16 *_palette;
Common::Rect _rect;
- bool _ignoreSubtype;
};
class Sequence {
diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp
index a77e4a06c6..2a221afadc 100644
--- a/engines/lastexpress/data/snd.cpp
+++ b/engines/lastexpress/data/snd.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/snd.h b/engines/lastexpress/data/snd.h
index 7111d939e7..f489304ff3 100644
--- a/engines/lastexpress/data/snd.h
+++ b/engines/lastexpress/data/snd.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp
index 4d19c02aa7..3e0da8cb55 100644
--- a/engines/lastexpress/data/subtitle.cpp
+++ b/engines/lastexpress/data/subtitle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/data/subtitle.h b/engines/lastexpress/data/subtitle.h
index 435408e4bd..40f6c11634 100644
--- a/engines/lastexpress/data/subtitle.h
+++ b/engines/lastexpress/data/subtitle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 7c83aff93d..6c2d833271 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/debug.h b/engines/lastexpress/debug.h
index 532cb83717..7a1e2648fb 100644
--- a/engines/lastexpress/debug.h
+++ b/engines/lastexpress/debug.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/detection.cpp b/engines/lastexpress/detection.cpp
index 2fdeef910a..d790582104 100644
--- a/engines/lastexpress/detection.cpp
+++ b/engines/lastexpress/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/drawable.h b/engines/lastexpress/drawable.h
index 5e77b0343a..8e844124f9 100644
--- a/engines/lastexpress/drawable.h
+++ b/engines/lastexpress/drawable.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp
index cdd9d8e712..5393410add 100644
--- a/engines/lastexpress/entities/abbot.cpp
+++ b/engines/lastexpress/entities/abbot.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/abbot.h b/engines/lastexpress/entities/abbot.h
index ba993fdbc9..c4a68f6ecb 100644
--- a/engines/lastexpress/entities/abbot.h
+++ b/engines/lastexpress/entities/abbot.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index b8ae62e7c4..9b56fca39f 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/alexei.h b/engines/lastexpress/entities/alexei.h
index 9a316ec574..5e14039a35 100644
--- a/engines/lastexpress/entities/alexei.h
+++ b/engines/lastexpress/entities/alexei.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp
index 86d5512cb9..0667d11697 100644
--- a/engines/lastexpress/entities/alouan.cpp
+++ b/engines/lastexpress/entities/alouan.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/alouan.h b/engines/lastexpress/entities/alouan.h
index 371e4f20d9..c84cf1a745 100644
--- a/engines/lastexpress/entities/alouan.h
+++ b/engines/lastexpress/entities/alouan.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index 4889f66c69..ff65be9772 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/anna.h b/engines/lastexpress/entities/anna.h
index de79ccb826..89a397a6d0 100644
--- a/engines/lastexpress/entities/anna.h
+++ b/engines/lastexpress/entities/anna.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index 11f72ecfe8..c5029537ad 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/august.h b/engines/lastexpress/entities/august.h
index 606321955b..f8eee1036b 100644
--- a/engines/lastexpress/entities/august.h
+++ b/engines/lastexpress/entities/august.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp
index 219ddf901b..979381afb0 100644
--- a/engines/lastexpress/entities/boutarel.cpp
+++ b/engines/lastexpress/entities/boutarel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/boutarel.h b/engines/lastexpress/entities/boutarel.h
index 04838f6527..8612566dc4 100644
--- a/engines/lastexpress/entities/boutarel.h
+++ b/engines/lastexpress/entities/boutarel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 6c8f7ca41c..fe977a577f 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h
index fb52ea3ee4..39739aa92e 100644
--- a/engines/lastexpress/entities/chapters.h
+++ b/engines/lastexpress/entities/chapters.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp
index 5e8a2df8cb..e24180e58d 100644
--- a/engines/lastexpress/entities/cooks.cpp
+++ b/engines/lastexpress/entities/cooks.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/cooks.h b/engines/lastexpress/entities/cooks.h
index f01d0b2ca0..79addb0a02 100644
--- a/engines/lastexpress/entities/cooks.h
+++ b/engines/lastexpress/entities/cooks.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp
index ebe2a930a5..80d93d8a87 100644
--- a/engines/lastexpress/entities/coudert.cpp
+++ b/engines/lastexpress/entities/coudert.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/coudert.h b/engines/lastexpress/entities/coudert.h
index 8303c80a32..a40f31e510 100644
--- a/engines/lastexpress/entities/coudert.h
+++ b/engines/lastexpress/entities/coudert.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index b2fc30829f..07e82d296e 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index 634c854d05..25c481c5cf 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/entity39.cpp b/engines/lastexpress/entities/entity39.cpp
index 1786cd2201..d1f20d6114 100644
--- a/engines/lastexpress/entities/entity39.cpp
+++ b/engines/lastexpress/entities/entity39.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/entity39.h b/engines/lastexpress/entities/entity39.h
index 54b65408c7..b6abcc2cc8 100644
--- a/engines/lastexpress/entities/entity39.h
+++ b/engines/lastexpress/entities/entity39.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h
index fd803676a9..2c2d132b07 100644
--- a/engines/lastexpress/entities/entity_intern.h
+++ b/engines/lastexpress/entities/entity_intern.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp
index 12ce16a32b..8ef27cbe92 100644
--- a/engines/lastexpress/entities/francois.cpp
+++ b/engines/lastexpress/entities/francois.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/francois.h b/engines/lastexpress/entities/francois.h
index 3118faf867..a2ecee3e60 100644
--- a/engines/lastexpress/entities/francois.h
+++ b/engines/lastexpress/entities/francois.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index 2ff34ef4c9..7b31c592cd 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h
index a761643531..8475c50799 100644
--- a/engines/lastexpress/entities/gendarmes.h
+++ b/engines/lastexpress/entities/gendarmes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp
index e9abcd888a..14d5b714ca 100644
--- a/engines/lastexpress/entities/hadija.cpp
+++ b/engines/lastexpress/entities/hadija.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/hadija.h b/engines/lastexpress/entities/hadija.h
index 545f21ee03..8e92dc6891 100644
--- a/engines/lastexpress/entities/hadija.h
+++ b/engines/lastexpress/entities/hadija.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp
index c53f4689fb..b7697d0c52 100644
--- a/engines/lastexpress/entities/ivo.cpp
+++ b/engines/lastexpress/entities/ivo.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/ivo.h b/engines/lastexpress/entities/ivo.h
index 75814336e0..a23d06cd3f 100644
--- a/engines/lastexpress/entities/ivo.h
+++ b/engines/lastexpress/entities/ivo.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index 29e9a90d41..b7af87751f 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/kahina.h b/engines/lastexpress/entities/kahina.h
index 7479cf76f9..ee9ccf5c81 100644
--- a/engines/lastexpress/entities/kahina.h
+++ b/engines/lastexpress/entities/kahina.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index 38a685ec19..8bf158943b 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/kronos.h b/engines/lastexpress/entities/kronos.h
index a7693fcd46..48da419a6e 100644
--- a/engines/lastexpress/entities/kronos.h
+++ b/engines/lastexpress/entities/kronos.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp
index af86ef8cdd..08edda5276 100644
--- a/engines/lastexpress/entities/mahmud.cpp
+++ b/engines/lastexpress/entities/mahmud.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/mahmud.h b/engines/lastexpress/entities/mahmud.h
index 685100f078..229e6d49d3 100644
--- a/engines/lastexpress/entities/mahmud.h
+++ b/engines/lastexpress/entities/mahmud.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp
index abd2aae9e4..1056e7fd7a 100644
--- a/engines/lastexpress/entities/max.cpp
+++ b/engines/lastexpress/entities/max.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/max.h b/engines/lastexpress/entities/max.h
index acd8235e89..7b7780742b 100644
--- a/engines/lastexpress/entities/max.h
+++ b/engines/lastexpress/entities/max.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp
index f484d00a2c..4bd276b7eb 100644
--- a/engines/lastexpress/entities/mertens.cpp
+++ b/engines/lastexpress/entities/mertens.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/mertens.h b/engines/lastexpress/entities/mertens.h
index 4cc58fd4ba..1b6d1d2f31 100644
--- a/engines/lastexpress/entities/mertens.h
+++ b/engines/lastexpress/entities/mertens.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp
index 76dc0aa0a0..601187b672 100644
--- a/engines/lastexpress/entities/milos.cpp
+++ b/engines/lastexpress/entities/milos.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/milos.h b/engines/lastexpress/entities/milos.h
index e8f95dc5ff..b7b716c4e7 100644
--- a/engines/lastexpress/entities/milos.h
+++ b/engines/lastexpress/entities/milos.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp
index 950644cb8f..f00fb7a9cb 100644
--- a/engines/lastexpress/entities/mmeboutarel.cpp
+++ b/engines/lastexpress/entities/mmeboutarel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/mmeboutarel.h b/engines/lastexpress/entities/mmeboutarel.h
index 0f6e6349fe..11d74b00f9 100644
--- a/engines/lastexpress/entities/mmeboutarel.h
+++ b/engines/lastexpress/entities/mmeboutarel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp
index 6e9f992390..b6356a0acb 100644
--- a/engines/lastexpress/entities/pascale.cpp
+++ b/engines/lastexpress/entities/pascale.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/pascale.h b/engines/lastexpress/entities/pascale.h
index eaf0f3ba0c..1b7777dec9 100644
--- a/engines/lastexpress/entities/pascale.h
+++ b/engines/lastexpress/entities/pascale.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp
index 8c779baeba..05211663bd 100644
--- a/engines/lastexpress/entities/rebecca.cpp
+++ b/engines/lastexpress/entities/rebecca.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/rebecca.h b/engines/lastexpress/entities/rebecca.h
index 885632f884..88a14e65d2 100644
--- a/engines/lastexpress/entities/rebecca.h
+++ b/engines/lastexpress/entities/rebecca.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp
index e8b4b4247b..26f512b900 100644
--- a/engines/lastexpress/entities/salko.cpp
+++ b/engines/lastexpress/entities/salko.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/salko.h b/engines/lastexpress/entities/salko.h
index 6ca73e39f6..0b672b9dba 100644
--- a/engines/lastexpress/entities/salko.h
+++ b/engines/lastexpress/entities/salko.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp
index 6323ef0ca8..590efa7157 100644
--- a/engines/lastexpress/entities/servers0.cpp
+++ b/engines/lastexpress/entities/servers0.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/servers0.h b/engines/lastexpress/entities/servers0.h
index 4c35637d65..70f06596b0 100644
--- a/engines/lastexpress/entities/servers0.h
+++ b/engines/lastexpress/entities/servers0.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp
index a8f4c0233c..153c2b66da 100644
--- a/engines/lastexpress/entities/servers1.cpp
+++ b/engines/lastexpress/entities/servers1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/servers1.h b/engines/lastexpress/entities/servers1.h
index c8f667ec5c..58566cd4d3 100644
--- a/engines/lastexpress/entities/servers1.h
+++ b/engines/lastexpress/entities/servers1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp
index 170090005f..ac4732556d 100644
--- a/engines/lastexpress/entities/sophie.cpp
+++ b/engines/lastexpress/entities/sophie.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/sophie.h b/engines/lastexpress/entities/sophie.h
index 188788bb9b..5589caf0f3 100644
--- a/engines/lastexpress/entities/sophie.h
+++ b/engines/lastexpress/entities/sophie.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/tables.cpp b/engines/lastexpress/entities/tables.cpp
index 4f8d2b954d..8701c012e4 100644
--- a/engines/lastexpress/entities/tables.cpp
+++ b/engines/lastexpress/entities/tables.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/tables.h b/engines/lastexpress/entities/tables.h
index c213aac978..2e93eb7ca5 100644
--- a/engines/lastexpress/entities/tables.h
+++ b/engines/lastexpress/entities/tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp
index d6bf4479e9..c6788fd4b2 100644
--- a/engines/lastexpress/entities/tatiana.cpp
+++ b/engines/lastexpress/entities/tatiana.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/tatiana.h b/engines/lastexpress/entities/tatiana.h
index 8ec69db5e9..ca2b800110 100644
--- a/engines/lastexpress/entities/tatiana.h
+++ b/engines/lastexpress/entities/tatiana.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp
index e3f530ef25..f707b02ccf 100644
--- a/engines/lastexpress/entities/train.cpp
+++ b/engines/lastexpress/entities/train.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/train.h b/engines/lastexpress/entities/train.h
index 4b8bc10c1a..1d94cba8f9 100644
--- a/engines/lastexpress/entities/train.h
+++ b/engines/lastexpress/entities/train.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp
index 67135c426f..2faaa30b6f 100644
--- a/engines/lastexpress/entities/vassili.cpp
+++ b/engines/lastexpress/entities/vassili.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/vassili.h b/engines/lastexpress/entities/vassili.h
index d006770f7b..dfdacf7920 100644
--- a/engines/lastexpress/entities/vassili.h
+++ b/engines/lastexpress/entities/vassili.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp
index f1e980842e..31b6e19c63 100644
--- a/engines/lastexpress/entities/verges.cpp
+++ b/engines/lastexpress/entities/verges.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/verges.h b/engines/lastexpress/entities/verges.h
index 93cc190d1e..dc902b376d 100644
--- a/engines/lastexpress/entities/verges.h
+++ b/engines/lastexpress/entities/verges.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp
index f29bce8b2b..6e9fb4f204 100644
--- a/engines/lastexpress/entities/vesna.cpp
+++ b/engines/lastexpress/entities/vesna.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/vesna.h b/engines/lastexpress/entities/vesna.h
index 025d45882e..8d255500be 100644
--- a/engines/lastexpress/entities/vesna.h
+++ b/engines/lastexpress/entities/vesna.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp
index 67963e50f6..e9c1c53a11 100644
--- a/engines/lastexpress/entities/yasmin.cpp
+++ b/engines/lastexpress/entities/yasmin.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/entities/yasmin.h b/engines/lastexpress/entities/yasmin.h
index 8fa8c10bb1..5ed735c9ac 100644
--- a/engines/lastexpress/entities/yasmin.h
+++ b/engines/lastexpress/entities/yasmin.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/eventhandler.h b/engines/lastexpress/eventhandler.h
index c561d57541..75263a8ec6 100644
--- a/engines/lastexpress/eventhandler.h
+++ b/engines/lastexpress/eventhandler.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp
index 944b1cb4ac..47694dda3e 100644
--- a/engines/lastexpress/fight/fight.cpp
+++ b/engines/lastexpress/fight/fight.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fight.h b/engines/lastexpress/fight/fight.h
index fffb520789..5c6eff507a 100644
--- a/engines/lastexpress/fight/fight.h
+++ b/engines/lastexpress/fight/fight.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter.cpp b/engines/lastexpress/fight/fighter.cpp
index 4b1cddabd4..6fd2a6421c 100644
--- a/engines/lastexpress/fight/fighter.cpp
+++ b/engines/lastexpress/fight/fighter.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter.h b/engines/lastexpress/fight/fighter.h
index dad95af186..326610af1e 100644
--- a/engines/lastexpress/fight/fighter.h
+++ b/engines/lastexpress/fight/fighter.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_anna.cpp b/engines/lastexpress/fight/fighter_anna.cpp
index c7660cab1a..723bd38cf0 100644
--- a/engines/lastexpress/fight/fighter_anna.cpp
+++ b/engines/lastexpress/fight/fighter_anna.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_anna.h b/engines/lastexpress/fight/fighter_anna.h
index abb6f9dc64..667552b8dc 100644
--- a/engines/lastexpress/fight/fighter_anna.h
+++ b/engines/lastexpress/fight/fighter_anna.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_ivo.cpp b/engines/lastexpress/fight/fighter_ivo.cpp
index 87a52c6be4..7bd9968da2 100644
--- a/engines/lastexpress/fight/fighter_ivo.cpp
+++ b/engines/lastexpress/fight/fighter_ivo.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_ivo.h b/engines/lastexpress/fight/fighter_ivo.h
index ca54fea904..1988b4b8c4 100644
--- a/engines/lastexpress/fight/fighter_ivo.h
+++ b/engines/lastexpress/fight/fighter_ivo.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_milos.cpp b/engines/lastexpress/fight/fighter_milos.cpp
index 9f8e726165..5b98b87304 100644
--- a/engines/lastexpress/fight/fighter_milos.cpp
+++ b/engines/lastexpress/fight/fighter_milos.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_milos.h b/engines/lastexpress/fight/fighter_milos.h
index 2126dd1838..734177f3dc 100644
--- a/engines/lastexpress/fight/fighter_milos.h
+++ b/engines/lastexpress/fight/fighter_milos.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_salko.cpp b/engines/lastexpress/fight/fighter_salko.cpp
index 1082674235..c0d15ec183 100644
--- a/engines/lastexpress/fight/fighter_salko.cpp
+++ b/engines/lastexpress/fight/fighter_salko.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_salko.h b/engines/lastexpress/fight/fighter_salko.h
index 0a2a615867..365f28a808 100644
--- a/engines/lastexpress/fight/fighter_salko.h
+++ b/engines/lastexpress/fight/fighter_salko.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_vesna.cpp b/engines/lastexpress/fight/fighter_vesna.cpp
index 02aaa1c16c..eeb00b821b 100644
--- a/engines/lastexpress/fight/fighter_vesna.cpp
+++ b/engines/lastexpress/fight/fighter_vesna.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/fight/fighter_vesna.h b/engines/lastexpress/fight/fighter_vesna.h
index 5c8ec855ae..a706922555 100644
--- a/engines/lastexpress/fight/fighter_vesna.h
+++ b/engines/lastexpress/fight/fighter_vesna.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index c6ea6f6c8a..986c56cb1b 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/action.h b/engines/lastexpress/game/action.h
index 3dad51d0d3..80de60511d 100644
--- a/engines/lastexpress/game/action.h
+++ b/engines/lastexpress/game/action.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp
index d7a369ba40..a92d252f0a 100644
--- a/engines/lastexpress/game/beetle.cpp
+++ b/engines/lastexpress/game/beetle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/beetle.h b/engines/lastexpress/game/beetle.h
index 034ebbd557..0a9a836065 100644
--- a/engines/lastexpress/game/beetle.h
+++ b/engines/lastexpress/game/beetle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index fafbd7cb64..b4b5527f8d 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/entities.h b/engines/lastexpress/game/entities.h
index cacbc408c9..089edbf87f 100644
--- a/engines/lastexpress/game/entities.h
+++ b/engines/lastexpress/game/entities.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index 11a76a77f0..9e02b3bc1d 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h
index 242dfc30cc..f3ab94ccab 100644
--- a/engines/lastexpress/game/inventory.h
+++ b/engines/lastexpress/game/inventory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp
index 1a9c6b4123..7ba2b0ff85 100644
--- a/engines/lastexpress/game/logic.cpp
+++ b/engines/lastexpress/game/logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/logic.h b/engines/lastexpress/game/logic.h
index b2d08cb06f..33180dfdd1 100644
--- a/engines/lastexpress/game/logic.h
+++ b/engines/lastexpress/game/logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp
index ad13a65199..31da650b9a 100644
--- a/engines/lastexpress/game/object.cpp
+++ b/engines/lastexpress/game/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/object.h b/engines/lastexpress/game/object.h
index be9d63d6c5..78e8a84df3 100644
--- a/engines/lastexpress/game/object.h
+++ b/engines/lastexpress/game/object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp
index 021dc40bb9..d9f2993c17 100644
--- a/engines/lastexpress/game/savegame.cpp
+++ b/engines/lastexpress/game/savegame.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h
index 7e8095fde1..f374e18a44 100644
--- a/engines/lastexpress/game/savegame.h
+++ b/engines/lastexpress/game/savegame.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp
index 8d14ec386b..b0186a4ccc 100644
--- a/engines/lastexpress/game/savepoint.cpp
+++ b/engines/lastexpress/game/savepoint.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h
index 005133891a..068c54eb0f 100644
--- a/engines/lastexpress/game/savepoint.h
+++ b/engines/lastexpress/game/savepoint.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/state.cpp b/engines/lastexpress/game/state.cpp
index 02ede25595..e47eda5ebd 100644
--- a/engines/lastexpress/game/state.cpp
+++ b/engines/lastexpress/game/state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h
index 83d528d346..38cd851aaa 100644
--- a/engines/lastexpress/game/state.h
+++ b/engines/lastexpress/game/state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index 9ced38a2e1..74e1efaa8b 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/graphics.h b/engines/lastexpress/graphics.h
index 7db7e88989..843bfd6e22 100644
--- a/engines/lastexpress/graphics.h
+++ b/engines/lastexpress/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h
index 02454be13d..6f94cf2a14 100644
--- a/engines/lastexpress/helpers.h
+++ b/engines/lastexpress/helpers.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index bc1624d171..293c3ab725 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/lastexpress.h b/engines/lastexpress/lastexpress.h
index 1431b79b9f..b4098f3860 100644
--- a/engines/lastexpress/lastexpress.h
+++ b/engines/lastexpress/lastexpress.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/menu/clock.cpp b/engines/lastexpress/menu/clock.cpp
index dedf045940..fadb578de6 100644
--- a/engines/lastexpress/menu/clock.cpp
+++ b/engines/lastexpress/menu/clock.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/menu/clock.h b/engines/lastexpress/menu/clock.h
index 339a18604f..248f2439af 100644
--- a/engines/lastexpress/menu/clock.h
+++ b/engines/lastexpress/menu/clock.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp
index c48e55bb55..cbd2a4a819 100644
--- a/engines/lastexpress/menu/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/menu/menu.h b/engines/lastexpress/menu/menu.h
index 4b84c065cb..5943c940ca 100644
--- a/engines/lastexpress/menu/menu.h
+++ b/engines/lastexpress/menu/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/menu/trainline.cpp b/engines/lastexpress/menu/trainline.cpp
index f819776163..fe6c7ca979 100644
--- a/engines/lastexpress/menu/trainline.cpp
+++ b/engines/lastexpress/menu/trainline.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/menu/trainline.h b/engines/lastexpress/menu/trainline.h
index af6a121e9c..bad01610e9 100644
--- a/engines/lastexpress/menu/trainline.h
+++ b/engines/lastexpress/menu/trainline.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/resource.cpp b/engines/lastexpress/resource.cpp
index 1d010355ac..2a48778c18 100644
--- a/engines/lastexpress/resource.cpp
+++ b/engines/lastexpress/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/resource.h b/engines/lastexpress/resource.h
index 90ac9b87ad..ddda4d6eb7 100644
--- a/engines/lastexpress/resource.h
+++ b/engines/lastexpress/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h
index dae7928043..c0099db7ac 100644
--- a/engines/lastexpress/shared.h
+++ b/engines/lastexpress/shared.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index 3d22657124..6bf1ebc9de 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/sound/entry.h b/engines/lastexpress/sound/entry.h
index a88b0b7210..d92b16a5dd 100644
--- a/engines/lastexpress/sound/entry.h
+++ b/engines/lastexpress/sound/entry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp
index 8904b48930..fe6d6f2251 100644
--- a/engines/lastexpress/sound/queue.cpp
+++ b/engines/lastexpress/sound/queue.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/sound/queue.h b/engines/lastexpress/sound/queue.h
index e1f9be1cf7..60c447596d 100644
--- a/engines/lastexpress/sound/queue.h
+++ b/engines/lastexpress/sound/queue.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index ad61c2e0d9..5f55f4e74e 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lastexpress/sound/sound.h b/engines/lastexpress/sound/sound.h
index 517543f470..81f1529286 100644
--- a/engines/lastexpress/sound/sound.h
+++ b/engines/lastexpress/sound/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/animseq.cpp b/engines/lure/animseq.cpp
index 8037563677..840b349fec 100644
--- a/engines/lure/animseq.cpp
+++ b/engines/lure/animseq.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/animseq.h b/engines/lure/animseq.h
index fde1fab921..a220356f92 100644
--- a/engines/lure/animseq.h
+++ b/engines/lure/animseq.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 92f07a566e..bbaa68befa 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/debugger.h b/engines/lure/debugger.h
index a4d4d689c4..a5360f2ed8 100644
--- a/engines/lure/debugger.h
+++ b/engines/lure/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/decode.cpp b/engines/lure/decode.cpp
index 484126c43f..6ad723a8e6 100644
--- a/engines/lure/decode.cpp
+++ b/engines/lure/decode.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/decode.h b/engines/lure/decode.h
index 93f617af7e..6b5e49fa22 100644
--- a/engines/lure/decode.h
+++ b/engines/lure/decode.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp
index 64d26c4c04..a87fcf6945 100644
--- a/engines/lure/detection.cpp
+++ b/engines/lure/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/disk.cpp b/engines/lure/disk.cpp
index 552da73f18..eebf299497 100644
--- a/engines/lure/disk.cpp
+++ b/engines/lure/disk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/disk.h b/engines/lure/disk.h
index 1872fbd055..859e338c18 100644
--- a/engines/lure/disk.h
+++ b/engines/lure/disk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/events.cpp b/engines/lure/events.cpp
index fe60b56658..9b7e501d55 100644
--- a/engines/lure/events.cpp
+++ b/engines/lure/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/events.h b/engines/lure/events.h
index dd3f82fe19..2a392c816d 100644
--- a/engines/lure/events.h
+++ b/engines/lure/events.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp
index ab5d992bdb..ed3e2d7ef0 100644
--- a/engines/lure/fights.cpp
+++ b/engines/lure/fights.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/fights.h b/engines/lure/fights.h
index 89f49d8c6d..32a99d7b74 100644
--- a/engines/lure/fights.h
+++ b/engines/lure/fights.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index eaed7ebbe7..efd33b6176 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/game.h b/engines/lure/game.h
index 42818e404b..ddf9fac24b 100644
--- a/engines/lure/game.h
+++ b/engines/lure/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index d0b439677d..fbf93e1e14 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h
index 85d36dc138..5411a83832 100644
--- a/engines/lure/hotspots.h
+++ b/engines/lure/hotspots.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/intro.cpp b/engines/lure/intro.cpp
index ce330be7c4..fc02e10667 100644
--- a/engines/lure/intro.cpp
+++ b/engines/lure/intro.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/intro.h b/engines/lure/intro.h
index ad442f1564..bde073e43c 100644
--- a/engines/lure/intro.h
+++ b/engines/lure/intro.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 3217cf039d..45fe0af025 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index 34bb9f1639..8a8299381e 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h
index 91fb650af3..7b39710798 100644
--- a/engines/lure/luredefs.h
+++ b/engines/lure/luredefs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/memory.cpp b/engines/lure/memory.cpp
index 137a8f6bee..1d838b65d0 100644
--- a/engines/lure/memory.cpp
+++ b/engines/lure/memory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/memory.h b/engines/lure/memory.h
index 05bf23a9ab..3594260901 100644
--- a/engines/lure/memory.h
+++ b/engines/lure/memory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 7564ce91a0..8867e8a626 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,7 +31,7 @@
#include "lure/events.h"
#include "lure/lure.h"
-#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(WEBOS) || defined(__ANDROID__)
+#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(WEBOS) || defined(__ANDROID__) || defined(__WII__)
#define LURE_CLICKABLE_MENUS
#endif
diff --git a/engines/lure/menu.h b/engines/lure/menu.h
index b3016f0560..a6113f009b 100644
--- a/engines/lure/menu.h
+++ b/engines/lure/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/palette.cpp b/engines/lure/palette.cpp
index 3975561749..30a5752366 100644
--- a/engines/lure/palette.cpp
+++ b/engines/lure/palette.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/palette.h b/engines/lure/palette.h
index 2af1f55973..8e1e92ac8d 100644
--- a/engines/lure/palette.h
+++ b/engines/lure/palette.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 9ec641140b..6b2705463d 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/res.h b/engines/lure/res.h
index a0a908f53d..9002ca3056 100644
--- a/engines/lure/res.h
+++ b/engines/lure/res.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index 15e7c1302d..5a4761c87b 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index a4d2f76cec..9190912f5b 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 26d15dd025..1be95ba3d4 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/room.h b/engines/lure/room.h
index deafa28a66..c5eba7185e 100644
--- a/engines/lure/room.h
+++ b/engines/lure/room.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/screen.cpp b/engines/lure/screen.cpp
index 4eb6fd46a3..e867459f8b 100644
--- a/engines/lure/screen.cpp
+++ b/engines/lure/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/screen.h b/engines/lure/screen.h
index 2a2fa6b2f2..2e3b0d4e49 100644
--- a/engines/lure/screen.h
+++ b/engines/lure/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 8afdaa5ad1..3df119a9da 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/scripts.h b/engines/lure/scripts.h
index 7bc8f8c950..2a400cc8d1 100644
--- a/engines/lure/scripts.h
+++ b/engines/lure/scripts.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index 298483bed8..bea0dbf9f4 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/sound.h b/engines/lure/sound.h
index 365a7ccdb6..74b28c33b4 100644
--- a/engines/lure/sound.h
+++ b/engines/lure/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/strings.cpp b/engines/lure/strings.cpp
index 0c9f4b5352..dbe2f786b4 100644
--- a/engines/lure/strings.cpp
+++ b/engines/lure/strings.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/strings.h b/engines/lure/strings.h
index e32921ddb6..d2c2a03ae1 100644
--- a/engines/lure/strings.h
+++ b/engines/lure/strings.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index 0f13d87fbc..17ac17814f 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/lure/surface.h b/engines/lure/surface.h
index d56e37632b..3cda09bf56 100644
--- a/engines/lure/surface.h
+++ b/engines/lure/surface.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/console.cpp b/engines/made/console.cpp
index 0076b6a4f9..f3d6b3d274 100644
--- a/engines/made/console.cpp
+++ b/engines/made/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/console.h b/engines/made/console.h
index 8b8484cb5c..9a1e0b247b 100644
--- a/engines/made/console.h
+++ b/engines/made/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 7c8f9bdd0c..85a8a5ca4a 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/database.h b/engines/made/database.h
index 89b4b45357..57e9fecdd5 100644
--- a/engines/made/database.h
+++ b/engines/made/database.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index c2c866ff34..7adc3e1f98 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp
index a8e33774f6..100f7b5c46 100644
--- a/engines/made/graphics.cpp
+++ b/engines/made/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/graphics.h b/engines/made/graphics.h
index 15704c7792..7f079891a2 100644
--- a/engines/made/graphics.h
+++ b/engines/made/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 3e192cb04c..af8156fc3e 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/made.h b/engines/made/made.h
index c0b86bb0a8..da251c6242 100644
--- a/engines/made/made.h
+++ b/engines/made/made.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index 04ac13eeda..b2917b58ed 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/music.h b/engines/made/music.h
index 3cfbd50ce7..95d1bd35c1 100644
--- a/engines/made/music.h
+++ b/engines/made/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp
index 573ff7faf1..3cac017e10 100644
--- a/engines/made/pmvplayer.cpp
+++ b/engines/made/pmvplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/pmvplayer.h b/engines/made/pmvplayer.h
index 3821ca8de1..cf06d67391 100644
--- a/engines/made/pmvplayer.h
+++ b/engines/made/pmvplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp
index 7e92cfe71b..f5e6ca85b3 100644
--- a/engines/made/redreader.cpp
+++ b/engines/made/redreader.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/redreader.h b/engines/made/redreader.h
index 3025d31ce1..28505d09c0 100644
--- a/engines/made/redreader.h
+++ b/engines/made/redreader.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index 28fee8ce57..1bb328c7a2 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/resource.h b/engines/made/resource.h
index a789069272..c573ec75d7 100644
--- a/engines/made/resource.h
+++ b/engines/made/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index 30848e8ec1..c27b781dda 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/screen.h b/engines/made/screen.h
index 266ac3811d..35d80663c6 100644
--- a/engines/made/screen.h
+++ b/engines/made/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index b89b3af802..2a155d67ac 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h
index 1fcdd5f0d4..fd216bfd63 100644
--- a/engines/made/screenfx.h
+++ b/engines/made/screenfx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/script.cpp b/engines/made/script.cpp
index 7658d20eb5..20fa026a40 100644
--- a/engines/made/script.cpp
+++ b/engines/made/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/script.h b/engines/made/script.h
index f3db43485f..bf75bc0875 100644
--- a/engines/made/script.h
+++ b/engines/made/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index 0e3b50aa98..efa765c7eb 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h
index 03d29c4592..9db5586adf 100644
--- a/engines/made/scriptfuncs.h
+++ b/engines/made/scriptfuncs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index 176f8688bd..91e855cbf5 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/made/sound.h b/engines/made/sound.h
index b8399fd90a..6ffca13aaa 100644
--- a/engines/made/sound.h
+++ b/engines/made/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/metaengine.h b/engines/metaengine.h
index ffa682fc53..41f3ec4cba 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef ENGINES_METAENGINE_H
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index b321e043d9..6435daf46f 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -29,7 +29,7 @@
#include "common/substream.h"
#include "common/system.h"
#include "common/textconsole.h"
-#include "graphics/decoders/bmp.h"
+#include "image/bmp.h"
namespace Mohawk {
@@ -635,7 +635,7 @@ MohawkSurface *MystBitmap::decodeImage(Common::SeekableReadStream *stream) {
Common::SeekableReadStream *bmpStream = decompressLZ(stream, uncompressedSize);
delete stream;
- Graphics::BitmapDecoder bitmapDecoder;
+ Image::BitmapDecoder bitmapDecoder;
if (!bitmapDecoder.loadStream(*bmpStream))
error("Could not decode Myst bitmap");
diff --git a/engines/mohawk/bitmap.h b/engines/mohawk/bitmap.h
index 73c117b5c7..ea8664f39d 100644
--- a/engines/mohawk/bitmap.h
+++ b/engines/mohawk/bitmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index ce22132cee..2e83eb3328 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h
index cdb4e1bedf..af01c0d1e0 100644
--- a/engines/mohawk/console.h
+++ b/engines/mohawk/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime.cpp b/engines/mohawk/cstime.cpp
index 0f69d50a22..3b26378819 100644
--- a/engines/mohawk/cstime.cpp
+++ b/engines/mohawk/cstime.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime.h b/engines/mohawk/cstime.h
index db06b9791e..f95222d3a1 100644
--- a/engines/mohawk/cstime.h
+++ b/engines/mohawk/cstime.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_cases.cpp b/engines/mohawk/cstime_cases.cpp
index c0a8dfc0e3..722d82a9f2 100644
--- a/engines/mohawk/cstime_cases.cpp
+++ b/engines/mohawk/cstime_cases.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_cases.h b/engines/mohawk/cstime_cases.h
index 1ac9abf87e..ba1231784a 100644
--- a/engines/mohawk/cstime_cases.h
+++ b/engines/mohawk/cstime_cases.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_game.cpp b/engines/mohawk/cstime_game.cpp
index 91d2f895c0..8eced701c3 100644
--- a/engines/mohawk/cstime_game.cpp
+++ b/engines/mohawk/cstime_game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_game.h b/engines/mohawk/cstime_game.h
index 88e813c999..6c082fc4d2 100644
--- a/engines/mohawk/cstime_game.h
+++ b/engines/mohawk/cstime_game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_graphics.cpp b/engines/mohawk/cstime_graphics.cpp
index 3a1452e67c..29336525da 100644
--- a/engines/mohawk/cstime_graphics.cpp
+++ b/engines/mohawk/cstime_graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_graphics.h b/engines/mohawk/cstime_graphics.h
index 5f034f47f4..35d5882bf0 100644
--- a/engines/mohawk/cstime_graphics.h
+++ b/engines/mohawk/cstime_graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_ui.cpp b/engines/mohawk/cstime_ui.cpp
index 6d5e5dd3ef..f3fe27a966 100644
--- a/engines/mohawk/cstime_ui.cpp
+++ b/engines/mohawk/cstime_ui.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_ui.h b/engines/mohawk/cstime_ui.h
index 3154d4b2ef..47e03081d2 100644
--- a/engines/mohawk/cstime_ui.h
+++ b/engines/mohawk/cstime_ui.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_view.cpp b/engines/mohawk/cstime_view.cpp
index 37c418f416..7879175bb0 100644
--- a/engines/mohawk/cstime_view.cpp
+++ b/engines/mohawk/cstime_view.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cstime_view.h b/engines/mohawk/cstime_view.h
index ae3283771d..0005d906f3 100644
--- a/engines/mohawk/cstime_view.h
+++ b/engines/mohawk/cstime_view.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index f70efde5fb..f1baac02e2 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/cursors.h b/engines/mohawk/cursors.h
index 7bfa491904..c41b5c273e 100644
--- a/engines/mohawk/cursors.h
+++ b/engines/mohawk/cursors.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index ef07de0180..926c296257 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 3b925af5a9..8a9c0f70fa 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 5f5a3b3800..ffc455286f 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h
index 844c01ad26..7470cd3acd 100644
--- a/engines/mohawk/dialogs.h
+++ b/engines/mohawk/dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 0f9a62c891..ea9b57ae17 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index 51d25db5d9..5f9b523e9a 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/installer_archive.cpp b/engines/mohawk/installer_archive.cpp
index 5af95f27e3..0abc930683 100644
--- a/engines/mohawk/installer_archive.cpp
+++ b/engines/mohawk/installer_archive.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/installer_archive.h b/engines/mohawk/installer_archive.h
index 89d2d85f8d..c3212d7f7c 100644
--- a/engines/mohawk/installer_archive.h
+++ b/engines/mohawk/installer_archive.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 634ff441b6..998ef048f6 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h
index 615fcd0e16..1a265a1a02 100644
--- a/engines/mohawk/livingbooks.h
+++ b/engines/mohawk/livingbooks.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index c45efb2c39..6dcd8c3ce7 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks_code.h b/engines/mohawk/livingbooks_code.h
index c9d9ae06e6..080377ce99 100644
--- a/engines/mohawk/livingbooks_code.h
+++ b/engines/mohawk/livingbooks_code.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks_graphics.cpp b/engines/mohawk/livingbooks_graphics.cpp
index fb764fa15b..fae0c99f6e 100644
--- a/engines/mohawk/livingbooks_graphics.cpp
+++ b/engines/mohawk/livingbooks_graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks_graphics.h b/engines/mohawk/livingbooks_graphics.h
index 3e2609750a..c76f92f641 100644
--- a/engines/mohawk/livingbooks_graphics.h
+++ b/engines/mohawk/livingbooks_graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks_lbx.cpp b/engines/mohawk/livingbooks_lbx.cpp
index dcf8caa4a5..b5f62704a1 100644
--- a/engines/mohawk/livingbooks_lbx.cpp
+++ b/engines/mohawk/livingbooks_lbx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/livingbooks_lbx.h b/engines/mohawk/livingbooks_lbx.h
index 3cca0a8e82..f9457c1425 100644
--- a/engines/mohawk/livingbooks_lbx.h
+++ b/engines/mohawk/livingbooks_lbx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/mohawk.cpp b/engines/mohawk/mohawk.cpp
index cb419064c0..d740d9479a 100644
--- a/engines/mohawk/mohawk.cpp
+++ b/engines/mohawk/mohawk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/mohawk.h b/engines/mohawk/mohawk.h
index 2f0e570d56..6fa733e38e 100644
--- a/engines/mohawk/mohawk.h
+++ b/engines/mohawk/mohawk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 975c6c2a21..7634e8d88a 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index a268c19737..4d86642652 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index 12a2c7f44c..4a3001774a 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_areas.h b/engines/mohawk/myst_areas.h
index 62af5ec4cf..97ec882497 100644
--- a/engines/mohawk/myst_areas.h
+++ b/engines/mohawk/myst_areas.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp
index 6a292c66e2..9ea9f15444 100644
--- a/engines/mohawk/myst_graphics.cpp
+++ b/engines/mohawk/myst_graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,8 +28,7 @@
#include "common/system.h"
#include "common/textconsole.h"
#include "engines/util.h"
-#include "graphics/decoders/jpeg.h"
-#include "graphics/decoders/pict.h"
+#include "image/pict.h"
namespace Mohawk {
@@ -94,7 +93,7 @@ MohawkSurface *MystGraphics::decodeImage(uint16 id) {
MohawkSurface *mhkSurface = 0;
if (isPict) {
- Graphics::PICTDecoder pict;
+ Image::PICTDecoder pict;
if (!pict.loadStream(*dataStream))
error("Could not decode Myst ME PICT");
diff --git a/engines/mohawk/myst_graphics.h b/engines/mohawk/myst_graphics.h
index 4bbc8d5b8c..1f70320bf6 100644
--- a/engines/mohawk/myst_graphics.h
+++ b/engines/mohawk/myst_graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index c1b75df4cf..15d74a2253 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_scripts.h b/engines/mohawk/myst_scripts.h
index b75da0801a..7d8165c762 100644
--- a/engines/mohawk/myst_scripts.h
+++ b/engines/mohawk/myst_scripts.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index 63ba5f7c85..2dd5745550 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/channelwood.h b/engines/mohawk/myst_stacks/channelwood.h
index a3ea406003..bd5d7ffe94 100644
--- a/engines/mohawk/myst_stacks/channelwood.h
+++ b/engines/mohawk/myst_stacks/channelwood.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/credits.cpp b/engines/mohawk/myst_stacks/credits.cpp
index 192e55d5e3..b9ff8b26aa 100644
--- a/engines/mohawk/myst_stacks/credits.cpp
+++ b/engines/mohawk/myst_stacks/credits.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/credits.h b/engines/mohawk/myst_stacks/credits.h
index a1f8b0a7d8..3c0f969203 100644
--- a/engines/mohawk/myst_stacks/credits.h
+++ b/engines/mohawk/myst_stacks/credits.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/demo.cpp b/engines/mohawk/myst_stacks/demo.cpp
index 9f393ea401..848736e37c 100644
--- a/engines/mohawk/myst_stacks/demo.cpp
+++ b/engines/mohawk/myst_stacks/demo.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/demo.h b/engines/mohawk/myst_stacks/demo.h
index c3e57cf7ae..f19b9a6c2c 100644
--- a/engines/mohawk/myst_stacks/demo.h
+++ b/engines/mohawk/myst_stacks/demo.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp
index d103105c2d..3eb3c40cbb 100644
--- a/engines/mohawk/myst_stacks/dni.cpp
+++ b/engines/mohawk/myst_stacks/dni.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/dni.h b/engines/mohawk/myst_stacks/dni.h
index 7f04287082..3dc4645bd3 100644
--- a/engines/mohawk/myst_stacks/dni.h
+++ b/engines/mohawk/myst_stacks/dni.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
index 71733227ac..2a33379198 100644
--- a/engines/mohawk/myst_stacks/intro.cpp
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/intro.h b/engines/mohawk/myst_stacks/intro.h
index 9fe3920e53..a6c4a594d2 100644
--- a/engines/mohawk/myst_stacks/intro.h
+++ b/engines/mohawk/myst_stacks/intro.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/makingof.cpp b/engines/mohawk/myst_stacks/makingof.cpp
index b5ad647381..1059fd0c5e 100644
--- a/engines/mohawk/myst_stacks/makingof.cpp
+++ b/engines/mohawk/myst_stacks/makingof.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/makingof.h b/engines/mohawk/myst_stacks/makingof.h
index d4bc0fd9f2..79ef913bcf 100644
--- a/engines/mohawk/myst_stacks/makingof.h
+++ b/engines/mohawk/myst_stacks/makingof.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index 43e9bcfed5..3181b78ae1 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/mechanical.h b/engines/mohawk/myst_stacks/mechanical.h
index 7f3d5143e4..6360b2be2d 100644
--- a/engines/mohawk/myst_stacks/mechanical.h
+++ b/engines/mohawk/myst_stacks/mechanical.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index dc5f433ce7..c500df5ad3 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/myst.h b/engines/mohawk/myst_stacks/myst.h
index de88843d59..a83609f640 100644
--- a/engines/mohawk/myst_stacks/myst.h
+++ b/engines/mohawk/myst_stacks/myst.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index 75e870281e..4cae4aaca7 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/preview.h b/engines/mohawk/myst_stacks/preview.h
index 706220e8ed..0959e935f5 100644
--- a/engines/mohawk/myst_stacks/preview.h
+++ b/engines/mohawk/myst_stacks/preview.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index a941b14eaa..8b95c7fa53 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/selenitic.h b/engines/mohawk/myst_stacks/selenitic.h
index d314c4d810..c669d01012 100644
--- a/engines/mohawk/myst_stacks/selenitic.h
+++ b/engines/mohawk/myst_stacks/selenitic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/slides.cpp b/engines/mohawk/myst_stacks/slides.cpp
index 720926904a..a1413f0d71 100644
--- a/engines/mohawk/myst_stacks/slides.cpp
+++ b/engines/mohawk/myst_stacks/slides.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/slides.h b/engines/mohawk/myst_stacks/slides.h
index 9fb76728b6..fb7868a03c 100644
--- a/engines/mohawk/myst_stacks/slides.h
+++ b/engines/mohawk/myst_stacks/slides.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index 1359685302..710c36ac8d 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_stacks/stoneship.h b/engines/mohawk/myst_stacks/stoneship.h
index 4125412b4d..4e1b42f26b 100644
--- a/engines/mohawk/myst_stacks/stoneship.h
+++ b/engines/mohawk/myst_stacks/stoneship.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp
index 3a8d233a26..d07aa9d5ec 100644
--- a/engines/mohawk/myst_state.cpp
+++ b/engines/mohawk/myst_state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/myst_state.h b/engines/mohawk/myst_state.h
index c7a6c0b4ac..b07a0f2469 100644
--- a/engines/mohawk/myst_state.h
+++ b/engines/mohawk/myst_state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index d7e829118a..4a4b78e391 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/resource.h b/engines/mohawk/resource.h
index f2ead7af65..d9074a5b73 100644
--- a/engines/mohawk/resource.h
+++ b/engines/mohawk/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/resource_cache.cpp b/engines/mohawk/resource_cache.cpp
index e73d8c43d3..0c19934278 100644
--- a/engines/mohawk/resource_cache.cpp
+++ b/engines/mohawk/resource_cache.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/resource_cache.h b/engines/mohawk/resource_cache.h
index b7eac9ebd7..b3c5bf7bb9 100644
--- a/engines/mohawk/resource_cache.h
+++ b/engines/mohawk/resource_cache.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 71aa371073..e1059bebaa 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index 961d85d61a..c22b9f7f87 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 384e89a4cf..10dcfd9fa7 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_external.h b/engines/mohawk/riven_external.h
index 9f076325a2..58dfde1a00 100644
--- a/engines/mohawk/riven_external.h
+++ b/engines/mohawk/riven_external.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp
index cd15960b85..615b2fdadb 100644
--- a/engines/mohawk/riven_graphics.cpp
+++ b/engines/mohawk/riven_graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_graphics.h b/engines/mohawk/riven_graphics.h
index 48dda28afd..577e5e6911 100644
--- a/engines/mohawk/riven_graphics.h
+++ b/engines/mohawk/riven_graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index f5bf7782d4..d97d0e174b 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_saveload.h b/engines/mohawk/riven_saveload.h
index 37b73c26c6..a6ddce5713 100644
--- a/engines/mohawk/riven_saveload.h
+++ b/engines/mohawk/riven_saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index 352a018990..06b6afdf30 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h
index 6df4a2e523..b669cd5081 100644
--- a/engines/mohawk/riven_scripts.h
+++ b/engines/mohawk/riven_scripts.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/riven_vars.cpp b/engines/mohawk/riven_vars.cpp
index 8ddb76eec9..1cd748d8d6 100644
--- a/engines/mohawk/riven_vars.cpp
+++ b/engines/mohawk/riven_vars.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index f92bebf10e..6f18d7178e 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/sound.h b/engines/mohawk/sound.h
index 12a59cdedf..49f6751072 100644
--- a/engines/mohawk/sound.h
+++ b/engines/mohawk/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index b7e06a2b9f..cebb72e24f 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -316,7 +316,7 @@ void VideoManager::clearMLST() {
VideoHandle VideoManager::playMovieRiven(uint16 id) {
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id) {
- debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping");
+ debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s, Volume = %d", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping", _mlstRecords[i].volume);
return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0, _mlstRecords[i].volume);
}
@@ -326,7 +326,7 @@ VideoHandle VideoManager::playMovieRiven(uint16 id) {
void VideoManager::playMovieBlockingRiven(uint16 id) {
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id) {
- debug(1, "Play tMOV %d (blocking) at (%d, %d)", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top);
+ debug(1, "Play tMOV %d (blocking) at (%d, %d), Volume = %d", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].volume);
VideoHandle videoHandle = createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, false);
waitUntilMovieEnds(videoHandle);
return;
@@ -373,7 +373,7 @@ void VideoManager::disableAllMovies() {
_videoStreams[i].enabled = false;
}
-VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume) {
+VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, uint16 volume) {
// First, check to see if that video is already playing
for (uint32 i = 0; i < _videoStreams.size(); i++)
if (_videoStreams[i].id == id)
@@ -383,7 +383,7 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool
Video::QuickTimeDecoder *decoder = new Video::QuickTimeDecoder();
decoder->setChunkBeginOffset(_vm->getResourceOffset(ID_TMOV, id));
decoder->loadStream(_vm->getResource(ID_TMOV, id));
- decoder->setVolume(volume);
+ decoder->setVolume((volume >= 256) ? 255 : volume);
VideoEntry entry;
entry.clear();
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index 2c4c827aa8..43181e3e6c 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -122,7 +122,7 @@ private:
// Keep tabs on any videos playing
Common::Array<VideoEntry> _videoStreams;
- VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume = 0xff);
+ VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, uint16 volume = 0xff);
VideoHandle createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop, byte volume = 0xff);
};
diff --git a/engines/mohawk/view.cpp b/engines/mohawk/view.cpp
index 719c288af5..1aaf32ea78 100644
--- a/engines/mohawk/view.cpp
+++ b/engines/mohawk/view.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mohawk/view.h b/engines/mohawk/view.h
index 06ffe605a3..47853f056f 100644
--- a/engines/mohawk/view.h
+++ b/engines/mohawk/view.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index c5d55066ba..556475d515 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -481,13 +481,24 @@ void MortevielleEngine::fctLook() {
}
return;
}
+
int cx = _coreVar._currPlace;
- if (_coreVar._currPlace == CHAPEL)
+ switch (_coreVar._currPlace) {
+ case CHAPEL:
cx = 17;
- if ((_coreVar._currPlace > MANOR_FRONT) && (_coreVar._currPlace < DOOR))
+ break;
+ case MANOR_BACK:
+ case INSIDE_WELL:
+ case WELL:
cx -= 4;
- if (_coreVar._currPlace == ROOM26)
+ break;
+ case ROOM26:
cx = 21;
+ break;
+ default:
+ break;
+ }
+
_crep = _tabdon[kArega + (cx * 7) + _num - 1];
if ((_coreVar._currPlace == ATTIC) && (_num == 8))
_crep = 126;
diff --git a/engines/mortevielle/debugger.cpp b/engines/mortevielle/debugger.cpp
index 4b39462cde..c8f75918ab 100644
--- a/engines/mortevielle/debugger.cpp
+++ b/engines/mortevielle/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/debugger.h b/engines/mortevielle/debugger.h
index 6e1006681c..66f5afef9d 100644
--- a/engines/mortevielle/debugger.h
+++ b/engines/mortevielle/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/detection.cpp b/engines/mortevielle/detection.cpp
index ee9cb40c99..b6c27e6b12 100644
--- a/engines/mortevielle/detection.cpp
+++ b/engines/mortevielle/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/detection_tables.h b/engines/mortevielle/detection_tables.h
index 8d0cd5630c..3e1e5aaefe 100644
--- a/engines/mortevielle/detection_tables.h
+++ b/engines/mortevielle/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/dialogs.cpp b/engines/mortevielle/dialogs.cpp
index 09a4227cc0..89098fabe5 100644
--- a/engines/mortevielle/dialogs.cpp
+++ b/engines/mortevielle/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -292,7 +292,7 @@ bool DialogManager::showKnowledgeCheck() {
Common::String choiceArray[15];
- int currChoice, prevChoice;
+ int currChoice;
int correctCount = 0;
for (int indx = 0; indx < 10; ++indx) {
@@ -317,7 +317,7 @@ bool DialogManager::showKnowledgeCheck() {
int optionPosY = 35;
int maxLength = 0;
- prevChoice = 1;
+ int prevChoice = 1;
for (int j = firstOption; j <= lastOption; ++j, ++prevChoice) {
tmpStr = _vm->getString(j);
if ((int) tmpStr.size() > maxLength)
diff --git a/engines/mortevielle/dialogs.h b/engines/mortevielle/dialogs.h
index 03dfc78023..abd8ee2493 100644
--- a/engines/mortevielle/dialogs.h
+++ b/engines/mortevielle/dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index 18b0e7f1c1..553c1a759e 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/graphics.h b/engines/mortevielle/graphics.h
index 7f0d4823cb..d29d9b2d8d 100644
--- a/engines/mortevielle/graphics.h
+++ b/engines/mortevielle/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp
index 7979e3ce7f..c0b81b252a 100644
--- a/engines/mortevielle/menu.cpp
+++ b/engines/mortevielle/menu.cpp
@@ -2,18 +2,18 @@
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
- * file _distributed with this source _distribution.
+ * file distributed with this source distribution.
*
- * This program is free software; you can re_distribute it and/or
+ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
- * This program is _distributed in the hope that it will be useful,
+ *
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -141,19 +141,19 @@ void Menu::readVerbNums(Common::File &f, int dataSize) {
_actionMenu[1]._actionId = _opcodeSHide & 0xFF;
_actionMenu[2]._menuId = _opcodeAttach >> 8;
- _actionMenu[2]._actionId = _opcodeAttach & 0xFF;
+ _actionMenu[2]._actionId = _opcodeAttach & 0xFF;
_actionMenu[3]._menuId = _opcodeForce >> 8;
- _actionMenu[3]._actionId = _opcodeForce & 0xFF;
+ _actionMenu[3]._actionId = _opcodeForce & 0xFF;
_actionMenu[4]._menuId = _opcodeSleep >> 8;
_actionMenu[4]._actionId = _opcodeSleep & 0xFF;
_actionMenu[5]._menuId = _opcodeEnter >> 8;
- _actionMenu[5]._actionId = _opcodeEnter & 0xFF;
+ _actionMenu[5]._actionId = _opcodeEnter & 0xFF;
_actionMenu[6]._menuId = _opcodeClose >> 8;
- _actionMenu[6]._actionId = _opcodeClose & 0xFF;
+ _actionMenu[6]._actionId = _opcodeClose & 0xFF;
_actionMenu[7]._menuId = _opcodeKnock >> 8;
_actionMenu[7]._actionId = _opcodeKnock & 0xFF;
@@ -612,7 +612,7 @@ void Menu::updateMenu() {
void Menu::initMenu() {
Common::File f;
-
+
bool menuLoaded = false;
// First try to read it from mort.dat if useOriginalData() is false
if (!_vm->useOriginalData()) {
@@ -636,7 +636,7 @@ void Menu::initMenu() {
desiredLanguageId = MORTDAT_LANG_ENGLISH;
break;
}
-
+
// Validate the data file header
char fileId[4];
f.read(fileId, 4);
@@ -654,7 +654,7 @@ void Menu::initMenu() {
// Read in the language
byte languageId = f.readByte();
--dataSize;
-
+
// If the language isn't correct, then skip the entire block
if (languageId != desiredLanguageId) {
f.skip(dataSize);
diff --git a/engines/mortevielle/menu.h b/engines/mortevielle/menu.h
index d8a3b4d0d6..b3695fef28 100644
--- a/engines/mortevielle/menu.h
+++ b/engines/mortevielle/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/module.mk b/engines/mortevielle/module.mk
index a9f02c2a67..7188e36958 100644
--- a/engines/mortevielle/module.mk
+++ b/engines/mortevielle/module.mk
@@ -19,5 +19,5 @@ ifeq ($(ENABLE_MORTEVIELLE), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 492ce63b41..90d366ed7e 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -131,10 +131,20 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const MortevielleGameDescr
}
_currMenu = OPCODE_NONE;
_currAction = OPCODE_NONE;
+ _menuOpcode = OPCODE_NONE;
_addFix = 0;
- _savedBitIndex = 0;
- _numpal = 0;
+ _currBitIndex = 0;
+ _currDay = 0;
+ _currHour = 10;
+ _currHalfHour = 0;
+ _hour = 10;
_key = 0;
+ _manorDistance = 0;
+ _numpal = 0;
+ _savedBitIndex = 0;
+ _endGame = false;
+ _loseGame = false;
+ _txxFileFl = false;
}
MortevielleEngine::~MortevielleEngine() {
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index 7a673f42f9..c3d1e4ae8b 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp
index 2077a4cdc5..8f96ba3ef5 100644
--- a/engines/mortevielle/mouse.cpp
+++ b/engines/mortevielle/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -97,15 +97,13 @@ void MouseHandler::getMousePosition(int &x, int &y, bool &click) {
* @remarks Originally called 'mov_mouse'
*/
void MouseHandler::moveMouse(bool &funct, char &key) {
- bool p_key;
- char in1, in2;
int cx, cy;
bool click;
// Set defaults and check pending events
funct = false;
key = '\377';
- p_key = _vm->keyPressed();
+ bool p_key = _vm->keyPressed();
// If mouse button clicked, return it
if (_vm->getMouseClick())
@@ -116,7 +114,7 @@ void MouseHandler::moveMouse(bool &funct, char &key) {
if (_vm->shouldQuit())
return;
- in1 = _vm->getChar();
+ char in1 = _vm->getChar();
getMousePosition(cx, cy, click);
switch (toupper(in1)) {
case '4':
@@ -160,7 +158,7 @@ void MouseHandler::moveMouse(bool &funct, char &key) {
p_key = _vm->keyPressed();
if (p_key) {
- in2 = _vm->getChar();
+ char in2 = _vm->getChar();
if ((in2 >= ';') && (in2 <= 'D')) {
funct = true;
diff --git a/engines/mortevielle/mouse.h b/engines/mortevielle/mouse.h
index 81c02dc8bd..0f28d50131 100644
--- a/engines/mortevielle/mouse.h
+++ b/engines/mortevielle/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp
index b359860a82..6a479c0859 100644
--- a/engines/mortevielle/outtext.cpp
+++ b/engines/mortevielle/outtext.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -287,8 +287,8 @@ void TextHandler::taffich() {
filename = "AXX.mor";
} else { // b == 50
// CHECKME: the size of AZZ.mor is 1280 for the DOS version
- // and 1260 for the Amiga version. Maybe the 20 bytes
- // are a filler (to get 10 blocks of 128 bytes),
+ // and 1260 for the Amiga version. Maybe the 20 bytes
+ // are a filler (to get 10 blocks of 128 bytes),
// or the size should be variable.
drawingSize = 1260;
filename = "AZZ.mor";
diff --git a/engines/mortevielle/outtext.h b/engines/mortevielle/outtext.h
index 397ca850dd..515bc9ece0 100644
--- a/engines/mortevielle/outtext.h
+++ b/engines/mortevielle/outtext.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/saveload.cpp b/engines/mortevielle/saveload.cpp
index 77a9a6371e..9f46940e1f 100644
--- a/engines/mortevielle/saveload.cpp
+++ b/engines/mortevielle/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -125,7 +125,7 @@ Common::Error SavegameManager::loadGame(const Common::String &filename) {
g_vm->gameLoaded();
g_vm->_mouse->showMouse();
return Common::kNoError;
- } else
+ } else
return Common::kUnknownError;
}
diff --git a/engines/mortevielle/saveload.h b/engines/mortevielle/saveload.h
index 9c21b0c294..a0de05b920 100644
--- a/engines/mortevielle/saveload.h
+++ b/engines/mortevielle/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp
index db1f7578f1..23ca9d89b4 100644
--- a/engines/mortevielle/sound.cpp
+++ b/engines/mortevielle/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -91,13 +91,12 @@ int SoundManager::decodeMusic(const byte *PSrc, byte *PDest, int size) {
static const int tab[16] = { -96, -72, -48, -32, -20, -12, -8, -4, 0, 4, 8, 12, 20, 32, 48, 72 };
uint seed = 128;
- int v;
int decompSize = 0;
int skipSize = 0;
for (int idx1 = 0; idx1 < size; ++idx1) {
byte srcByte = *PSrc++;
- v = tab[srcByte >> 4];
+ int v = tab[srcByte >> 4];
seed += v;
*PDest++ = seed & 0xff;
@@ -204,7 +203,7 @@ void SoundManager::litph(tablint &t, int typ, int tempo) {
}
} else { // 2
debugC(5, kMortevielleSounds, "litph - vadson");
- const static int ambiantNoiseAdr[] = {0, 14020,
+ const static int ambiantNoiseAdr[] = {0, 14020,
14020, 18994,
18994, 19630,
19630, 22258,
@@ -696,7 +695,7 @@ void SoundManager::handlePhoneme() {
uint16 startPos = _cfiphBuffer[_phonemeNumb - 1] + deca[_soundType];
uint16 endPos = _cfiphBuffer[_phonemeNumb] + deca[_soundType];
int wordCount = endPos - startPos;
-
+
startPos /= 2;
endPos /= 2;
assert((endPos - startPos) < 1711);
diff --git a/engines/mortevielle/sound.h b/engines/mortevielle/sound.h
index 5321c8946c..d913684935 100644
--- a/engines/mortevielle/sound.h
+++ b/engines/mortevielle/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp
index 29c9be2e0c..d5dec6a286 100644
--- a/engines/mortevielle/utils.cpp
+++ b/engines/mortevielle/utils.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -258,7 +258,6 @@ void MortevielleEngine::handleAction() {
clearVerbBar();
- bool handledOpcodeFl = false;
_controlMenu = 0;
if (!_keyPressedEsc) {
_menu->drawMenu();
@@ -319,6 +318,7 @@ void MortevielleEngine::handleAction() {
_menuOpcode = _currMenu;
if ((_currMenu == MENU_ACTION) || (_currMenu == MENU_SELF))
_menuOpcode = _currAction;
+ bool handledOpcodeFl = false;
if (!_anyone) {
if ((_heroSearching) || (_obpart)) {
if (_mouse->_pos.y < 12)
diff --git a/engines/neverhood/background.cpp b/engines/neverhood/background.cpp
index d6a9900d38..77c1e057a6 100644
--- a/engines/neverhood/background.cpp
+++ b/engines/neverhood/background.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/background.h b/engines/neverhood/background.h
index ef88be21c0..d4ba20c8e5 100644
--- a/engines/neverhood/background.h
+++ b/engines/neverhood/background.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/blbarchive.cpp b/engines/neverhood/blbarchive.cpp
index c743037e63..d1d8cf1aa2 100644
--- a/engines/neverhood/blbarchive.cpp
+++ b/engines/neverhood/blbarchive.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/blbarchive.h b/engines/neverhood/blbarchive.h
index 620b12b8ac..25e816ddcd 100644
--- a/engines/neverhood/blbarchive.h
+++ b/engines/neverhood/blbarchive.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp
index 34438d821f..a4d1366880 100644
--- a/engines/neverhood/console.cpp
+++ b/engines/neverhood/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/console.h b/engines/neverhood/console.h
index 70260a96af..bf1b201270 100644
--- a/engines/neverhood/console.h
+++ b/engines/neverhood/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp
index feba193609..57580395bf 100644
--- a/engines/neverhood/detection.cpp
+++ b/engines/neverhood/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp
index 7513034bf3..96a935851c 100644
--- a/engines/neverhood/diskplayerscene.cpp
+++ b/engines/neverhood/diskplayerscene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/diskplayerscene.h b/engines/neverhood/diskplayerscene.h
index 150d5c58ed..2ae85b9a0b 100644
--- a/engines/neverhood/diskplayerscene.h
+++ b/engines/neverhood/diskplayerscene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/entity.cpp b/engines/neverhood/entity.cpp
index 1ebf1dcf6c..68390051f5 100644
--- a/engines/neverhood/entity.cpp
+++ b/engines/neverhood/entity.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/entity.h b/engines/neverhood/entity.h
index 5c29bf8a4f..4edb19239d 100644
--- a/engines/neverhood/entity.h
+++ b/engines/neverhood/entity.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
index 5e9981caa6..12ae66658c 100644
--- a/engines/neverhood/gamemodule.cpp
+++ b/engines/neverhood/gamemodule.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/gamemodule.h b/engines/neverhood/gamemodule.h
index 198f8f6715..b8f7276773 100644
--- a/engines/neverhood/gamemodule.h
+++ b/engines/neverhood/gamemodule.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/gamevars.cpp b/engines/neverhood/gamevars.cpp
index 9c080fea24..72b688c194 100644
--- a/engines/neverhood/gamevars.cpp
+++ b/engines/neverhood/gamevars.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/gamevars.h b/engines/neverhood/gamevars.h
index 3aec4d1da4..9bb49ebf5b 100644
--- a/engines/neverhood/gamevars.h
+++ b/engines/neverhood/gamevars.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp
index e976844c16..3d1724ed8a 100644
--- a/engines/neverhood/graphics.cpp
+++ b/engines/neverhood/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/graphics.h b/engines/neverhood/graphics.h
index b80bd60729..12fb2d2215 100644
--- a/engines/neverhood/graphics.h
+++ b/engines/neverhood/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp
index a813440f62..de940bda79 100644
--- a/engines/neverhood/klaymen.cpp
+++ b/engines/neverhood/klaymen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/klaymen.h b/engines/neverhood/klaymen.h
index a614560fc0..6c25d5b4de 100644
--- a/engines/neverhood/klaymen.h
+++ b/engines/neverhood/klaymen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp
index b332418cf5..255d04dc86 100644
--- a/engines/neverhood/menumodule.cpp
+++ b/engines/neverhood/menumodule.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/menumodule.h b/engines/neverhood/menumodule.h
index 9da9c849a9..6508ccbdf2 100644
--- a/engines/neverhood/menumodule.h
+++ b/engines/neverhood/menumodule.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h
index 5f1e1b87dd..15a762fbe9 100644
--- a/engines/neverhood/messages.h
+++ b/engines/neverhood/messages.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/microtiles.cpp b/engines/neverhood/microtiles.cpp
index 3dd6475046..a1075b8d09 100644
--- a/engines/neverhood/microtiles.cpp
+++ b/engines/neverhood/microtiles.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "neverhood/microtiles.h"
diff --git a/engines/neverhood/microtiles.h b/engines/neverhood/microtiles.h
index 29af3d956a..15152600df 100644
--- a/engines/neverhood/microtiles.h
+++ b/engines/neverhood/microtiles.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef NEVERHOOD_MICROTILES_H
diff --git a/engines/neverhood/module.cpp b/engines/neverhood/module.cpp
index 3ef4554334..0d6b70c9a2 100644
--- a/engines/neverhood/module.cpp
+++ b/engines/neverhood/module.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/module.h b/engines/neverhood/module.h
index 8ab2159030..d4c954c716 100644
--- a/engines/neverhood/module.h
+++ b/engines/neverhood/module.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index 788e22dc1b..b19ba05b32 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -228,7 +228,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam &param, Entit
}
Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which)
- : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false) {
+ : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false), _asKlaymenPeekHand(nullptr) {
NRect tempClipRect;
Sprite *tempSprite;
@@ -609,7 +609,7 @@ uint32 Scene1005::getTextIndex() {
uint32 textIndex;
textIndex = getTextIndex1();
if (getGlobalVar(V_ENTRANCE_OPEN)) {
- textIndex = getTextIndex2();
+ textIndex = getKloggsTextIndex();
}
if (getGlobalVar(V_TEXT_FLAG1) && getGlobalVar(V_TEXT_INDEX) == textIndex) {
textIndex = getTextIndex3();
@@ -690,9 +690,9 @@ uint32 Scene1005::getTextIndex1() {
return textIndex;
}
-uint32 Scene1005::getTextIndex2() {
+uint32 Scene1005::getKloggsTextIndex() {
uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX1);
- if (textIndex + 1 >= 10) {
+ if (textIndex + 1 > 10) {
setGlobalVar(V_TEXT_COUNTING_INDEX1, 0);
textIndex = 0;
} else {
diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h
index 4b17c92b3b..58aa92e45f 100644
--- a/engines/neverhood/modules/module1000.h
+++ b/engines/neverhood/modules/module1000.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -101,7 +101,7 @@ protected:
void drawTextToBackground();
uint32 getTextIndex();
uint32 getTextIndex1();
- uint32 getTextIndex2();
+ uint32 getKloggsTextIndex();
uint32 getTextIndex3();
};
diff --git a/engines/neverhood/modules/module1000_sprites.cpp b/engines/neverhood/modules/module1000_sprites.cpp
index a028df4b10..dd504ae25a 100644
--- a/engines/neverhood/modules/module1000_sprites.cpp
+++ b/engines/neverhood/modules/module1000_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1000_sprites.h b/engines/neverhood/modules/module1000_sprites.h
index 564b3cc335..8a03824086 100644
--- a/engines/neverhood/modules/module1000_sprites.h
+++ b/engines/neverhood/modules/module1000_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp
index e40508e502..cca80f3f62 100644
--- a/engines/neverhood/modules/module1100.cpp
+++ b/engines/neverhood/modules/module1100.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -142,7 +142,7 @@ void Module1100::updateScene() {
_vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0);
createScene(1, 0);
} else if (_moduleResult == 1) {
- /* NOTE This fixes a bug in the original where the "tunnel" footstep
+ /* NOTE This fixes a bug in the original where the "tunnel" footstep
sounds are played instead of the correct footsteps. */
_vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0);
createScene(8, 0);
diff --git a/engines/neverhood/modules/module1100.h b/engines/neverhood/modules/module1100.h
index 38bac1f298..31f5f8a04e 100644
--- a/engines/neverhood/modules/module1100.h
+++ b/engines/neverhood/modules/module1100.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1100_sprites.cpp b/engines/neverhood/modules/module1100_sprites.cpp
index 49a388ffca..b5fd8490f6 100644
--- a/engines/neverhood/modules/module1100_sprites.cpp
+++ b/engines/neverhood/modules/module1100_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1100_sprites.h b/engines/neverhood/modules/module1100_sprites.h
index c8e5a838da..2e50902664 100644
--- a/engines/neverhood/modules/module1100_sprites.h
+++ b/engines/neverhood/modules/module1100_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1200.cpp b/engines/neverhood/modules/module1200.cpp
index 8bf42b3b96..ba5e18ab15 100644
--- a/engines/neverhood/modules/module1200.cpp
+++ b/engines/neverhood/modules/module1200.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1200.h b/engines/neverhood/modules/module1200.h
index d9d4dd11f2..492f0d42f0 100644
--- a/engines/neverhood/modules/module1200.h
+++ b/engines/neverhood/modules/module1200.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1200_sprites.cpp b/engines/neverhood/modules/module1200_sprites.cpp
index 5848e16092..04bd4c1cb7 100644
--- a/engines/neverhood/modules/module1200_sprites.cpp
+++ b/engines/neverhood/modules/module1200_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1200_sprites.h b/engines/neverhood/modules/module1200_sprites.h
index ef1ec40ced..ae820f0530 100644
--- a/engines/neverhood/modules/module1200_sprites.h
+++ b/engines/neverhood/modules/module1200_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp
index fe119c1732..60ff0411a6 100644
--- a/engines/neverhood/modules/module1300.cpp
+++ b/engines/neverhood/modules/module1300.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -603,7 +603,7 @@ uint32 Scene1305::handleMessage(int messageNum, const MessageParam &param, Entit
}
Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which)
- : Scene(vm, parentModule) {
+ : Scene(vm, parentModule), _asKey(nullptr) {
if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0)
setGlobalVar(V_KEY3_LOCATION, 4);
@@ -683,7 +683,6 @@ Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which)
clearRectList();
sendMessage(_asElevator, NM_KLAYMEN_OPEN_DOOR, 0);
}
-
}
Scene1306::~Scene1306() {
@@ -942,6 +941,7 @@ Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which)
_sprite2 = insertStaticSprite(0x40043120, 995);
_sprite3 = insertStaticSprite(0x43003100, 995);
_sprite4 = NULL;
+ _sprite5 = nullptr;
if (which < 0) {
// Restoring game
diff --git a/engines/neverhood/modules/module1300.h b/engines/neverhood/modules/module1300.h
index 2f59ff16c2..4a0ca6c062 100644
--- a/engines/neverhood/modules/module1300.h
+++ b/engines/neverhood/modules/module1300.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1300_sprites.cpp b/engines/neverhood/modules/module1300_sprites.cpp
index 0c1632501e..b4b42198e1 100644
--- a/engines/neverhood/modules/module1300_sprites.cpp
+++ b/engines/neverhood/modules/module1300_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1300_sprites.h b/engines/neverhood/modules/module1300_sprites.h
index e044d3cec8..6f4faaa234 100644
--- a/engines/neverhood/modules/module1300_sprites.h
+++ b/engines/neverhood/modules/module1300_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp
index 018f27e2b7..551b6874ff 100644
--- a/engines/neverhood/modules/module1400.cpp
+++ b/engines/neverhood/modules/module1400.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1400.h b/engines/neverhood/modules/module1400.h
index 53ad7125ab..52f72db6d3 100644
--- a/engines/neverhood/modules/module1400.h
+++ b/engines/neverhood/modules/module1400.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1400_sprites.cpp b/engines/neverhood/modules/module1400_sprites.cpp
index 478b328034..30a5c340c9 100644
--- a/engines/neverhood/modules/module1400_sprites.cpp
+++ b/engines/neverhood/modules/module1400_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1400_sprites.h b/engines/neverhood/modules/module1400_sprites.h
index 49b91fe0cf..fe0db66d27 100644
--- a/engines/neverhood/modules/module1400_sprites.h
+++ b/engines/neverhood/modules/module1400_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1500.cpp b/engines/neverhood/modules/module1500.cpp
index eaa23e586b..8e51b1aff5 100644
--- a/engines/neverhood/modules/module1500.cpp
+++ b/engines/neverhood/modules/module1500.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1500.h b/engines/neverhood/modules/module1500.h
index f244948918..6c8bf32340 100644
--- a/engines/neverhood/modules/module1500.h
+++ b/engines/neverhood/modules/module1500.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp
index 76c5ca93d2..0adcd939cd 100644
--- a/engines/neverhood/modules/module1600.cpp
+++ b/engines/neverhood/modules/module1600.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1600.h b/engines/neverhood/modules/module1600.h
index f08eaad8fc..b1c9662f79 100644
--- a/engines/neverhood/modules/module1600.h
+++ b/engines/neverhood/modules/module1600.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1600_sprites.cpp b/engines/neverhood/modules/module1600_sprites.cpp
index b7b3658c5e..09e3d0afe1 100644
--- a/engines/neverhood/modules/module1600_sprites.cpp
+++ b/engines/neverhood/modules/module1600_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1600_sprites.h b/engines/neverhood/modules/module1600_sprites.h
index fa59475dad..1c51160be3 100644
--- a/engines/neverhood/modules/module1600_sprites.h
+++ b/engines/neverhood/modules/module1600_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1700.cpp b/engines/neverhood/modules/module1700.cpp
index 1062691cd2..6ff34ecd91 100644
--- a/engines/neverhood/modules/module1700.cpp
+++ b/engines/neverhood/modules/module1700.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1700.h b/engines/neverhood/modules/module1700.h
index 09daff2acf..57d04312bb 100644
--- a/engines/neverhood/modules/module1700.h
+++ b/engines/neverhood/modules/module1700.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1700_sprites.cpp b/engines/neverhood/modules/module1700_sprites.cpp
index d6e00c95f3..3a6784b0f5 100644
--- a/engines/neverhood/modules/module1700_sprites.cpp
+++ b/engines/neverhood/modules/module1700_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1700_sprites.h b/engines/neverhood/modules/module1700_sprites.h
index 4117de01d9..afa5d9f7ad 100644
--- a/engines/neverhood/modules/module1700_sprites.h
+++ b/engines/neverhood/modules/module1700_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1800.cpp b/engines/neverhood/modules/module1800.cpp
index 282292a516..17d6367252 100644
--- a/engines/neverhood/modules/module1800.cpp
+++ b/engines/neverhood/modules/module1800.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1800.h b/engines/neverhood/modules/module1800.h
index d3f3a635c3..35af1f8e58 100644
--- a/engines/neverhood/modules/module1800.h
+++ b/engines/neverhood/modules/module1800.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1900.cpp b/engines/neverhood/modules/module1900.cpp
index 5fdc6091dc..71926d6950 100644
--- a/engines/neverhood/modules/module1900.cpp
+++ b/engines/neverhood/modules/module1900.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1900.h b/engines/neverhood/modules/module1900.h
index d785c6f506..78128f8f37 100644
--- a/engines/neverhood/modules/module1900.h
+++ b/engines/neverhood/modules/module1900.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1900_sprites.cpp b/engines/neverhood/modules/module1900_sprites.cpp
index 9e43203def..074a83cdcd 100644
--- a/engines/neverhood/modules/module1900_sprites.cpp
+++ b/engines/neverhood/modules/module1900_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module1900_sprites.h b/engines/neverhood/modules/module1900_sprites.h
index 7e57b11618..6df02e2279 100644
--- a/engines/neverhood/modules/module1900_sprites.h
+++ b/engines/neverhood/modules/module1900_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2000.cpp b/engines/neverhood/modules/module2000.cpp
index ad18e65cdd..498f50989e 100644
--- a/engines/neverhood/modules/module2000.cpp
+++ b/engines/neverhood/modules/module2000.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2000.h b/engines/neverhood/modules/module2000.h
index 8dc72c57dc..6e1cfb6fe6 100644
--- a/engines/neverhood/modules/module2000.h
+++ b/engines/neverhood/modules/module2000.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2000_sprites.cpp b/engines/neverhood/modules/module2000_sprites.cpp
index 35edd8e73f..ccf383d26d 100644
--- a/engines/neverhood/modules/module2000_sprites.cpp
+++ b/engines/neverhood/modules/module2000_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2000_sprites.h b/engines/neverhood/modules/module2000_sprites.h
index ca84aa73ca..62b738d9fb 100644
--- a/engines/neverhood/modules/module2000_sprites.h
+++ b/engines/neverhood/modules/module2000_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2100.cpp b/engines/neverhood/modules/module2100.cpp
index e95eb58420..9488057fa4 100644
--- a/engines/neverhood/modules/module2100.cpp
+++ b/engines/neverhood/modules/module2100.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2100.h b/engines/neverhood/modules/module2100.h
index c5256434d9..e660eba7c0 100644
--- a/engines/neverhood/modules/module2100.h
+++ b/engines/neverhood/modules/module2100.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2100_sprites.cpp b/engines/neverhood/modules/module2100_sprites.cpp
index f43c0afed5..4d2e4956e6 100644
--- a/engines/neverhood/modules/module2100_sprites.cpp
+++ b/engines/neverhood/modules/module2100_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2100_sprites.h b/engines/neverhood/modules/module2100_sprites.h
index 85a6b9f27d..c1116ef9a5 100644
--- a/engines/neverhood/modules/module2100_sprites.h
+++ b/engines/neverhood/modules/module2100_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp
index f1d5d2854d..6618cb3ab0 100644
--- a/engines/neverhood/modules/module2200.cpp
+++ b/engines/neverhood/modules/module2200.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -885,7 +885,7 @@ void Scene2205::update() {
} else if (_isLightOn && !getGlobalVar(V_LIGHTS_ON)) {
_palette->addPalette(0xD00A028D, 0, 256, 0);
changeBackground(0xD00A028D);
- _ssLightSwitch->setFileHashes(0x2D339030, 0xDAC86E84);
+ _ssLightSwitch->setFileHashes(0xD6C86E84, 0xDAC86E84);
sendMessage(_ssDoorFrame, 0x2000, 0);
changeMouseCursor(0xA0289D08);
_isKlaymenInLight = true;
diff --git a/engines/neverhood/modules/module2200.h b/engines/neverhood/modules/module2200.h
index 6b414304ae..5250bf3fe9 100644
--- a/engines/neverhood/modules/module2200.h
+++ b/engines/neverhood/modules/module2200.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2200_sprites.cpp b/engines/neverhood/modules/module2200_sprites.cpp
index ddf31f7920..7c1e84c3cf 100644
--- a/engines/neverhood/modules/module2200_sprites.cpp
+++ b/engines/neverhood/modules/module2200_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2200_sprites.h b/engines/neverhood/modules/module2200_sprites.h
index 9aaf3b6aae..9327b1cb9f 100644
--- a/engines/neverhood/modules/module2200_sprites.h
+++ b/engines/neverhood/modules/module2200_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2300.cpp b/engines/neverhood/modules/module2300.cpp
index 689d53570f..68ae07f2bb 100644
--- a/engines/neverhood/modules/module2300.cpp
+++ b/engines/neverhood/modules/module2300.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,14 +31,14 @@ static const uint32 kModule2300SoundList[] = {
};
Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which)
- : Module(vm, parentModule), _soundVolume(0) {
+ : Module(vm, parentModule), _waterfallSoundVolume(0) {
_vm->_soundMan->addSoundList(0x1A214010, kModule2300SoundList);
_vm->_soundMan->setSoundListParams(kModule2300SoundList, true, 50, 600, 10, 150);
- _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+ _isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1;
- if (_isWallBroken) {
+ if (_isWaterfallRunning) {
_vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
_vm->_soundMan->playSoundLooping(0x90F0D1C3);
} else {
@@ -78,8 +78,8 @@ void Module2300::createScene(int sceneNum, int which) {
case 1:
_vm->gameState().sceneNum = 1;
createNavigationScene(0x004B67E8, which);
- if (_isWallBroken) {
- _soundVolume = 15;
+ if (_isWaterfallRunning) {
+ _waterfallSoundVolume = 15;
_vm->_soundMan->setSoundVolume(0x90F0D1C3, 15);
}
break;
@@ -92,10 +92,10 @@ void Module2300::createScene(int sceneNum, int which) {
if (getGlobalVar(V_WALL_BROKEN))
createNavigationScene(0x004B68F0, which);
else {
- _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
createNavigationScene(0x004B68A8, which);
- if (_isWallBroken) {
- _soundVolume = 87;
+ if (_isWaterfallRunning) {
+ _waterfallSoundVolume = 87;
_vm->_soundMan->setSoundVolume(0x90F0D1C3, 87);
}
}
@@ -161,10 +161,10 @@ void Module2300::updateScene() {
} else {
switch (_sceneNum) {
case 1:
- if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 &&
+ if (_isWaterfallRunning && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 &&
navigationScene()->getFrameNumber() % 2) {
- _soundVolume++;
- _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ _waterfallSoundVolume++;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
}
if (navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 0 &&
navigationScene()->getFrameNumber() == 50) {
@@ -174,9 +174,9 @@ void Module2300::updateScene() {
}
break;
case 3:
- if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) {
- _soundVolume--;
- _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ if (_isWaterfallRunning && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) {
+ _waterfallSoundVolume--;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
}
break;
}
diff --git a/engines/neverhood/modules/module2300.h b/engines/neverhood/modules/module2300.h
index 0a1e1d57a4..58bffb710c 100644
--- a/engines/neverhood/modules/module2300.h
+++ b/engines/neverhood/modules/module2300.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -37,8 +37,8 @@ public:
virtual ~Module2300();
protected:
int _sceneNum;
- bool _isWallBroken;
- int _soundVolume;
+ int _waterfallSoundVolume;
+ bool _isWaterfallRunning;
void createScene(int sceneNum, int which);
void updateScene();
};
diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp
index 867fb692f2..3acb952db9 100644
--- a/engines/neverhood/modules/module2400.cpp
+++ b/engines/neverhood/modules/module2400.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2400.h b/engines/neverhood/modules/module2400.h
index 61603f3e00..0ab56dd86a 100644
--- a/engines/neverhood/modules/module2400.h
+++ b/engines/neverhood/modules/module2400.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2400_sprites.cpp b/engines/neverhood/modules/module2400_sprites.cpp
index 32c00cde27..f31fd59907 100644
--- a/engines/neverhood/modules/module2400_sprites.cpp
+++ b/engines/neverhood/modules/module2400_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2400_sprites.h b/engines/neverhood/modules/module2400_sprites.h
index a901eb101c..5d9464af13 100644
--- a/engines/neverhood/modules/module2400_sprites.h
+++ b/engines/neverhood/modules/module2400_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp
index eb1b65cd83..7e93b0ebc0 100644
--- a/engines/neverhood/modules/module2500.cpp
+++ b/engines/neverhood/modules/module2500.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2500.h b/engines/neverhood/modules/module2500.h
index de6226ef0c..57ab22889a 100644
--- a/engines/neverhood/modules/module2500.h
+++ b/engines/neverhood/modules/module2500.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2500_sprites.cpp b/engines/neverhood/modules/module2500_sprites.cpp
index 1394a87db6..b628cd8f02 100644
--- a/engines/neverhood/modules/module2500_sprites.cpp
+++ b/engines/neverhood/modules/module2500_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2500_sprites.h b/engines/neverhood/modules/module2500_sprites.h
index e7f7b05702..b5c2a1ac01 100644
--- a/engines/neverhood/modules/module2500_sprites.h
+++ b/engines/neverhood/modules/module2500_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2600.cpp b/engines/neverhood/modules/module2600.cpp
index 3c3e733b3f..d0f6090ea8 100644
--- a/engines/neverhood/modules/module2600.cpp
+++ b/engines/neverhood/modules/module2600.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2600.h b/engines/neverhood/modules/module2600.h
index 99ec3a34ca..0f13ed4b09 100644
--- a/engines/neverhood/modules/module2600.h
+++ b/engines/neverhood/modules/module2600.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2600_sprites.cpp b/engines/neverhood/modules/module2600_sprites.cpp
index 2506a6eb48..ffba6a4e59 100644
--- a/engines/neverhood/modules/module2600_sprites.cpp
+++ b/engines/neverhood/modules/module2600_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2600_sprites.h b/engines/neverhood/modules/module2600_sprites.h
index c36e72cae8..0b4954ceb1 100644
--- a/engines/neverhood/modules/module2600_sprites.h
+++ b/engines/neverhood/modules/module2600_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp
index 13c30048a4..2a112435fc 100644
--- a/engines/neverhood/modules/module2700.cpp
+++ b/engines/neverhood/modules/module2700.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -84,7 +84,7 @@ static const uint32 kScene2725StaticSprites[] = {
};
Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which)
- : Module(vm, parentModule), _soundIndex(0), _radioMusicInitialized(false) {
+ : Module(vm, parentModule), _soundIndex(0), _radioMusicInitialized(false), _musicFileHash(0) {
_vm->_soundMan->addMusic(0x42212411, 0x04020210);
_vm->_soundMan->startMusic(0x04020210, 24, 2);
diff --git a/engines/neverhood/modules/module2700.h b/engines/neverhood/modules/module2700.h
index 97b4f1cbea..9ac2159765 100644
--- a/engines/neverhood/modules/module2700.h
+++ b/engines/neverhood/modules/module2700.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2700_sprites.cpp b/engines/neverhood/modules/module2700_sprites.cpp
index 8dd2fa3461..e17cddc834 100644
--- a/engines/neverhood/modules/module2700_sprites.cpp
+++ b/engines/neverhood/modules/module2700_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2700_sprites.h b/engines/neverhood/modules/module2700_sprites.h
index 394ba896a1..7da0223bce 100644
--- a/engines/neverhood/modules/module2700_sprites.h
+++ b/engines/neverhood/modules/module2700_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp
index 5d892de224..a59c3f8156 100644
--- a/engines/neverhood/modules/module2800.cpp
+++ b/engines/neverhood/modules/module2800.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2800.h b/engines/neverhood/modules/module2800.h
index 26e44bc543..73a13610e3 100644
--- a/engines/neverhood/modules/module2800.h
+++ b/engines/neverhood/modules/module2800.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2800_sprites.cpp b/engines/neverhood/modules/module2800_sprites.cpp
index 35596da6b5..f9a58de92d 100644
--- a/engines/neverhood/modules/module2800_sprites.cpp
+++ b/engines/neverhood/modules/module2800_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2800_sprites.h b/engines/neverhood/modules/module2800_sprites.h
index 91f26d7849..ec34a7ccf5 100644
--- a/engines/neverhood/modules/module2800_sprites.h
+++ b/engines/neverhood/modules/module2800_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp
index ca734972ca..69186514a2 100644
--- a/engines/neverhood/modules/module2900.cpp
+++ b/engines/neverhood/modules/module2900.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -34,11 +34,12 @@ namespace Neverhood {
Module2900::Module2900(NeverhoodEngine *vm, Module *parentModule, int which)
: Module(vm, parentModule) {
+ _teleporterModuleResult = -1;
+
if (which >= 0)
setGlobalVar(V_TELEPORTER_WHICH, which);
createScene(0, 0);
-
}
void Module2900::createScene(int sceneNum, int which) {
diff --git a/engines/neverhood/modules/module2900.h b/engines/neverhood/modules/module2900.h
index 5f6ed29a12..8d6dad5660 100644
--- a/engines/neverhood/modules/module2900.h
+++ b/engines/neverhood/modules/module2900.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2900_sprites.cpp b/engines/neverhood/modules/module2900_sprites.cpp
index 59780b33a0..1ec820abdf 100644
--- a/engines/neverhood/modules/module2900_sprites.cpp
+++ b/engines/neverhood/modules/module2900_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module2900_sprites.h b/engines/neverhood/modules/module2900_sprites.h
index 9f7df502e1..3ad7f2eefd 100644
--- a/engines/neverhood/modules/module2900_sprites.h
+++ b/engines/neverhood/modules/module2900_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp
index dc6fb984ef..d4809611ad 100644
--- a/engines/neverhood/modules/module3000.cpp
+++ b/engines/neverhood/modules/module3000.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -39,7 +39,7 @@ static const uint32 kModule3000SoundList[] = {
};
Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
- : Module(vm, parentModule), _soundVolume(0) {
+ : Module(vm, parentModule), _waterfallSoundVolume(0) {
_vm->_soundMan->addSoundList(0x81293110, kModule3000SoundList);
_vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 50, 600, 5, 150);
@@ -48,9 +48,9 @@ Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
_vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
- _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+ _isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1;
- if (!_isWallBroken) {
+ if (_isWaterfallRunning) {
_vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
_vm->_soundMan->playSoundLooping(0x90F0D1C3);
}
@@ -78,12 +78,11 @@ void Module3000::createScene(int sceneNum, int which) {
static const byte kNavigationTypes06[] = {5};
debug(1, "Module3000::createScene(%d, %d)", sceneNum, which);
_vm->gameState().sceneNum = sceneNum;
- _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
switch (_vm->gameState().sceneNum) {
case 1:
if (!getGlobalVar(V_BOLT_DOOR_OPEN)) {
createNavigationScene(0x004B7C80, which);
- } else if (_isWallBroken) {
+ } else if (getGlobalVar(V_WALL_BROKEN)) {
createNavigationScene(0x004B7CE0, which);
} else {
createNavigationScene(0x004B7CB0, which);
@@ -91,11 +90,11 @@ void Module3000::createScene(int sceneNum, int which) {
break;
case 2:
_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
- if (!_isWallBroken) {
- _soundVolume = 90;
+ if (_isWaterfallRunning) {
+ _waterfallSoundVolume = 90;
_vm->_soundMan->setSoundVolume(0x90F0D1C3, 90);
}
- if (_isWallBroken) {
+ if (getGlobalVar(V_WALL_BROKEN)) {
createNavigationScene(0x004B7D58, which);
} else {
createNavigationScene(0x004B7D10, which);
@@ -104,7 +103,7 @@ void Module3000::createScene(int sceneNum, int which) {
case 3:
if (getGlobalVar(V_STAIRS_DOWN))
createNavigationScene(0x004B7E60, which);
- else if (_isWallBroken)
+ else if (getGlobalVar(V_WALL_BROKEN))
createNavigationScene(0x004B7DA0, which);
else
createNavigationScene(0x004B7E00, which);
@@ -152,12 +151,12 @@ void Module3000::createScene(int sceneNum, int which) {
// NOTE: Newly introduced sceneNums
case 1001:
if (!getGlobalVar(V_BOLT_DOOR_OPEN))
- if (_isWallBroken)
+ if (getGlobalVar(V_WALL_BROKEN))
createSmackerScene(0x00940021, true, true, false);
else
createSmackerScene(0x01140021, true, true, false);
else
- if (_isWallBroken)
+ if (getGlobalVar(V_WALL_BROKEN))
createSmackerScene(0x001011B1, true, true, false);
else
createSmackerScene(0x001021B1, true, true, false);
@@ -195,8 +194,8 @@ void Module3000::updateScene() {
break;
case 2:
_vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
- if (_isWallBroken) {
- _soundVolume = 0;
+ if (_isWaterfallRunning) {
+ _waterfallSoundVolume = 0;
_vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
}
if (_moduleResult == 0) {
@@ -240,7 +239,7 @@ void Module3000::updateScene() {
createScene(8, -1);
break;
case 8:
- _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+ _isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1;
if (_moduleResult != 1) {
_vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 0, 0, 0, 0);
createScene(4, 1);
@@ -301,12 +300,12 @@ void Module3000::updateScene() {
} else if (frameNumber == 10) {
_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
}
- if (!_isWallBroken && _soundVolume < 90 && frameNumber % 2) {
+ if (_isWaterfallRunning && _waterfallSoundVolume < 90 && frameNumber % 2) {
if (frameNumber == 0)
- _soundVolume = 40;
+ _waterfallSoundVolume = 40;
else
- _soundVolume++;
- _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ _waterfallSoundVolume++;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
}
}
}
@@ -315,9 +314,9 @@ void Module3000::updateScene() {
if (navigationScene()->isWalkingForward()) {
uint32 frameNumber = navigationScene()->getFrameNumber();
int navigationIndex = navigationScene()->getNavigationIndex();
- if (!_isWallBroken && _soundVolume > 1 && frameNumber % 2) {
- _soundVolume--;
- _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ if (_isWaterfallRunning && _waterfallSoundVolume > 1 && frameNumber % 2) {
+ _waterfallSoundVolume--;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
}
if (navigationIndex == 0) {
if (frameNumber == 35) {
@@ -340,12 +339,12 @@ void Module3000::updateScene() {
if (frameNumber == 40) {
_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
}
- if (!_isWallBroken && _soundVolume < 90 && frameNumber % 2) {
+ if (_isWaterfallRunning && _waterfallSoundVolume < 90 && frameNumber % 2) {
if (frameNumber == 0)
- _soundVolume = 40;
+ _waterfallSoundVolume = 40;
else
- _soundVolume++;
- _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ _waterfallSoundVolume++;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
}
}
}
diff --git a/engines/neverhood/modules/module3000.h b/engines/neverhood/modules/module3000.h
index a88dea513e..3d895b8d8a 100644
--- a/engines/neverhood/modules/module3000.h
+++ b/engines/neverhood/modules/module3000.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -34,8 +34,8 @@ public:
Module3000(NeverhoodEngine *vm, Module *parentModule, int which);
virtual ~Module3000();
protected:
- int _soundVolume;
- bool _isWallBroken;
+ int _waterfallSoundVolume;
+ bool _isWaterfallRunning;
void createScene(int sceneNum, int which);
void updateScene();
};
diff --git a/engines/neverhood/modules/module3000_sprites.cpp b/engines/neverhood/modules/module3000_sprites.cpp
index 3c0c5fe209..3f883eaa72 100644
--- a/engines/neverhood/modules/module3000_sprites.cpp
+++ b/engines/neverhood/modules/module3000_sprites.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/modules/module3000_sprites.h b/engines/neverhood/modules/module3000_sprites.h
index 7316613327..2c1369251d 100644
--- a/engines/neverhood/modules/module3000_sprites.h
+++ b/engines/neverhood/modules/module3000_sprites.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/mouse.cpp b/engines/neverhood/mouse.cpp
index f11a3f99ea..0abbeba19d 100644
--- a/engines/neverhood/mouse.cpp
+++ b/engines/neverhood/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/mouse.h b/engines/neverhood/mouse.h
index d6f42b4071..3e71f60de2 100644
--- a/engines/neverhood/mouse.h
+++ b/engines/neverhood/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp
index adbb6aef7a..a1eeae9c1c 100644
--- a/engines/neverhood/navigationscene.cpp
+++ b/engines/neverhood/navigationscene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/navigationscene.h b/engines/neverhood/navigationscene.h
index c17446811c..8e286effb9 100644
--- a/engines/neverhood/navigationscene.h
+++ b/engines/neverhood/navigationscene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp
index 1119bfbb08..c0a235cae3 100644
--- a/engines/neverhood/neverhood.cpp
+++ b/engines/neverhood/neverhood.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h
index 4d923d1f0e..0661bcba0e 100644
--- a/engines/neverhood/neverhood.h
+++ b/engines/neverhood/neverhood.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp
index 134fec7163..39f1ecdbf1 100644
--- a/engines/neverhood/palette.cpp
+++ b/engines/neverhood/palette.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/palette.h b/engines/neverhood/palette.h
index 016f856104..f1b365fe47 100644
--- a/engines/neverhood/palette.h
+++ b/engines/neverhood/palette.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/resource.cpp b/engines/neverhood/resource.cpp
index b45dbff3b9..8aba0ad37b 100644
--- a/engines/neverhood/resource.cpp
+++ b/engines/neverhood/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/resource.h b/engines/neverhood/resource.h
index 40236d9d22..a9d5b86d17 100644
--- a/engines/neverhood/resource.h
+++ b/engines/neverhood/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/resourceman.cpp b/engines/neverhood/resourceman.cpp
index f6937384c0..2065a13347 100644
--- a/engines/neverhood/resourceman.cpp
+++ b/engines/neverhood/resourceman.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/resourceman.h b/engines/neverhood/resourceman.h
index 29bf40a6b8..306e02f788 100644
--- a/engines/neverhood/resourceman.h
+++ b/engines/neverhood/resourceman.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/saveload.cpp b/engines/neverhood/saveload.cpp
index 01988769e6..8fe6c9a155 100644
--- a/engines/neverhood/saveload.cpp
+++ b/engines/neverhood/saveload.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/savefile.h"
diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp
index b8cde73e81..58056b65a9 100644
--- a/engines/neverhood/scene.cpp
+++ b/engines/neverhood/scene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h
index e6183199ce..98a7fa5090 100644
--- a/engines/neverhood/scene.h
+++ b/engines/neverhood/scene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/screen.cpp b/engines/neverhood/screen.cpp
index 901ab73b39..cc735c4c16 100644
--- a/engines/neverhood/screen.cpp
+++ b/engines/neverhood/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/screen.h b/engines/neverhood/screen.h
index a9b5af02f6..82ce90b245 100644
--- a/engines/neverhood/screen.h
+++ b/engines/neverhood/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/smackerplayer.cpp b/engines/neverhood/smackerplayer.cpp
index 014e094b94..e15e729f81 100644
--- a/engines/neverhood/smackerplayer.cpp
+++ b/engines/neverhood/smackerplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/smackerplayer.h b/engines/neverhood/smackerplayer.h
index dd7199dd6d..e08854bd96 100644
--- a/engines/neverhood/smackerplayer.h
+++ b/engines/neverhood/smackerplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/smackerscene.cpp b/engines/neverhood/smackerscene.cpp
index c3915200b5..2b43579130 100644
--- a/engines/neverhood/smackerscene.cpp
+++ b/engines/neverhood/smackerscene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/smackerscene.h b/engines/neverhood/smackerscene.h
index 8e5084512f..e2c1802b61 100644
--- a/engines/neverhood/smackerscene.h
+++ b/engines/neverhood/smackerscene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp
index 023eda4c02..d53243d4ba 100644
--- a/engines/neverhood/sound.cpp
+++ b/engines/neverhood/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h
index 1f80f8d6b0..512b0fef98 100644
--- a/engines/neverhood/sound.h
+++ b/engines/neverhood/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/sprite.cpp b/engines/neverhood/sprite.cpp
index 05fc9b256f..a566b8ee3b 100644
--- a/engines/neverhood/sprite.cpp
+++ b/engines/neverhood/sprite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/sprite.h b/engines/neverhood/sprite.h
index 1d17bf0e70..5422fd15d5 100644
--- a/engines/neverhood/sprite.h
+++ b/engines/neverhood/sprite.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/staticdata.cpp b/engines/neverhood/staticdata.cpp
index ec9c852118..552ea92604 100644
--- a/engines/neverhood/staticdata.cpp
+++ b/engines/neverhood/staticdata.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/neverhood/staticdata.h b/engines/neverhood/staticdata.h
index b1cab3bfcd..88dad56f78 100644
--- a/engines/neverhood/staticdata.h
+++ b/engines/neverhood/staticdata.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/obsolete.cpp b/engines/obsolete.cpp
index 6733a384be..d65fb13ec1 100644
--- a/engines/obsolete.cpp
+++ b/engines/obsolete.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/obsolete.h b/engines/obsolete.h
index 97bc7524a6..be0963a7dc 100644
--- a/engines/obsolete.h
+++ b/engines/obsolete.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/adlib.cpp b/engines/parallaction/adlib.cpp
index 134e5cfbf3..7c1dd1681f 100644
--- a/engines/parallaction/adlib.cpp
+++ b/engines/parallaction/adlib.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp
index 2a7e0ce375..234abff59a 100644
--- a/engines/parallaction/balloons.cpp
+++ b/engines/parallaction/balloons.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/callables_br.cpp b/engines/parallaction/callables_br.cpp
index 7d3e63dfba..ca60b8e578 100644
--- a/engines/parallaction/callables_br.cpp
+++ b/engines/parallaction/callables_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp
index 04642aa632..280cccd15f 100644
--- a/engines/parallaction/callables_ns.cpp
+++ b/engines/parallaction/callables_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index 4a8f8c71d7..1fea73a326 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index fb892c44b2..277f1cbe69 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 06ffd0b89b..62e2152816 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h
index 63e33dcfbd..2e43b6f87b 100644
--- a/engines/parallaction/disk.h
+++ b/engines/parallaction/disk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index f648f4b9a1..7458065b8c 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -23,7 +23,7 @@
#include "common/config-manager.h"
#include "common/fs.h"
#include "common/textconsole.h"
-#include "graphics/decoders/iff.h"
+#include "image/iff.h"
#include "parallaction/parallaction.h"
#include "parallaction/parser.h"
@@ -460,7 +460,7 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *filename) {
byte r,g,b;
const byte *p;
Common::SeekableReadStream *stream;
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
uint i;
stream = tryOpenFile("backs/" + Common::String(filename), ".ap");
@@ -544,7 +544,7 @@ MaskBuffer *AmigaDisk_br::loadMask(const char *name, uint32 w, uint32 h) {
return 0;
}
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.setNumRelevantPlanes(2); // use only 2 first bits from each pixels
decoder.setPixelPacking(true); // pack 4 2bit pixels into 1 byte
decoder.loadStream(*stream);
@@ -583,7 +583,7 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) {
Common::String sName = name;
Common::SeekableReadStream *stream = openFile("ras/" + sName, ".ras");
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.loadStream(*stream);
Graphics::Surface *surf = new Graphics::Surface;
@@ -720,7 +720,7 @@ GfxObj* AmigaDisk_br::loadObjects(const char *name, uint8 part) {
debugC(5, kDebugDisk, "AmigaDisk_br::loadObjects");
Common::SeekableReadStream *stream = openFile(name);
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.loadStream(*stream);
uint16 max = objectsMax[part];
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index ae28e864a9..28e61b04f9 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -26,7 +26,7 @@
#include "common/memstream.h"
#include "common/substream.h"
#include "common/textconsole.h"
-#include "graphics/decoders/iff.h"
+#include "image/iff.h"
#include "parallaction/parser.h"
#include "parallaction/parallaction.h"
@@ -917,7 +917,7 @@ void AmigaDisk_ns::buildMask(byte* buf) {
void AmigaDisk_ns::loadBackground(BackgroundInfo& info, const char *name) {
Common::SeekableReadStream *s = openFile(name);
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.loadStream(*s);
info.bg.copyFrom(*decoder.getSurface());
@@ -935,7 +935,7 @@ void AmigaDisk_ns::loadBackground(BackgroundInfo& info, const char *name) {
info.palette.setEntry(i, r, g, b);
}
- const Common::Array<Graphics::IFFDecoder::PaletteRange> &paletteRanges = decoder.getPaletteRanges();
+ const Common::Array<Image::IFFDecoder::PaletteRange> &paletteRanges = decoder.getPaletteRanges();
for (uint j = 0; j < 6 && j < paletteRanges.size(); j++) {
PaletteFxRange range;
range._timer = paletteRanges[j].timer;
@@ -959,7 +959,7 @@ void AmigaDisk_ns::loadMask_internal(BackgroundInfo& info, const char *name) {
return; // no errors if missing mask files: not every location has one
}
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.setNumRelevantPlanes(2); // use only 2 first bits from each pixel
decoder.setPixelPacking(true); // pack 4 2bit pixels into 1 byte
decoder.loadStream(*s);
@@ -990,7 +990,7 @@ void AmigaDisk_ns::loadPath_internal(BackgroundInfo& info, const char *name) {
return; // no errors if missing path files: not every location has one
}
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.setNumRelevantPlanes(1); // use only first bit from each pixel
decoder.setPixelPacking(true); // pack 8 1bit pixels into 1 byte
decoder.loadStream(*s);
diff --git a/engines/parallaction/exec.cpp b/engines/parallaction/exec.cpp
index 122abf9e0e..ceba072173 100644
--- a/engines/parallaction/exec.cpp
+++ b/engines/parallaction/exec.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/exec.h b/engines/parallaction/exec.h
index 5968954ba0..15217d3a4c 100644
--- a/engines/parallaction/exec.h
+++ b/engines/parallaction/exec.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp
index 985ea29311..c2fbc415af 100644
--- a/engines/parallaction/exec_br.cpp
+++ b/engines/parallaction/exec_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp
index 816f220b1f..45fe0a9900 100644
--- a/engines/parallaction/exec_ns.cpp
+++ b/engines/parallaction/exec_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/font.cpp b/engines/parallaction/font.cpp
index 627c6ebe22..57b04deb12 100644
--- a/engines/parallaction/font.cpp
+++ b/engines/parallaction/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index e2d9532c8a..f1499f7782 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index dca1870cb7..06b315016a 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -9,12 +9,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 401e753775..55e2bbca84 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/gui.cpp b/engines/parallaction/gui.cpp
index aa9c29ac57..a2d33f0256 100644
--- a/engines/parallaction/gui.cpp
+++ b/engines/parallaction/gui.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/gui.h b/engines/parallaction/gui.h
index 9f2e96475b..c8cad29935 100644
--- a/engines/parallaction/gui.h
+++ b/engines/parallaction/gui.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index 2ec5ba6e8d..ae3d136b0e 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp
index ae32a416e3..3d977c9e51 100644
--- a/engines/parallaction/gui_ns.cpp
+++ b/engines/parallaction/gui_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index a445ce0138..290af339bb 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/input.h b/engines/parallaction/input.h
index a303eb96c8..f7a2d8c1d5 100644
--- a/engines/parallaction/input.h
+++ b/engines/parallaction/input.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index 1cae63be42..fcac9f08e2 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/inventory.h b/engines/parallaction/inventory.h
index d5cf8badf0..832bd7bf36 100644
--- a/engines/parallaction/inventory.h
+++ b/engines/parallaction/inventory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 50556c3ec4..50a5b38d8d 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h
index 89e8134431..7cee0460c1 100644
--- a/engines/parallaction/objects.h
+++ b/engines/parallaction/objects.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index e7be1eb8a3..2b75e78582 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 203a0168ea..6ea50584f8 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 586e4bbd6a..1e1c0b0a3d 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 91e8c78fc2..144c2b3a98 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp
index 5d61c2988c..c37cee692e 100644
--- a/engines/parallaction/parser.cpp
+++ b/engines/parallaction/parser.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h
index 622e507aad..7b77f58eb0 100644
--- a/engines/parallaction/parser.h
+++ b/engines/parallaction/parser.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp
index e60349ffa8..c6693dc65b 100644
--- a/engines/parallaction/parser_br.cpp
+++ b/engines/parallaction/parser_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index ac5e7c7135..710f00ee4d 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index 2ecc5377a4..72e9400acd 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/saveload.h b/engines/parallaction/saveload.h
index 3976ee1290..c9b724e69d 100644
--- a/engines/parallaction/saveload.h
+++ b/engines/parallaction/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -71,12 +71,12 @@ public:
};
class SaveLoad_br : public SaveLoad {
- Parallaction_br *_vm;
+// Parallaction_br *_vm;
virtual void doLoadGame(uint16 slot);
virtual void doSaveGame(uint16 slot, const char* name);
public:
- SaveLoad_br(Parallaction_br *vm, Common::SaveFileManager *saveFileMan) : SaveLoad(saveFileMan, "bra"), _vm(vm) { }
+ SaveLoad_br(Parallaction_br *vm, Common::SaveFileManager *saveFileMan) : SaveLoad(saveFileMan, "bra") { }
virtual void getGamePartProgress(bool *complete, int size);
virtual void setPartComplete(const char *part);
diff --git a/engines/parallaction/sound.h b/engines/parallaction/sound.h
index e8dde78ddc..79cc346f62 100644
--- a/engines/parallaction/sound.h
+++ b/engines/parallaction/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index ea769de9e8..d13b318ace 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp
index ed3031e94e..692389b490 100644
--- a/engines/parallaction/sound_ns.cpp
+++ b/engines/parallaction/sound_ns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp
index 32404037f0..40bac5b64d 100644
--- a/engines/parallaction/staticres.cpp
+++ b/engines/parallaction/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp
index 19162cd7db..40f0bd2805 100644
--- a/engines/parallaction/walk.cpp
+++ b/engines/parallaction/walk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/parallaction/walk.h b/engines/parallaction/walk.h
index ae6db6eaf1..f77e834fcb 100644
--- a/engines/parallaction/walk.h
+++ b/engines/parallaction/walk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/pegasus/ai/ai_area.cpp b/engines/pegasus/ai/ai_area.cpp
index 5ac8af8812..9cab568d66 100644
--- a/engines/pegasus/ai/ai_area.cpp
+++ b/engines/pegasus/ai/ai_area.cpp
@@ -234,6 +234,7 @@ void AIArea::playAIAreaSequence(const LowerClientSignature, const LowerAreaSigna
vm->_cursor->hide();
while (_middleAreaMovie.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -258,6 +259,7 @@ void AIArea::playAIAreaSequence(const LowerClientSignature, const LowerAreaSigna
vm->_cursor->hide();
while (_rightAreaMovie.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
diff --git a/engines/pegasus/cursor.cpp b/engines/pegasus/cursor.cpp
index ad0d2c2d7d..602ae88068 100644
--- a/engines/pegasus/cursor.cpp
+++ b/engines/pegasus/cursor.cpp
@@ -28,7 +28,7 @@
#include "common/system.h"
#include "graphics/cursorman.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pict.h"
+#include "image/pict.h"
#include "pegasus/cursor.h"
#include "pegasus/graphics.h"
@@ -148,7 +148,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {
Common::SeekableReadStream *pictStream = vm->_resFork->getResource(MKTAG('P', 'I', 'C', 'T'), cursorInfo.tag + 1000);
if (pictStream) {
- Graphics::PICTDecoder pict;
+ Image::PICTDecoder pict;
if (!pict.loadStream(*pictStream))
error("Failed to decode cursor PICT %d", cursorInfo.tag + 1000);
@@ -166,7 +166,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {
error("Failed to find color icon %d", cursorInfo.tag);
// PixMap section
- Graphics::PICTDecoder::PixMap pixMap = Graphics::PICTDecoder::readPixMap(*cicnStream);
+ Image::PICTDecoder::PixMap pixMap = Image::PICTDecoder::readPixMap(*cicnStream);
// Mask section
cicnStream->readUint32BE(); // mask baseAddr
diff --git a/engines/pegasus/energymonitor.cpp b/engines/pegasus/energymonitor.cpp
index be9d205360..40e54afb89 100644
--- a/engines/pegasus/energymonitor.cpp
+++ b/engines/pegasus/energymonitor.cpp
@@ -269,6 +269,7 @@ void EnergyMonitor::calibrateEnergyBar() {
// Make sure warning light is hidden...
_energyLight.hide();
while (getCurrentEnergy() != (int32)kMaxJMPEnergy) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
diff --git a/engines/pegasus/fader.cpp b/engines/pegasus/fader.cpp
index a2bbf22944..80ce8ef5dc 100644
--- a/engines/pegasus/fader.cpp
+++ b/engines/pegasus/fader.cpp
@@ -94,6 +94,7 @@ void Fader::startFaderSync(const FaderMoveSpec &spec) {
start();
while (isFading()) {
+ InputDevice.pumpEvents();
((PegasusEngine *)g_engine)->checkCallBacks();
useIdleTime();
}
diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp
index b74e4a4c45..283d55421f 100644
--- a/engines/pegasus/input.cpp
+++ b/engines/pegasus/input.cpp
@@ -81,9 +81,7 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) {
// (ie. if one uses enter to access the restore menu, we never receive
// the key up event, which leads to bad things)
// This is to closely emulate what the GetKeys() function did on Mac OS
- Common::Event event;
- while (g_system->getEventManager()->pollEvent(event))
- ;
+ pumpEvents();
// Now create the bitfield
InputBits currentBits = 0;
@@ -206,6 +204,13 @@ bool InputDeviceManager::notifyEvent(const Common::Event &event) {
return false;
}
+void InputDeviceManager::pumpEvents() {
+ // Just poll for events. notifyEvent() will pick up on them.
+ Common::Event event;
+ while (g_system->getEventManager()->pollEvent(event))
+ ;
+}
+
int operator==(const Input &arg1, const Input &arg2) {
return arg1._inputState == arg2._inputState;
}
diff --git a/engines/pegasus/input.h b/engines/pegasus/input.h
index 3e938fa42a..ba6f11dba0 100644
--- a/engines/pegasus/input.h
+++ b/engines/pegasus/input.h
@@ -50,6 +50,8 @@ public:
void waitInput(const InputBits);
+ void pumpEvents();
+
protected:
friend class Common::Singleton<SingletonBaseType>;
diff --git a/engines/pegasus/interface.cpp b/engines/pegasus/interface.cpp
index f2429bf36a..f8ae6a0752 100644
--- a/engines/pegasus/interface.cpp
+++ b/engines/pegasus/interface.cpp
@@ -604,6 +604,7 @@ void Interface::raiseInventoryDrawerSync() {
raiseInventoryDrawer(false);
while (_inventoryLid.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -613,6 +614,7 @@ void Interface::raiseInventoryDrawerSync() {
inventoryLidOpen(false);
while (_inventoryPush.isFading()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -628,6 +630,7 @@ void Interface::lowerInventoryDrawerSync() {
lowerInventoryDrawer(false);
while (_inventoryPush.isFading()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -637,6 +640,7 @@ void Interface::lowerInventoryDrawerSync() {
inventoryDrawerDown(false);
while (_inventoryLid.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -652,6 +656,7 @@ void Interface::raiseBiochipDrawerSync() {
raiseBiochipDrawer(false);
while (_biochipLid.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -661,6 +666,7 @@ void Interface::raiseBiochipDrawerSync() {
biochipLidOpen(false);
while (_biochipPush.isFading()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -676,6 +682,7 @@ void Interface::lowerBiochipDrawerSync() {
lowerBiochipDrawer(false);
while (_biochipPush.isFading()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
@@ -685,6 +692,7 @@ void Interface::lowerBiochipDrawerSync() {
biochipDrawerDown(false);
while (_biochipLid.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
diff --git a/engines/pegasus/items/inventorypicture.cpp b/engines/pegasus/items/inventorypicture.cpp
index fc812faae2..bfdc382f5d 100644
--- a/engines/pegasus/items/inventorypicture.cpp
+++ b/engines/pegasus/items/inventorypicture.cpp
@@ -331,6 +331,7 @@ void InventoryItemsPicture::playEndMessage(DisplayElement *pushElement) {
endMessage.start();
while (endMessage.isRunning()) {
+ InputDevice.pumpEvents();
vm->checkCallBacks();
vm->refreshDisplay();
g_system->delayMillis(10);
diff --git a/engines/pegasus/items/item.cpp b/engines/pegasus/items/item.cpp
index 8089f2b93d..830d3f2f34 100644
--- a/engines/pegasus/items/item.cpp
+++ b/engines/pegasus/items/item.cpp
@@ -39,9 +39,9 @@
namespace Pegasus {
Item::Item(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) : IDObject(id) {
- _itemNeighborhood = neighborhood;
- _itemRoom = room;
- _itemDirection = direction;
+ _originalNeighborhood = _itemNeighborhood = neighborhood;
+ _originalRoom = _itemRoom = room;
+ _originalDirection = _itemDirection = direction;
_itemWeight = 1;
_itemOwnerID = kNoActorID;
_itemState = 0;
@@ -131,6 +131,14 @@ Item::~Item() {
delete[] _itemExtras.entries;
}
+void Item::reset() {
+ _itemNeighborhood = _originalNeighborhood;
+ _itemRoom = _originalRoom;
+ _itemDirection = _originalDirection;
+ _itemOwnerID = kNoActorID;
+ _itemState = 0;
+}
+
void Item::writeToStream(Common::WriteStream *stream) {
stream->writeUint16BE(_itemNeighborhood);
stream->writeUint16BE(_itemRoom);
diff --git a/engines/pegasus/items/item.h b/engines/pegasus/items/item.h
index a1451b2a58..26cccf043c 100644
--- a/engines/pegasus/items/item.h
+++ b/engines/pegasus/items/item.h
@@ -339,6 +339,9 @@ public:
void findItemExtra(const uint32 extraID, ItemExtraEntry &entry);
+ // Reset to its original state at the beginning of the game
+ void reset();
+
protected:
NeighborhoodID _itemNeighborhood;
RoomID _itemRoom;
@@ -347,6 +350,10 @@ protected:
WeightType _itemWeight;
ItemState _itemState;
+ NeighborhoodID _originalNeighborhood;
+ RoomID _originalRoom;
+ DirectionConstant _originalDirection;
+
JMPItemInfo _itemInfo;
ItemStateInfo _sharedAreaInfo;
ItemExtraInfo _itemExtras;
diff --git a/engines/pegasus/items/itemlist.cpp b/engines/pegasus/items/itemlist.cpp
index ff8cae546b..4b58d9ad78 100644
--- a/engines/pegasus/items/itemlist.cpp
+++ b/engines/pegasus/items/itemlist.cpp
@@ -64,4 +64,9 @@ Item *ItemList::findItemByID(const ItemID id) {
return 0;
}
+void ItemList::resetAllItems() {
+ for (ItemIterator it = begin(); it != end(); it++)
+ (*it)->reset();
+}
+
} // End of namespace Pegasus
diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h
index 9b59206ab3..22bef2c96e 100644
--- a/engines/pegasus/items/itemlist.h
+++ b/engines/pegasus/items/itemlist.h
@@ -48,6 +48,7 @@ public:
virtual void readFromStream(Common::ReadStream *stream);
Item *findItemByID(const ItemID id);
+ void resetAllItems();
};
typedef ItemList::iterator ItemIterator;
diff --git a/engines/pegasus/menu.cpp b/engines/pegasus/menu.cpp
index e55c006f86..4bbda8fd93 100644
--- a/engines/pegasus/menu.cpp
+++ b/engines/pegasus/menu.cpp
@@ -227,6 +227,7 @@ MainMenu::MainMenu() : GameMenu(kMainMenuID), _menuBackground(0), _overviewButto
_menuLoop.attachFader(&_menuFader);
_menuLoop.initFromAIFFFile("Sounds/Main Menu.aiff");
+ _menuFader.setMasterVolume(((PegasusEngine *)g_engine)->getAmbienceLevel());
updateDisplay();
}
@@ -736,6 +737,7 @@ DeathMenu::DeathMenu(const DeathReason deathReason) : GameMenu(kDeathMenuID), _d
_largeSelect.startDisplaying();
} else {
_triumphSound.initFromQuickTime("Sounds/Caldoria/Galactic Triumph");
+ _triumphSound.setVolume(((PegasusEngine *)g_engine)->getAmbienceLevel());
_triumphSound.playSound();
}
diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
index 0707a83e87..9d2d6723a9 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
@@ -196,6 +196,8 @@ void Caldoria::start() {
if (!pullbackMovie->loadFile("Images/Caldoria/Pullback.movie"))
error("Could not load pullback movie");
+ pullbackMovie->setVolume(MIN<uint>(_vm->getSoundFXLevel(), 0xFF));
+
// Draw the first frame so we can fade to it
const Graphics::Surface *frame = pullbackMovie->decodeNextFrame();
assert(frame);
@@ -907,7 +909,7 @@ void Caldoria::arriveAtCaldoria49() {
setCurrentAlternate(kAltCaldoriaNormal);
// Need to force the loop to play.
- if (GameState.getCurrentDirection() == kNorth) {
+ if (GameState.getCurrentDirection() == kNorth && !GameState.getCaldoriaSinclairShot()) {
GameState.setCaldoriaFuseTimeLimit(kSinclairShootsTimeLimit);
startExtraSequence(kCa49NorthVoiceAnalysis, kExtraCompletedFlag, kFilterNoInput);
}
@@ -1916,10 +1918,13 @@ uint Caldoria::getNumHints() {
numHints = 1;
}
break;
+#if 0
+ // The hint file is missing
case MakeRoomView(kCaldoria49, kEast):
case MakeRoomView(kCaldoria54, kEast):
numHints = 1;
break;
+#endif
case MakeRoomView(kCaldoria49, kNorth):
numHints = 1;
break;
@@ -1950,9 +1955,12 @@ Common::String Caldoria::getHintMovie(uint hintNum) {
}
return "Images/AI/Globals/XGLOB1A";
+#if 0
+ // The hint file is missing
case MakeRoomView(kCaldoria49, kEast):
case MakeRoomView(kCaldoria54, kEast):
return "Images/AI/Caldoria/X49E";
+#endif
case MakeRoomView(kCaldoria49, kNorth):
return "Images/AI/Caldoria/X49NB2";
}
diff --git a/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp b/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp
index abf34d3863..c964e3458b 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp
@@ -1167,6 +1167,18 @@ CaldoriaBomb::~CaldoriaBomb() {
delete[] _bombLevel[i];
}
+void CaldoriaBomb::setSoundFXLevel(const uint16) {
+ // The transition sounds between levels are ambience, so overwrite what
+ // Neighborhood::setSoundFXLevel does and keep using the ambience volume level
+ if (_timer.isRunning())
+ _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getAmbienceLevel());
+}
+
+void CaldoriaBomb::setAmbienceLevel(const uint16 level) {
+ if (_timer.isRunning())
+ _owner->_navMovie.setVolume(level);
+}
+
void CaldoriaBomb::openInteraction() {
_grid.moveElementTo(kCaldoriaBombGridLeft, kCaldoriaBombGridTop);
_grid.setDisplayOrder(kCaldoriaBombGridOrder);
@@ -1234,6 +1246,7 @@ void CaldoriaBomb::receiveNotification(Notification *notification, const Notific
_timer.start();
_currentLevel = 0;
_lastVertex = -1;
+ _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getAmbienceLevel());
startBombAmbient("Sounds/Caldoria/BmbLoop1.22K.AIFF");
break;
case kCaldoria56BombStage2:
@@ -1258,6 +1271,7 @@ void CaldoriaBomb::receiveNotification(Notification *notification, const Notific
_grid.hide();
_timer.stop();
_timer.hide();
+ _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel());
_owner->loadLoopSound1("");
_owner->playDeathExtra(kCaldoria56BombExplodes, kDeathNuclearExplosion);
}
@@ -1411,6 +1425,7 @@ void CaldoriaBomb::handleInput(const Input &input, const Hotspot *hotspot) {
_timer.stop();
_grid.hide();
_timer.hide();
+ _owner->_navMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel());
_owner->startExtraSequence(kCaldoria56BombStage7, kExtraCompletedFlag, kFilterNoInput);
break;
}
diff --git a/engines/pegasus/neighborhood/caldoria/caldoriabomb.h b/engines/pegasus/neighborhood/caldoria/caldoriabomb.h
index 5bb39b4122..ba6d1e8998 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoriabomb.h
+++ b/engines/pegasus/neighborhood/caldoria/caldoriabomb.h
@@ -122,6 +122,9 @@ public:
CaldoriaBomb(Neighborhood *, NotificationManager *);
virtual ~CaldoriaBomb();
+ void setSoundFXLevel(const uint16);
+ void setAmbienceLevel(const uint16);
+
long getNumHints();
Common::String getHintMovie(uint);
void doSolve();
diff --git a/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp b/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp
index a3ce97d438..2ae990d775 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp
@@ -24,6 +24,7 @@
*/
#include "pegasus/gamestate.h"
+#include "pegasus/pegasus.h"
#include "pegasus/neighborhood/neighborhood.h"
#include "pegasus/neighborhood/caldoria/caldoria.h"
#include "pegasus/neighborhood/caldoria/caldoriamessages.h"
@@ -45,6 +46,10 @@ void CaldoriaMessages::openInteraction() {
_messageNumber = 1;
}
+void CaldoriaMessages::setSoundFXLevel(const uint16 fxLevel) {
+ _messageMovie.setVolume(fxLevel);
+}
+
void CaldoriaMessages::initInteraction() {
GameInteraction::_owner->startExtraSequence(kCaBedroomVidPhone, kExtraCompletedFlag, kFilterNoInput);
}
@@ -101,6 +106,7 @@ void CaldoriaMessages::play1Message(uint messageNumber) {
GameState.setCaldoriaSeenMessages(true);
}
+ _messageMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel());
_messageMovie.moveElementTo(kCaldoriaMessageLeft, kCaldoriaMessageTop);
_messageMovie.setDisplayOrder(kCaldoriaMessagesOrder);
_messageMovie.startDisplaying();
diff --git a/engines/pegasus/neighborhood/caldoria/caldoriamessages.h b/engines/pegasus/neighborhood/caldoria/caldoriamessages.h
index 955fe10ce9..b2fc7c3bf9 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoriamessages.h
+++ b/engines/pegasus/neighborhood/caldoria/caldoriamessages.h
@@ -41,6 +41,8 @@ public:
CaldoriaMessages(Neighborhood *, const NotificationID, NotificationManager *);
virtual ~CaldoriaMessages() {}
+ void setSoundFXLevel(const uint16);
+
protected:
void openInteraction();
void initInteraction();
diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp
index 435bcd4c9e..df5a75541c 100644
--- a/engines/pegasus/neighborhood/mars/mars.cpp
+++ b/engines/pegasus/neighborhood/mars/mars.cpp
@@ -535,6 +535,10 @@ void Mars::doorOpened() {
}
void Mars::setUpReactorEnergyDrain() {
+ // If there's no energy monitor, there's nothing to do
+ if (!g_energyMonitor)
+ return;
+
switch (GameState.getCurrentRoomAndView()) {
case MakeRoomView(kMars51, kEast):
if (GameState.isCurrentDoorOpen()) {
@@ -2398,6 +2402,8 @@ void Mars::doCanyonChase() {
if (!video->loadFile("Images/Mars/M44ESA.movie"))
error("Could not load interface->shuttle transition video");
+ video->setVolume(MIN<uint>(_vm->getSoundFXLevel(), 0xFF));
+
video->start();
while (!_vm->shouldQuit() && !video->endOfVideo()) {
@@ -2476,6 +2482,7 @@ void Mars::doCanyonChase() {
_shuttleEnergyMeter.initShuttleEnergyMeter();
_shuttleEnergyMeter.powerUpMeter();
while (_shuttleEnergyMeter.isFading()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
g_system->updateScreen();
@@ -2607,6 +2614,7 @@ void Mars::startUpFromFinishedSpaceChase() {
kShuttleJunkTop, false);
initOneMovie(&_explosions, "Images/Mars/Explosions.movie", kShuttleWeaponFrontOrder, 0, 0, false);
+ _explosions.setVolume(_vm->getSoundFXLevel());
_explosionCallBack.initCallBack(&_explosions, kCallBackAtExtremes);
_energyBeam.initShuttleWeapon();
@@ -2645,6 +2653,7 @@ void Mars::startUpFromFinishedSpaceChase() {
initOneMovie(&_canyonChaseMovie, "Images/Mars/M98EAS.movie", kShuttleTractorBeamMovieOrder,
kShuttleWindowLeft, kShuttleWindowTop, true);
+ _canyonChaseMovie.setVolume(_vm->getSoundFXLevel());
_canyonChaseMovie.setTime(_canyonChaseMovie.getDuration());
_canyonChaseMovie.redrawMovieWorld();
}
@@ -2720,6 +2729,7 @@ void Mars::startUpFromSpaceChase() {
kShuttleJunkTop, false);
initOneMovie(&_explosions, "Images/Mars/Explosions.movie", kShuttleWeaponFrontOrder, 0, 0, false);
+ _explosions.setVolume(_vm->getSoundFXLevel());
_explosionCallBack.initCallBack(&_explosions, kCallBackAtExtremes);
_energyBeam.initShuttleWeapon();
@@ -2783,6 +2793,10 @@ void Mars::startUpFromSpaceChase() {
void Mars::setSoundFXLevel(const uint16 level) {
Neighborhood::setSoundFXLevel(level);
+ if (GameState.getCurrentRoomAndView() == MakeRoomView(kMars48, kEast) &&
+ !GameState.getMarsAvoidedReactorRobot())
+ _loop2Fader.setMasterVolume(level);
+
if (_canyonChaseMovie.isMovieValid())
_canyonChaseMovie.setVolume(level);
@@ -2812,6 +2826,7 @@ void Mars::marsTimerExpired(MarsTimerEvent &event) {
GameState.setScoringEnteredLaunchTube();
while (_canyonChaseMovie.isRunning()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
@@ -2836,6 +2851,7 @@ void Mars::marsTimerExpired(MarsTimerEvent &event) {
initOneMovie(&_junk, "Images/Mars/Junk.movie", kShuttleJunkOrder, kShuttleJunkLeft, kShuttleJunkTop, false);
initOneMovie(&_explosions, "Images/Mars/Explosions.movie", kShuttleWeaponFrontOrder, 0, 0, false);
+ _explosions.setVolume(_vm->getSoundFXLevel());
_explosionCallBack.initCallBack(&_explosions, kCallBackAtExtremes);
_energyBeam.initShuttleWeapon();
@@ -2945,6 +2961,7 @@ void Mars::marsTimerExpired(MarsTimerEvent &event) {
showBigExplosion(r, kShuttleAlienShipOrder);
while (_explosions.isRunning()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
g_system->delayMillis(10);
@@ -3138,6 +3155,7 @@ void Mars::spaceChaseClick(const Input &input, const HotSpotID id) {
_shuttleEnergyMeter.drainForTractorBeam();
while (_shuttleEnergyMeter.isFading()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
@@ -3167,11 +3185,13 @@ void Mars::spaceChaseClick(const Input &input, const HotSpotID id) {
// Shameless reuse of a variable :P
initOneMovie(&_canyonChaseMovie, "Images/Mars/M98EAS.movie", kShuttleTractorBeamMovieOrder,
kShuttleWindowLeft, kShuttleWindowTop, true);
+ _canyonChaseMovie.setVolume(_vm->getSoundFXLevel());
_canyonChaseMovie.redrawMovieWorld();
playMovieSegment(&_canyonChaseMovie, 0, _canyonChaseMovie.getDuration());
// wait here until any junk clears...
while (_junk.junkFlying()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
diff --git a/engines/pegasus/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp
index 3116bd7978..c9be349694 100644
--- a/engines/pegasus/neighborhood/neighborhood.cpp
+++ b/engines/pegasus/neighborhood/neighborhood.cpp
@@ -470,6 +470,7 @@ void Neighborhood::requestSpotSound(const TimeValue in, const TimeValue out, con
void Neighborhood::playSpotSoundSync(const TimeValue in, const TimeValue out) {
// Let the action queue play out first...
while (!actionQueueEmpty()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->checkNotifications();
@@ -480,6 +481,7 @@ void Neighborhood::playSpotSoundSync(const TimeValue in, const TimeValue out) {
_spotSounds.playSoundSegment(in, out);
while (_spotSounds.isPlaying()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
@@ -1105,6 +1107,7 @@ void Neighborhood::startTurnPush(const TurnDirection turnDirection, const TimeVa
_turnPush.continueFader();
do {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
@@ -1492,7 +1495,15 @@ void Neighborhood::loadLoopSound2(const Common::String &soundName, uint16 volume
if (!_loop2SoundString.empty()) {
_soundLoop2.initFromAIFFFile(_loop2SoundString);
_soundLoop2.loopSound();
- _loop2Fader.setMasterVolume(_vm->getAmbienceLevel());
+ // HACK: Some ambient loops are actually sound effects, like Ares waiting at
+ // the reactor and Poseidon at the launch console. Detect these and use the
+ // SFX volume instead of ambience.
+ if (soundName == "Sounds/Mars/Robot Loop.aiff" ||
+ soundName == "Sounds/Norad/Breathing Typing.22K.AIFF" ||
+ soundName == "Sounds/Norad/N54NAS.32K.AIFF")
+ _loop2Fader.setMasterVolume(_vm->getSoundFXLevel());
+ else
+ _loop2Fader.setMasterVolume(_vm->getAmbienceLevel());
_loop2Fader.setFaderValue(0);
faderMove.makeTwoKnotFaderSpec(fadeScale, 0, 0, fadeIn, volume);
_loop2Fader.startFaderSync(faderMove);
@@ -1577,6 +1588,7 @@ void Neighborhood::closeCroppedMovie() {
void Neighborhood::playCroppedMovieOnce(const Common::String &movieName, CoordType left, CoordType top, const InputBits interruptionFilter) {
openCroppedMovie(movieName, left, top);
+ _croppedMovie.setVolume(_vm->getSoundFXLevel());
_croppedMovie.redrawMovieWorld();
_croppedMovie.start();
@@ -1616,6 +1628,7 @@ void Neighborhood::playMovieSegment(Movie *movie, TimeValue startTime, TimeValue
movie->start();
while (movie->isRunning()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
diff --git a/engines/pegasus/neighborhood/neighborhood.h b/engines/pegasus/neighborhood/neighborhood.h
index 3c1c5eac92..f7f2b038c6 100644
--- a/engines/pegasus/neighborhood/neighborhood.h
+++ b/engines/pegasus/neighborhood/neighborhood.h
@@ -91,6 +91,7 @@ struct QueueRequest {
bool operator==(const QueueRequest &arg1, const QueueRequest &arg2);
bool operator!=(const QueueRequest &arg1, const QueueRequest &arg2);
+class CaldoriaBomb;
class GameInteraction;
class Item;
class Neighborhood;
@@ -109,6 +110,7 @@ protected:
typedef Common::Queue<QueueRequest> NeighborhoodActionQueue;
class Neighborhood : public IDObject, public NotificationReceiver, public InputHandler, public Idler {
+friend class CaldoriaBomb;
friend class StriderCallBack;
public:
diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.cpp b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
index 0b95e9bc2b..5c321a8e8a 100644
--- a/engines/pegasus/neighborhood/norad/delta/globegame.cpp
+++ b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
@@ -453,8 +453,13 @@ GlobeGame::GlobeGame(Neighborhood *handler) : GameInteraction(kNoradGlobeGameInt
_neighborhoodNotification = handler->getNeighborhoodNotification();
}
+void GlobeGame::setSoundFXLevel(const uint16 fxLevel) {
+ _monitorMovie.setVolume(fxLevel);
+}
+
void GlobeGame::openInteraction() {
_monitorMovie.initFromMovieFile("Images/Norad Delta/N79 Left Monitor");
+ _monitorMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel());
_monitorMovie.moveElementTo(kGlobeMonitorLeft, kGlobeMonitorTop);
_monitorMovie.setDisplayOrder(kGlobeMonitorLayer);
_monitorMovie.startDisplaying();
diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.h b/engines/pegasus/neighborhood/norad/delta/globegame.h
index 73ed48866f..93235a1784 100644
--- a/engines/pegasus/neighborhood/norad/delta/globegame.h
+++ b/engines/pegasus/neighborhood/norad/delta/globegame.h
@@ -98,6 +98,8 @@ public:
GlobeGame(Neighborhood *);
virtual ~GlobeGame() {}
+ void setSoundFXLevel(const uint16);
+
void handleInput(const Input &, const Hotspot *);
void clickInHotspot(const Input &, const Hotspot *);
void activateHotspots();
diff --git a/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp b/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp
index 1eea2f0156..ee047d72b2 100644
--- a/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp
+++ b/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp
@@ -514,6 +514,17 @@ void NoradDelta::openDoor() {
}
}
+void NoradDelta::cantMoveThatWay(CanOpenDoorReason reason) {
+ // WORKAROUND: The door outside the launch console room isn't treated as a door,
+ // so play the correct sound.
+ if (reason == kCantMoveBlocked && GameState.getCurrentRoomAndView() == MakeRoomView(kNorad67, kNorth)) {
+ cantOpenDoor(kCantOpenLocked);
+ return;
+ }
+
+ Neighborhood::cantMoveThatWay(reason);
+}
+
void NoradDelta::activateHotspots() {
Norad::activateHotspots();
@@ -863,6 +874,13 @@ void NoradDelta::doSolve() {
}
}
+void NoradDelta::setSoundFXLevel(const uint16 level) {
+ Neighborhood::setSoundFXLevel(level);
+
+ if (GameState.getCurrentRoomAndView() == MakeRoomView(kNorad54North, kNorth))
+ _loop2Fader.setMasterVolume(level);
+}
+
Common::String NoradDelta::getSoundSpotsName() {
return "Sounds/Norad/Norad Delta Spots";
}
diff --git a/engines/pegasus/neighborhood/norad/delta/noraddelta.h b/engines/pegasus/neighborhood/norad/delta/noraddelta.h
index 11065f2c9d..591fd691a2 100644
--- a/engines/pegasus/neighborhood/norad/delta/noraddelta.h
+++ b/engines/pegasus/neighborhood/norad/delta/noraddelta.h
@@ -68,6 +68,8 @@ public:
bool canSolve();
void doSolve();
+ void setSoundFXLevel(const uint16);
+
void doorOpened();
protected:
@@ -90,6 +92,7 @@ protected:
void arriveAtNorad79West();
TimeValue getViewTime(const RoomID, const DirectionConstant);
void openDoor();
+ void cantMoveThatWay(CanMoveForwardReason);
void activateHotspots();
void clickInHotspot(const Input &, const Hotspot *);
void receiveNotification(Notification *, const NotificationFlags);
diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
index 99efe10272..92b79c038e 100644
--- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
@@ -1692,7 +1692,9 @@ void FullTSA::initializeTBPMonitor(const int newMode, const ExtraID highlightExt
releaseSprites();
}
- _interruptionFilter = kFilterAllInput;
+ // Only allow input if we're not in the middle of series of queue requests.
+ if (actionQueueEmpty())
+ _interruptionFilter = kFilterAllInput;
}
void FullTSA::startUpComparisonMonitor() {
@@ -2643,6 +2645,7 @@ void FullTSA::receiveNotification(Notification *notification, const Notification
GameState.setMarsReadyForShuttleTransport(false);
GameState.setMarsFinishedCanyonChase(false);
GameState.setMarsThreadedMaze(false);
+ GameState.setMarsSawRobotLeave(false);
break;
case kPlayerOnWayToWSC:
_vm->jumpToNewEnvironment(kWSCID, kWSC01, kWest);
@@ -2691,16 +2694,18 @@ void FullTSA::receiveNotification(Notification *notification, const Notification
}
break;
case kTSA37DownloadToOpMemReview:
- switch (GameState.getTSAState()) {
- case kPlayerOnWayToNorad:
- g_opticalChip->playOpMemMovie(kPoseidonSpotID);
- break;
- case kPlayerOnWayToMars:
- g_opticalChip->playOpMemMovie(kAriesSpotID);
- break;
- case kPlayerOnWayToWSC:
- g_opticalChip->playOpMemMovie(kMercurySpotID);
- break;
+ if (_vm->itemInBiochips(kOpticalBiochip)) {
+ switch (GameState.getTSAState()) {
+ case kPlayerOnWayToNorad:
+ g_opticalChip->playOpMemMovie(kPoseidonSpotID);
+ break;
+ case kPlayerOnWayToMars:
+ g_opticalChip->playOpMemMovie(kAriesSpotID);
+ break;
+ case kPlayerOnWayToWSC:
+ g_opticalChip->playOpMemMovie(kMercurySpotID);
+ break;
+ }
}
if (GameState.allTimeZonesFinished()) {
diff --git a/engines/pegasus/neighborhood/tsa/tinytsa.cpp b/engines/pegasus/neighborhood/tsa/tinytsa.cpp
index 0d11f5d904..c808325b0f 100644
--- a/engines/pegasus/neighborhood/tsa/tinytsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/tinytsa.cpp
@@ -327,6 +327,7 @@ void TinyTSA::receiveNotification(Notification *notification, const Notification
GameState.setMarsReadyForShuttleTransport(false);
GameState.setMarsFinishedCanyonChase(false);
GameState.setMarsThreadedMaze(false);
+ GameState.setMarsSawRobotLeave(false);
break;
case kPlayerOnWayToWSC:
_vm->jumpToNewEnvironment(kWSCID, kWSC01, kWest);
@@ -372,16 +373,18 @@ void TinyTSA::receiveNotification(Notification *notification, const Notification
}
break;
case kTinyTSA37DownloadToOpMemReview:
- switch (GameState.getTSAState()) {
- case kPlayerOnWayToNorad:
- g_opticalChip->playOpMemMovie(kPoseidonSpotID);
- break;
- case kPlayerOnWayToMars:
- g_opticalChip->playOpMemMovie(kAriesSpotID);
- break;
- case kPlayerOnWayToWSC:
- g_opticalChip->playOpMemMovie(kMercurySpotID);
- break;
+ if (_vm->itemInBiochips(kOpticalBiochip)) {
+ switch (GameState.getTSAState()) {
+ case kPlayerOnWayToNorad:
+ g_opticalChip->playOpMemMovie(kPoseidonSpotID);
+ break;
+ case kPlayerOnWayToMars:
+ g_opticalChip->playOpMemMovie(kAriesSpotID);
+ break;
+ case kPlayerOnWayToWSC:
+ g_opticalChip->playOpMemMovie(kMercurySpotID);
+ break;
+ }
}
requestExtraSequence(kTinyTSA37OpMemReviewToMainMenu, kExtraCompletedFlag, kFilterNoInput);
diff --git a/engines/pegasus/neighborhood/wsc/wsc.cpp b/engines/pegasus/neighborhood/wsc/wsc.cpp
index 09e2a48a52..f009b35cdc 100644
--- a/engines/pegasus/neighborhood/wsc/wsc.cpp
+++ b/engines/pegasus/neighborhood/wsc/wsc.cpp
@@ -2029,6 +2029,7 @@ void WSC::moleculeGameClick(const HotSpotID id) {
_moleculesMovie.start();
while (_moleculesMovie.isRunning()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
@@ -2063,6 +2064,7 @@ void WSC::moleculeGameClick(const HotSpotID id) {
_moleculesMovie.start();
while (_moleculesMovie.isRunning()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
@@ -2076,6 +2078,7 @@ void WSC::moleculeGameClick(const HotSpotID id) {
while (_moleculesMovie.isRunning()) {
+ InputDevice.pumpEvents();
_vm->checkCallBacks();
_vm->refreshDisplay();
_vm->_system->delayMillis(10);
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 0148470cd5..0010180d8d 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -36,6 +36,7 @@
#include "backends/keymapper/keymapper.h"
#include "base/plugins.h"
#include "base/version.h"
+#include "gui/message.h"
#include "gui/saveload.h"
#include "video/theora_decoder.h"
#include "video/qt_decoder.h"
@@ -306,6 +307,7 @@ void PegasusEngine::runIntro() {
Video::VideoDecoder *video = new Video::QuickTimeDecoder();
if (video->loadFile(_introDirectory + "/BandaiLogo.movie")) {
+ video->setVolume(MIN<uint>(getAmbienceLevel(), 0xFF));
video->start();
while (!shouldQuit() && !video->endOfVideo() && !skipped) {
@@ -337,6 +339,8 @@ void PegasusEngine::runIntro() {
if (!video->loadFile(_introDirectory + "/Big Movie.movie"))
error("Could not load intro movie");
+ video->setVolume(MIN<uint>(getAmbienceLevel(), 0xFF));
+
video->seek(Audio::Timestamp(0, 10 * 600, 600));
video->start();
@@ -379,20 +383,21 @@ Common::Error PegasusEngine::showSaveDialog() {
int slot = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
- Common::Error result;
+ if (slot >= 0)
+ return saveGameState(slot, slc.getResultString());
- if (slot >= 0) {
- if (saveGameState(slot, slc.getResultString()).getCode() == Common::kNoError)
- result = Common::kNoError;
- else
- result = Common::kUnknownError;
- } else {
- result = Common::kUserCanceled;
- }
+ return Common::kUserCanceled;
+}
- return result;
+void PegasusEngine::showSaveFailedDialog(const Common::Error &status) {
+ Common::String failMessage = Common::String::format(_("Gamestate save failed (%s)! "
+ "Please consult the README for basic information, and for "
+ "instructions on how to obtain further assistance."), status.getDesc().c_str());
+ GUI::MessageDialog dialog(failMessage);
+ dialog.runModal();
}
+
GUI::Debugger *PegasusEngine::getDebugger() {
return _console;
}
@@ -431,6 +436,8 @@ void PegasusEngine::removeTimeBase(TimeBase *timeBase) {
bool PegasusEngine::loadFromStream(Common::SeekableReadStream *stream) {
// Dispose currently running stuff
+ lowerInventoryDrawerSync();
+ lowerBiochipDrawerSync();
useMenu(0);
useNeighborhood(0);
removeAllItemsFromInventory();
@@ -790,6 +797,8 @@ void PegasusEngine::introTimerExpired() {
if (!video->loadFile(_introDirectory + "/LilMovie.movie"))
error("Failed to load little movie");
+ video->setVolume(MIN<uint>(getAmbienceLevel(), 0xFF));
+
bool saveAllowed = swapSaveAllowed(false);
bool openAllowed = swapLoadAllowed(false);
@@ -832,6 +841,7 @@ void PegasusEngine::delayShell(TimeValue time, TimeScale scale) {
uint32 timeInMillis = time * 1000 / scale;
while (g_system->getMillis() < startTime + timeInMillis) {
+ InputDevice.pumpEvents();
checkCallBacks();
_gfx->updateDisplay();
}
@@ -936,6 +946,8 @@ void PegasusEngine::doGameMenuCommand(const GameMenuCommand command) {
if (!video->loadFile(_introDirectory + "/Closing.movie"))
error("Could not load closing movie");
+ video->setVolume(MIN<uint>(getSoundFXLevel(), 0xFF));
+
uint16 x = (640 - video->getWidth() * 2) / 2;
uint16 y = (480 - video->getHeight() * 2) / 2;
@@ -967,8 +979,14 @@ void PegasusEngine::doGameMenuCommand(const GameMenuCommand command) {
resetIntroTimer();
break;
case kMenuCmdPauseSave:
- if (showSaveDialog().getCode() != Common::kUserCanceled)
+ result = showSaveDialog();
+
+ if (result.getCode() != Common::kUserCanceled) {
+ if (result.getCode() != Common::kNoError)
+ showSaveFailedDialog(result);
+
pauseMenu(false);
+ }
break;
case kMenuCmdPauseContinue:
pauseMenu(false);
@@ -1019,7 +1037,12 @@ void PegasusEngine::handleInput(const Input &input, const Hotspot *cursorSpot) {
// Can only save during a game and not in the demo
if (g_neighborhood && !isDemo()) {
pauseEngine(true);
- showSaveDialog();
+
+ Common::Error result = showSaveDialog();
+
+ if (result.getCode() != Common::kNoError && result.getCode() != Common::kUserCanceled)
+ showSaveFailedDialog(result);
+
pauseEngine(false);
}
}
@@ -1460,6 +1483,15 @@ void PegasusEngine::throwAwayEverything() {
g_interface = 0;
}
+InputBits PegasusEngine::getInputFilter() {
+ InputBits filter = InputHandler::getInputFilter();
+
+ if (isPaused())
+ return filter & ~JMPPPInput::getItemPanelsInputFilter();
+
+ return filter;
+}
+
void PegasusEngine::processShell() {
checkCallBacks();
checkNotifications();
@@ -1658,6 +1690,9 @@ void PegasusEngine::startNewGame() {
removeAllItemsFromInventory();
removeAllItemsFromBiochips();
+ // Properly reset all items to their original state
+ g_allItems.resetAllItems();
+
BiochipItem *biochip = (BiochipItem *)_allItems.findItemByID(kAIBiochip);
addItemToBiochips(biochip);
@@ -2148,6 +2183,7 @@ void PegasusEngine::autoDragItemIntoRoom(Item *item, Sprite *draggingSprite) {
_autoDragger.autoDrag(draggingSprite, start, stop, time, kDefaultTimeScale);
while (_autoDragger.isDragging()) {
+ InputDevice.pumpEvents();
checkCallBacks();
refreshDisplay();
_system->delayMillis(10);
@@ -2181,6 +2217,7 @@ void PegasusEngine::autoDragItemIntoInventory(Item *, Sprite *draggingSprite) {
_autoDragger.autoDrag(draggingSprite, start, stop, time, kDefaultTimeScale);
while (_autoDragger.isDragging()) {
+ InputDevice.pumpEvents();
checkCallBacks();
refreshDisplay();
_system->delayMillis(10);
@@ -2257,10 +2294,7 @@ void PegasusEngine::doSubChase() {
drawScaledFrame(frame, 0, 0);
}
- Common::Event event;
- while (_eventMan->pollEvent(event))
- ;
-
+ InputDevice.pumpEvents();
_system->delayMillis(10);
}
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index 59637e38df..d88545a4d1 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -257,6 +257,7 @@ private:
bool _saveAllowed, _loadAllowed; // It's so nice that this was in the original code already :P
Common::Error showLoadDialog();
Common::Error showSaveDialog();
+ void showSaveFailedDialog(const Common::Error &status);
bool _saveRequested, _loadRequested;
// Misc.
@@ -272,6 +273,7 @@ private:
uint getNeighborhoodCD(const NeighborhoodID neighborhood) const;
uint _currentCD;
void initKeymap();
+ InputBits getInputFilter();
// Menu
GameMenu *_gameMenu;
diff --git a/engines/pegasus/surface.cpp b/engines/pegasus/surface.cpp
index cdcb3c6e79..cb1e2e7bcc 100644
--- a/engines/pegasus/surface.cpp
+++ b/engines/pegasus/surface.cpp
@@ -28,7 +28,7 @@
#include "common/stream.h"
#include "common/system.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pict.h"
+#include "image/pict.h"
#include "video/video_decoder.h"
#include "pegasus/pegasus.h"
@@ -101,7 +101,7 @@ void Surface::getImageFromPICTResource(Common::MacResManager *resFork, uint16 id
}
bool Surface::getImageFromPICTStream(Common::SeekableReadStream *stream) {
- Graphics::PICTDecoder pict;
+ Image::PICTDecoder pict;
if (!pict.loadStream(*stream))
return false;
diff --git a/engines/queen/bankman.cpp b/engines/queen/bankman.cpp
index ea823773dc..6d99874697 100644
--- a/engines/queen/bankman.cpp
+++ b/engines/queen/bankman.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/bankman.h b/engines/queen/bankman.h
index 9e1e726fbf..87c58022a1 100644
--- a/engines/queen/bankman.h
+++ b/engines/queen/bankman.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/command.cpp b/engines/queen/command.cpp
index 7876dbfae9..d9fafa3a1d 100644
--- a/engines/queen/command.cpp
+++ b/engines/queen/command.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/command.h b/engines/queen/command.h
index 6865aa80a2..1d49b134de 100644
--- a/engines/queen/command.h
+++ b/engines/queen/command.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/credits.cpp b/engines/queen/credits.cpp
index 43e3bc7c6a..b2f6a601bf 100644
--- a/engines/queen/credits.cpp
+++ b/engines/queen/credits.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/credits.h b/engines/queen/credits.h
index b89d029a59..56e0bdb882 100644
--- a/engines/queen/credits.h
+++ b/engines/queen/credits.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/cutaway.cpp b/engines/queen/cutaway.cpp
index 1e53c00564..0f54431acf 100644
--- a/engines/queen/cutaway.cpp
+++ b/engines/queen/cutaway.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -552,7 +552,6 @@ void Cutaway::dumpCutawayAnim(CutawayAnim &anim) {
const byte *Cutaway::handleAnimation(const byte *ptr, CutawayObject &object) {
// lines 1517-1770 in cutaway.c
int frameCount = 0;
- int header = 0;
int i;
CutawayAnim objAnim[56];
@@ -560,7 +559,7 @@ const byte *Cutaway::handleAnimation(const byte *ptr, CutawayObject &object) {
// Read animation frames
for (;;) {
- header = (int16)READ_BE_INT16(ptr);
+ int header = (int16)READ_BE_INT16(ptr);
ptr += 2;
if (-2 == header)
diff --git a/engines/queen/cutaway.h b/engines/queen/cutaway.h
index a7e3646a59..f6115c8023 100644
--- a/engines/queen/cutaway.h
+++ b/engines/queen/cutaway.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/debug.cpp b/engines/queen/debug.cpp
index d09c5d4469..3706806ac2 100644
--- a/engines/queen/debug.cpp
+++ b/engines/queen/debug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -21,6 +21,7 @@
*/
#include "common/scummsys.h"
+#include "common/util.h"
#include "queen/debug.h"
@@ -57,8 +58,17 @@ void Debugger::postEnter() {
_vm->graphics()->setupMouseCursor();
}
+static bool isNumeric(const char *arg) {
+ const char *str = arg;
+ bool retVal = true;
+ while (retVal && (*str != '\0')) {
+ retVal = Common::isDigit(*str++);
+ }
+ return retVal;
+}
+
bool Debugger::Cmd_Asm(int argc, const char **argv) {
- if (argc == 2) {
+ if (argc == 2 && isNumeric(argv[1])) {
uint16 sm = atoi(argv[1]);
_vm->logic()->executeSpecialMove(sm);
return false;
@@ -75,12 +85,17 @@ bool Debugger::Cmd_Areas(int argc, const char **argv) {
}
bool Debugger::Cmd_Bob(int argc, const char **argv) {
- if (argc >= 3) {
+ if (argc >= 3 && isNumeric(argv[1])) {
int bobNum = atoi(argv[1]);
if (bobNum >= Graphics::MAX_BOBS_NUMBER) {
DebugPrintf("Bob %d is out of range (range: 0 - %d)\n", bobNum, Graphics::MAX_BOBS_NUMBER);
} else {
- int param = (argc > 3) ? atoi(argv[3]) : 0;
+ int param = 0;
+ if (argc > 3 && isNumeric(argv[3])) {
+ param = atoi(argv[3]);
+ } else {
+ DebugPrintf("Invalid parameter for bob command '%s'\n", argv[2]);
+ }
BobSlot *bob = _vm->graphics()->bob(bobNum);
if (!strcmp(argv[2], "toggle")) {
bob->active = !bob->active;
@@ -109,22 +124,21 @@ bool Debugger::Cmd_Bob(int argc, const char **argv) {
bool Debugger::Cmd_GameState(int argc, const char **argv) {
uint16 slot;
- switch (argc) {
- case 2:
- slot = atoi(argv[1]);
- DebugPrintf("GAMESTATE[%d] ", slot);
- DebugPrintf("is %d\n", _vm->logic()->gameState(slot));
- break;
- case 3:
+ if ((argc == 2 || argc == 3) && isNumeric(argv[1])) {
slot = atoi(argv[1]);
DebugPrintf("GAMESTATE[%d] ", slot);
- DebugPrintf("was %d ", _vm->logic()->gameState(slot));
- _vm->logic()->gameState(slot, atoi(argv[2]));
- DebugPrintf("now %d\n", _vm->logic()->gameState(slot));
- break;
- default:
- DebugPrintf("Usage: %s slotnum value\n", argv[0]);
- break;
+ DebugPrintf("%s %d\n", (argc == 2) ? "is" : "was", _vm->logic()->gameState(slot));
+
+ if (argc == 3) {
+ if (isNumeric(argv[1])) {
+ _vm->logic()->gameState(slot, atoi(argv[2]));
+ DebugPrintf("now %d\n", _vm->logic()->gameState(slot));
+ } else {
+ DebugPrintf("Usage: %s slotnum <value>\n", argv[0]);
+ }
+ }
+ } else {
+ DebugPrintf("Usage: %s slotnum <value>\n", argv[0]);
}
return true;
}
@@ -164,7 +178,7 @@ bool Debugger::Cmd_PrintBobs(int argc, const char**argv) {
}
bool Debugger::Cmd_Room(int argc, const char **argv) {
- if (argc == 2) {
+ if (argc == 2 && isNumeric(argv[1])) {
uint16 roomNum = atoi(argv[1]);
_vm->logic()->joePos(0, 0);
_vm->logic()->newRoom(roomNum);
@@ -180,7 +194,7 @@ bool Debugger::Cmd_Room(int argc, const char **argv) {
}
bool Debugger::Cmd_Song(int argc, const char **argv) {
- if (argc == 2) {
+ if (argc == 2 && isNumeric(argv[1])) {
int16 songNum = atoi(argv[1]);
_vm->sound()->playSong(songNum);
DebugPrintf("Playing song %d\n", songNum);
diff --git a/engines/queen/debug.h b/engines/queen/debug.h
index 01da4a35d6..19d77dffc0 100644
--- a/engines/queen/debug.h
+++ b/engines/queen/debug.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/defs.h b/engines/queen/defs.h
index 3d06485ef5..1904a390bc 100644
--- a/engines/queen/defs.h
+++ b/engines/queen/defs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/detection.cpp b/engines/queen/detection.cpp
new file mode 100644
index 0000000000..5a7b4c6ad0
--- /dev/null
+++ b/engines/queen/detection.cpp
@@ -0,0 +1,508 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "base/plugins.h"
+
+#include "engines/advancedDetector.h"
+
+#include "common/config-manager.h"
+#include "common/file.h"
+#include "common/gui_options.h"
+#include "common/savefile.h"
+#include "common/system.h"
+#include "common/translation.h"
+
+#include "queen/queen.h"
+#include "queen/resource.h"
+
+namespace Queen {
+
+struct QueenGameDescription {
+ ADGameDescription desc;
+};
+
+} // End of namespace Queen
+
+static const PlainGameDescriptor queenGames[] = {
+ {"queen", "Flight of the Amazon Queen"},
+ {0, 0}
+};
+
+#define GAMEOPTION_ALT_INTRO GUIO_GAMEOPTIONS1
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ALT_INTRO,
+ {
+ _s("Alternative intro"),
+ _s("Use an alternative game intro (CD version only)"),
+ "alt_intro",
+ false
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+namespace Queen {
+
+static const QueenGameDescription gameDescriptions[] = {
+ // Amiga Demo - English
+ {
+ {
+ "queen",
+ "Demo",
+ AD_ENTRY1s("queen.1", "f7a1a37ac93bf763b1569231237cb4d8", 563335),
+ Common::EN_ANY,
+ Common::kPlatformAmiga,
+ ADGF_DEMO,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+ // Amiga Interview Demo - English
+ {
+ {
+ "queen",
+ "Interview",
+ AD_ENTRY1s("queen.1", "f5d42a18d8f5689480413871410663d7", 597032),
+ Common::EN_ANY,
+ Common::kPlatformAmiga,
+ ADGF_DEMO,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+ // DOS Demo - English
+ {
+ {
+ "queen",
+ "Demo",
+ AD_ENTRY1s("queen.1", "f39334d8133840aa3bcbd733c12937cf", 3732177),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_DEMO,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+ // DOS Interview Demo - English
+ {
+ {
+ "queen",
+ "Interview",
+ AD_ENTRY1s("queen.1", "30b3291f37665bf24d9482b183cb2f67", 1915913),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_DEMO,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+ // PCGAMES DOS Demo - English
+ {
+ {
+ "queen",
+ "Demo",
+ AD_ENTRY1s("queen.1", "f39334d8133840aa3bcbd733c12937cf", 3724538),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_DEMO,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+#if 0
+ // Amiga Floppy - English
+ {
+ {
+ "queen",
+ "Floppy",
+ AD_ENTRY1s("queen.1", NULL, 351775), // TODO: Fill in correct MD5
+ Common::EN_ANY,
+ Common::kPlatformAmiga,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+#endif
+
+ // DOS Floppy - English
+ {
+ {
+ "queen",
+ "Floppy",
+ AD_ENTRY1s("queen.1", "f5e827645d3c887be3bdf4729d847756", 22677657),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+ // DOS CD - English
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1", "b6302bccf70463de3d5faf0f0628f742", 190787021),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // DOS Floppy - French
+ {
+ {
+ "queen",
+ "Floppy",
+ AD_ENTRY1s("queen.1", "f5e827645d3c887be3bdf4729d847756", 22157304),
+ Common::FR_FRA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+
+ // DOS CD - French
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1", "6fd5486a0db75bae2e023b575c3d6a5d", 186689095),
+ Common::FR_FRA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+#if 0
+ // DOS Floppy - German
+ {
+ {
+ "queen",
+ "Floppy",
+ AD_ENTRY1s("queen.1", NULL, 22240013), // TODO: Fill in correct MD5
+ Common::DE_DEU,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+#endif
+
+#if 0
+ // DOS CD - German
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1", NULL, 217648975), // TODO: Fill in correct MD5
+ Common::DE_DEU,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+#endif
+
+#if 0
+ // DOS CD - Hebrew
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1", NULL, 190705558), // TODO: Fill in correct MD5
+ Common::HE_ISR,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+#endif
+
+#if 0
+ // DOS Floppy - Italian
+ {
+ {
+ "queen",
+ "Floppy",
+ AD_ENTRY1s("queen.1", NULL, 22461366), // TODO: Fill in correct MD5
+ Common::IT_ITA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOSPEECH)
+ },
+ },
+#endif
+
+ // DOS CD - Italian
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1", "b6302bccf70463de3d5faf0f0628f742", 190795582),
+ Common::IT_ITA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+#if 0
+ // DOS CD - Spanish
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1", NULL, 190730602), // TODO: Fill in correct MD5
+ Common::ES_ESP,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+#endif
+
+ // DOS CD - English (Compressed Freeware Release v1.0)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", "a0749bb8b72e537ead1a63a3dde1443d", 54108887),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // DOS CD - English (Compressed Freeware Release v1.1)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", "21fd690b372f8a6289f6f33bc986276c", 51222412),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // DOS CD - French (Compressed Freeware Release v1.0)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", "67e3020f8a35e1df7b1c753b5aaa71e1", 97382620),
+ Common::FR_FRA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // DOS CD - German (Compressed Freeware Release v1.0)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", "28f78dbec7e20f603a10c2f8ea889a5c", 108738717),
+ Common::DE_DEU,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // DOS CD - Hebrew (Compressed Freeware Release v1.0)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", "4d52d8780613ef27a2b779caecb20a21", 99391805),
+ Common::HE_ISR,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // DOS CD - Italian (Compressed Freeware Release v1.0)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", "2f72b715ed753cf905a37cdcc7ea611e", 98327801),
+ Common::IT_ITA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+
+ // TODO: Freeware Release for Spanish DOS CD is missing.
+#if 0
+ // DOS CD - Spanish (Compressed Freeware Release v1.0)
+ {
+ {
+ "queen",
+ "Talkie",
+ AD_ENTRY1s("queen.1c", NULL, ?),
+ Common::ES_ESP,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_ALT_INTRO)
+ },
+ },
+#endif
+
+ { AD_TABLE_END_MARKER }
+};
+
+} // End of namespace Queen
+
+class QueenMetaEngine : public AdvancedMetaEngine {
+public:
+ QueenMetaEngine() : AdvancedMetaEngine(Queen::gameDescriptions, sizeof(Queen::QueenGameDescription), queenGames, optionsList) {
+ _singleid = "queen";
+ }
+
+ virtual const char *getName() const {
+ return "Queen";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis";
+ }
+
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const { return 99; }
+ virtual void removeSaveState(const char *target, int slot) const;
+
+ const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const;
+};
+
+bool QueenMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave);
+}
+
+const ADGameDescription *QueenMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ static ADGameDescription desc;
+
+ // Iterate over all files in the given directory
+ for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
+ if (file->isDirectory()) {
+ continue;
+ }
+ if (file->getName().equalsIgnoreCase("queen.1") || file->getName().equalsIgnoreCase("queen.1c")) {
+ Common::File dataFile;
+ if (!dataFile.open(*file)) {
+ continue;
+ }
+ Queen::DetectedGameVersion version;
+ if (Queen::Resource::detectVersion(&version, &dataFile)) {
+ desc.gameid = "queen";
+ desc.language = version.language;
+ desc.platform = version.platform;
+ desc.flags = ADGF_NO_FLAGS;
+ desc.guioptions = GUIO0();
+ if (version.features & Queen::GF_DEMO) {
+ desc.extra = "Demo";
+ desc.flags = ADGF_DEMO;
+ desc.guioptions = GUIO_NOSPEECH;
+ } else if (version.features & Queen::GF_INTERVIEW) {
+ desc.extra = "Interview";
+ desc.flags = ADGF_DEMO;
+ desc.guioptions = GUIO_NOSPEECH;
+ } else if (version.features & Queen::GF_FLOPPY) {
+ desc.extra = "Floppy";
+ desc.guioptions = GUIO_NOSPEECH;
+ } else if (version.features & Queen::GF_TALKIE) {
+ desc.extra = "Talkie";
+ desc.guioptions = GAMEOPTION_ALT_INTRO;
+ }
+ return (const ADGameDescription *)&desc;
+ }
+ }
+ }
+ return 0;
+}
+
+SaveStateList QueenMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::StringArray filenames;
+ char saveDesc[32];
+ Common::String pattern("queen.s??");
+
+ filenames = saveFileMan->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+
+ SaveStateList saveList;
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ // Obtain the last 2 digits of the filename, since they correspond to the save slot
+ int slotNum = atoi(file->c_str() + file->size() - 2);
+
+ if (slotNum >= 0 && slotNum <= 99) {
+ Common::InSaveFile *in = saveFileMan->openForLoading(*file);
+ if (in) {
+ for (int i = 0; i < 4; i++)
+ in->readUint32BE();
+ in->read(saveDesc, 32);
+ saveList.push_back(SaveStateDescriptor(slotNum, saveDesc));
+ delete in;
+ }
+ }
+ }
+
+ return saveList;
+}
+
+void QueenMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String filename = Common::String::format("queen.s%02d", slot);
+
+ g_system->getSavefileManager()->removeSavefile(filename);
+}
+
+bool QueenMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ const Queen::QueenGameDescription *gd = (const Queen::QueenGameDescription *)desc;
+
+ if (gd)
+ *engine = new Queen::QueenEngine(syst); //FIXME , gd);
+
+ return (gd != 0);
+}
+
+#if PLUGIN_ENABLED_DYNAMIC(QUEEN)
+ REGISTER_PLUGIN_DYNAMIC(QUEEN, PLUGIN_TYPE_ENGINE, QueenMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(QUEEN, PLUGIN_TYPE_ENGINE, QueenMetaEngine);
+#endif
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index 7437bab974..b2213f7fee 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -29,8 +29,9 @@
#include "graphics/cursorman.h"
#include "graphics/palette.h"
#include "graphics/surface.h"
-#include "graphics/decoders/iff.h"
-#include "graphics/decoders/pcx.h"
+
+#include "image/iff.h"
+#include "image/pcx.h"
#include "queen/display.h"
#include "queen/input.h"
@@ -813,7 +814,7 @@ void Display::fill(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint16 w,
void Display::decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd) {
Common::MemoryReadStream str(src, srcSize);
- ::Graphics::PCXDecoder pcx;
+ Image::PCXDecoder pcx;
if (!pcx.loadStream(str))
error("Error while reading PCX image");
@@ -832,7 +833,7 @@ void Display::decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dst
void Display::decodeIFF(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase) {
Common::MemoryReadStream str(src, srcSize);
- ::Graphics::IFFDecoder iff;
+ Image::IFFDecoder iff;
if (!iff.loadStream(str))
error("Error while reading IFF image");
diff --git a/engines/queen/display.h b/engines/queen/display.h
index 8a8aaef5a6..7261d05b07 100644
--- a/engines/queen/display.h
+++ b/engines/queen/display.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/graphics.cpp b/engines/queen/graphics.cpp
index 70f7d7c94b..87236447e8 100644
--- a/engines/queen/graphics.cpp
+++ b/engines/queen/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -522,7 +522,7 @@ void Graphics::setBobText(const BobSlot *pbs, const char *text, int textX, int t
// Calc text position
- short x, y, width, height;
+ short x, y, width;
if (flags) {
if (flags == 2)
@@ -540,7 +540,7 @@ void Graphics::setBobText(const BobSlot *pbs, const char *text, int textX, int t
BobFrame *pbf = _vm->bankMan()->fetchFrame(pbs->frameNum);
width = (pbf->width * pbs->scale) / 100;
- height = (pbf->height * pbs->scale) / 100;
+ short height = (pbf->height * pbs->scale) / 100;
y = y - height - 16 - lineCount * 9;
}
diff --git a/engines/queen/graphics.h b/engines/queen/graphics.h
index 9c719ba22c..2035b170d3 100644
--- a/engines/queen/graphics.h
+++ b/engines/queen/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/grid.cpp b/engines/queen/grid.cpp
index 82b98c0150..467f341c0b 100644
--- a/engines/queen/grid.cpp
+++ b/engines/queen/grid.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/grid.h b/engines/queen/grid.h
index f905e3f4fe..2e60c62b59 100644
--- a/engines/queen/grid.h
+++ b/engines/queen/grid.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/input.cpp b/engines/queen/input.cpp
index dd10e7ad46..1cce9ad6d1 100644
--- a/engines/queen/input.cpp
+++ b/engines/queen/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/input.h b/engines/queen/input.h
index f04ecb24f7..87f6b20e71 100644
--- a/engines/queen/input.h
+++ b/engines/queen/input.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp
index 474f72eca5..db80775fc7 100644
--- a/engines/queen/journal.cpp
+++ b/engines/queen/journal.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/journal.h b/engines/queen/journal.h
index a9b9ccb2b8..57907f0ff1 100644
--- a/engines/queen/journal.h
+++ b/engines/queen/journal.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/logic.cpp b/engines/queen/logic.cpp
index ea13e5973e..d48bb8a498 100644
--- a/engines/queen/logic.cpp
+++ b/engines/queen/logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/logic.h b/engines/queen/logic.h
index 608c19e71e..d597942257 100644
--- a/engines/queen/logic.h
+++ b/engines/queen/logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/midiadlib.cpp b/engines/queen/midiadlib.cpp
index 83853cba92..25175c21d7 100644
--- a/engines/queen/midiadlib.cpp
+++ b/engines/queen/midiadlib.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/module.mk b/engines/queen/module.mk
index 5e0602cae7..8ba49a301d 100644
--- a/engines/queen/module.mk
+++ b/engines/queen/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS := \
credits.o \
cutaway.o \
debug.o \
+ detection.o \
display.o \
graphics.o \
grid.o \
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index 2835954003..93d6527622 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/music.h b/engines/queen/music.h
index ea6affcbe5..b475639f22 100644
--- a/engines/queen/music.h
+++ b/engines/queen/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/musicdata.cpp b/engines/queen/musicdata.cpp
index a046355446..57c28c90f4 100644
--- a/engines/queen/musicdata.cpp
+++ b/engines/queen/musicdata.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 08fc594560..0aea6122ca 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -23,14 +23,12 @@
#include "base/plugins.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
-#include "common/events.h"
#include "common/textconsole.h"
-#include "common/translation.h"
#include "engines/util.h"
@@ -49,177 +47,6 @@
#include "queen/talk.h"
#include "queen/walk.h"
-#include "engines/metaengine.h"
-
-static const PlainGameDescriptor queenGameDescriptor = {
- "queen", "Flight of the Amazon Queen"
-};
-
-static const ExtraGuiOption queenExtraGuiOption = {
- _s("Alternative intro"),
- _s("Use an alternative game intro (CD version only)"),
- "alt_intro",
- false
-};
-
-class QueenMetaEngine : public MetaEngine {
-public:
- virtual const char *getName() const;
- virtual const char *getOriginalCopyright() const;
-
- virtual bool hasFeature(MetaEngineFeature f) const;
- virtual GameList getSupportedGames() const;
- virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
- virtual GameDescriptor findGame(const char *gameid) const;
- virtual GameList detectGames(const Common::FSList &fslist) const;
- virtual SaveStateList listSaves(const char *target) const;
- virtual int getMaximumSaveSlot() const;
- virtual void removeSaveState(const char *target, int slot) const;
-
- virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
-};
-
-const char *QueenMetaEngine::getName() const {
- return "Queen";
-}
-
-const char *QueenMetaEngine::getOriginalCopyright() const {
- return "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis";
-}
-
-bool QueenMetaEngine::hasFeature(MetaEngineFeature f) const {
- return
- (f == kSupportsListSaves) ||
- (f == kSupportsLoadingDuringStartup) ||
- (f == kSupportsDeleteSave);
-}
-
-bool Queen::QueenEngine::hasFeature(EngineFeature f) const {
- return
- (f == kSupportsRTL) ||
- (f == kSupportsLoadingDuringRuntime) ||
- (f == kSupportsSavingDuringRuntime) ||
- (f == kSupportsSubtitleOptions);
-}
-
-GameList QueenMetaEngine::getSupportedGames() const {
- GameList games;
- games.push_back(queenGameDescriptor);
- return games;
-}
-
-int QueenMetaEngine::getMaximumSaveSlot() const { return 99; }
-
-const ExtraGuiOptions QueenMetaEngine::getExtraGuiOptions(const Common::String &target) const {
- Common::String guiOptions;
- ExtraGuiOptions options;
-
- if (target.empty()) {
- options.push_back(queenExtraGuiOption);
- return options;
- }
-
- if (ConfMan.hasKey("guioptions", target)) {
- guiOptions = ConfMan.get("guioptions", target);
- guiOptions = parseGameGUIOptions(guiOptions);
- }
-
- if (!guiOptions.contains(GUIO_NOSPEECH))
- options.push_back(queenExtraGuiOption);
- return options;
-}
-
-GameDescriptor QueenMetaEngine::findGame(const char *gameid) const {
- if (0 == scumm_stricmp(gameid, queenGameDescriptor.gameid)) {
- return queenGameDescriptor;
- }
- return GameDescriptor();
-}
-
-GameList QueenMetaEngine::detectGames(const Common::FSList &fslist) const {
- GameList detectedGames;
-
- // Iterate over all files in the given directory
- for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- if (file->isDirectory()) {
- continue;
- }
- if (file->getName().equalsIgnoreCase("queen.1") || file->getName().equalsIgnoreCase("queen.1c")) {
- Common::File dataFile;
- if (!dataFile.open(*file)) {
- continue;
- }
- Queen::DetectedGameVersion version;
- if (Queen::Resource::detectVersion(&version, &dataFile)) {
- GameDescriptor dg(queenGameDescriptor.gameid, queenGameDescriptor.description, version.language, version.platform);
- if (version.features & Queen::GF_DEMO) {
- dg.updateDesc("Demo");
- dg.setGUIOptions(GUIO_NOSPEECH);
- } else if (version.features & Queen::GF_INTERVIEW) {
- dg.updateDesc("Interview");
- dg.setGUIOptions(GUIO_NOSPEECH);
- } else if (version.features & Queen::GF_FLOPPY) {
- dg.updateDesc("Floppy");
- dg.setGUIOptions(GUIO_NOSPEECH);
- } else if (version.features & Queen::GF_TALKIE) {
- dg.updateDesc("Talkie");
- }
- detectedGames.push_back(dg);
- break;
- }
- }
- }
- return detectedGames;
-}
-
-SaveStateList QueenMetaEngine::listSaves(const char *target) const {
- Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringArray filenames;
- char saveDesc[32];
- Common::String pattern("queen.s??");
-
- filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
-
- SaveStateList saveList;
- for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
- // Obtain the last 2 digits of the filename, since they correspond to the save slot
- int slotNum = atoi(file->c_str() + file->size() - 2);
-
- if (slotNum >= 0 && slotNum <= 99) {
- Common::InSaveFile *in = saveFileMan->openForLoading(*file);
- if (in) {
- for (int i = 0; i < 4; i++)
- in->readUint32BE();
- in->read(saveDesc, 32);
- saveList.push_back(SaveStateDescriptor(slotNum, saveDesc));
- delete in;
- }
- }
- }
-
- return saveList;
-}
-
-void QueenMetaEngine::removeSaveState(const char *target, int slot) const {
- Common::String filename = target;
- filename += Common::String::format(".s%02d", slot);
-
- g_system->getSavefileManager()->removeSavefile(filename);
-}
-
-Common::Error QueenMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
- assert(engine);
- *engine = new Queen::QueenEngine(syst);
- return Common::kNoError;
-}
-
-#if PLUGIN_ENABLED_DYNAMIC(QUEEN)
- REGISTER_PLUGIN_DYNAMIC(QUEEN, PLUGIN_TYPE_ENGINE, QueenMetaEngine);
-#else
- REGISTER_PLUGIN_STATIC(QUEEN, PLUGIN_TYPE_ENGINE, QueenMetaEngine);
-#endif
-
namespace Queen {
QueenEngine::QueenEngine(OSystem *syst)
@@ -488,6 +315,14 @@ GUI::Debugger *QueenEngine::getDebugger() {
return _debugger;
}
+bool Queen::QueenEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsRTL) ||
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime) ||
+ (f == kSupportsSubtitleOptions);
+}
+
Common::Error QueenEngine::run() {
initGraphics(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT, false);
diff --git a/engines/queen/queen.h b/engines/queen/queen.h
index a8b0e9f6ed..c00e1b3a70 100644
--- a/engines/queen/queen.h
+++ b/engines/queen/queen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp
index 6a55929d65..714b3cef39 100644
--- a/engines/queen/resource.cpp
+++ b/engines/queen/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/resource.h b/engines/queen/resource.h
index 7317ec5134..e090dabbd3 100644
--- a/engines/queen/resource.h
+++ b/engines/queen/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/restables.cpp b/engines/queen/restables.cpp
index bc828164b0..55e13b2135 100644
--- a/engines/queen/restables.cpp
+++ b/engines/queen/restables.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index 6731a51e04..63e24454c1 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/sound.h b/engines/queen/sound.h
index 6a5dfc2c28..d06d93b9e1 100644
--- a/engines/queen/sound.h
+++ b/engines/queen/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/state.cpp b/engines/queen/state.cpp
index a07e68045b..09d2ccca47 100644
--- a/engines/queen/state.cpp
+++ b/engines/queen/state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/state.h b/engines/queen/state.h
index 1a6725c800..786434156b 100644
--- a/engines/queen/state.h
+++ b/engines/queen/state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/structs.h b/engines/queen/structs.h
index 6dd98fa1f5..4f413d8c6d 100644
--- a/engines/queen/structs.h
+++ b/engines/queen/structs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index 1531510ba4..1b9d72babc 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1252,7 +1252,6 @@ int16 Talk::selectSentence() {
_vm->input()->clearKeyVerb();
if (sentenceCount > 0) {
- int zone = 0;
int oldZone = 0;
while (0 == selectedSentence) {
@@ -1263,7 +1262,7 @@ int16 Talk::selectSentence() {
_vm->update();
Common::Point mouse = _vm->input()->getMousePos();
- zone = _vm->grid()->findZoneForPos(GS_PANEL, mouse.x, mouse.y);
+ int zone = _vm->grid()->findZoneForPos(GS_PANEL, mouse.x, mouse.y);
int mouseButton = _vm->input()->mouseButton();
_vm->input()->clearMouseButton();
diff --git a/engines/queen/talk.h b/engines/queen/talk.h
index cba77cc255..4dcf5ba52c 100644
--- a/engines/queen/talk.h
+++ b/engines/queen/talk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/walk.cpp b/engines/queen/walk.cpp
index b5c9b97ce0..dd7e46c765 100644
--- a/engines/queen/walk.cpp
+++ b/engines/queen/walk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/queen/walk.h b/engines/queen/walk.h
index e5257b7afa..ce72607cbf 100644
--- a/engines/queen/walk.h
+++ b/engines/queen/walk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 0548da9ee5..d8b115f9bd 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index d9d4b70168..b8a5436d76 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/actor_path.cpp b/engines/saga/actor_path.cpp
index d0f1cf2b5b..7cf834ded1 100644
--- a/engines/saga/actor_path.cpp
+++ b/engines/saga/actor_path.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index ea33a0950d..a5345261c5 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index df8283b4c2..9e0bcf52ad 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/animation.h b/engines/saga/animation.h
index 2c42cb7253..dbb3117ba2 100644
--- a/engines/saga/animation.h
+++ b/engines/saga/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index 771925a321..eab615b33f 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/console.h b/engines/saga/console.h
index b93638467b..625e6f57ad 100644
--- a/engines/saga/console.h
+++ b/engines/saga/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index f6872c41ad..8487811398 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 30cb13a031..72187a1a13 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/displayinfo.h b/engines/saga/displayinfo.h
index 70c36bafd5..a0cdf5733b 100644
--- a/engines/saga/displayinfo.h
+++ b/engines/saga/displayinfo.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index c5842f4998..013b019c9f 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/events.h b/engines/saga/events.h
index 581abe17b0..6c423abb8c 100644
--- a/engines/saga/events.h
+++ b/engines/saga/events.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp
index 8c3f4d7c42..73d42598cb 100644
--- a/engines/saga/font.cpp
+++ b/engines/saga/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/font.h b/engines/saga/font.h
index a45299ad48..e46468e816 100644
--- a/engines/saga/font.h
+++ b/engines/saga/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/font_map.cpp b/engines/saga/font_map.cpp
index 936c8e779c..145956f25f 100644
--- a/engines/saga/font_map.cpp
+++ b/engines/saga/font_map.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index 62250a0820..ceb86ebb18 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h
index c68160e907..ef2c2bde43 100644
--- a/engines/saga/gfx.h
+++ b/engines/saga/gfx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/image.cpp b/engines/saga/image.cpp
index 3434d46b42..31a38623f8 100644
--- a/engines/saga/image.cpp
+++ b/engines/saga/image.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/input.cpp b/engines/saga/input.cpp
index 8576a3e536..cf30c5fc38 100644
--- a/engines/saga/input.cpp
+++ b/engines/saga/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index b105e34487..680b2274f5 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/interface.h b/engines/saga/interface.h
index 84533705fe..340a0e9180 100644
--- a/engines/saga/interface.h
+++ b/engines/saga/interface.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp
index 7922d56425..fc28d2372f 100644
--- a/engines/saga/introproc_ihnm.cpp
+++ b/engines/saga/introproc_ihnm.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp
index ed53e078a0..91b1d3db95 100644
--- a/engines/saga/introproc_ite.cpp
+++ b/engines/saga/introproc_ite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index e61dfbf161..710236b0c4 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index 945b4ad5a7..77680178c1 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/isomap.h b/engines/saga/isomap.h
index b35f79b1af..155d9b8d24 100644
--- a/engines/saga/isomap.h
+++ b/engines/saga/isomap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/itedata.cpp b/engines/saga/itedata.cpp
index 44aa48ccee..87b71c2cb7 100644
--- a/engines/saga/itedata.cpp
+++ b/engines/saga/itedata.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/itedata.h b/engines/saga/itedata.h
index 73f0a2aa21..d27b84781f 100644
--- a/engines/saga/itedata.h
+++ b/engines/saga/itedata.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 3ac89bc2c2..e444900967 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 081fab21f6..ba44c3ca71 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/objectmap.cpp b/engines/saga/objectmap.cpp
index b300a247e9..f27c888a61 100644
--- a/engines/saga/objectmap.cpp
+++ b/engines/saga/objectmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/objectmap.h b/engines/saga/objectmap.h
index 3f71c8f95d..7f00fc390a 100644
--- a/engines/saga/objectmap.h
+++ b/engines/saga/objectmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/palanim.cpp b/engines/saga/palanim.cpp
index 021a4c9bac..b5178a3d75 100644
--- a/engines/saga/palanim.cpp
+++ b/engines/saga/palanim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/palanim.h b/engines/saga/palanim.h
index 920cbec65a..a6ec4674cf 100644
--- a/engines/saga/palanim.h
+++ b/engines/saga/palanim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 63d9a88fee..705834f1b7 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/puzzle.h b/engines/saga/puzzle.h
index 0f9bd8aeff..2a6a8cf4ed 100644
--- a/engines/saga/puzzle.h
+++ b/engines/saga/puzzle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp
index a9ef23381e..1f23a388d0 100644
--- a/engines/saga/render.cpp
+++ b/engines/saga/render.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/render.h b/engines/saga/render.h
index 5694bacb35..4aaaf61eb4 100644
--- a/engines/saga/render.h
+++ b/engines/saga/render.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 8025a949d4..cdf674dc66 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/resource.h b/engines/saga/resource.h
index a8e2e92361..252e92c967 100644
--- a/engines/saga/resource.h
+++ b/engines/saga/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/resource_hrs.cpp b/engines/saga/resource_hrs.cpp
index ac16e21c12..09da9cf0bb 100644
--- a/engines/saga/resource_hrs.cpp
+++ b/engines/saga/resource_hrs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/resource_res.cpp b/engines/saga/resource_res.cpp
index 4fec9da662..d57238b2eb 100644
--- a/engines/saga/resource_res.cpp
+++ b/engines/saga/resource_res.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/resource_rsc.cpp b/engines/saga/resource_rsc.cpp
index bc66e9e30a..aaec90e655 100644
--- a/engines/saga/resource_rsc.cpp
+++ b/engines/saga/resource_rsc.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 239a3be9db..b15d161ba3 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 645e1c30d0..6077e55094 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 9784cf4e33..90ba62070b 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index eff31cf98b..7f77cbab38 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -43,7 +43,7 @@
#include "common/util.h"
-#include "graphics/decoders/iff.h"
+#include "image/iff.h"
namespace Saga {
@@ -463,7 +463,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
_vm->_interface->setMode(kPanelSceneSubstitute);
if (file.open(sceneSubstitutes[i].image)) {
- Graphics::IFFDecoder decoder;
+ Image::IFFDecoder decoder;
decoder.loadStream(file);
pal = decoder.getPalette();
rect.setWidth(decoder.getSurface()->w);
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index 6e2cb12380..0a3b98b33f 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 3efc554cb3..94b26c8da3 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/script.h b/engines/saga/script.h
index c4ea2d62b3..dd080fbe24 100644
--- a/engines/saga/script.h
+++ b/engines/saga/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index c623349b7a..91e39c54b6 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sfuncs_ihnm.cpp b/engines/saga/sfuncs_ihnm.cpp
index fdfd0fdf2c..6957360942 100644
--- a/engines/saga/sfuncs_ihnm.cpp
+++ b/engines/saga/sfuncs_ihnm.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 619ffc243e..426430c892 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/shorten.h b/engines/saga/shorten.h
index 77feafa54d..556abaf311 100644
--- a/engines/saga/shorten.h
+++ b/engines/saga/shorten.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index ca843af465..39578e96f0 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sndres.h b/engines/saga/sndres.h
index 979c0288f6..554eed4a27 100644
--- a/engines/saga/sndres.h
+++ b/engines/saga/sndres.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 67be499bc7..0eb6f8a82a 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sound.h b/engines/saga/sound.h
index e2163dfb0e..fa59538bbc 100644
--- a/engines/saga/sound.h
+++ b/engines/saga/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp
index bf550659e9..ae8ee9cd54 100644
--- a/engines/saga/sprite.cpp
+++ b/engines/saga/sprite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sprite.h b/engines/saga/sprite.h
index 0375d8c63f..525958006d 100644
--- a/engines/saga/sprite.h
+++ b/engines/saga/sprite.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp
index 6e5cc68ae6..dde266bb0b 100644
--- a/engines/saga/sthread.cpp
+++ b/engines/saga/sthread.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index 260c7cd3ff..186d7bc5f2 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/savestate.h b/engines/savestate.h
index c233554657..970e01485d 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index e7cbde6cbb..1bc0dd067c 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/console.h b/engines/sci/console.h
index 37cf35a471..c8e99f78f7 100644
--- a/engines/sci/console.h
+++ b/engines/sci/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/debug.h b/engines/sci/debug.h
index 765ceca07d..4fcb757c10 100644
--- a/engines/sci/debug.h
+++ b/engines/sci/debug.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp
index 306825008d..e65ff148de 100644
--- a/engines/sci/decompressor.cpp
+++ b/engines/sci/decompressor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/decompressor.h b/engines/sci/decompressor.h
index 5753026709..dab35fa41c 100644
--- a/engines/sci/decompressor.h
+++ b/engines/sci/decompressor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 883a4d965b..4f28738508 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 85d01ca380..e97db04a8f 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index c26c787fbd..31e7ca4931 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index f6bb0b5759..a4d715fee0 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index 3dc042389e..2ba7d15ac0 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h
index 1c8e302d15..052eb735e9 100644
--- a/engines/sci/engine/file.h
+++ b/engines/sci/engine/file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp
index 9a30ff3e17..70c8c52bf0 100644
--- a/engines/sci/engine/gc.cpp
+++ b/engines/sci/engine/gc.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/gc.h b/engines/sci/engine/gc.h
index 9e02bbd0bd..fbaad14b00 100644
--- a/engines/sci/engine/gc.h
+++ b/engines/sci/engine/gc.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 12746e17d6..2b16bb3d99 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 69c3a6d0c9..dddf845222 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 39244bd760..8a9c1426b6 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -431,7 +431,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(RestartGame), SIG_EVERYWHERE, "", NULL, NULL },
{ MAP_CALL(RestoreGame), SIG_EVERYWHERE, "[r0]i[r0]", NULL, NULL },
{ MAP_CALL(Said), SIG_EVERYWHERE, "[r0]", NULL, NULL },
- { MAP_CALL(SaveGame), SIG_EVERYWHERE, "[r0]i[r0](r)", NULL, NULL },
+ { MAP_CALL(SaveGame), SIG_EVERYWHERE, "[r0]i[r0](r0)", NULL, NULL },
{ MAP_CALL(ScriptID), SIG_EVERYWHERE, "[io](i)", NULL, NULL },
{ MAP_CALL(SetCursor), SIG_SCI21, SIGFOR_ALL, "i(i)([io])(i*)", NULL, NULL },
// TODO: SCI2.1 may supply an object optionally (mother goose sci21 right on startup) - find out why
@@ -454,7 +454,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(StrAt), SIG_EVERYWHERE, "ri(i)", NULL, kStrAt_workarounds },
{ MAP_CALL(StrCat), SIG_EVERYWHERE, "rr", NULL, NULL },
{ MAP_CALL(StrCmp), SIG_EVERYWHERE, "rr(i)", NULL, NULL },
- { MAP_CALL(StrCpy), SIG_EVERYWHERE, "r[r0](i)", NULL, NULL },
+ { MAP_CALL(StrCpy), SIG_EVERYWHERE, "r[r0](i)", NULL, kStrCpy_workarounds },
{ MAP_CALL(StrEnd), SIG_EVERYWHERE, "r", NULL, NULL },
{ MAP_CALL(StrLen), SIG_EVERYWHERE, "[r0]", NULL, kStrLen_workarounds },
{ MAP_CALL(StrSplit), SIG_EVERYWHERE, "rr[r0]", NULL, NULL },
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 11ef18c0c2..59f741a254 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index b940eca6f5..65acdbcdf5 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -37,6 +37,7 @@
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/engine/savegame.h"
+#include "sci/sound/audio.h"
#include "sci/console.h"
namespace Sci {
@@ -494,6 +495,21 @@ reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) {
Common::String str = s->_segMan->getString(argv[1]);
debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle);
+ // Handle sciAudio calls in fanmade games here. sciAudio is an
+ // external .NET library for playing MP3 files in fanmade games.
+ // It runs in the background, and obtains sound commands from the
+ // currently running game via text files (called "conductor files").
+ // We skip creating these files, and instead handle the calls
+ // directly. Since the sciAudio calls are only creating text files,
+ // this is probably the most straightforward place to handle them.
+ if (handle == 0xFFFF && str.hasPrefix("(sciAudio")) {
+ Common::List<ExecStack>::const_iterator iter = s->_executionStack.reverse_begin();
+ iter--; // sciAudio
+ iter--; // sciAudio child
+ g_sci->_audio->handleFanmadeSciAudio(iter->sendp, s->_segMan);
+ return NULL_REG;
+ }
+
#ifdef ENABLE_SCI32
if (handle == VIRTUALFILE_HANDLE) {
s->_virtualIndexFile->write(str.c_str(), str.size());
@@ -743,11 +759,11 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
savegameId = dialog->runModalWithCurrentTarget();
game_description = dialog->getResultString();
if (game_description.empty()) {
- // create our own description for the saved game, the user didnt enter it
+ // create our own description for the saved game, the user didn't enter it
game_description = dialog->createDefaultSaveDescription(savegameId);
}
delete dialog;
- g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save)
+ g_sci->_soundCmd->pauseAll(false); // unpause music (we can't have it paused during save)
if (savegameId < 0)
return NULL_REG;
@@ -849,8 +865,6 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
}
// don't adjust ID of the saved game, it's already correct
} else {
- if (argv[2].isNull())
- error("kRestoreGame: called with parameter 2 being NULL");
if (g_sci->getGameId() == GID_JONES) {
// Jones has one save slot only
savegameId = 0;
@@ -879,7 +893,6 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
in = saveFileMan->openForLoading(filename);
if (in) {
// found a savegame file
-
gamestate_restore(s, in);
delete in;
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 79ab2d138b..c2089bcd4d 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index cd735d1233..8953f45266 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -142,7 +142,15 @@ reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv) {
uint16 y = argv[1].toUint16();
reg_t targetObject = argv[2];
uint16 illegalBits = argv[3].getOffset();
- Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(targetObject, true);
+ Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(targetObject);
+
+ uint16 itemX = readSelectorValue(s->_segMan, targetObject, SELECTOR(x));
+ uint16 itemY = readSelectorValue(s->_segMan, targetObject, SELECTOR(y));
+ // If top and left are negative, we need to adjust coordinates by the item's x and y
+ if (nsRect.left < 0)
+ nsRect.translate(itemX, 0);
+ if (nsRect.top < 0)
+ nsRect.translate(0, itemY);
// we assume that x, y are local coordinates
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 7e6c112b9f..66590da23f 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index b2aaa01b45..15bc24e0e3 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp
index 05ba7005d7..8dca7f74df 100644
--- a/engines/sci/engine/kmenu.cpp
+++ b/engines/sci/engine/kmenu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 8b7fc4ffec..e3a354e222 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 649a1428a0..51d49eea9f 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp
index 5e861daaa4..aa89b963cc 100644
--- a/engines/sci/engine/kparse.cpp
+++ b/engines/sci/engine/kparse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 3c223bebbe..940bd38adb 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index 2c115be500..5c271780dd 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 2879b7f45d..6a1708d21a 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index d72b1d1772..56dad583e4 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 3964ccc1f8..319469cb08 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index 8c5741f8b0..640175b20a 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index 5bead82efe..ff76534d2d 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp
index 6f219b388e..eeff45163d 100644
--- a/engines/sci/engine/object.cpp
+++ b/engines/sci/engine/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 1ea9ae449a..00fe7c6875 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index ce9a672572..cdcdcc41e5 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -860,16 +860,13 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
return;
}
- if ((meta.version < MINIMUM_SAVEGAME_VERSION) ||
- (meta.version > CURRENT_SAVEGAME_VERSION)) {
- /*
- if (meta.version < MINIMUM_SAVEGAME_VERSION)
- warning("Old savegame version detected, unable to load it");
- else
- warning("Savegame version is %d, maximum supported is %0d", meta.version, CURRENT_SAVEGAME_VERSION);
- */
-
- showScummVMDialog("The format of this saved game is obsolete, unable to load it");
+ if ((meta.version < MINIMUM_SAVEGAME_VERSION) || (meta.version > CURRENT_SAVEGAME_VERSION)) {
+ if (meta.version < MINIMUM_SAVEGAME_VERSION) {
+ showScummVMDialog("The format of this saved game is obsolete, unable to load it");
+ } else {
+ Common::String msg = Common::String::format("Savegame version is %d, maximum supported is %0d", meta.version, CURRENT_SAVEGAME_VERSION);
+ showScummVMDialog(msg);
+ }
s->r_acc = TRUE_REG; // signal failure
return;
@@ -878,8 +875,6 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
if (meta.gameObjectOffset > 0 && meta.script0Size > 0) {
Resource *script0 = g_sci->getResMan()->findResource(ResourceId(kResourceTypeScript, 0), false);
if (script0->size != meta.script0Size || g_sci->getGameObject().getOffset() != meta.gameObjectOffset) {
- //warning("This saved game was created with a different version of the game, unable to load it");
-
showScummVMDialog("This saved game was created with a different version of the game, unable to load it");
s->r_acc = TRUE_REG; // signal failure
diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h
index f1f02f89f2..8f2835654b 100644
--- a/engines/sci/engine/savegame.h
+++ b/engines/sci/engine/savegame.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index c661a00185..2fe1aba975 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index 9e016156b8..46d6ace917 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 8f05cc1453..b4d245197b 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2668,8 +2668,8 @@ void ScriptPatcher::initSignature(const SciScriptPatcherEntry *patchTable, bool
uint16 curWord;
uint16 curCommand;
uint32 curValue;
- byte byte1;
- byte byte2;
+ byte byte1 = 0;
+ byte byte2 = 0;
int patchEntryCount = 0;
// Count entries and allocate runtime data
diff --git a/engines/sci/engine/script_patches.h b/engines/sci/engine/script_patches.h
index 9e572f33fa..0b35792949 100644
--- a/engines/sci/engine/script_patches.h
+++ b/engines/sci/engine/script_patches.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 277437109c..44910058ef 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -737,37 +737,39 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke
case SIG_TYPE_REFERENCE:
{
SegmentObj *mobj = s->_segMan->getSegmentObj(argv[parmNr].getSegment());
- switch (mobj->getType()) {
- case SEG_TYPE_HUNK:
- {
- HunkTable *ht = (HunkTable *)mobj;
- int index = argv[parmNr].getOffset();
- if (ht->isValidEntry(index)) {
- // NOTE: This ", deleted" isn't as useful as it could
- // be because it prints the status _after_ the kernel
- // call.
- debugN(" ('%s' hunk%s)", ht->_table[index].type, ht->_table[index].mem ? "" : ", deleted");
- } else
- debugN(" (INVALID hunk ref)");
- break;
- }
- default:
- // TODO: Any other segment types which could
- // use special handling?
-
- if (kernelCall->function == kSaid) {
- SegmentRef saidSpec = s->_segMan->dereference(argv[parmNr]);
- if (saidSpec.isRaw) {
- debugN(" ('");
- g_sci->getVocabulary()->debugDecipherSaidBlock(saidSpec.raw);
- debugN("')");
+ if (mobj) {
+ switch (mobj->getType()) {
+ case SEG_TYPE_HUNK:
+ {
+ HunkTable *ht = (HunkTable *)mobj;
+ int index = argv[parmNr].getOffset();
+ if (ht->isValidEntry(index)) {
+ // NOTE: This ", deleted" isn't as useful as it could
+ // be because it prints the status _after_ the kernel
+ // call.
+ debugN(" ('%s' hunk%s)", ht->_table[index].type, ht->_table[index].mem ? "" : ", deleted");
+ } else
+ debugN(" (INVALID hunk ref)");
+ break;
+ }
+ default:
+ // TODO: Any other segment types which could
+ // use special handling?
+
+ if (kernelCall->function == kSaid) {
+ SegmentRef saidSpec = s->_segMan->dereference(argv[parmNr]);
+ if (saidSpec.isRaw) {
+ debugN(" ('");
+ g_sci->getVocabulary()->debugDecipherSaidBlock(saidSpec.raw);
+ debugN("')");
+ } else {
+ debugN(" (non-raw said-spec)");
+ }
} else {
- debugN(" (non-raw said-spec)");
+ debugN(" ('%s')", s->_segMan->getString(argv[parmNr]).c_str());
}
- } else {
- debugN(" ('%s')", s->_segMan->getString(argv[parmNr]).c_str());
+ break;
}
- break;
}
}
default:
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 161a4f5c79..3738fd3dcb 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index b587f4991a..2d6e624f6f 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index a7f147a15a..bb90698e6a 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index 0d54b651e1..de7f60ac16 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 2f6b4d58dd..910f1f885f 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h
index 5d3d0752ac..b3dd393708 100644
--- a/engines/sci/engine/selector.h
+++ b/engines/sci/engine/selector.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 0f0c8dcd66..7701822f6d 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -252,7 +252,7 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu
}
}
- if (seeker)
+ if (*seeker)
return Common::String(str.c_str(), seeker - str.c_str());
else
return str;
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 25110ce0ca..ecc8cb7dfe 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp
index 74d2851024..188da3d5a2 100644
--- a/engines/sci/engine/static_selectors.cpp
+++ b/engines/sci/engine/static_selectors.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index d7c2fdc0eb..06858540ec 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 8b38faa013..cf65803929 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp
index 5327dd1a2e..65a82832cc 100644
--- a/engines/sci/engine/vm_types.cpp
+++ b/engines/sci/engine/vm_types.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,6 +28,43 @@
namespace Sci {
+SegmentId reg_t::getSegment() const {
+ if (getSciVersion() <= SCI_VERSION_2_1) {
+ return _segment;
+ } else {
+ // Return the lower 14 bits of the segment
+ return (_segment & 0x3FFF);
+ }
+}
+
+void reg_t::setSegment(SegmentId segment) {
+ if (getSciVersion() <= SCI_VERSION_2_1) {
+ _segment = segment;
+ } else {
+ // Set the lower 14 bits of the segment, and preserve the upper 2 ones for the offset
+ _segment = (_segment & 0xC000) | (segment & 0x3FFF);
+ }
+}
+
+uint32 reg_t::getOffset() const {
+ if (getSciVersion() <= SCI_VERSION_2_1) {
+ return _offset;
+ } else {
+ // Return the lower 16 bits from the offset, and the 17th and 18th bits from the segment
+ return ((_segment & 0xC000) << 2) | _offset;
+ }
+}
+
+void reg_t::setOffset(uint32 offset) {
+ if (getSciVersion() <= SCI_VERSION_2_1) {
+ _offset = offset;
+ } else {
+ // Store the lower 16 bits in the offset, and the 17th and 18th bits in the segment
+ _offset = offset & 0xFFFF;
+ _segment = ((offset & 0x30000) >> 2) | (_segment & 0x3FFF);
+ }
+}
+
reg_t reg_t::lookForWorkaround(const reg_t right, const char *operation) const {
SciTrackOriginReply originReply;
SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, arithmeticWorkarounds, &originReply);
diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h
index 22bd8beaa1..af78bd0b84 100644
--- a/engines/sci/engine/vm_types.h
+++ b/engines/sci/engine/vm_types.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -35,36 +35,25 @@ struct reg_t {
SegmentId _segment;
uint16 _offset;
- inline SegmentId getSegment() const {
- return _segment;
- }
-
- inline void setSegment(SegmentId segment) {
- _segment = segment;
- }
-
- inline uint16 getOffset() const {
- return _offset;
- }
-
- inline void setOffset(uint16 offset) {
- _offset = offset;
- }
+ SegmentId getSegment() const;
+ void setSegment(SegmentId segment);
+ uint32 getOffset() const;
+ void setOffset(uint32 offset);
inline void incOffset(int16 offset) {
setOffset(getOffset() + offset);
}
inline bool isNull() const {
- return (_offset | getSegment()) == 0;
+ return (getOffset() | getSegment()) == 0;
}
inline uint16 toUint16() const {
- return _offset;
+ return (uint16)getOffset();
}
inline int16 toSint16() const {
- return (int16)_offset;
+ return (int16)getOffset();
}
bool isNumber() const {
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 4b8500bbcb..6ef98e3b2a 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -411,6 +411,11 @@ const SciWorkaroundEntry kStrAt_workarounds[] = {
SCI_WORKAROUNDENTRY_TERMINATOR
};
+const SciWorkaroundEntry kStrCpy_workarounds[] = {
+ { GID_MOTHERGOOSE, 23, 23, 0, "talkScript", "changeState", -1, 0, { WORKAROUND_FAKE, 0 } }, // when talking to the girl in scene 23, there's no destination parameter (script bug - wrong instruction order). The original source is used directly afterwards in kDisplay, to show the girl's text - bug #6485
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kStrLen_workarounds[] = {
{ GID_QFG2, 210, 2, 0, "", "export 21", 0xdeb, 0, { WORKAROUND_FAKE, 0 } }, // When saying something incorrect at the WIT, an integer is passed instead of a reference - bug #5489
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index d5e91b70ec..2e73dddbe3 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -93,6 +93,7 @@ extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[];
extern const SciWorkaroundEntry kSetCursor_workarounds[];
extern const SciWorkaroundEntry kSetPort_workarounds[];
extern const SciWorkaroundEntry kStrAt_workarounds[];
+extern const SciWorkaroundEntry kStrCpy_workarounds[];
extern const SciWorkaroundEntry kStrLen_workarounds[];
extern const SciWorkaroundEntry kUnLoad_workarounds[];
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 7318fe2f68..511d2014bd 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/event.h b/engines/sci/event.h
index 930001160a..82e93a9373 100644
--- a/engines/sci/event.h
+++ b/engines/sci/event.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 53715613fc..73cd7240d3 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h
index 52da7d6ec6..6c1822c903 100644
--- a/engines/sci/graphics/animate.h
+++ b/engines/sci/graphics/animate.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/cache.cpp b/engines/sci/graphics/cache.cpp
index 55f8624c49..59af8334eb 100644
--- a/engines/sci/graphics/cache.cpp
+++ b/engines/sci/graphics/cache.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/cache.h b/engines/sci/graphics/cache.h
index 2f462fe042..33fa4fe399 100644
--- a/engines/sci/graphics/cache.h
+++ b/engines/sci/graphics/cache.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp
index b42063b119..3c2285a470 100644
--- a/engines/sci/graphics/compare.cpp
+++ b/engines/sci/graphics/compare.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -241,21 +241,13 @@ void GfxCompare::kernelBaseSetter(reg_t object) {
}
}
-Common::Rect GfxCompare::getNSRect(reg_t object, bool fixRect) {
+Common::Rect GfxCompare::getNSRect(reg_t object) {
Common::Rect nsRect;
nsRect.top = readSelectorValue(_segMan, object, SELECTOR(nsTop));
nsRect.left = readSelectorValue(_segMan, object, SELECTOR(nsLeft));
nsRect.bottom = readSelectorValue(_segMan, object, SELECTOR(nsBottom));
nsRect.right = readSelectorValue(_segMan, object, SELECTOR(nsRight));
- if (fixRect) {
- // nsRect top/left may be negative, adjust accordingly
- if (nsRect.top < 0)
- nsRect.top = 0;
- if (nsRect.left < 0)
- nsRect.left = 0;
- }
-
return nsRect;
}
diff --git a/engines/sci/graphics/compare.h b/engines/sci/graphics/compare.h
index 0080406a3b..88b44aeeb1 100644
--- a/engines/sci/graphics/compare.h
+++ b/engines/sci/graphics/compare.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -42,7 +42,7 @@ public:
reg_t kernelCanBeHere(reg_t curObject, reg_t listReference);
bool kernelIsItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Point position);
void kernelBaseSetter(reg_t object);
- Common::Rect getNSRect(reg_t object, bool fixRect = false);
+ Common::Rect getNSRect(reg_t object);
void setNSRect(reg_t object, Common::Rect nsRect);
private:
diff --git a/engines/sci/graphics/controls16.cpp b/engines/sci/graphics/controls16.cpp
index 0098f7b9ef..f2b2ccdfe6 100644
--- a/engines/sci/graphics/controls16.cpp
+++ b/engines/sci/graphics/controls16.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/controls16.h b/engines/sci/graphics/controls16.h
index 2cde86d4b1..6a70c71aae 100644
--- a/engines/sci/graphics/controls16.h
+++ b/engines/sci/graphics/controls16.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index 5b61e1a86a..90b5cd558c 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/controls32.h b/engines/sci/graphics/controls32.h
index 1b705988c2..5af7c20f16 100644
--- a/engines/sci/graphics/controls32.h
+++ b/engines/sci/graphics/controls32.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/coordadjuster.cpp b/engines/sci/graphics/coordadjuster.cpp
index 1446888cf4..93dff10382 100644
--- a/engines/sci/graphics/coordadjuster.cpp
+++ b/engines/sci/graphics/coordadjuster.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/coordadjuster.h b/engines/sci/graphics/coordadjuster.h
index 25279b34b1..cb0227fbe4 100644
--- a/engines/sci/graphics/coordadjuster.h
+++ b/engines/sci/graphics/coordadjuster.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index a9c741670f..048ec1e9b9 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h
index 369bd22a0b..c2d7998eb3 100644
--- a/engines/sci/graphics/cursor.h
+++ b/engines/sci/graphics/cursor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/font.cpp b/engines/sci/graphics/font.cpp
index 30184cc091..e4684ff134 100644
--- a/engines/sci/graphics/font.cpp
+++ b/engines/sci/graphics/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/font.h b/engines/sci/graphics/font.h
index 8e5c980e2c..58b2ba4813 100644
--- a/engines/sci/graphics/font.h
+++ b/engines/sci/graphics/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/fontsjis.cpp b/engines/sci/graphics/fontsjis.cpp
index ac58c55423..9c942eadd1 100644
--- a/engines/sci/graphics/fontsjis.cpp
+++ b/engines/sci/graphics/fontsjis.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/fontsjis.h b/engines/sci/graphics/fontsjis.h
index ae5eaa43f9..57403ad98e 100644
--- a/engines/sci/graphics/fontsjis.h
+++ b/engines/sci/graphics/fontsjis.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 76510fa53b..ffed7b596e 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 5ef770486f..e0c60f92c1 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h
index 773f83a00e..4889f12bd2 100644
--- a/engines/sci/graphics/helpers.h
+++ b/engines/sci/graphics/helpers.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/maciconbar.cpp b/engines/sci/graphics/maciconbar.cpp
index 4df80b289f..8e2e12b7bd 100644
--- a/engines/sci/graphics/maciconbar.cpp
+++ b/engines/sci/graphics/maciconbar.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -32,7 +32,7 @@
#include "common/memstream.h"
#include "common/system.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pict.h"
+#include "image/pict.h"
namespace Sci {
@@ -201,12 +201,12 @@ void GfxMacIconBar::setInventoryIcon(int16 icon) {
}
Graphics::Surface *GfxMacIconBar::loadPict(ResourceId id) {
- Graphics::PICTDecoder pictDecoder;
Resource *res = g_sci->getResMan()->findResource(id, false);
if (!res || res->size == 0)
return 0;
+ Image::PICTDecoder pictDecoder;
Common::MemoryReadStream stream(res->data, res->size);
if (!pictDecoder.loadStream(stream))
return 0;
diff --git a/engines/sci/graphics/maciconbar.h b/engines/sci/graphics/maciconbar.h
index eca10b804c..86cbc74039 100644
--- a/engines/sci/graphics/maciconbar.h
+++ b/engines/sci/graphics/maciconbar.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index d2416ab4e0..8e8c1d64c2 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/menu.h b/engines/sci/graphics/menu.h
index aa3550da4e..95fd4f6c20 100644
--- a/engines/sci/graphics/menu.h
+++ b/engines/sci/graphics/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/paint.cpp b/engines/sci/graphics/paint.cpp
index 7befa99afe..482b81aff1 100644
--- a/engines/sci/graphics/paint.cpp
+++ b/engines/sci/graphics/paint.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/paint.h b/engines/sci/graphics/paint.h
index 27f7e428b6..b2277131d5 100644
--- a/engines/sci/graphics/paint.h
+++ b/engines/sci/graphics/paint.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index 940a1ac3cf..b835eb92ca 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/paint16.h b/engines/sci/graphics/paint16.h
index e06021c3e7..882f311a5b 100644
--- a/engines/sci/graphics/paint16.h
+++ b/engines/sci/graphics/paint16.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp
index a03e77dfa6..f94c65c76b 100644
--- a/engines/sci/graphics/paint32.cpp
+++ b/engines/sci/graphics/paint32.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/paint32.h b/engines/sci/graphics/paint32.h
index 81e355f77f..e7a3ec256d 100644
--- a/engines/sci/graphics/paint32.h
+++ b/engines/sci/graphics/paint32.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index d8d788b00a..a3624c7959 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index e974781d49..347695deb8 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index caab1d80da..434a490109 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/picture.h b/engines/sci/graphics/picture.h
index 53f83bc09f..2404f99b41 100644
--- a/engines/sci/graphics/picture.h
+++ b/engines/sci/graphics/picture.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index d589ee17f9..488450485d 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/portrait.h b/engines/sci/graphics/portrait.h
index de0dbffb3f..877b253bcf 100644
--- a/engines/sci/graphics/portrait.h
+++ b/engines/sci/graphics/portrait.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index ed0013b491..bd0b5f4081 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h
index 1818eaddb3..51aca09f54 100644
--- a/engines/sci/graphics/ports.h
+++ b/engines/sci/graphics/ports.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 0df163dd7b..15717239d8 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index 01fb899edb..c334638703 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 56e9ea8b69..245d6996cb 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/text16.h b/engines/sci/graphics/text16.h
index 321c7fc25e..ab0cb13a64 100644
--- a/engines/sci/graphics/text16.h
+++ b/engines/sci/graphics/text16.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index f14ae2ef0b..56ce73e8fa 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h
index ce78003fdf..7ba7df50e4 100644
--- a/engines/sci/graphics/text32.h
+++ b/engines/sci/graphics/text32.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp
index b385c2c1db..5e7dbc6c15 100644
--- a/engines/sci/graphics/transitions.cpp
+++ b/engines/sci/graphics/transitions.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/transitions.h b/engines/sci/graphics/transitions.h
index 246f681690..ae9ca4b48a 100644
--- a/engines/sci/graphics/transitions.h
+++ b/engines/sci/graphics/transitions.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 3d72743ff4..f3f352e5b8 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/graphics/view.h b/engines/sci/graphics/view.h
index d3473f1024..d8803db208 100644
--- a/engines/sci/graphics/view.h
+++ b/engines/sci/graphics/view.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp
index 26e3ec9238..ee0125b7c9 100644
--- a/engines/sci/parser/grammar.cpp
+++ b/engines/sci/parser/grammar.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp
index eff4a29f49..693bbec744 100644
--- a/engines/sci/parser/said.cpp
+++ b/engines/sci/parser/said.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index f5b79d6c5e..7c560dfaef 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -724,14 +724,13 @@ int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const c
newPos = parseNodes(i, pos, nextToken, nextValue, argc, argv);
+ if (newPos == -1)
+ return -1;
+
if (j == 0)
_parserNodes[oldPos].left = &_parserNodes[newPos];
else
_parserNodes[oldPos].right = &_parserNodes[newPos];
-
-
- if (newPos == -1)
- return -1;
}
const char *token = argv[(*i)++];
diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h
index e4a7e41b3c..09499946cb 100644
--- a/engines/sci/parser/vocabulary.h
+++ b/engines/sci/parser/vocabulary.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 52155cd09a..17195c14b8 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2264,15 +2264,6 @@ void ResourceManager::detectSciVersion() {
s_sciVersion = SCI_VERSION_1_1;
return;
}
- // FIXME: this is really difficult, lsl1 spanish has map/vol sci1late
- // and the only current detection difference is movecounttype which
- // is increment here, but ignore for all the regular sci1late games
- // the problem is, we dont have access to that detection till later
- // so maybe (part of?) that detection should get moved in here
- if (g_sci && (g_sci->getGameId() == GID_LSL1) && (g_sci->getLanguage() == Common::ES_ESP)) {
- s_sciVersion = SCI_VERSION_1_MIDDLE;
- return;
- }
s_sciVersion = SCI_VERSION_1_LATE;
return;
case kResVersionSci11:
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 6a22f48086..e90f52a3ce 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 8e1568f564..4c7cd9b84a 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/resource_intern.h b/engines/sci/resource_intern.h
index c256c9d156..461d684005 100644
--- a/engines/sci/resource_intern.h
+++ b/engines/sci/resource_intern.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index f32e0e16f9..cf5192e1e6 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -286,6 +286,11 @@ Common::Error SciEngine::run() {
// We set this, so that the game automatically quit right after init
_gamestate->variables[VAR_GLOBAL][4] = TRUE_REG;
+ // Jones only initializes its menus when restarting/restoring, thus set
+ // the gameIsRestarting flag here before initializing. Fixes bug #6536.
+ if (g_sci->getGameId() == GID_JONES)
+ _gamestate->gameIsRestarting = GAMEISRESTARTING_RESTORE;
+
_gamestate->_executionStackPosChanged = false;
run_vm(_gamestate);
@@ -576,7 +581,7 @@ bool SciEngine::initGame() {
// Script 0 should always be at segment 1
if (script0Segment != 1) {
- debug(2, "Failed to instantiate script.000");
+ debug(2, "Failed to instantiate script 0");
return false;
}
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 418f8c5e50..48bc4819d2 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index 8f405b0fa5..8e35d6b055 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -61,6 +61,62 @@ void AudioPlayer::stopAllAudio() {
audioCdStop();
}
+/**
+ * Handles the sciAudio calls in fanmade games.
+ * sciAudio is an external .NET library for playing MP3 files in fanmade games.
+ * It runs in the background, and obtains sound commands from the
+ * currently running game via text files (called "conductor files").
+ * For further info, check: http://sciprogramming.com/community/index.php?topic=634.0
+ */
+void AudioPlayer::handleFanmadeSciAudio(reg_t sciAudioObject, SegManager *segMan) {
+ // TODO: This is a bare bones implementation. Only the play/playx and stop commands
+ // are handled for now - the other commands haven't been observed in any fanmade game
+ // yet. All the volume related and fading functionality is currently missing.
+
+ Kernel *kernel = g_sci->getKernel();
+
+ reg_t commandReg = readSelector(segMan, sciAudioObject, kernel->findSelector("command"));
+ Common::String command = segMan->getString(commandReg);
+
+ if (command == "play" || command == "playx") {
+#ifdef USE_MAD
+ reg_t fileNameReg = readSelector(segMan, sciAudioObject, kernel->findSelector("fileName"));
+ Common::String fileName = segMan->getString(fileNameReg);
+
+ int16 loopCount = (int16)readSelectorValue(segMan, sciAudioObject, kernel->findSelector("loopCount"));
+ // When loopCount is -1, we treat it as infinite looping, else no looping is done.
+ // This is observed by game scripts, which can set loopCount to all sorts of random values.
+ // Adjust loopCount for ScummVM's LoopingAudioStream semantics
+ loopCount = (loopCount == -1) ? 0 : 1;
+
+ // Determine sound type
+ Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType;
+ if (fileName.hasPrefix("music"))
+ soundType = Audio::Mixer::kMusicSoundType;
+ else if (fileName.hasPrefix("speech"))
+ soundType = Audio::Mixer::kSpeechSoundType;
+
+ Common::File *sciAudio = new Common::File();
+ // Replace backwards slashes
+ for (uint i = 0; i < fileName.size(); i++) {
+ if (fileName[i] == '\\')
+ fileName.setChar('/', i);
+ }
+ sciAudio->open("sciAudio/" + fileName);
+
+ Audio::SeekableAudioStream *audioStream = Audio::makeMP3Stream(sciAudio, DisposeAfterUse::YES);
+
+ // We only support one audio handle
+ _mixer->playStream(soundType, &_audioHandle,
+ Audio::makeLoopingAudioStream((Audio::RewindableAudioStream *)audioStream, loopCount));
+#endif
+ } else if (command == "stop") {
+ _mixer->stopHandle(_audioHandle);
+ } else {
+ warning("Unhandled sciAudio command: %s", command.c_str());
+ }
+}
+
int AudioPlayer::startAudio(uint16 module, uint32 number) {
int sampleLen;
Audio::AudioStream *audioStream = getAudioStream(number, module, &sampleLen);
diff --git a/engines/sci/sound/audio.h b/engines/sci/sound/audio.h
index e0ba234b12..9e65d6e0c8 100644
--- a/engines/sci/sound/audio.h
+++ b/engines/sci/sound/audio.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -75,6 +75,8 @@ public:
void pauseAudio();
void resumeAudio();
+ void handleFanmadeSciAudio(reg_t sciAudioObject, SegManager *segMan);
+
void setSoundSync(ResourceId id, reg_t syncObjAddr, SegManager *segMan);
void doSoundSync(reg_t syncObjAddr, SegManager *segMan);
void stopSoundSync();
diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp
index 3229fd7071..fcfda2f532 100644
--- a/engines/sci/sound/drivers/adlib.cpp
+++ b/engines/sci/sound/drivers/adlib.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp
index 131a85f371..5ce49086ca 100644
--- a/engines/sci/sound/drivers/amigamac.cpp
+++ b/engines/sci/sound/drivers/amigamac.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/cms.cpp b/engines/sci/sound/drivers/cms.cpp
index fd60863177..a222090fc8 100644
--- a/engines/sci/sound/drivers/cms.cpp
+++ b/engines/sci/sound/drivers/cms.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/fb01.cpp b/engines/sci/sound/drivers/fb01.cpp
index b16473e62e..db9f7558e2 100644
--- a/engines/sci/sound/drivers/fb01.cpp
+++ b/engines/sci/sound/drivers/fb01.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/fmtowns.cpp b/engines/sci/sound/drivers/fmtowns.cpp
index 21cb2f1e43..f6dbac2a67 100644
--- a/engines/sci/sound/drivers/fmtowns.cpp
+++ b/engines/sci/sound/drivers/fmtowns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/gm_names.h b/engines/sci/sound/drivers/gm_names.h
index fbfa413a4a..791f79777c 100644
--- a/engines/sci/sound/drivers/gm_names.h
+++ b/engines/sci/sound/drivers/gm_names.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/map-mt32-to-gm.h b/engines/sci/sound/drivers/map-mt32-to-gm.h
index 12a36aa51c..5c90c47777 100644
--- a/engines/sci/sound/drivers/map-mt32-to-gm.h
+++ b/engines/sci/sound/drivers/map-mt32-to-gm.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index a31d5f9a81..31c9d90de8 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/mididriver.h b/engines/sci/sound/drivers/mididriver.h
index 8938eef62f..fee0154096 100644
--- a/engines/sci/sound/drivers/mididriver.h
+++ b/engines/sci/sound/drivers/mididriver.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp
index 1d823b643d..2399c506d4 100644
--- a/engines/sci/sound/drivers/pcjr.cpp
+++ b/engines/sci/sound/drivers/pcjr.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 6f250e0a3a..c0b4f3122e 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -601,11 +601,10 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
}// switch (info.command())
}
-void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
+bool MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
if (!fireEvents) {
// We don't do any processing that should be done while skipping events
- MidiParser::processEvent(info, fireEvents);
- return;
+ return MidiParser::processEvent(info, fireEvents);
}
switch (info.command()) {
@@ -657,7 +656,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
}
// Done with this event.
- return;
+ return true;
}
// Break to let parent handle the rest.
@@ -684,7 +683,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
switch (info.basic.param1) {
case kSetReverb:
// Already handled above
- return;
+ return true;
case kMidiHold:
// Check if the hold ID marker is the same as the hold ID
// marker set for that song by cmdSetSoundHold.
@@ -692,9 +691,9 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
if (info.basic.param2 == _pSnd->hold) {
jumpToTick(_loopTick, false, false);
// Done with this event.
- return;
+ return true;
}
- return;
+ return true;
case kUpdateCue:
if (!_jumpingToTick) {
int inc;
@@ -715,17 +714,17 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
debugC(4, kDebugLevelSound, "datainc %04x", inc);
}
- return;
+ return true;
case kResetOnPause:
_resetOnPause = info.basic.param2;
- return;
+ return true;
// Unhandled SCI commands
case 0x46: // LSL3 - binoculars
case 0x61: // Iceman (AdLib?)
case 0x73: // Hoyle
case 0xD1: // KQ4, when riding the unicorn
// Obscure SCI commands - ignored
- return;
+ return true;
// Standard MIDI commands
case 0x01: // mod wheel
case 0x04: // foot controller
@@ -740,10 +739,10 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
case 0x4B: // voice mapping
// TODO: is any support for this needed at the MIDI parser level?
warning("Unhanded SCI MIDI command 0x%x - voice mapping (parameter %d)", info.basic.param1, info.basic.param2);
- return;
+ return true;
default:
warning("Unhandled SCI MIDI command 0x%x (parameter %d)", info.basic.param1, info.basic.param2);
- return;
+ return true;
}
}
@@ -762,7 +761,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
jumpToTick(_loopTick);
// Done with this event.
- return;
+ return true;
} else {
_pSnd->status = kSoundStopped;
@@ -782,7 +781,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
// Let parent handle the rest
- MidiParser::processEvent(info, fireEvents);
+ return MidiParser::processEvent(info, fireEvents);
}
byte MidiParser_SCI::getSongReverb() {
diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h
index 7e24c34144..15c01977bd 100644
--- a/engines/sci/sound/midiparser_sci.h
+++ b/engines/sci/sound/midiparser_sci.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -89,7 +89,7 @@ public:
protected:
void parseNextEvent(EventInfo &info);
- void processEvent(const EventInfo &info, bool fireEvents = true);
+ bool processEvent(const EventInfo &info, bool fireEvents = true);
byte *midiMixChannels();
byte *midiFilterChannels(int channelMask);
byte midiGetNextChannel(long ticker);
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index f46c1dfbb0..97675a140e 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index 23a072cb26..bfc542d2a5 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index aa2a309f4d..2bd7f50de5 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h
index d76f969c7d..4effda68e4 100644
--- a/engines/sci/sound/soundcmd.h
+++ b/engines/sci/sound/soundcmd.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/util.cpp b/engines/sci/util.cpp
index 4f09bb7a55..3a9ed9ca69 100644
--- a/engines/sci/util.cpp
+++ b/engines/sci/util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/util.h b/engines/sci/util.h
index 0da5063a69..378030939c 100644
--- a/engines/sci/util.h
+++ b/engines/sci/util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index a567ece2ea..a2795d21f9 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -116,6 +116,10 @@ bool RobotDecoder::load(GuiResourceId id) {
if (g_sci->getGameId() == GID_RAMA && id == 1003)
return false;
+ // Robots for the options in the RAMA menu
+ if (g_sci->getGameId() == GID_RAMA && (id >= 1004 && id <= 1009))
+ return false;
+
// TODO: The robot video in the Lighthouse demo gets stuck
if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16)
return false;
diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h
index 437954f7fb..4faea5008a 100644
--- a/engines/sci/video/robot_decoder.h
+++ b/engines/sci/video/robot_decoder.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/video/seq_decoder.cpp b/engines/sci/video/seq_decoder.cpp
index 54603ec1f1..f523a42ca5 100644
--- a/engines/sci/video/seq_decoder.cpp
+++ b/engines/sci/video/seq_decoder.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h
index 890f349feb..e141f8dee0 100644
--- a/engines/sci/video/seq_decoder.h
+++ b/engines/sci/video/seq_decoder.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 4e14473921..116a953b0b 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index a733fdb4ed..46dc7d0295 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/actor_he.h b/engines/scumm/actor_he.h
index 24b632d00e..9bc244945c 100644
--- a/engines/scumm/actor_he.h
+++ b/engines/scumm/actor_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 481c4af432..6d80315ccb 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/akos.h b/engines/scumm/akos.h
index bd42aedcbd..017989424b 100644
--- a/engines/scumm/akos.h
+++ b/engines/scumm/akos.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp
index e1a8688bb9..024520f14b 100644
--- a/engines/scumm/base-costume.cpp
+++ b/engines/scumm/base-costume.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h
index 652655c24e..1e633bdec6 100644
--- a/engines/scumm/base-costume.h
+++ b/engines/scumm/base-costume.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/bomp.cpp b/engines/scumm/bomp.cpp
index 5b87f3042c..a0c4e67e4b 100644
--- a/engines/scumm/bomp.cpp
+++ b/engines/scumm/bomp.cpp
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/bomp.h b/engines/scumm/bomp.h
index b2d042daae..eb19cdf1d0 100644
--- a/engines/scumm/bomp.h
+++ b/engines/scumm/bomp.h
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index f6d2a18f38..70c8f2e032 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/boxes.h b/engines/scumm/boxes.h
index 345d6a9d36..4fd1947848 100644
--- a/engines/scumm/boxes.h
+++ b/engines/scumm/boxes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/camera.cpp b/engines/scumm/camera.cpp
index 4b48acfbdb..799fdd7547 100644
--- a/engines/scumm/camera.cpp
+++ b/engines/scumm/camera.cpp
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/charset-fontdata.cpp b/engines/scumm/charset-fontdata.cpp
index 16193f5503..3a0cd15637 100644
--- a/engines/scumm/charset-fontdata.cpp
+++ b/engines/scumm/charset-fontdata.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index dd79aff2da..185ebbce6e 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index 1c1df51921..5a9977b7d6 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_CHARSET_H
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 85c60f9a40..7470f13fa2 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/costume.h b/engines/scumm/costume.h
index 4a21692ddb..8e4fd41740 100644
--- a/engines/scumm/costume.h
+++ b/engines/scumm/costume.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_COSTUME_H
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 721644b554..6445d257f6 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 872293f821..a792d63149 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/debugger.h b/engines/scumm/debugger.h
index b60a1a2f03..43bf9d6fd4 100644
--- a/engines/scumm/debugger.h
+++ b/engines/scumm/debugger.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_DEBUGGER_H
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index aa7e60930a..b7a25808a5 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index 5ed6b5aab0..f714812a9c 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index 6717ea9b06..c876af1256 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 945c5b6611..8321daa583 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 7977f123ed..08222dd8cd 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_DIALOGS_H
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 1bb4a28f65..1d1b6b4f13 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -379,7 +380,7 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int
int size;
assert(height >= 0);
- assert(slot >= 0 && slot < 4);
+ assert((int)slot >= 0 && (int)slot < 4);
if (_game.version >= 7) {
if (slot == kMainVirtScreen && (_roomHeight != 0))
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 0d81698c50..42844daf30 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s
index 9238888831..5cfe8ba0a4 100644
--- a/engines/scumm/gfxARM.s
+++ b/engines/scumm/gfxARM.s
@@ -41,6 +41,7 @@
@ In addition, we assume that text, src and dst are all word (4 byte)
@ aligned. This is the same assumption that the old 'inline' version
@ made.
+ .align 2
_asmDrawStripToScreen:
@ r0 = height
@ r1 = width
@@ -118,6 +119,7 @@ end:
@ In addition, we assume that src and dst are both word (4 byte)
@ aligned. This is the same assumption that the old 'inline' version
@ made.
+ .align 2
_asmCopy8Col:
@ r0 = dst
@ r1 = dstPitch
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index 0aed181afd..6a558c97b4 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp
index c736c6a04c..8483a8a402 100644
--- a/engines/scumm/he/animation_he.cpp
+++ b/engines/scumm/he/animation_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h
index 48234b8072..677a4b4247 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp
index 84562c12d5..c409863804 100644
--- a/engines/scumm/he/cup_player_he.cpp
+++ b/engines/scumm/he/cup_player_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/cup_player_he.h b/engines/scumm/he/cup_player_he.h
index 15bc6b46ba..16c8a37f2f 100644
--- a/engines/scumm/he/cup_player_he.h
+++ b/engines/scumm/he/cup_player_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/floodfill_he.cpp b/engines/scumm/he/floodfill_he.cpp
index f9d53c6b12..279a8c63c4 100644
--- a/engines/scumm/he/floodfill_he.cpp
+++ b/engines/scumm/he/floodfill_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/floodfill_he.h b/engines/scumm/he/floodfill_he.h
index 3f62cc9b81..286bcce4f5 100644
--- a/engines/scumm/he/floodfill_he.h
+++ b/engines/scumm/he/floodfill_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index 067f508d2c..370f54c1d8 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/baseball2001.cpp b/engines/scumm/he/logic/baseball2001.cpp
index 342423fd79..5cbc96a21d 100644
--- a/engines/scumm/he/logic/baseball2001.cpp
+++ b/engines/scumm/he/logic/baseball2001.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/basketball.cpp b/engines/scumm/he/logic/basketball.cpp
index a4da8e05dc..bac15ea24a 100644
--- a/engines/scumm/he/logic/basketball.cpp
+++ b/engines/scumm/he/logic/basketball.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp
index 215fdf0179..bde0c38484 100644
--- a/engines/scumm/he/logic/football.cpp
+++ b/engines/scumm/he/logic/football.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/funshop.cpp b/engines/scumm/he/logic/funshop.cpp
index 8993fedad2..50759cf89e 100644
--- a/engines/scumm/he/logic/funshop.cpp
+++ b/engines/scumm/he/logic/funshop.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/moonbase.cpp b/engines/scumm/he/logic/moonbase.cpp
index 5b4618a4ad..29a0dde7a2 100644
--- a/engines/scumm/he/logic/moonbase.cpp
+++ b/engines/scumm/he/logic/moonbase.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/puttrace.cpp b/engines/scumm/he/logic/puttrace.cpp
index ea4397cd97..1c3317b131 100644
--- a/engines/scumm/he/logic/puttrace.cpp
+++ b/engines/scumm/he/logic/puttrace.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic/soccer.cpp b/engines/scumm/he/logic/soccer.cpp
index 2b29f93173..0efe482b5a 100644
--- a/engines/scumm/he/logic/soccer.cpp
+++ b/engines/scumm/he/logic/soccer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -566,7 +566,7 @@ int LogicHEsoccer::addCollisionTreeChild(int depth, int index, int parent) {
}
int LogicHEsoccer::op_1013(int32 a1, int32 a2, int32 a3) {
- // Initialises _collisionTree, a tree used for collision detection.
+ // Initializes _collisionTree, a tree used for collision detection.
// It is used by op_1014 to work out which objects to check.
_collisionTree = new uint32[585 * 11];
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index 0f9454ba28..366cd3be26 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h
index 93c0569a4f..cd547f1616 100644
--- a/engines/scumm/he/logic_he.h
+++ b/engines/scumm/he/logic_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp
index 44ba841644..89b9b9bca4 100644
--- a/engines/scumm/he/palette_he.cpp
+++ b/engines/scumm/he/palette_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index ce4b2239d2..ddde352686 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h
index 6996ce81eb..49175db8d4 100644
--- a/engines/scumm/he/resource_he.h
+++ b/engines/scumm/he/resource_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index c26e3f57ea..afc6633ef6 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 409fb7edf7..0c92fbcac3 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp
index 9259e0db2f..a911487738 100644
--- a/engines/scumm/he/script_v70he.cpp
+++ b/engines/scumm/he/script_v70he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v71he.cpp b/engines/scumm/he/script_v71he.cpp
index 3ad9220ac5..1ef21f1e6e 100644
--- a/engines/scumm/he/script_v71he.cpp
+++ b/engines/scumm/he/script_v71he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index cfa2be7275..31b4887d10 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp
index 7a8f230fc0..f5a193afcc 100644
--- a/engines/scumm/he/script_v80he.cpp
+++ b/engines/scumm/he/script_v80he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index f844c51cc6..f65d2f6077 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 1afb1b4074..a78aff96f8 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/sound_he.h b/engines/scumm/he/sound_he.h
index f487acc7da..323858a7c9 100644
--- a/engines/scumm/he/sound_he.h
+++ b/engines/scumm/he/sound_he.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_HE_SOUND_HE_H
diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp
index ec69ae11b4..218f2ec59c 100644
--- a/engines/scumm/he/sprite_he.cpp
+++ b/engines/scumm/he/sprite_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/sprite_he.h b/engines/scumm/he/sprite_he.h
index be6717faa5..e31ccbf790 100644
--- a/engines/scumm/he/sprite_he.h
+++ b/engines/scumm/he/sprite_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index b3511648bd..9a59609651 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h
index ce3fbc27c6..8db438a074 100644
--- a/engines/scumm/he/wiz_he.h
+++ b/engines/scumm/he/wiz_he.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 0e96952a48..8b892f5fda 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/imuse/imuse.h b/engines/scumm/imuse/imuse.h
index cce5309229..35ccc931b5 100644
--- a/engines/scumm/imuse/imuse.h
+++ b/engines/scumm/imuse/imuse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index d17d4ed28b..fed716e300 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_INTERNAL
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 5e928f3d44..937523d275 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp
index 3a9c42a920..6714cc00a0 100644
--- a/engines/scumm/imuse/imuse_player.cpp
+++ b/engines/scumm/imuse/imuse_player.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse/instrument.cpp b/engines/scumm/imuse/instrument.cpp
index 61c73b1e2d..6cbe1a5a15 100644
--- a/engines/scumm/imuse/instrument.cpp
+++ b/engines/scumm/imuse/instrument.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse/instrument.h b/engines/scumm/imuse/instrument.h
index 7e09e86fa5..47f556b40b 100644
--- a/engines/scumm/imuse/instrument.h
+++ b/engines/scumm/imuse/instrument.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_INSTRUMENT_H
diff --git a/engines/scumm/imuse/mac_m68k.cpp b/engines/scumm/imuse/mac_m68k.cpp
index 0980ef1fd2..8ebd8e4cca 100644
--- a/engines/scumm/imuse/mac_m68k.cpp
+++ b/engines/scumm/imuse/mac_m68k.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "scumm/imuse/mac_m68k.h"
diff --git a/engines/scumm/imuse/mac_m68k.h b/engines/scumm/imuse/mac_m68k.h
index 59e2f68b9b..31beaf4e66 100644
--- a/engines/scumm/imuse/mac_m68k.h
+++ b/engines/scumm/imuse/mac_m68k.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_MAC_M68K_H
diff --git a/engines/scumm/imuse/pcspk.cpp b/engines/scumm/imuse/pcspk.cpp
index cbf3446f10..856b771990 100644
--- a/engines/scumm/imuse/pcspk.cpp
+++ b/engines/scumm/imuse/pcspk.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "scumm/imuse/pcspk.h"
diff --git a/engines/scumm/imuse/pcspk.h b/engines/scumm/imuse/pcspk.h
index 195bd34b07..6a107e169a 100644
--- a/engines/scumm/imuse/pcspk.h
+++ b/engines/scumm/imuse/pcspk.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_PCSPK_H
diff --git a/engines/scumm/imuse/sysex.h b/engines/scumm/imuse/sysex.h
index 06ac483afd..f9a1d717d2 100644
--- a/engines/scumm/imuse/sysex.h
+++ b/engines/scumm/imuse/sysex.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_SYSEX_H
diff --git a/engines/scumm/imuse/sysex_samnmax.cpp b/engines/scumm/imuse/sysex_samnmax.cpp
index a4f525da56..7a412414fe 100644
--- a/engines/scumm/imuse/sysex_samnmax.cpp
+++ b/engines/scumm/imuse/sysex_samnmax.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp
index 8f230ebac3..d2bf857b7a 100644
--- a/engines/scumm/imuse/sysex_scumm.cpp
+++ b/engines/scumm/imuse/sysex_scumm.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index a737539c44..db260dce42 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/system.h"
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index d940b6897f..f04c2f7826 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#if !defined(SCUMM_IMUSE_DIGI_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
index d6e07bd0ec..bf024aa098 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.h b/engines/scumm/imuse_digi/dimuse_bndmgr.h
index 21d3110f8b..2d04e88246 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.h
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_DIGI_BUNDLE_MGR_H
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp
index 6edfe0bd33..b7468802d5 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/scummsys.h"
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.h b/engines/scumm/imuse_digi/dimuse_codecs.h
index a38f7234dd..163d0250fa 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.h
+++ b/engines/scumm/imuse_digi/dimuse_codecs.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_DIGI_CODECS_H
diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp
index adf2560142..46c457c864 100644
--- a/engines/scumm/imuse_digi/dimuse_music.cpp
+++ b/engines/scumm/imuse_digi/dimuse_music.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp
index bc030cc242..f181e5b6db 100644
--- a/engines/scumm/imuse_digi/dimuse_script.cpp
+++ b/engines/scumm/imuse_digi/dimuse_script.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 26e248fbca..78d05c2051 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.h b/engines/scumm/imuse_digi/dimuse_sndmgr.h
index ff6281d5e3..aebf4d7f11 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.h
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_IMUSE_DIGI_SNDMGR_H
diff --git a/engines/scumm/imuse_digi/dimuse_tables.cpp b/engines/scumm/imuse_digi/dimuse_tables.cpp
index c27138b765..bae081b308 100644
--- a/engines/scumm/imuse_digi/dimuse_tables.cpp
+++ b/engines/scumm/imuse_digi/dimuse_tables.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/imuse_digi/dimuse_tables.h b/engines/scumm/imuse_digi/dimuse_tables.h
index a74941dfea..cb8393d4d7 100644
--- a/engines/scumm/imuse_digi/dimuse_tables.h
+++ b/engines/scumm/imuse_digi/dimuse_tables.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#if !defined(SCUMM_IMUSE_DIGI_TABLES_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp
index 0896f9af7d..34926fa34e 100644
--- a/engines/scumm/imuse_digi/dimuse_track.cpp
+++ b/engines/scumm/imuse_digi/dimuse_track.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h
index 420db4bb06..7e360268e5 100644
--- a/engines/scumm/imuse_digi/dimuse_track.h
+++ b/engines/scumm/imuse_digi/dimuse_track.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#if !defined(SCUMM_IMUSE_DIGI_TRACK_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index d1786dfb60..5e2566dc32 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index 44528e5bac..b3e9a0e699 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/insane/insane.h b/engines/scumm/insane/insane.h
index 12d44c57f4..8c5862d20c 100644
--- a/engines/scumm/insane/insane.h
+++ b/engines/scumm/insane/insane.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp
index a7fa72c417..de904610ee 100644
--- a/engines/scumm/insane/insane_ben.cpp
+++ b/engines/scumm/insane/insane_ben.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp
index d711b63342..40dd453722 100644
--- a/engines/scumm/insane/insane_enemy.cpp
+++ b/engines/scumm/insane/insane_enemy.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp
index 9c395beea6..e2ed30733b 100644
--- a/engines/scumm/insane/insane_iact.cpp
+++ b/engines/scumm/insane/insane_iact.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp
index 06d5d7ac68..51b4bb33f5 100644
--- a/engines/scumm/insane/insane_scenes.cpp
+++ b/engines/scumm/insane/insane_scenes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp
index 8549a9262d..35eb9f7eb7 100644
--- a/engines/scumm/midiparser_ro.cpp
+++ b/engines/scumm/midiparser_ro.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/music.h b/engines/scumm/music.h
index 9fd14d830e..c5762ed24a 100644
--- a/engines/scumm/music.h
+++ b/engines/scumm/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp
index d9f0b412e1..1d5761ef48 100644
--- a/engines/scumm/nut_renderer.cpp
+++ b/engines/scumm/nut_renderer.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/scumm/nut_renderer.h b/engines/scumm/nut_renderer.h
index acccf161fa..47458b9f77 100644
--- a/engines/scumm/nut_renderer.h
+++ b/engines/scumm/nut_renderer.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#if !defined(SCUMM_NUT_RENDERER_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index d266183f85..7919075d0b 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/object.h b/engines/scumm/object.h
index 8212075e43..ef3a267e6a 100644
--- a/engines/scumm/object.h
+++ b/engines/scumm/object.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_OBJECT_H
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index bd085dd4d5..5275f1e942 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -8,11 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp
index 20630e1cb9..7b525116cf 100644
--- a/engines/scumm/players/player_ad.cpp
+++ b/engines/scumm/players/player_ad.cpp
@@ -748,7 +748,7 @@ void Player_AD::parseNote(int channel, int num, const byte *offset) {
const int note = channel * 2 + num;
_notes[note].state = -1;
processNote(note, offset);
- _notes[note].playTime = 0;
+ _notes[note].playTime = 0;
if (*offset & 0x20) {
_notes[note].playTime = (*(offset + 4) >> 4) * 118;
diff --git a/engines/scumm/players/player_apple2.cpp b/engines/scumm/players/player_apple2.cpp
index 87b8100f22..cba32bef2c 100644
--- a/engines/scumm/players/player_apple2.cpp
+++ b/engines/scumm/players/player_apple2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_apple2.h b/engines/scumm/players/player_apple2.h
index 9930a4f95d..8efb951f20 100644
--- a/engines/scumm/players/player_apple2.h
+++ b/engines/scumm/players/player_apple2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_mac.cpp b/engines/scumm/players/player_mac.cpp
index 281eec5336..fe15698494 100644
--- a/engines/scumm/players/player_mac.cpp
+++ b/engines/scumm/players/player_mac.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_mac.h b/engines/scumm/players/player_mac.h
index 7f9f42c34e..d247ce9883 100644
--- a/engines/scumm/players/player_mac.h
+++ b/engines/scumm/players/player_mac.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_mod.cpp b/engines/scumm/players/player_mod.cpp
index abaa8c1fc5..ced30ff193 100644
--- a/engines/scumm/players/player_mod.cpp
+++ b/engines/scumm/players/player_mod.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_mod.h b/engines/scumm/players/player_mod.h
index d4a5b16fca..bb0c422090 100644
--- a/engines/scumm/players/player_mod.h
+++ b/engines/scumm/players/player_mod.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_nes.cpp b/engines/scumm/players/player_nes.cpp
index f55f1f9edd..3b5adc4550 100644
--- a/engines/scumm/players/player_nes.cpp
+++ b/engines/scumm/players/player_nes.cpp
@@ -8,14 +8,14 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
- * aint32 with this program; if not, write to the Free Software
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
diff --git a/engines/scumm/players/player_nes.h b/engines/scumm/players/player_nes.h
index f0b3e79aad..6c5efe9d38 100644
--- a/engines/scumm/players/player_nes.h
+++ b/engines/scumm/players/player_nes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_pce.cpp b/engines/scumm/players/player_pce.cpp
index 6d6e2fcde5..89a3b07798 100644
--- a/engines/scumm/players/player_pce.cpp
+++ b/engines/scumm/players/player_pce.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_pce.h b/engines/scumm/players/player_pce.h
index ca2eddf58c..5c9a2d201c 100644
--- a/engines/scumm/players/player_pce.h
+++ b/engines/scumm/players/player_pce.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_sid.cpp b/engines/scumm/players/player_sid.cpp
index 1b97ad16d4..c7be112449 100644
--- a/engines/scumm/players/player_sid.cpp
+++ b/engines/scumm/players/player_sid.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_sid.h b/engines/scumm/players/player_sid.h
index a48ec793cd..aa7e6be8c1 100644
--- a/engines/scumm/players/player_sid.h
+++ b/engines/scumm/players/player_sid.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_towns.cpp b/engines/scumm/players/player_towns.cpp
index acbdbc7fb6..5b8ca04021 100644
--- a/engines/scumm/players/player_towns.cpp
+++ b/engines/scumm/players/player_towns.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_towns.h b/engines/scumm/players/player_towns.h
index 2369b7da5f..3736524ee2 100644
--- a/engines/scumm/players/player_towns.h
+++ b/engines/scumm/players/player_towns.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v1.cpp b/engines/scumm/players/player_v1.cpp
index 0fa1ee9361..041f556120 100644
--- a/engines/scumm/players/player_v1.cpp
+++ b/engines/scumm/players/player_v1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v1.h b/engines/scumm/players/player_v1.h
index ccd24c39df..3854922847 100644
--- a/engines/scumm/players/player_v1.h
+++ b/engines/scumm/players/player_v1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2.cpp b/engines/scumm/players/player_v2.cpp
index 2429af2d8c..f0aaa4a3be 100644
--- a/engines/scumm/players/player_v2.cpp
+++ b/engines/scumm/players/player_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2.h b/engines/scumm/players/player_v2.h
index 33878ff08b..b7a602d3a3 100644
--- a/engines/scumm/players/player_v2.h
+++ b/engines/scumm/players/player_v2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2a.cpp b/engines/scumm/players/player_v2a.cpp
index aeccb8b7cb..80a80a5584 100644
--- a/engines/scumm/players/player_v2a.cpp
+++ b/engines/scumm/players/player_v2a.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2a.h b/engines/scumm/players/player_v2a.h
index 12193635f2..37333829d8 100644
--- a/engines/scumm/players/player_v2a.h
+++ b/engines/scumm/players/player_v2a.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2base.cpp b/engines/scumm/players/player_v2base.cpp
index 75f1518989..b1872f3fb3 100644
--- a/engines/scumm/players/player_v2base.cpp
+++ b/engines/scumm/players/player_v2base.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2base.h b/engines/scumm/players/player_v2base.h
index 32bde95ddc..83b496af67 100644
--- a/engines/scumm/players/player_v2base.h
+++ b/engines/scumm/players/player_v2base.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2cms.cpp b/engines/scumm/players/player_v2cms.cpp
index 8e903bf9d2..08321932c3 100644
--- a/engines/scumm/players/player_v2cms.cpp
+++ b/engines/scumm/players/player_v2cms.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v2cms.h b/engines/scumm/players/player_v2cms.h
index fe42720215..b68fa00198 100644
--- a/engines/scumm/players/player_v2cms.h
+++ b/engines/scumm/players/player_v2cms.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v3a.cpp b/engines/scumm/players/player_v3a.cpp
index ca0eedc90a..e6610a87d3 100644
--- a/engines/scumm/players/player_v3a.cpp
+++ b/engines/scumm/players/player_v3a.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v3a.h b/engines/scumm/players/player_v3a.h
index 3f84a74e51..7a4ebec8ab 100644
--- a/engines/scumm/players/player_v3a.h
+++ b/engines/scumm/players/player_v3a.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v3m.cpp b/engines/scumm/players/player_v3m.cpp
index e30e31aff9..bfe6144b6f 100644
--- a/engines/scumm/players/player_v3m.cpp
+++ b/engines/scumm/players/player_v3m.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v3m.h b/engines/scumm/players/player_v3m.h
index 615d736035..81dda801fc 100644
--- a/engines/scumm/players/player_v3m.h
+++ b/engines/scumm/players/player_v3m.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v4a.cpp b/engines/scumm/players/player_v4a.cpp
index 59f49625c3..bd8ce3f7ad 100644
--- a/engines/scumm/players/player_v4a.cpp
+++ b/engines/scumm/players/player_v4a.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v4a.h b/engines/scumm/players/player_v4a.h
index c8c7b63ed2..a746d59877 100644
--- a/engines/scumm/players/player_v4a.h
+++ b/engines/scumm/players/player_v4a.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v5m.cpp b/engines/scumm/players/player_v5m.cpp
index 77b6d52a3c..5be92d024b 100644
--- a/engines/scumm/players/player_v5m.cpp
+++ b/engines/scumm/players/player_v5m.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/players/player_v5m.h b/engines/scumm/players/player_v5m.h
index e3a457f8af..f60a3f9346 100644
--- a/engines/scumm/players/player_v5m.h
+++ b/engines/scumm/players/player_v5m.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/proc3ARM.s b/engines/scumm/proc3ARM.s
index 75dd4b4a7f..70892faef2 100644
--- a/engines/scumm/proc3ARM.s
+++ b/engines/scumm/proc3ARM.s
@@ -28,14 +28,6 @@
.set space, 48
-.set _scaleIndexY, store_r14 + 28
-.set _numStrips, store_r14 + 24
-.set _palette, store_r14 + 20
-.set _shadow_table, store_r14 + 16
-.set _scaleIndexX, store_r14 + 12
-.set _scaleX, store_r14 + 8
-.set _height, store_r14 + 4
-
.set store_r14, space + 36
.set store_r11, space + 32
.set store_r10, space + 28
@@ -46,6 +38,14 @@
.set store_r5, space + 8
.set store_r4, space + 4
+.set _scaleIndexY, store_r14 + 28
+.set _numStrips, store_r14 + 24
+.set _palette, store_r14 + 20
+.set _shadow_table, store_r14 + 16
+.set _scaleIndexX, store_r14 + 12
+.set _scaleX, store_r14 + 8
+.set _height, store_r14 + 4
+
.set src, 48
.set height, 44
.set len, 40
@@ -71,6 +71,7 @@
@ <> = _palette
@ <> = _numstrips
@ <> = _scaleIndexY
+ .align 2
_ClassicProc3RendererShadowARM:
@ shadow20 = false
@ shadowed = true
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 7c42b40f58..d4e4f43d5c 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/resource.h b/engines/scumm/resource.h
index aa7f809b76..6ae553901b 100644
--- a/engines/scumm/resource.h
+++ b/engines/scumm/resource.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_RESOURCE_H
diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp
index 927ee676a5..7ccdfa4780 100644
--- a/engines/scumm/resource_v2.cpp
+++ b/engines/scumm/resource_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/resource_v3.cpp b/engines/scumm/resource_v3.cpp
index 55e42e389c..99e967cef1 100644
--- a/engines/scumm/resource_v3.cpp
+++ b/engines/scumm/resource_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index 6215e86b89..d017514c82 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index 9ee8fb93a9..3828629997 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 848e288589..0aaff4c094 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -188,32 +188,31 @@ bool ScummEngine::saveState(Common::WriteStream *out, bool writeHeader) {
}
bool ScummEngine::saveState(int slot, bool compat, Common::String &filename) {
- bool saveFailed;
+ bool saveFailed = false;
pauseEngine(true);
Common::WriteStream *out = openSaveFileForWriting(slot, compat, filename);
- if (!out)
- return false;
-
- saveFailed = false;
- if (!saveState(out))
+ if (!out) {
saveFailed = true;
+ } else {
+ if (!saveState(out))
+ saveFailed = true;
- out->finalize();
- if (out->err())
- saveFailed = true;
- delete out;
+ out->finalize();
+ if (out->err())
+ saveFailed = true;
+ delete out;
+ }
- if (saveFailed) {
+ if (saveFailed)
debug(1, "State save as '%s' FAILED", filename.c_str());
- return false;
- }
- debug(1, "State saved as '%s'", filename.c_str());
+ else
+ debug(1, "State saved as '%s'", filename.c_str());
pauseEngine(false);
- return true;
+ return !saveFailed;
}
@@ -1243,7 +1242,9 @@ void ScummEngine::saveOrLoad(Serializer *s) {
}
s->saveUint16(0xFFFF); // End marker
} else {
- while ((type = (ResType)s->loadUint16()) != 0xFFFF) {
+ uint16 tmp;
+ while ((tmp = s->loadUint16()) != 0xFFFF) {
+ type = (ResType)tmp;
while ((idx = s->loadUint16()) != 0xFFFF) {
assert(idx < _res->_types[type].size());
loadResource(s, type, idx);
@@ -1431,7 +1432,9 @@ void ScummEngine::saveOrLoad(Serializer *s) {
}
s->saveByte(0xFF);
} else {
- while ((type = (ResType)s->loadByte()) != 0xFF) {
+ uint8 tmp;
+ while ((tmp = s->loadByte()) != 0xFF) {
+ type = (ResType)tmp;
idx = s->loadUint16();
_res->lock(type, idx);
}
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index c34be5816d..bd8ae3ff59 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index c8eabdd61c..2c672ccc89 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script.h b/engines/scumm/script.h
index 74ffaaf426..972909dccc 100644
--- a/engines/scumm/script.h
+++ b/engines/scumm/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index 361287d29f..a7999a2695 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 96d422d5bb..74d0aa2483 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v3.cpp b/engines/scumm/script_v3.cpp
index b28d831101..00fc525ab5 100644
--- a/engines/scumm/script_v3.cpp
+++ b/engines/scumm/script_v3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index ec3ac4b00f..7ac21fea31 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 3da7000ae9..2cda9898af 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 6983c51f30..d2f4133f74 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp
index f6f376f3c9..03a6d13886 100644
--- a/engines/scumm/script_v8.cpp
+++ b/engines/scumm/script_v8.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 39fbae8147..54f22ecad3 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 7d3a01b895..b4afa09bb2 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v0.h b/engines/scumm/scumm_v0.h
index 7f532c04d7..80d047ab9f 100644
--- a/engines/scumm/scumm_v0.h
+++ b/engines/scumm/scumm_v0.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v2.h b/engines/scumm/scumm_v2.h
index 316a08d325..e438008c1e 100644
--- a/engines/scumm/scumm_v2.h
+++ b/engines/scumm/scumm_v2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v3.h b/engines/scumm/scumm_v3.h
index f11ca16a50..29f170e7ea 100644
--- a/engines/scumm/scumm_v3.h
+++ b/engines/scumm/scumm_v3.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v4.h b/engines/scumm/scumm_v4.h
index e21e4b26ae..28f619ceaa 100644
--- a/engines/scumm/scumm_v4.h
+++ b/engines/scumm/scumm_v4.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v5.h b/engines/scumm/scumm_v5.h
index 0eef04b8de..1bd38d68f2 100644
--- a/engines/scumm/scumm_v5.h
+++ b/engines/scumm/scumm_v5.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v6.h b/engines/scumm/scumm_v6.h
index c42a49a9f5..73268f6f33 100644
--- a/engines/scumm/scumm_v6.h
+++ b/engines/scumm/scumm_v6.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v7.h b/engines/scumm/scumm_v7.h
index 6fb98a0af7..b8830be810 100644
--- a/engines/scumm/scumm_v7.h
+++ b/engines/scumm/scumm_v7.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/scumm_v8.h b/engines/scumm/scumm_v8.h
index 43bfad1fc9..714a7d2dcb 100644
--- a/engines/scumm/scumm_v8.h
+++ b/engines/scumm/scumm_v8.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp
index 7f9ca70080..6d86215626 100644
--- a/engines/scumm/smush/channel.cpp
+++ b/engines/scumm/smush/channel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/channel.h b/engines/scumm/smush/channel.h
index 839aeaa970..dc2219bbed 100644
--- a/engines/scumm/smush/channel.h
+++ b/engines/scumm/smush/channel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/codec1.cpp b/engines/scumm/smush/codec1.cpp
index 79d97d2ce3..0ec34e0266 100644
--- a/engines/scumm/smush/codec1.cpp
+++ b/engines/scumm/smush/codec1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index 344057e3ac..aab70ab876 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/codec37.h b/engines/scumm/smush/codec37.h
index bcb858b0b5..2d34655f24 100644
--- a/engines/scumm/smush/codec37.h
+++ b/engines/scumm/smush/codec37.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/codec47.cpp b/engines/scumm/smush/codec47.cpp
index 4b503a0a38..5bac85ee82 100644
--- a/engines/scumm/smush/codec47.cpp
+++ b/engines/scumm/smush/codec47.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/codec47.h b/engines/scumm/smush/codec47.h
index 0e5156db5c..1621db6996 100644
--- a/engines/scumm/smush/codec47.h
+++ b/engines/scumm/smush/codec47.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/codec47ARM.s b/engines/scumm/smush/codec47ARM.s
index a91f932558..53e9143f39 100644
--- a/engines/scumm/smush/codec47ARM.s
+++ b/engines/scumm/smush/codec47ARM.s
@@ -28,6 +28,7 @@
.global _ARM_Smush_decode2
+ .align 2
_ARM_Smush_decode2:
@ r0 = dst
@ r1 = src
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp
index f2c4f993e4..461aff962e 100644
--- a/engines/scumm/smush/imuse_channel.cpp
+++ b/engines/scumm/smush/imuse_channel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index 2f1ca512f0..ca64b38556 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp
index 5cfa0ea519..4c04901b42 100644
--- a/engines/scumm/smush/smush_font.cpp
+++ b/engines/scumm/smush/smush_font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/smush_font.h b/engines/scumm/smush/smush_font.h
index 5de4a725c6..9cfea5a26d 100644
--- a/engines/scumm/smush/smush_font.h
+++ b/engines/scumm/smush/smush_font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp
index d2b4b5a482..42e8f645be 100644
--- a/engines/scumm/smush/smush_mixer.cpp
+++ b/engines/scumm/smush/smush_mixer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h
index 75a8889242..18ec7f96fb 100644
--- a/engines/scumm/smush/smush_mixer.h
+++ b/engines/scumm/smush/smush_mixer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index ce098f07aa..7617fc541f 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/smush/smush_player.h b/engines/scumm/smush/smush_player.h
index 5a2024060e..81c498a516 100644
--- a/engines/scumm/smush/smush_player.h
+++ b/engines/scumm/smush/smush_player.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 071805752b..01bdefc7c0 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h
index 48f28d51ff..a96d2b8ed5 100644
--- a/engines/scumm/sound.h
+++ b/engines/scumm/sound.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_SOUND_H
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 975307d0d0..d60c4c6a50 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index 9c90d7575d..73028c8513 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 0d0f6cdb95..fdb98a8019 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/scumm/verbs.h b/engines/scumm/verbs.h
index 0aa008b4de..a0b5f69231 100644
--- a/engines/scumm/verbs.h
+++ b/engines/scumm/verbs.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef SCUMM_VERBS_H
diff --git a/engines/sky/autoroute.cpp b/engines/sky/autoroute.cpp
index ab791cb066..877090f6b8 100644
--- a/engines/sky/autoroute.cpp
+++ b/engines/sky/autoroute.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/autoroute.h b/engines/sky/autoroute.h
index 8721ba6c54..91d4846ef8 100644
--- a/engines/sky/autoroute.h
+++ b/engines/sky/autoroute.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 57c1f6b48b..dfdd765120 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/control.h b/engines/sky/control.h
index 1380d29ee2..44591f299d 100644
--- a/engines/sky/control.h
+++ b/engines/sky/control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/debug.cpp b/engines/sky/debug.cpp
index a417bc2ece..63da42eec2 100644
--- a/engines/sky/debug.cpp
+++ b/engines/sky/debug.cpp
@@ -1108,6 +1108,15 @@ void Debugger::postEnter() {
_mouse->resetCursor();
}
+static bool isNumeric(const char *arg) {
+ const char *str = arg;
+ bool retVal = true;
+ while (retVal && (*str != '\0')) {
+ retVal = Common::isDigit(*str++);
+ }
+ return retVal;
+}
+
bool Debugger::Cmd_ShowGrid(int argc, const char **argv) {
_showGrid = !_showGrid;
DebugPrintf("Show grid: %s\n", _showGrid ? "On" : "Off");
@@ -1299,22 +1308,20 @@ bool Debugger::Cmd_ScriptVar(int argc, const char **argv) {
}
bool Debugger::Cmd_Section(int argc, const char **argv) {
- if (argc < 2) {
- DebugPrintf("Example: %s 4\n", argv[0]);
- return true;
- }
-
- const int baseId[] = { START_ONE, START_S6, START_29, START_SC31, START_SC66, START_SC90, START_SC81 };
- int section = atoi(argv[1]);
+ if (argc == 2 && isNumeric(argv[1])) {
+ const int baseId[] = { START_ONE, START_S6, START_29, START_SC31, START_SC66, START_SC90, START_SC81 };
+ int section = atoi(argv[1]);
- if (section >= 0 && section <= 6) {
- _logic->fnEnterSection(section == 6 ? 4 : section, 0, 0);
- _logic->fnAssignBase(ID_FOSTER, baseId[section], 0);
- _skyCompact->fetchCpt(ID_FOSTER)->megaSet = 0;
+ if (section >= 0 && section <= 6) {
+ _logic->fnEnterSection(section == 6 ? 4 : section, 0, 0);
+ _logic->fnAssignBase(ID_FOSTER, baseId[section], 0);
+ _skyCompact->fetchCpt(ID_FOSTER)->megaSet = 0;
+ } else {
+ DebugPrintf("Section %d is out of range (range: %d - %d)\n", section, 0, 6);
+ }
} else {
- DebugPrintf("Unknown section '%s'\n", argv[1]);
+ DebugPrintf("Example: %s 4\n", argv[0]);
}
-
return true;
}
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 8f6c2bb6a2..4c7bb2dc17 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/disk.cpp b/engines/sky/disk.cpp
index e97aeb01a2..25f4a125f1 100644
--- a/engines/sky/disk.cpp
+++ b/engines/sky/disk.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/disk.h b/engines/sky/disk.h
index 320c38eebd..bd19e465d1 100644
--- a/engines/sky/disk.h
+++ b/engines/sky/disk.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/grid.cpp b/engines/sky/grid.cpp
index 6a9dc502a7..343c2c0415 100644
--- a/engines/sky/grid.cpp
+++ b/engines/sky/grid.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/grid.h b/engines/sky/grid.h
index 6e0e9aabaa..641c96d534 100644
--- a/engines/sky/grid.h
+++ b/engines/sky/grid.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/hufftext.cpp b/engines/sky/hufftext.cpp
index 0592f094d9..ba9ee6c3e2 100644
--- a/engines/sky/hufftext.cpp
+++ b/engines/sky/hufftext.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index 2f75a19b69..d4476e2916 100644
--- a/engines/sky/intro.cpp
+++ b/engines/sky/intro.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/intro.h b/engines/sky/intro.h
index 98af6e3664..fb6a1ec9cd 100644
--- a/engines/sky/intro.h
+++ b/engines/sky/intro.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index e92e768272..e1175f9936 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/logic.h b/engines/sky/logic.h
index 9f8df25870..8507fe7398 100644
--- a/engines/sky/logic.h
+++ b/engines/sky/logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp
index 74a92c8f00..de2d2226bb 100644
--- a/engines/sky/mouse.cpp
+++ b/engines/sky/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/mouse.h b/engines/sky/mouse.h
index 1ba0167fb5..310b724e4f 100644
--- a/engines/sky/mouse.h
+++ b/engines/sky/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp
index 99509554c7..8400fef6eb 100644
--- a/engines/sky/music/adlibchannel.cpp
+++ b/engines/sky/music/adlibchannel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/adlibchannel.h b/engines/sky/music/adlibchannel.h
index 44ac0d79d0..80dae93b2c 100644
--- a/engines/sky/music/adlibchannel.h
+++ b/engines/sky/music/adlibchannel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp
index a41cd6a81d..dd64c5bc81 100644
--- a/engines/sky/music/adlibmusic.cpp
+++ b/engines/sky/music/adlibmusic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/adlibmusic.h b/engines/sky/music/adlibmusic.h
index 2161795b4c..886eef026e 100644
--- a/engines/sky/music/adlibmusic.h
+++ b/engines/sky/music/adlibmusic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/gmchannel.cpp b/engines/sky/music/gmchannel.cpp
index 215d6490b9..85a381de53 100644
--- a/engines/sky/music/gmchannel.cpp
+++ b/engines/sky/music/gmchannel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/gmchannel.h b/engines/sky/music/gmchannel.h
index f16de401db..b935321f50 100644
--- a/engines/sky/music/gmchannel.h
+++ b/engines/sky/music/gmchannel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/gmmusic.cpp b/engines/sky/music/gmmusic.cpp
index 84f6a654d0..7dc82807d9 100644
--- a/engines/sky/music/gmmusic.cpp
+++ b/engines/sky/music/gmmusic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/gmmusic.h b/engines/sky/music/gmmusic.h
index 068601ba1f..fa2b960404 100644
--- a/engines/sky/music/gmmusic.h
+++ b/engines/sky/music/gmmusic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/mt32music.cpp b/engines/sky/music/mt32music.cpp
index a3fdd42713..9e8886d82a 100644
--- a/engines/sky/music/mt32music.cpp
+++ b/engines/sky/music/mt32music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/mt32music.h b/engines/sky/music/mt32music.h
index 8f8e70f51b..fe68910869 100644
--- a/engines/sky/music/mt32music.h
+++ b/engines/sky/music/mt32music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index 944edb1fdc..d26b6393de 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/music/musicbase.h b/engines/sky/music/musicbase.h
index 066ebe593c..38a52805b7 100644
--- a/engines/sky/music/musicbase.h
+++ b/engines/sky/music/musicbase.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/rnc_deco.cpp b/engines/sky/rnc_deco.cpp
index 27fae03514..8242b27dee 100644
--- a/engines/sky/rnc_deco.cpp
+++ b/engines/sky/rnc_deco.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/rnc_deco.h b/engines/sky/rnc_deco.h
index 96a75a9750..2046b56371 100644
--- a/engines/sky/rnc_deco.h
+++ b/engines/sky/rnc_deco.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp
index 2797ed2fea..c96b449162 100644
--- a/engines/sky/screen.cpp
+++ b/engines/sky/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/screen.h b/engines/sky/screen.h
index bf8b69a95a..fa04cd91c3 100644
--- a/engines/sky/screen.h
+++ b/engines/sky/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index 4c47dfafc7..40b6959a9b 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/sky.h b/engines/sky/sky.h
index cd8a650d60..56833004ac 100644
--- a/engines/sky/sky.h
+++ b/engines/sky/sky.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/skydefs.h b/engines/sky/skydefs.h
index 070e185d55..167b7dade2 100644
--- a/engines/sky/skydefs.h
+++ b/engines/sky/skydefs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp
index a60e3d9e38..d9343d10c7 100644
--- a/engines/sky/sound.cpp
+++ b/engines/sky/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/sound.h b/engines/sky/sound.h
index da0d91911b..3c330dae99 100644
--- a/engines/sky/sound.h
+++ b/engines/sky/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/struc.h b/engines/sky/struc.h
index c2ebf1bad0..dd75410283 100644
--- a/engines/sky/struc.h
+++ b/engines/sky/struc.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/text.cpp b/engines/sky/text.cpp
index 38a01116fe..bf7b8e3787 100644
--- a/engines/sky/text.cpp
+++ b/engines/sky/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sky/text.h b/engines/sky/text.h
index cf0d707ce9..e327b6e6b4 100644
--- a/engines/sky/text.h
+++ b/engines/sky/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 742aac1a53..0257a805ff 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h
index 2c51a74f71..462addf70f 100644
--- a/engines/sword1/animation.h
+++ b/engines/sword1/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/collision.h b/engines/sword1/collision.h
index 9a9eeec429..6cfe50d9d6 100644
--- a/engines/sword1/collision.h
+++ b/engines/sword1/collision.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/console.cpp b/engines/sword1/console.cpp
index 4c55f8d990..3eb3b93a19 100644
--- a/engines/sword1/console.cpp
+++ b/engines/sword1/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/console.h b/engines/sword1/console.h
index 260fe95d52..a2bb51f9a4 100644
--- a/engines/sword1/console.h
+++ b/engines/sword1/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 80d8edc1dd..201c3aa9bd 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/control.h b/engines/sword1/control.h
index a80ea05b03..2d15bcdd15 100644
--- a/engines/sword1/control.h
+++ b/engines/sword1/control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/debug.cpp b/engines/sword1/debug.cpp
index 6f82d0f49a..cddc7283f0 100644
--- a/engines/sword1/debug.cpp
+++ b/engines/sword1/debug.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/debug.h b/engines/sword1/debug.h
index 1505ae28dd..f3ebb0b9b2 100644
--- a/engines/sword1/debug.h
+++ b/engines/sword1/debug.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index f3af04c81d..8a1f3dfef9 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/eventman.cpp b/engines/sword1/eventman.cpp
index 113151bfd5..3b3e696937 100644
--- a/engines/sword1/eventman.cpp
+++ b/engines/sword1/eventman.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/eventman.h b/engines/sword1/eventman.h
index 25cb886a34..cf32ff7343 100644
--- a/engines/sword1/eventman.h
+++ b/engines/sword1/eventman.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index 757d768780..a0067ffbf5 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h
index a146d340cf..94da2b3a77 100644
--- a/engines/sword1/logic.h
+++ b/engines/sword1/logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/memman.cpp b/engines/sword1/memman.cpp
index 19809249b5..be36684fe5 100644
--- a/engines/sword1/memman.cpp
+++ b/engines/sword1/memman.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/memman.h b/engines/sword1/memman.h
index 7f84720248..bff5c6a620 100644
--- a/engines/sword1/memman.h
+++ b/engines/sword1/memman.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/menu.cpp b/engines/sword1/menu.cpp
index f61e10106a..2cf765b65e 100644
--- a/engines/sword1/menu.cpp
+++ b/engines/sword1/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/menu.h b/engines/sword1/menu.h
index ea062f1a49..66e465cf63 100644
--- a/engines/sword1/menu.h
+++ b/engines/sword1/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/module.mk b/engines/sword1/module.mk
index a19fcbfab9..cd1b03ee7d 100644
--- a/engines/sword1/module.mk
+++ b/engines/sword1/module.mk
@@ -19,7 +19,7 @@ MODULE_OBJS := \
sound.o \
staticres.o \
sword1.o \
- text.o
+ text.o
# This module can be built as a plugin
ifeq ($(ENABLE_SWORD1), DYNAMIC_PLUGIN)
diff --git a/engines/sword1/mouse.cpp b/engines/sword1/mouse.cpp
index 4a62995d96..88de4001bb 100644
--- a/engines/sword1/mouse.cpp
+++ b/engines/sword1/mouse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/mouse.h b/engines/sword1/mouse.h
index b2a844d0a9..924b04c206 100644
--- a/engines/sword1/mouse.h
+++ b/engines/sword1/mouse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index f31faffd5e..6a0a3d1e70 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/music.h b/engines/sword1/music.h
index 4207019c13..ec25427ead 100644
--- a/engines/sword1/music.h
+++ b/engines/sword1/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/object.h b/engines/sword1/object.h
index 0dab5519bd..8ded828b90 100644
--- a/engines/sword1/object.h
+++ b/engines/sword1/object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp
index 3e70a95699..07f19154a0 100644
--- a/engines/sword1/objectman.cpp
+++ b/engines/sword1/objectman.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h
index 197b437c15..fef1a8da3a 100644
--- a/engines/sword1/objectman.h
+++ b/engines/sword1/objectman.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp
index 7222965c9d..0a0324a67c 100644
--- a/engines/sword1/resman.cpp
+++ b/engines/sword1/resman.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/resman.h b/engines/sword1/resman.h
index 49d974c1db..ac6aa87065 100644
--- a/engines/sword1/resman.h
+++ b/engines/sword1/resman.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/router.cpp b/engines/sword1/router.cpp
index ef07a0bf02..72c8440e1c 100644
--- a/engines/sword1/router.cpp
+++ b/engines/sword1/router.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/router.h b/engines/sword1/router.h
index 82724b1e6e..76ddf53222 100644
--- a/engines/sword1/router.h
+++ b/engines/sword1/router.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index 76957e0a70..507f4f0884 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/screen.h b/engines/sword1/screen.h
index 7586e937a7..6186f64250 100644
--- a/engines/sword1/screen.h
+++ b/engines/sword1/screen.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 643657c71f..0b4d3829d6 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index b52d89f390..666598dba0 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/staticres.cpp b/engines/sword1/staticres.cpp
index 5dabce1301..37ab3c2f6d 100644
--- a/engines/sword1/staticres.cpp
+++ b/engines/sword1/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2682,7 +2682,7 @@ const char Music::_tuneList[TOTAL_TUNES][8] = {
"3m10", // DONE 82 After, "A description, perhaps."
"2m13", // DONE 83 Red nose icon at costumier's. Copy 2M13.
"3m12", // DONE 84 Tissue icon. Also, after Nico's "No, I write it (the magazine) 5M19.
- "3m13", // DONE 85 Photo icon over, "Do you recognise this man?"
+ "3m13", // DONE 85 Photo icon over, "Do you recognize this man?"
"3m14", // DONE 86 Exit icon, over, "Thanks for your help, buddy."
"2m9", // DONE 87 Clicking on police station on the map.
"3m17", // DONE 88 Police station on, "I've tracked down the clown's movements."
@@ -2702,7 +2702,7 @@ const char Music::_tuneList[TOTAL_TUNES][8] = {
"3m32", // DONE 100 Source music for Lady Piermont.
"3m33", // DONE 101 More music for Lady P.
"2m13", // DONE 102 Red Nose music Copy 2M13
- "4m3", // DONE 103 On photo, "Do you recognise the man in this photograph"
+ "4m3", // DONE 103 On photo, "Do you recognize the man in this photograph"
"4m4", // DONE 104 With Lady P. After, "Hi there, ma'am."
"4m5", // DONE 105 After, "I think the word you're looking for is...dick"
"4m6", // DONE 106 After, "English arrogance might do the trick." Also for "More English arrogance" (4M27)
@@ -2881,7 +2881,7 @@ const char Music::_tuneList[TOTAL_TUNES][8] = {
"scm1b", // DONE 260 When George passes the trigger point toward the back of the train and he sees Guido.
"spm6b", // DONE 261 The climax of "spm6", which should coincide with the Countess holding up the chalice.
"marquet", // DONE 262 Starts at the fade down when George is asked to leave Jacques' room
- "rm4", // DONE 263 "On crystal stand icon. As George walks to the centre of the cavern." I'd do this on the first LMB on the stump.
+ "rm4", // DONE 263 "On crystal stand icon. As George walks to the center of the cavern." I'd do this on the first LMB on the stump.
"rm5", // DONE 264 "On icon. As George places the crystal on top of the stand." When the player places the gem luggage on the emplaced tripod.
"rm6", // DONE 265 "Chalice reflection. On icon as George places Chalice on floor of Church" i.e. the mosaic in the Baphomet dig. It's over thirty seconds long so it had best start running when the chalice luggage is placed on the mosaic so it runs through the big screen of the reflection.
"rm7", // DONE 266 "Burning candle. On icon as George sets about lighting candle." One minute forty-eight, this one. I've no idea how long the burning candle Smacker is but the cue description seems to indicate it should run from the moment the burning tissue successfully lights the candle, i.e. the window is shut.
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 5738431dce..08ea02f32d 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index ec6555b4b3..c58e97e353 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/sworddefs.h b/engines/sword1/sworddefs.h
index db4146f37e..643b17d3e2 100644
--- a/engines/sword1/sworddefs.h
+++ b/engines/sword1/sworddefs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/swordres.h b/engines/sword1/swordres.h
index b1fc206b80..284219110d 100644
--- a/engines/sword1/swordres.h
+++ b/engines/sword1/swordres.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp
index f23ac5f182..2ef1d95b4e 100644
--- a/engines/sword1/text.cpp
+++ b/engines/sword1/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword1/text.h b/engines/sword1/text.h
index 4dcb9e26a7..aecd268c00 100644
--- a/engines/sword1/text.h
+++ b/engines/sword1/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/console.cpp b/engines/sword25/console.cpp
index f1b91d2bc2..d8222e7f6d 100644
--- a/engines/sword25/console.cpp
+++ b/engines/sword25/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/console.h b/engines/sword25/console.h
index 9e2516ccf0..ea955ee139 100644
--- a/engines/sword25/console.h
+++ b/engines/sword25/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index 06e4ba2a7d..df68d11609 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/detection_tables.h b/engines/sword25/detection_tables.h
index 94a5b55fed..a9f263b7d4 100644
--- a/engines/sword25/detection_tables.h
+++ b/engines/sword25/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp
index 3cdce1b493..5d7dcf2506 100644
--- a/engines/sword25/fmv/movieplayer.cpp
+++ b/engines/sword25/fmv/movieplayer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h
index 2f5614b505..95fb05ee60 100644
--- a/engines/sword25/fmv/movieplayer.h
+++ b/engines/sword25/fmv/movieplayer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/fmv/movieplayer_script.cpp b/engines/sword25/fmv/movieplayer_script.cpp
index 8359059b85..44353268c7 100644
--- a/engines/sword25/fmv/movieplayer_script.cpp
+++ b/engines/sword25/fmv/movieplayer_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index 37207c967b..eeb78857ea 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h
index ced1995ae9..b6f314ea42 100644
--- a/engines/sword25/gfx/animation.h
+++ b/engines/sword25/gfx/animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationdescription.cpp b/engines/sword25/gfx/animationdescription.cpp
index 164206bbc2..983850269d 100644
--- a/engines/sword25/gfx/animationdescription.cpp
+++ b/engines/sword25/gfx/animationdescription.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationdescription.h b/engines/sword25/gfx/animationdescription.h
index 009d83dcc7..7884e32655 100644
--- a/engines/sword25/gfx/animationdescription.h
+++ b/engines/sword25/gfx/animationdescription.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index 8c09a545a0..431d466658 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationresource.h b/engines/sword25/gfx/animationresource.h
index 70291f220e..d4b58326cb 100644
--- a/engines/sword25/gfx/animationresource.h
+++ b/engines/sword25/gfx/animationresource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp
index a1d2bf5d1a..7db89be8b2 100644
--- a/engines/sword25/gfx/animationtemplate.cpp
+++ b/engines/sword25/gfx/animationtemplate.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationtemplate.h b/engines/sword25/gfx/animationtemplate.h
index b61ecfcf54..6968e44183 100644
--- a/engines/sword25/gfx/animationtemplate.h
+++ b/engines/sword25/gfx/animationtemplate.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp
index 4cefe24b18..4783a314f4 100644
--- a/engines/sword25/gfx/animationtemplateregistry.cpp
+++ b/engines/sword25/gfx/animationtemplateregistry.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h
index d3d02b2ac8..cbc6cc0120 100644
--- a/engines/sword25/gfx/animationtemplateregistry.h
+++ b/engines/sword25/gfx/animationtemplateregistry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/bitmap.cpp b/engines/sword25/gfx/bitmap.cpp
index 593a426975..c9a2d8601a 100644
--- a/engines/sword25/gfx/bitmap.cpp
+++ b/engines/sword25/gfx/bitmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/bitmap.h b/engines/sword25/gfx/bitmap.h
index f22c5d7fc9..71e0f1d306 100644
--- a/engines/sword25/gfx/bitmap.h
+++ b/engines/sword25/gfx/bitmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index 72b8a3ea1f..7a4daedd84 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp
index 1f3d2d063d..ce9c056d08 100644
--- a/engines/sword25/gfx/dynamicbitmap.cpp
+++ b/engines/sword25/gfx/dynamicbitmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/dynamicbitmap.h b/engines/sword25/gfx/dynamicbitmap.h
index ed53776577..ddea5238d4 100644
--- a/engines/sword25/gfx/dynamicbitmap.h
+++ b/engines/sword25/gfx/dynamicbitmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp
index 0aeca7c180..c4d4c3c52e 100644
--- a/engines/sword25/gfx/fontresource.cpp
+++ b/engines/sword25/gfx/fontresource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/fontresource.h b/engines/sword25/gfx/fontresource.h
index 511f485658..be10e42876 100644
--- a/engines/sword25/gfx/fontresource.h
+++ b/engines/sword25/gfx/fontresource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index bfdb51481b..2a870c021d 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index 3309763966..cf4289b8bb 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index b4334195a1..14b9de1453 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp
index e2eeaca33f..454c7e1047 100644
--- a/engines/sword25/gfx/image/art.cpp
+++ b/engines/sword25/gfx/image/art.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/art.h b/engines/sword25/gfx/image/art.h
index 40bcb55aa7..820520012c 100644
--- a/engines/sword25/gfx/image/art.h
+++ b/engines/sword25/gfx/image/art.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/image.h b/engines/sword25/gfx/image/image.h
index 8db54e7c54..8fbf802501 100644
--- a/engines/sword25/gfx/image/image.h
+++ b/engines/sword25/gfx/image/image.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/imgloader.cpp b/engines/sword25/gfx/image/imgloader.cpp
index 9006a596b4..b4b3030de8 100644
--- a/engines/sword25/gfx/image/imgloader.cpp
+++ b/engines/sword25/gfx/image/imgloader.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -33,14 +33,14 @@
#include "sword25/gfx/image/image.h"
#include "sword25/gfx/image/imgloader.h"
#include "graphics/pixelformat.h"
-#include "graphics/decoders/png.h"
+#include "image/png.h"
namespace Sword25 {
bool ImgLoader::decodePNGImage(const byte *fileDataPtr, uint fileSize, byte *&uncompressedDataPtr, int &width, int &height, int &pitch) {
Common::MemoryReadStream *fileStr = new Common::MemoryReadStream(fileDataPtr, fileSize, DisposeAfterUse::NO);
- Graphics::PNGDecoder png;
+ ::Image::PNGDecoder png;
if (!png.loadStream(*fileStr)) // the fileStr pointer, and thus pFileData will be deleted after this is done
error("Error while reading PNG image");
diff --git a/engines/sword25/gfx/image/imgloader.h b/engines/sword25/gfx/image/imgloader.h
index 735ab9203c..b932cdc903 100644
--- a/engines/sword25/gfx/image/imgloader.h
+++ b/engines/sword25/gfx/image/imgloader.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index b359fc6a3e..107b4cd402 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/renderedimage.h b/engines/sword25/gfx/image/renderedimage.h
index 116f97de26..3cc9725b12 100644
--- a/engines/sword25/gfx/image/renderedimage.h
+++ b/engines/sword25/gfx/image/renderedimage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp
index 7e4c3143f5..776f8ce8d3 100644
--- a/engines/sword25/gfx/image/swimage.cpp
+++ b/engines/sword25/gfx/image/swimage.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/swimage.h b/engines/sword25/gfx/image/swimage.h
index a35127a41d..b31c2318ec 100644
--- a/engines/sword25/gfx/image/swimage.h
+++ b/engines/sword25/gfx/image/swimage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp
index ab895b5cef..0e5dfb9c53 100644
--- a/engines/sword25/gfx/image/vectorimage.cpp
+++ b/engines/sword25/gfx/image/vectorimage.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h
index d1760a433e..a99d532e75 100644
--- a/engines/sword25/gfx/image/vectorimage.h
+++ b/engines/sword25/gfx/image/vectorimage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp
index 6d4dc213f2..c7a79fd3c4 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.cpp
+++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/microtiles.cpp b/engines/sword25/gfx/microtiles.cpp
index 18e4a9a1fb..792e4ef385 100644
--- a/engines/sword25/gfx/microtiles.cpp
+++ b/engines/sword25/gfx/microtiles.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "sword25/gfx/microtiles.h"
diff --git a/engines/sword25/gfx/microtiles.h b/engines/sword25/gfx/microtiles.h
index 454fc39f37..8f94b6cfbf 100644
--- a/engines/sword25/gfx/microtiles.h
+++ b/engines/sword25/gfx/microtiles.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef SWORD25_MICROTILES_H
diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp
index 9b7fe82914..9699db7f6a 100644
--- a/engines/sword25/gfx/panel.cpp
+++ b/engines/sword25/gfx/panel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/panel.h b/engines/sword25/gfx/panel.h
index d372b4e0fc..5010cbaaf0 100644
--- a/engines/sword25/gfx/panel.h
+++ b/engines/sword25/gfx/panel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index e9e11aae4e..c109e49aa8 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/renderobject.h b/engines/sword25/gfx/renderobject.h
index 7fcd3a87a3..8fde17e7a6 100644
--- a/engines/sword25/gfx/renderobject.h
+++ b/engines/sword25/gfx/renderobject.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp
index bc7dd02636..4927b4c58e 100644
--- a/engines/sword25/gfx/renderobjectmanager.cpp
+++ b/engines/sword25/gfx/renderobjectmanager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/renderobjectmanager.h b/engines/sword25/gfx/renderobjectmanager.h
index 1db91dfbe6..c56e49aff9 100644
--- a/engines/sword25/gfx/renderobjectmanager.h
+++ b/engines/sword25/gfx/renderobjectmanager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/renderobjectptr.h b/engines/sword25/gfx/renderobjectptr.h
index 7b7f190a01..950fdcfb45 100644
--- a/engines/sword25/gfx/renderobjectptr.h
+++ b/engines/sword25/gfx/renderobjectptr.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/renderobjectregistry.h b/engines/sword25/gfx/renderobjectregistry.h
index 92d8c9b830..49ed4e7d5c 100644
--- a/engines/sword25/gfx/renderobjectregistry.h
+++ b/engines/sword25/gfx/renderobjectregistry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/rootrenderobject.h b/engines/sword25/gfx/rootrenderobject.h
index f1b19d6bae..608af8f14c 100644
--- a/engines/sword25/gfx/rootrenderobject.h
+++ b/engines/sword25/gfx/rootrenderobject.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 7b56a6e9f3..4b4f967f29 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/screenshot.h b/engines/sword25/gfx/screenshot.h
index e2e2dfc7f5..fb37dfc9c0 100644
--- a/engines/sword25/gfx/screenshot.h
+++ b/engines/sword25/gfx/screenshot.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index bb57fa3a03..14e2012d80 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/staticbitmap.h b/engines/sword25/gfx/staticbitmap.h
index 90b92b4331..4ded60aec8 100644
--- a/engines/sword25/gfx/staticbitmap.h
+++ b/engines/sword25/gfx/staticbitmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index 8c33fa8d61..b0a9e4ed3f 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h
index 873eb33380..0187643659 100644
--- a/engines/sword25/gfx/text.h
+++ b/engines/sword25/gfx/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/timedrenderobject.cpp b/engines/sword25/gfx/timedrenderobject.cpp
index e35b0ae95b..bedde83781 100644
--- a/engines/sword25/gfx/timedrenderobject.cpp
+++ b/engines/sword25/gfx/timedrenderobject.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/gfx/timedrenderobject.h b/engines/sword25/gfx/timedrenderobject.h
index 44c3b40528..387cd21b42 100644
--- a/engines/sword25/gfx/timedrenderobject.h
+++ b/engines/sword25/gfx/timedrenderobject.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/input/inputengine.cpp b/engines/sword25/input/inputengine.cpp
index 0d1c449805..7157e7242f 100644
--- a/engines/sword25/input/inputengine.cpp
+++ b/engines/sword25/input/inputengine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/input/inputengine.h b/engines/sword25/input/inputengine.h
index f79890a9fd..c5ef40cc9e 100644
--- a/engines/sword25/input/inputengine.h
+++ b/engines/sword25/input/inputengine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp
index db2619294c..17b0584c2c 100644
--- a/engines/sword25/input/inputengine_script.cpp
+++ b/engines/sword25/input/inputengine_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/common.h b/engines/sword25/kernel/common.h
index 8cfc81e981..0fc6bf725e 100644
--- a/engines/sword25/kernel/common.h
+++ b/engines/sword25/kernel/common.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/filesystemutil.cpp b/engines/sword25/kernel/filesystemutil.cpp
index 281e7986df..a3e3081b8f 100644
--- a/engines/sword25/kernel/filesystemutil.cpp
+++ b/engines/sword25/kernel/filesystemutil.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/filesystemutil.h b/engines/sword25/kernel/filesystemutil.h
index bb100123d9..9c20de7696 100644
--- a/engines/sword25/kernel/filesystemutil.h
+++ b/engines/sword25/kernel/filesystemutil.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/inputpersistenceblock.cpp b/engines/sword25/kernel/inputpersistenceblock.cpp
index aa3a759756..c38f967506 100644
--- a/engines/sword25/kernel/inputpersistenceblock.cpp
+++ b/engines/sword25/kernel/inputpersistenceblock.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/inputpersistenceblock.h b/engines/sword25/kernel/inputpersistenceblock.h
index 02a944ff1b..bcda794a51 100644
--- a/engines/sword25/kernel/inputpersistenceblock.h
+++ b/engines/sword25/kernel/inputpersistenceblock.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/kernel.cpp b/engines/sword25/kernel/kernel.cpp
index d6388eee2b..cf972818d2 100644
--- a/engines/sword25/kernel/kernel.cpp
+++ b/engines/sword25/kernel/kernel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/kernel.h b/engines/sword25/kernel/kernel.h
index adf69f92d6..411d0cf3b2 100644
--- a/engines/sword25/kernel/kernel.h
+++ b/engines/sword25/kernel/kernel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/kernel_script.cpp b/engines/sword25/kernel/kernel_script.cpp
index 27a221d45f..1b7c6a6f14 100644
--- a/engines/sword25/kernel/kernel_script.cpp
+++ b/engines/sword25/kernel/kernel_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h
index 449b1b60a3..9491a2217c 100644
--- a/engines/sword25/kernel/objectregistry.h
+++ b/engines/sword25/kernel/objectregistry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/outputpersistenceblock.cpp b/engines/sword25/kernel/outputpersistenceblock.cpp
index 53fb624767..9003b5d58a 100644
--- a/engines/sword25/kernel/outputpersistenceblock.cpp
+++ b/engines/sword25/kernel/outputpersistenceblock.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/outputpersistenceblock.h b/engines/sword25/kernel/outputpersistenceblock.h
index 17f018a106..c7d8dfc6aa 100644
--- a/engines/sword25/kernel/outputpersistenceblock.h
+++ b/engines/sword25/kernel/outputpersistenceblock.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/persistable.h b/engines/sword25/kernel/persistable.h
index 1807211847..8df2c45b2e 100644
--- a/engines/sword25/kernel/persistable.h
+++ b/engines/sword25/kernel/persistable.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/persistenceblock.h b/engines/sword25/kernel/persistenceblock.h
index 8ac3e84a41..a56c85770c 100644
--- a/engines/sword25/kernel/persistenceblock.h
+++ b/engines/sword25/kernel/persistenceblock.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index df26da7800..fb83b7f941 100644
--- a/engines/sword25/kernel/persistenceservice.cpp
+++ b/engines/sword25/kernel/persistenceservice.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/persistenceservice.h b/engines/sword25/kernel/persistenceservice.h
index 59e0a3661d..bc73ae9f43 100644
--- a/engines/sword25/kernel/persistenceservice.h
+++ b/engines/sword25/kernel/persistenceservice.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/resmanager.cpp b/engines/sword25/kernel/resmanager.cpp
index cc3316250a..c0f94ae5c5 100644
--- a/engines/sword25/kernel/resmanager.cpp
+++ b/engines/sword25/kernel/resmanager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/resmanager.h b/engines/sword25/kernel/resmanager.h
index 6b95a45b6e..57a091295a 100644
--- a/engines/sword25/kernel/resmanager.h
+++ b/engines/sword25/kernel/resmanager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/resource.cpp b/engines/sword25/kernel/resource.cpp
index 656355cc17..e0d46a807b 100644
--- a/engines/sword25/kernel/resource.cpp
+++ b/engines/sword25/kernel/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/resource.h b/engines/sword25/kernel/resource.h
index 7c8175c9c9..41deb24d88 100644
--- a/engines/sword25/kernel/resource.h
+++ b/engines/sword25/kernel/resource.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/resservice.h b/engines/sword25/kernel/resservice.h
index 69b0688e32..11b0b824fb 100644
--- a/engines/sword25/kernel/resservice.h
+++ b/engines/sword25/kernel/resservice.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/kernel/service.h b/engines/sword25/kernel/service.h
index 576776bb5f..aa40563e06 100644
--- a/engines/sword25/kernel/service.h
+++ b/engines/sword25/kernel/service.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/geometry.h b/engines/sword25/math/geometry.h
index bdbd5b2052..1539a93a31 100644
--- a/engines/sword25/math/geometry.h
+++ b/engines/sword25/math/geometry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp
index 70798f7692..192a6adf54 100644
--- a/engines/sword25/math/geometry_script.cpp
+++ b/engines/sword25/math/geometry_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/line.h b/engines/sword25/math/line.h
index 9eaa2d3c8c..9e2a50fac3 100644
--- a/engines/sword25/math/line.h
+++ b/engines/sword25/math/line.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/polygon.cpp b/engines/sword25/math/polygon.cpp
index 99d947df87..ccefa1901e 100644
--- a/engines/sword25/math/polygon.cpp
+++ b/engines/sword25/math/polygon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/polygon.h b/engines/sword25/math/polygon.h
index f81e165621..3cb2286be1 100644
--- a/engines/sword25/math/polygon.h
+++ b/engines/sword25/math/polygon.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp
index db888e432a..cf422af774 100644
--- a/engines/sword25/math/region.cpp
+++ b/engines/sword25/math/region.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/region.h b/engines/sword25/math/region.h
index 0fd7223631..a61c0c4c94 100644
--- a/engines/sword25/math/region.h
+++ b/engines/sword25/math/region.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/regionregistry.cpp b/engines/sword25/math/regionregistry.cpp
index e4925f7baf..35a5fb4b88 100644
--- a/engines/sword25/math/regionregistry.cpp
+++ b/engines/sword25/math/regionregistry.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/regionregistry.h b/engines/sword25/math/regionregistry.h
index 9e0a28bea7..04a96c52c7 100644
--- a/engines/sword25/math/regionregistry.h
+++ b/engines/sword25/math/regionregistry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/vertex.cpp b/engines/sword25/math/vertex.cpp
index b486d35e7e..ed0baeeeb3 100644
--- a/engines/sword25/math/vertex.cpp
+++ b/engines/sword25/math/vertex.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/vertex.h b/engines/sword25/math/vertex.h
index 4cb0eaca30..89ad344f6a 100644
--- a/engines/sword25/math/vertex.h
+++ b/engines/sword25/math/vertex.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp
index 0ba7e8ec3d..f7160317c6 100644
--- a/engines/sword25/math/walkregion.cpp
+++ b/engines/sword25/math/walkregion.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/math/walkregion.h b/engines/sword25/math/walkregion.h
index 7dded1980b..9a3b6e616b 100644
--- a/engines/sword25/math/walkregion.h
+++ b/engines/sword25/math/walkregion.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index 5549f50c3c..2db4f2da74 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/package/packagemanager.h b/engines/sword25/package/packagemanager.h
index b0c6718008..a1806a4046 100644
--- a/engines/sword25/package/packagemanager.h
+++ b/engines/sword25/package/packagemanager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/package/packagemanager_script.cpp b/engines/sword25/package/packagemanager_script.cpp
index 229ec37459..4e72ad1934 100644
--- a/engines/sword25/package/packagemanager_script.cpp
+++ b/engines/sword25/package/packagemanager_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/lua_extensions.cpp b/engines/sword25/script/lua_extensions.cpp
index bf502d719e..3f828aee46 100644
--- a/engines/sword25/script/lua_extensions.cpp
+++ b/engines/sword25/script/lua_extensions.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/luabindhelper.cpp b/engines/sword25/script/luabindhelper.cpp
index 6900305f5c..1dd84bc36e 100644
--- a/engines/sword25/script/luabindhelper.cpp
+++ b/engines/sword25/script/luabindhelper.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/luabindhelper.h b/engines/sword25/script/luabindhelper.h
index 5223d4440e..85d6570b1b 100644
--- a/engines/sword25/script/luabindhelper.h
+++ b/engines/sword25/script/luabindhelper.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/luacallback.cpp b/engines/sword25/script/luacallback.cpp
index cee0531b8a..72f7e01612 100644
--- a/engines/sword25/script/luacallback.cpp
+++ b/engines/sword25/script/luacallback.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/luacallback.h b/engines/sword25/script/luacallback.h
index 796af8598b..fa5ba9c228 100644
--- a/engines/sword25/script/luacallback.h
+++ b/engines/sword25/script/luacallback.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp
index 9d394309e6..f62a08005b 100644
--- a/engines/sword25/script/luascript.cpp
+++ b/engines/sword25/script/luascript.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/luascript.h b/engines/sword25/script/luascript.h
index 1a4a38c3be..a13a50749d 100644
--- a/engines/sword25/script/luascript.h
+++ b/engines/sword25/script/luascript.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/script/script.h b/engines/sword25/script/script.h
index 04f248fe7e..8f9c00a986 100644
--- a/engines/sword25/script/script.h
+++ b/engines/sword25/script/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 8ff1b0cf2a..4029b4e808 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h
index 8974ee69e5..1dd7ba0925 100644
--- a/engines/sword25/sfx/soundengine.h
+++ b/engines/sword25/sfx/soundengine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/sfx/soundengine_script.cpp b/engines/sword25/sfx/soundengine_script.cpp
index d7771967a3..48e71de66c 100644
--- a/engines/sword25/sfx/soundengine_script.cpp
+++ b/engines/sword25/sfx/soundengine_script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index 2201188052..259deb2ea8 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/sword25.h b/engines/sword25/sword25.h
index 1254ea177b..72391cf9d8 100644
--- a/engines/sword25/sword25.h
+++ b/engines/sword25/sword25.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/util/lua/scummvm_file.cpp b/engines/sword25/util/lua/scummvm_file.cpp
index b5f1388129..c38aba004f 100644
--- a/engines/sword25/util/lua/scummvm_file.cpp
+++ b/engines/sword25/util/lua/scummvm_file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/sword25/util/lua/scummvm_file.h b/engines/sword25/util/lua/scummvm_file.h
index e8c468ee07..72d2690a4d 100644
--- a/engines/sword25/util/lua/scummvm_file.h
+++ b/engines/sword25/util/lua/scummvm_file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/teenagent/actor.cpp b/engines/teenagent/actor.cpp
index d65a367309..a4df43a5fe 100644
--- a/engines/teenagent/actor.cpp
+++ b/engines/teenagent/actor.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/actor.h"
diff --git a/engines/teenagent/actor.h b/engines/teenagent/actor.h
index 942397c636..33ed9e90d0 100644
--- a/engines/teenagent/actor.h
+++ b/engines/teenagent/actor.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/animation.h"
diff --git a/engines/teenagent/animation.cpp b/engines/teenagent/animation.cpp
index effafcaac6..5708c101ec 100644
--- a/engines/teenagent/animation.cpp
+++ b/engines/teenagent/animation.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/teenagent.h"
diff --git a/engines/teenagent/animation.h b/engines/teenagent/animation.h
index 9be21a4c3d..44b1312554 100644
--- a/engines/teenagent/animation.h
+++ b/engines/teenagent/animation.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_ANIMATION_H
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index 9fe9e68a76..74d3d7d56d 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/teenagent.h"
@@ -4623,7 +4624,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
SET_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1);
}
} else
- displayMessage(dsAddr_tvOffMsg); // "I just realised that the TV is off"
+ displayMessage(dsAddr_tvOffMsg); // "I just realized that the TV is off"
} else {
SET_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 0);
if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
diff --git a/engines/teenagent/console.cpp b/engines/teenagent/console.cpp
index 9ab6001d54..13d5c687ce 100644
--- a/engines/teenagent/console.cpp
+++ b/engines/teenagent/console.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/console.h"
diff --git a/engines/teenagent/console.h b/engines/teenagent/console.h
index 4dbdd3fc07..b569f98d8f 100644
--- a/engines/teenagent/console.h
+++ b/engines/teenagent/console.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_CONSOLE_H
diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp
index f9f5d2f13a..7a53faf98a 100644
--- a/engines/teenagent/detection.cpp
+++ b/engines/teenagent/detection.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/system.h"
@@ -184,7 +185,7 @@ public:
};
#if PLUGIN_ENABLED_DYNAMIC(TEENAGENT)
-REGISTER_PLUGIN_DYNAMIC(TEENAGENT, PLUGIN_TYPE_ENGINE, TeenAgentMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(TEENAGENT, PLUGIN_TYPE_ENGINE, TeenAgentMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(TEENAGENT, PLUGIN_TYPE_ENGINE, TeenAgentMetaEngine);
+ REGISTER_PLUGIN_STATIC(TEENAGENT, PLUGIN_TYPE_ENGINE, TeenAgentMetaEngine);
#endif
diff --git a/engines/teenagent/dialog.cpp b/engines/teenagent/dialog.cpp
index 312757a462..0993c26961 100644
--- a/engines/teenagent/dialog.cpp
+++ b/engines/teenagent/dialog.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/dialog.h"
diff --git a/engines/teenagent/dialog.h b/engines/teenagent/dialog.h
index 6672ce7206..de67b999a2 100644
--- a/engines/teenagent/dialog.h
+++ b/engines/teenagent/dialog.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_DIALOG_H
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index 9d85328f20..ab75a45ba7 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/font.h"
diff --git a/engines/teenagent/font.h b/engines/teenagent/font.h
index a61f145fa6..65931f2084 100644
--- a/engines/teenagent/font.h
+++ b/engines/teenagent/font.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_FONT_H
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 354371666c..e8544446dc 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/memstream.h"
diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h
index d487848c2c..4a250987ba 100644
--- a/engines/teenagent/inventory.h
+++ b/engines/teenagent/inventory.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_INVENTORY_H
diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp
index b06a5f1f5e..5d66c3c90c 100644
--- a/engines/teenagent/music.cpp
+++ b/engines/teenagent/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/teenagent/music.h b/engines/teenagent/music.h
index 408436cf3a..e1630cc845 100644
--- a/engines/teenagent/music.h
+++ b/engines/teenagent/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp
index 5dad9ab99d..3197a715aa 100644
--- a/engines/teenagent/objects.cpp
+++ b/engines/teenagent/objects.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/debug.h"
diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h
index 6e7955766f..f923ae52ab 100644
--- a/engines/teenagent/objects.h
+++ b/engines/teenagent/objects.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/teenagent/pack.cpp b/engines/teenagent/pack.cpp
index 2e6c913a72..cbf2bfd89e 100644
--- a/engines/teenagent/pack.cpp
+++ b/engines/teenagent/pack.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/pack.h"
diff --git a/engines/teenagent/pack.h b/engines/teenagent/pack.h
index 1d6c471554..3607bae91d 100644
--- a/engines/teenagent/pack.h
+++ b/engines/teenagent/pack.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index cdbdcf9655..8d8f705a24 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/resources.h"
diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h
index 7aae2f9ec8..2cdc070a87 100644
--- a/engines/teenagent/resources.h
+++ b/engines/teenagent/resources.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_RESOURCES_H
@@ -494,7 +495,7 @@ const uint16 dsAddr_noDepraveMsg = 0x4d02; // "Nah, I don't want to deprave the
// No Read Again Message : 0x4d2a to 0x4d5a
const uint16 dsAddr_noReadAgainMsg = 0x4d2a; // "I don't want to read it again. I might like it."
// TV Off Message : 0x4d5b to 0x4d7f
-const uint16 dsAddr_tvOffMsg = 0x4d5b; // "I just realised that the TV is off"
+const uint16 dsAddr_tvOffMsg = 0x4d5b; // "I just realized that the TV is off"
// Not Happen Message : 0x4d80 to 0x4d92
const uint16 dsAddr_NotHappenMsg = 0x4d80; // "Nothing happened"
// Tape Started Message : 0x4d93 to 0x4da5
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index f36a60932c..6e1cef31bc 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 14aefa0cca..07b304ed97 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_SCENE_H
diff --git a/engines/teenagent/segment.cpp b/engines/teenagent/segment.cpp
index cb17190da7..0e7659d680 100644
--- a/engines/teenagent/segment.cpp
+++ b/engines/teenagent/segment.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/segment.h"
diff --git a/engines/teenagent/segment.h b/engines/teenagent/segment.h
index 286337d120..14ccb24894 100644
--- a/engines/teenagent/segment.h
+++ b/engines/teenagent/segment.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_SEGMENT_H
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index 4db25bc749..748874a4c5 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/surface.h"
diff --git a/engines/teenagent/surface.h b/engines/teenagent/surface.h
index 3e591ed3e0..35850cf3aa 100644
--- a/engines/teenagent/surface.h
+++ b/engines/teenagent/surface.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_SURFACE_H
diff --git a/engines/teenagent/surface_list.cpp b/engines/teenagent/surface_list.cpp
index e293ce6470..444d927294 100644
--- a/engines/teenagent/surface_list.cpp
+++ b/engines/teenagent/surface_list.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "teenagent/surface_list.h"
diff --git a/engines/teenagent/surface_list.h b/engines/teenagent/surface_list.h
index 73a41fb5f8..2cca7849df 100644
--- a/engines/teenagent/surface_list.h
+++ b/engines/teenagent/surface_list.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_SURFACE_LIST_H__
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index e73f1100d6..d5a8b8e2dc 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h
index 3c3bc25e56..a06f8dbf9b 100644
--- a/engines/teenagent/teenagent.h
+++ b/engines/teenagent/teenagent.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TEENAGENT_ENGINE_H
diff --git a/engines/testbed/config-params.cpp b/engines/testbed/config-params.cpp
index 47e5dfa933..1aa97168c1 100644
--- a/engines/testbed/config-params.cpp
+++ b/engines/testbed/config-params.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/testbed/config-params.h b/engines/testbed/config-params.h
index 6906d9248e..89aae199b6 100644
--- a/engines/testbed/config-params.h
+++ b/engines/testbed/config-params.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_CONFIG_PARAMS_H
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index a40d239ebf..efc0d30221 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/stream.h"
diff --git a/engines/testbed/config.h b/engines/testbed/config.h
index 7d479a74fd..db687de261 100644
--- a/engines/testbed/config.h
+++ b/engines/testbed/config.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_CONFIG_H
diff --git a/engines/testbed/detection.cpp b/engines/testbed/detection.cpp
index fd426d3e98..348ade62b0 100644
--- a/engines/testbed/detection.cpp
+++ b/engines/testbed/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp
index 4b9ced2a53..3e1b6adf9e 100644
--- a/engines/testbed/events.cpp
+++ b/engines/testbed/events.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/events.h"
diff --git a/engines/testbed/events.h b/engines/testbed/events.h
index 00a659bd33..f8883ec1d8 100644
--- a/engines/testbed/events.h
+++ b/engines/testbed/events.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_EVENTS_H
diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp
index 62ac616192..07b1c0f2af 100644
--- a/engines/testbed/fs.cpp
+++ b/engines/testbed/fs.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/testbed/fs.h b/engines/testbed/fs.h
index 1cb7b3a871..966f138d71 100644
--- a/engines/testbed/fs.h
+++ b/engines/testbed/fs.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_FS_H
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index 26e073d407..43580104e7 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/events.h"
diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h
index f3013fdf53..139eeb97dd 100644
--- a/engines/testbed/graphics.h
+++ b/engines/testbed/graphics.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_GRAPHICS_H
diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp
index 33fab03a5e..daa5f1cf3c 100644
--- a/engines/testbed/midi.cpp
+++ b/engines/testbed/midi.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/archive.h"
diff --git a/engines/testbed/midi.h b/engines/testbed/midi.h
index 02550a6eb2..b9f3e82abd 100644
--- a/engines/testbed/midi.h
+++ b/engines/testbed/midi.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_MIDI_H
diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp
index aee3ccd294..5847a8d2e4 100644
--- a/engines/testbed/misc.cpp
+++ b/engines/testbed/misc.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "testbed/misc.h"
diff --git a/engines/testbed/misc.h b/engines/testbed/misc.h
index 3f0772c6e5..23e303d676 100644
--- a/engines/testbed/misc.h
+++ b/engines/testbed/misc.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_MISC_H
diff --git a/engines/testbed/savegame.cpp b/engines/testbed/savegame.cpp
index 226e9880a6..e426b9717d 100644
--- a/engines/testbed/savegame.cpp
+++ b/engines/testbed/savegame.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/savefile.h"
diff --git a/engines/testbed/savegame.h b/engines/testbed/savegame.h
index 2c9ec83470..b242ee5f3b 100644
--- a/engines/testbed/savegame.h
+++ b/engines/testbed/savegame.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_SAVEGAME_H
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index 5af1d8ca31..aebd981826 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "audio/softsynth/pcspk.h"
diff --git a/engines/testbed/sound.h b/engines/testbed/sound.h
index fea7d9d45b..893a89b175 100644
--- a/engines/testbed/sound.h
+++ b/engines/testbed/sound.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_SOUND_H
diff --git a/engines/testbed/template.h b/engines/testbed/template.h
index 847777f34b..9e6c347e4d 100644
--- a/engines/testbed/template.h
+++ b/engines/testbed/template.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_TEMPLATE_H
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index 152764eb27..635fd09bac 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/debug-channels.h"
diff --git a/engines/testbed/testbed.h b/engines/testbed/testbed.h
index 6933efa0f0..0f70e1191f 100644
--- a/engines/testbed/testbed.h
+++ b/engines/testbed/testbed.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_H
diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp
index 39eeca31bd..7729c4911b 100644
--- a/engines/testbed/testsuite.cpp
+++ b/engines/testbed/testsuite.cpp
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "common/config-manager.h"
diff --git a/engines/testbed/testsuite.h b/engines/testbed/testsuite.h
index dc159ce25f..4f2a23c8bd 100644
--- a/engines/testbed/testsuite.h
+++ b/engines/testbed/testsuite.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef TESTBED_TESTSUITE_H
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 531a8e3d12..1440fb3556 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/actors.h b/engines/tinsel/actors.h
index 6ebe32505a..4d82e14f6a 100644
--- a/engines/tinsel/actors.h
+++ b/engines/tinsel/actors.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/adpcm.cpp b/engines/tinsel/adpcm.cpp
index ca3150ca3d..9de3dff341 100644
--- a/engines/tinsel/adpcm.cpp
+++ b/engines/tinsel/adpcm.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/adpcm.h b/engines/tinsel/adpcm.h
index 3e899d94c3..b63e8dcfa7 100644
--- a/engines/tinsel/adpcm.h
+++ b/engines/tinsel/adpcm.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp
index a1ec02186c..19e180b57e 100644
--- a/engines/tinsel/anim.cpp
+++ b/engines/tinsel/anim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/anim.h b/engines/tinsel/anim.h
index 0c60cf84d4..0c0d5e18ae 100644
--- a/engines/tinsel/anim.h
+++ b/engines/tinsel/anim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp
index 8e3fc50f12..7913548ed1 100644
--- a/engines/tinsel/background.cpp
+++ b/engines/tinsel/background.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h
index cfa3998eda..418413e200 100644
--- a/engines/tinsel/background.h
+++ b/engines/tinsel/background.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index 9f1f2c43f4..a702568164 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index fa66b7ad8e..f28cd684f9 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h
index fa254ed26d..e52297f9de 100644
--- a/engines/tinsel/bmv.h
+++ b/engines/tinsel/bmv.h
@@ -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
diff --git a/engines/tinsel/cliprect.cpp b/engines/tinsel/cliprect.cpp
index 76feede83f..6212a1491e 100644
--- a/engines/tinsel/cliprect.cpp
+++ b/engines/tinsel/cliprect.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/cliprect.h b/engines/tinsel/cliprect.h
index 101289b837..f55542a170 100644
--- a/engines/tinsel/cliprect.h
+++ b/engines/tinsel/cliprect.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/config.cpp b/engines/tinsel/config.cpp
index 050573028a..bd5929f6ef 100644
--- a/engines/tinsel/config.cpp
+++ b/engines/tinsel/config.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/config.h b/engines/tinsel/config.h
index 8b6b675766..4f3168622a 100644
--- a/engines/tinsel/config.h
+++ b/engines/tinsel/config.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp
index a83e7cd9ca..e69031d572 100644
--- a/engines/tinsel/cursor.cpp
+++ b/engines/tinsel/cursor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/cursor.h b/engines/tinsel/cursor.h
index 4e32aa3a19..997d7ae479 100644
--- a/engines/tinsel/cursor.h
+++ b/engines/tinsel/cursor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/debugger.cpp b/engines/tinsel/debugger.cpp
index 1261326032..45e3a05903 100644
--- a/engines/tinsel/debugger.cpp
+++ b/engines/tinsel/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/debugger.h b/engines/tinsel/debugger.h
index ff4ccd519f..7e01c51641 100644
--- a/engines/tinsel/debugger.h
+++ b/engines/tinsel/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index a7ba8b28cb..c7a62dacad 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index 6e83fce3b1..a2ea67b3e6 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index e6229ff3a0..a84dad942c 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/dialogs.h b/engines/tinsel/dialogs.h
index ab53ba771c..47f831869f 100644
--- a/engines/tinsel/dialogs.h
+++ b/engines/tinsel/dialogs.h
@@ -9,12 +9,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/drives.cpp b/engines/tinsel/drives.cpp
index 3ecef83753..1ed659040d 100644
--- a/engines/tinsel/drives.cpp
+++ b/engines/tinsel/drives.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/drives.h b/engines/tinsel/drives.h
index 9e97b92fa5..5b80505345 100644
--- a/engines/tinsel/drives.h
+++ b/engines/tinsel/drives.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/dw.h b/engines/tinsel/dw.h
index 34f05ab8c2..b0619ad5ad 100644
--- a/engines/tinsel/dw.h
+++ b/engines/tinsel/dw.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/effect.cpp b/engines/tinsel/effect.cpp
index f5adb63c2b..11e849e101 100644
--- a/engines/tinsel/effect.cpp
+++ b/engines/tinsel/effect.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp
index 61d3903f1a..07d3c512b4 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h
index 51669e4680..cfc52c11c0 100644
--- a/engines/tinsel/events.h
+++ b/engines/tinsel/events.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index b51b1d6d4f..0a28ea1460 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h
index f7db902fe5..cb1bb3aa14 100644
--- a/engines/tinsel/faders.h
+++ b/engines/tinsel/faders.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/film.h b/engines/tinsel/film.h
index edb8dc268d..f5f48f3067 100644
--- a/engines/tinsel/film.h
+++ b/engines/tinsel/film.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp
index 3dba56468b..076bfa8e23 100644
--- a/engines/tinsel/font.cpp
+++ b/engines/tinsel/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/font.h b/engines/tinsel/font.h
index 83bc12354e..d9e25bea2e 100644
--- a/engines/tinsel/font.h
+++ b/engines/tinsel/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index c4f341f6fe..0282aff3cb 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/graphics.h b/engines/tinsel/graphics.h
index d34f069f6a..b2144247c2 100644
--- a/engines/tinsel/graphics.h
+++ b/engines/tinsel/graphics.h
@@ -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
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index 104adf72a2..62d244e449 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/handle.h b/engines/tinsel/handle.h
index e681bfc131..ccc8f0f9db 100644
--- a/engines/tinsel/handle.h
+++ b/engines/tinsel/handle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/heapmem.cpp b/engines/tinsel/heapmem.cpp
index 597cc69e66..82fc3fd11a 100644
--- a/engines/tinsel/heapmem.cpp
+++ b/engines/tinsel/heapmem.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/heapmem.h b/engines/tinsel/heapmem.h
index 7b29a3ecce..2be405d9d7 100644
--- a/engines/tinsel/heapmem.h
+++ b/engines/tinsel/heapmem.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/mareels.cpp b/engines/tinsel/mareels.cpp
index 7dd905d0f2..d906709f32 100644
--- a/engines/tinsel/mareels.cpp
+++ b/engines/tinsel/mareels.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/mareels.h b/engines/tinsel/mareels.h
index 2ff5ca906e..3ef1cd43ea 100644
--- a/engines/tinsel/mareels.h
+++ b/engines/tinsel/mareels.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/move.cpp b/engines/tinsel/move.cpp
index 275b6006f5..32a953b1a2 100644
--- a/engines/tinsel/move.cpp
+++ b/engines/tinsel/move.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/move.h b/engines/tinsel/move.h
index a307e5c081..7fb284baed 100644
--- a/engines/tinsel/move.h
+++ b/engines/tinsel/move.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp
index 37769a7819..75894aea89 100644
--- a/engines/tinsel/multiobj.cpp
+++ b/engines/tinsel/multiobj.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/multiobj.h b/engines/tinsel/multiobj.h
index a0f977553a..9968bf3c37 100644
--- a/engines/tinsel/multiobj.h
+++ b/engines/tinsel/multiobj.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index bf7257f876..8a7305f63b 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/music.h b/engines/tinsel/music.h
index 121bf3d79b..0a78c39a76 100644
--- a/engines/tinsel/music.h
+++ b/engines/tinsel/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index b70b581bbe..caf41ab81c 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h
index 5644ddf19c..0b6efc3356 100644
--- a/engines/tinsel/object.h
+++ b/engines/tinsel/object.h
@@ -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
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index b72d52cc8d..918894cf6f 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index c57b8df2ba..a91a432149 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -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
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index 7e439e83a9..dc19f39405 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h
index 4980fc6ed9..46ba2b10f3 100644
--- a/engines/tinsel/pcode.h
+++ b/engines/tinsel/pcode.h
@@ -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
diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp
index b821c5dee2..545403573d 100644
--- a/engines/tinsel/pdisplay.cpp
+++ b/engines/tinsel/pdisplay.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/pdisplay.h b/engines/tinsel/pdisplay.h
index aefaf015bd..f02ef928f3 100644
--- a/engines/tinsel/pdisplay.h
+++ b/engines/tinsel/pdisplay.h
@@ -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
diff --git a/engines/tinsel/pid.h b/engines/tinsel/pid.h
index 4f63045cb4..6c9d7ee7e4 100644
--- a/engines/tinsel/pid.h
+++ b/engines/tinsel/pid.h
@@ -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
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
index e202278953..ef3127233d 100644
--- a/engines/tinsel/play.cpp
+++ b/engines/tinsel/play.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/play.h b/engines/tinsel/play.h
index fffa8a9329..01bb10bf21 100644
--- a/engines/tinsel/play.h
+++ b/engines/tinsel/play.h
@@ -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
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index 8a984c78f9..767c0b442f 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/polygons.h b/engines/tinsel/polygons.h
index 6d36d555d8..763f009805 100644
--- a/engines/tinsel/polygons.h
+++ b/engines/tinsel/polygons.h
@@ -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
diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp
index 49666c13ca..8ed65af3e4 100644
--- a/engines/tinsel/rince.cpp
+++ b/engines/tinsel/rince.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h
index 623f3ee137..db59012a57 100644
--- a/engines/tinsel/rince.h
+++ b/engines/tinsel/rince.h
@@ -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
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index acff196916..88cd80b78a 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp
index d2537169f7..32ec774575 100644
--- a/engines/tinsel/savescn.cpp
+++ b/engines/tinsel/savescn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/savescn.h b/engines/tinsel/savescn.h
index 894af0d6b8..b4f74b173a 100644
--- a/engines/tinsel/savescn.h
+++ b/engines/tinsel/savescn.h
@@ -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
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index 6b6f4a5cd3..49a854045d 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/scene.h b/engines/tinsel/scene.h
index 06e5c096d9..27aecaa132 100644
--- a/engines/tinsel/scene.h
+++ b/engines/tinsel/scene.h
@@ -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
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index a73b4b9b97..894ffb7f5b 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/sched.h b/engines/tinsel/sched.h
index 3e791cecd8..da06c545bf 100644
--- a/engines/tinsel/sched.h
+++ b/engines/tinsel/sched.h
@@ -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
diff --git a/engines/tinsel/scn.cpp b/engines/tinsel/scn.cpp
index 70093447ff..db14af27e2 100644
--- a/engines/tinsel/scn.cpp
+++ b/engines/tinsel/scn.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/scn.h b/engines/tinsel/scn.h
index 2e3a02cdda..12253d70b2 100644
--- a/engines/tinsel/scn.h
+++ b/engines/tinsel/scn.h
@@ -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
diff --git a/engines/tinsel/scroll.cpp b/engines/tinsel/scroll.cpp
index 0a6a281d35..eafb238ec0 100644
--- a/engines/tinsel/scroll.cpp
+++ b/engines/tinsel/scroll.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/scroll.h b/engines/tinsel/scroll.h
index bcdc15cda6..4d3f85dd0f 100644
--- a/engines/tinsel/scroll.h
+++ b/engines/tinsel/scroll.h
@@ -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
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 416ee74127..3d87a17331 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/sound.h b/engines/tinsel/sound.h
index c68d9cb71e..6255d7ffe8 100644
--- a/engines/tinsel/sound.h
+++ b/engines/tinsel/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/strres.cpp b/engines/tinsel/strres.cpp
index 19a1ee94d6..6ad01a0d35 100644
--- a/engines/tinsel/strres.cpp
+++ b/engines/tinsel/strres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/strres.h b/engines/tinsel/strres.h
index 772896c81f..56d5273153 100644
--- a/engines/tinsel/strres.h
+++ b/engines/tinsel/strres.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/sysvar.cpp b/engines/tinsel/sysvar.cpp
index 6ef4f165ab..6244c5c4d5 100644
--- a/engines/tinsel/sysvar.cpp
+++ b/engines/tinsel/sysvar.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/sysvar.h b/engines/tinsel/sysvar.h
index 65bf558433..49391cc5cf 100644
--- a/engines/tinsel/sysvar.h
+++ b/engines/tinsel/sysvar.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp
index 150eb2bdde..1c114fffa1 100644
--- a/engines/tinsel/text.cpp
+++ b/engines/tinsel/text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h
index 97e82c7a93..5d39540d8f 100644
--- a/engines/tinsel/text.h
+++ b/engines/tinsel/text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/timers.cpp b/engines/tinsel/timers.cpp
index 36986ccb47..d4b20f4bfb 100644
--- a/engines/tinsel/timers.cpp
+++ b/engines/tinsel/timers.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/timers.h b/engines/tinsel/timers.h
index 9bf85d9c35..67019bfea3 100644
--- a/engines/tinsel/timers.h
+++ b/engines/tinsel/timers.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index 34aa64a609..0bc83868de 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/tinlib.h b/engines/tinsel/tinlib.h
index 7c8c2ffbf6..c1f2269a03 100644
--- a/engines/tinsel/tinlib.h
+++ b/engines/tinsel/tinlib.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 5ba3c5e80a..31610a8467 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index efa9355dd5..c83bc80ead 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/token.cpp b/engines/tinsel/token.cpp
index 080c005c3c..1e4efe7445 100644
--- a/engines/tinsel/token.cpp
+++ b/engines/tinsel/token.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tinsel/token.h b/engines/tinsel/token.h
index 8169ef1c7a..7aa8f327b6 100644
--- a/engines/tinsel/token.h
+++ b/engines/tinsel/token.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toltecs/animation.cpp b/engines/toltecs/animation.cpp
index 084332cf83..1f776bbc02 100644
--- a/engines/toltecs/animation.cpp
+++ b/engines/toltecs/animation.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "toltecs/toltecs.h"
diff --git a/engines/toltecs/animation.h b/engines/toltecs/animation.h
index 54ec5d8afa..728142cacb 100644
--- a/engines/toltecs/animation.h
+++ b/engines/toltecs/animation.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_ANIMATION_H
diff --git a/engines/toltecs/console.cpp b/engines/toltecs/console.cpp
index f3394909ed..f84a8e3c44 100644
--- a/engines/toltecs/console.cpp
+++ b/engines/toltecs/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toltecs/console.h b/engines/toltecs/console.h
index bcdfd0cf04..5e786d527e 100644
--- a/engines/toltecs/console.h
+++ b/engines/toltecs/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp
index 380f4a3a26..b6c7ad3d2b 100644
--- a/engines/toltecs/detection.cpp
+++ b/engines/toltecs/detection.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "base/plugins.h"
@@ -256,7 +255,7 @@ SaveStateList ToltecsMetaEngine::listSaves(const char *target) const {
Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); file++) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 3);
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index 0850630c43..a58771433e 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "audio/mixer.h"
@@ -196,7 +195,7 @@ void MenuSystem::handleKeyDown(const Common::KeyState& kbd) {
}
ItemID MenuSystem::findItemAt(int x, int y) {
- for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); iter++) {
+ for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); ++iter) {
if ((*iter).enabled && (*iter).rect.contains(x, y - _top))
return (*iter).id;
}
@@ -204,7 +203,7 @@ ItemID MenuSystem::findItemAt(int x, int y) {
}
MenuSystem::Item *MenuSystem::getItem(ItemID id) {
- for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); iter++) {
+ for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); ++iter) {
if ((*iter).id == id)
return &(*iter);
}
@@ -225,8 +224,6 @@ void MenuSystem::setItemCaption(Item *item, const char *caption) {
}
void MenuSystem::initMenu(MenuID menuID) {
- int newSlotNum;
-
_items.clear();
memcpy(_vm->_screen->_frontScreen, _background->getPixels(), 640 * 400);
@@ -277,7 +274,7 @@ void MenuSystem::initMenu(MenuID menuID) {
Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 116 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
}
- newSlotNum = loadSavegamesList() + 1;
+ int newSlotNum = loadSavegamesList() + 1;
_savegames.push_back(SavegameItem(newSlotNum, Common::String::format("GAME %04d", _savegames.size())));
setSavegameCaptions(true);
} else {
@@ -324,7 +321,7 @@ void MenuSystem::initMenu(MenuID menuID) {
break;
}
- for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); iter++) {
+ for (Common::Array<Item>::iterator iter = _items.begin(); iter != _items.end(); ++iter) {
if ((*iter).enabled)
drawItem((*iter).id, false);
}
@@ -509,7 +506,7 @@ int MenuSystem::loadSavegamesList() {
filenames = saveFileMan->listSavefiles(pattern.c_str());
Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
- for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); file++) {
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 3);
if (slotNum > maxSlotNum)
diff --git a/engines/toltecs/menu.h b/engines/toltecs/menu.h
index a5eca7c8ff..476eefe142 100644
--- a/engines/toltecs/menu.h
+++ b/engines/toltecs/menu.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_MENU_H
diff --git a/engines/toltecs/microtiles.cpp b/engines/toltecs/microtiles.cpp
index 9181480351..0ac04905cb 100644
--- a/engines/toltecs/microtiles.cpp
+++ b/engines/toltecs/microtiles.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "toltecs/microtiles.h"
@@ -119,10 +118,7 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
for (y = 0; y < _tilesH; ++y) {
for (x = 0; x < _tilesW; ++x) {
- int finish = 0;
- BoundingBox boundingBox;
-
- boundingBox = _tiles[i];
+ BoundingBox boundingBox = _tiles[i];
if (isBoundingBoxEmpty(boundingBox)) {
++i;
@@ -140,6 +136,7 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
// FIXME: Why is the following code in an #if block?
#if 1
if (TileX1(boundingBox) == TileSize - 1 && x != _tilesW - 1) { // check if the tile continues
+ bool finish = false;
while (!finish) {
++x;
++i;
@@ -151,13 +148,12 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
{
--x;
--i;
- finish = 1;
+ finish = true;
}
}
}
#endif
x1 = (x * TileSize) + TileX1(_tiles[i]);
-
x1 = CLIP (x1, min_x, max_x);
// FIXME: Why is the following code in an #if block?
diff --git a/engines/toltecs/microtiles.h b/engines/toltecs/microtiles.h
index 53933621a9..3714887fd7 100644
--- a/engines/toltecs/microtiles.h
+++ b/engines/toltecs/microtiles.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_MICROTILES_H
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 341da7e5f3..0aa0a99a36 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "audio/mixer.h"
diff --git a/engines/toltecs/movie.h b/engines/toltecs/movie.h
index aa28c83fef..9404e5f639 100644
--- a/engines/toltecs/movie.h
+++ b/engines/toltecs/movie.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_MOVIE_H
diff --git a/engines/toltecs/music.cpp b/engines/toltecs/music.cpp
index 830e4a97da..e4e067de39 100644
--- a/engines/toltecs/music.cpp
+++ b/engines/toltecs/music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toltecs/music.h b/engines/toltecs/music.h
index 8d364dbb9f..e6dc3dd146 100644
--- a/engines/toltecs/music.h
+++ b/engines/toltecs/music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toltecs/palette.cpp b/engines/toltecs/palette.cpp
index b93bb8b510..ab66e60c9d 100644
--- a/engines/toltecs/palette.cpp
+++ b/engines/toltecs/palette.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "graphics/palette.h"
@@ -121,7 +120,7 @@ uint16 Palette::findFragment(int16 id) {
debug(0, "Palette::findFragment(%d)", id);
uint16 result = 0;
- for (PaletteFragmentArray::iterator iter = _fragments.begin(); iter != _fragments.end(); iter++) {
+ for (PaletteFragmentArray::iterator iter = _fragments.begin(); iter != _fragments.end(); ++iter) {
PaletteFragment fragment = *iter;
if (fragment.id == id) {
result = (fragment.count << 8) | fragment.index;
@@ -194,7 +193,7 @@ void Palette::saveState(Common::WriteStream *out) {
uint16 fragmentCount = _fragments.size();
out->writeUint16LE(fragmentCount);
- for (PaletteFragmentArray::iterator iter = _fragments.begin(); iter != _fragments.end(); iter++) {
+ for (PaletteFragmentArray::iterator iter = _fragments.begin(); iter != _fragments.end(); ++iter) {
PaletteFragment fragment = *iter;
out->writeUint16LE(fragment.id);
out->writeByte(fragment.index);
diff --git a/engines/toltecs/palette.h b/engines/toltecs/palette.h
index 4777a82699..d16a32b10a 100644
--- a/engines/toltecs/palette.h
+++ b/engines/toltecs/palette.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_PALETTE_H
diff --git a/engines/toltecs/render.cpp b/engines/toltecs/render.cpp
index ae458d40a3..bf68eee94c 100644
--- a/engines/toltecs/render.cpp
+++ b/engines/toltecs/render.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/system.h"
@@ -65,7 +64,7 @@ void RenderQueue::addSprite(SpriteDrawItem &sprite) {
// Add sprite sorted by priority
RenderQueueArray::iterator iter = _currQueue->begin();
while (iter != _currQueue->end() && (*iter).priority <= item.priority) {
- iter++;
+ ++iter;
}
_currQueue->insert(iter, item);
@@ -104,7 +103,7 @@ void RenderQueue::addMask(SegmapMaskRect &mask) {
if (rectIntersectsItem(item.rect)) {
RenderQueueArray::iterator iter = _currQueue->begin();
while (iter != _currQueue->end() && (*iter).priority <= item.priority) {
- iter++;
+ ++iter;
}
_currQueue->insert(iter, item);
}
@@ -119,7 +118,7 @@ void RenderQueue::update() {
if (!doFullRefresh) {
- for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); ++iter) {
RenderQueueItem *item = &(*iter);
RenderQueueItem *prevItem = findItemInQueue(_prevQueue, *item);
if (prevItem) {
@@ -134,7 +133,7 @@ void RenderQueue::update() {
}
}
- for (RenderQueueArray::iterator iter = _prevQueue->begin(); iter != _prevQueue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = _prevQueue->begin(); iter != _prevQueue->end(); ++iter) {
RenderQueueItem *prevItem = &(*iter);
RenderQueueItem *item = findItemInQueue(_currQueue, *prevItem);
if (!item) {
@@ -145,7 +144,7 @@ void RenderQueue::update() {
restoreDirtyBackground();
- for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); ++iter) {
RenderQueueItem *item = &(*iter);
if (item->flags != kUnchanged)
invalidateItemsByRect(item->rect, item);
@@ -164,7 +163,7 @@ void RenderQueue::update() {
_vm->_screen->_fullRefresh = false;
}
- for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); ++iter) {
const RenderQueueItem *item = &(*iter);
if (item->flags == kRefresh || doFullRefresh) {
@@ -209,7 +208,7 @@ void RenderQueue::clear() {
}
bool RenderQueue::rectIntersectsItem(const Common::Rect &rect) {
- for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); ++iter) {
const RenderQueueItem *item = &(*iter);
if (rect.intersects(item->rect))
return true;
@@ -221,7 +220,7 @@ RenderQueueItem *RenderQueue::findItemInQueue(RenderQueueArray *queue, const Ren
/* This checks if the given item also exists in the previously drawn frame.
The state of the item (position, color etc) is handled elsewhere.
*/
- for (RenderQueueArray::iterator iter = queue->begin(); iter != queue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = queue->begin(); iter != queue->end(); ++iter) {
RenderQueueItem *prevItem = &(*iter);
if (prevItem->type == item.type) {
switch (item.type) {
@@ -263,7 +262,7 @@ bool RenderQueue::hasItemChanged(const RenderQueueItem &item1, const RenderQueue
}
void RenderQueue::invalidateItemsByRect(const Common::Rect &rect, const RenderQueueItem *item) {
- for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); iter++) {
+ for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); ++iter) {
RenderQueueItem *subItem = &(*iter);
if (item != subItem &&
subItem->flags == kUnchanged &&
diff --git a/engines/toltecs/render.h b/engines/toltecs/render.h
index 59d7a3ddb9..5150903146 100644
--- a/engines/toltecs/render.h
+++ b/engines/toltecs/render.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_RENDER_H
diff --git a/engines/toltecs/resource.cpp b/engines/toltecs/resource.cpp
index d66075004b..468ae0272f 100644
--- a/engines/toltecs/resource.cpp
+++ b/engines/toltecs/resource.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/file.h"
diff --git a/engines/toltecs/resource.h b/engines/toltecs/resource.h
index 3d45d9fb1b..d8e8ad9a5d 100644
--- a/engines/toltecs/resource.h
+++ b/engines/toltecs/resource.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_RESOURCE_H
diff --git a/engines/toltecs/saveload.cpp b/engines/toltecs/saveload.cpp
index 4edcc601b8..409fc97076 100644
--- a/engines/toltecs/saveload.cpp
+++ b/engines/toltecs/saveload.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/savefile.h"
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp
index dd418be71f..6bacc5dff7 100644
--- a/engines/toltecs/screen.cpp
+++ b/engines/toltecs/screen.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "graphics/cursorman.h"
diff --git a/engines/toltecs/screen.h b/engines/toltecs/screen.h
index 7b2149fded..980865f65f 100644
--- a/engines/toltecs/screen.h
+++ b/engines/toltecs/screen.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_SCREEN_H
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 83c4ef15fe..01149a14b7 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
// TODO: Clean up game variable handling and move it to ToltecsEngine
diff --git a/engines/toltecs/script.h b/engines/toltecs/script.h
index 4c880dfef5..e77dcf4352 100644
--- a/engines/toltecs/script.h
+++ b/engines/toltecs/script.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_SCRIPT_H
diff --git a/engines/toltecs/segmap.cpp b/engines/toltecs/segmap.cpp
index fea40f3277..b27e0c8e11 100644
--- a/engines/toltecs/segmap.cpp
+++ b/engines/toltecs/segmap.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "toltecs/toltecs.h"
diff --git a/engines/toltecs/segmap.h b/engines/toltecs/segmap.h
index dda0edeb88..c1ad293162 100644
--- a/engines/toltecs/segmap.h
+++ b/engines/toltecs/segmap.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_SEGMAP_H
diff --git a/engines/toltecs/sound.cpp b/engines/toltecs/sound.cpp
index 8afc0e7890..fb14dd15ee 100644
--- a/engines/toltecs/sound.cpp
+++ b/engines/toltecs/sound.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "audio/audiostream.h"
diff --git a/engines/toltecs/sound.h b/engines/toltecs/sound.h
index 48a6cd1318..13e943e9e3 100644
--- a/engines/toltecs/sound.h
+++ b/engines/toltecs/sound.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_SOUND_H
diff --git a/engines/toltecs/sprite.cpp b/engines/toltecs/sprite.cpp
index 6101eb7d85..f29f64dcfe 100644
--- a/engines/toltecs/sprite.cpp
+++ b/engines/toltecs/sprite.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "toltecs/toltecs.h"
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 8bd824cfee..d3b69e7f21 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/config-manager.h"
diff --git a/engines/toltecs/toltecs.h b/engines/toltecs/toltecs.h
index b405d099c4..7a04f6e8da 100644
--- a/engines/toltecs/toltecs.h
+++ b/engines/toltecs/toltecs.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TOLTECS_H
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index f5c580c8c5..989702cd3c 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
diff --git a/engines/tony/custom.h b/engines/tony/custom.h
index 0f1061e8cd..9ba10be28a 100644
--- a/engines/tony/custom.h
+++ b/engines/tony/custom.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 84f05b0d25..22c218a19c 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/debugger.h b/engines/tony/debugger.h
index 85ba9d75b6..1db1b460fc 100644
--- a/engines/tony/debugger.h
+++ b/engines/tony/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp
index d355450153..9bb768d1ed 100644
--- a/engines/tony/detection.cpp
+++ b/engines/tony/detection.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "base/plugins.h"
@@ -178,7 +177,7 @@ SaveStateDescriptor TonyMetaEngine::querySaveMetaInfos(const char *target, int s
}
#if PLUGIN_ENABLED_DYNAMIC(TONY)
-REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
+ REGISTER_PLUGIN_STATIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
#endif
diff --git a/engines/tony/detection_tables.h b/engines/tony/detection_tables.h
index ca16495903..ce4651f0ab 100644
--- a/engines/tony/detection_tables.h
+++ b/engines/tony/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 1729052d42..850aff17be 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/font.h b/engines/tony/font.h
index 9ef50b99ec..d52547a58d 100644
--- a/engines/tony/font.h
+++ b/engines/tony/font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -347,6 +347,7 @@ public:
virtual ~RMDialogChoice();
// Initialization and closure
+ using RMGfxWoodyBuffer::init;
void init();
void close();
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index ca7c07ad8c..c102242dfd 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -140,8 +140,6 @@ void RMOptionButton::setActiveState(bool bState) {
\****************************************************************************/
RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int slideSize) {
- RMResRaw *raw;
-
_pos = pt;
_nSlideSize = slideSize;
_nMax = nRange;
@@ -154,6 +152,7 @@ RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int
_sliderSingle = NULL;
// Sliders
+ RMResRaw *raw;
INIT_GFX16_FROMRAW(20029, _sliderCenter);
INIT_GFX16_FROMRAW(20030, _sliderLeft);
INIT_GFX16_FROMRAW(20031, _sliderRight);
@@ -966,6 +965,8 @@ void RMOptionScreen::changeState(CORO_PARAM, OptionScreenState newState) {
void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
CORO_BEGIN_CONTEXT;
bool bLeftClick, bRightClick;
+ RMResRaw *raw;
+
RMPoint mousePos;
bool bRefresh;
int i;
diff --git a/engines/tony/game.h b/engines/tony/game.h
index fdf62a2a5d..cda07de889 100644
--- a/engines/tony/game.h
+++ b/engines/tony/game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -300,6 +300,7 @@ public:
RMOptionScreen();
virtual ~RMOptionScreen();
+ using RMGfxWoodyBuffer::init;
void init(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool &result);
void initLoadMenuOnly(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool bAlternateGfx, bool &result);
void initSaveMenuOnly(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool bAlternateGfx, bool &result);
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 3433ad3024..9254d59df6 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -821,27 +821,24 @@ void RMGfxSourceBuffer8RLE::setAlreadyCompressed() {
}
void RMGfxSourceBuffer8RLE::compressRLE() {
- byte *startline;
byte *cur;
byte curdata;
byte *src;
- byte *startsrc;
- int rep;
// Perform RLE compression for lines
cur = _megaRLEBuf;
src = _buf;
for (int y = 0; y < _dimy; y++) {
// Save the beginning of the line
- startline = cur;
+ byte *startline = cur;
// Leave space for the length of the line
cur += 2;
// It starts from the empty space
curdata = 0;
- rep = 0;
- startsrc = src;
+ int rep = 0;
+ byte *startsrc = src;
for (int x = 0; x < _dimx;) {
if ((curdata == 0 && *src == 0) || (curdata == 1 && *src == _alphaBlendColor)
|| (curdata == 2 && (*src != _alphaBlendColor && *src != 0))) {
diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h
index 9e8f5225c0..c9081506d7 100644
--- a/engines/tony/gfxcore.h
+++ b/engines/tony/gfxcore.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -71,7 +71,7 @@ public:
int getDimy();
// Creation
- virtual void create(int dimx, int dimy, int nBpp);
+ void create(int dimx, int dimy, int nBpp);
virtual void destroy();
// These are valid only if the buffer is locked
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index 7bb25f59b9..efbf63a6f5 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -352,11 +352,10 @@ void RMGfxEngine::initCustomDll() {
}
void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) {
- RMItem *item;
assert(GLOBALS._gfxEngine);
if (GLOBALS._gfxEngine->_bLocationLoaded) {
- item = GLOBALS._gfxEngine->_loc.getItemFromCode(dwItem);
+ RMItem *item = GLOBALS._gfxEngine->_loc.getItemFromCode(dwItem);
if (item != NULL) {
if (nPattern != -1) {
item->setPattern(nPattern, true);
@@ -452,8 +451,8 @@ void RMGfxEngine::unloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
void RMGfxEngine::init() {
// Screen loading
- RMResRaw *raw;
RMGfxSourceBuffer16 *load = NULL;
+ RMResRaw *raw;
INIT_GFX16_FROMRAW(20038, load);
_bigBuf.addPrim(new RMGfxPrimitive(load));
_bigBuf.drawOT(Common::nullContext);
@@ -722,9 +721,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
if (_ctx->ver >= 5) {
// Version 5
- bool bStat = false;
-
- bStat = _ctx->f->readByte();
+ bool bStat = _ctx->f->readByte();
_tony.setShepherdess(bStat);
bStat = _ctx->f->readByte();
_inter.setPerorate(bStat);
diff --git a/engines/tony/gfxengine.h b/engines/tony/gfxengine.h
index ab32a01972..927593a5d3 100644
--- a/engines/tony/gfxengine.h
+++ b/engines/tony/gfxengine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/globals.cpp b/engines/tony/globals.cpp
index 8e4ae240a0..ca2b6e72dc 100644
--- a/engines/tony/globals.cpp
+++ b/engines/tony/globals.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index 0ff243b374..1cff57fd16 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp
index e84da04d97..787fb21f21 100644
--- a/engines/tony/input.cpp
+++ b/engines/tony/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/input.h b/engines/tony/input.h
index 274aa8c491..31acb68eb6 100644
--- a/engines/tony/input.h
+++ b/engines/tony/input.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index 6b023d5990..974be8b04d 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -457,8 +457,6 @@ bool RMInventory::rightRelease(const RMPoint &mpos, RMTonyAction &curAction) {
#define INVSPEED 20
void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen) {
- bool bNeedRedraw = false;
-
if (_state != CLOSED) {
// Clean up the OT list
g_system->lockMutex(_csModifyInterface);
@@ -466,6 +464,8 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
// DoFrame makes all the objects currently in the inventory be displayed
// @@@ Maybe we should do all takeable objects? Please does not help
+ bool bNeedRedraw = false;
+
for (int i = 0; i < _nInv; i++) {
if (_items[_inv[i]]._icon.doFrame(this, false) && (i >= _curPos && i <= _curPos + 7))
bNeedRedraw = true;
@@ -698,9 +698,8 @@ int RMInventory::loadState(byte *state) {
state += 4;
}
- int x;
for (int i = 0; i < 256; i++) {
- x = READ_LE_UINT32(state);
+ int x = READ_LE_UINT32(state);
state += 4;
if (i < _nItems) {
diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h
index 1d660d51cd..5528e6589c 100644
--- a/engines/tony/inventory.h
+++ b/engines/tony/inventory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -101,6 +101,7 @@ public:
/**
* Initialization and closing
*/
+ using RMGfxWoodyBuffer::init;
void init();
void close();
void reset();
@@ -209,6 +210,7 @@ public:
/**
* Initialization
*/
+ using RMGfxSourceBuffer8RLEByte::init;
void init();
void close();
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index 5beac842f9..09a00deed1 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -892,12 +892,12 @@ void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
/* Returns path along the vector path path[] */
/****************************************************************************/
-short RMCharacter::findPath(short source, short destination) {
+bool RMCharacter::findPath(short source, short destination) {
static RMBox box[MAXBOXES]; // Matrix of adjacent boxes
static short nodeCost[MAXBOXES]; // Cost per node
static short valid[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated
static short nextNode[MAXBOXES]; // Next node
- short minCost, error = 0;
+ bool error = false;
RMBoxLoc *cur;
g_system->lockMutex(_csMove);
@@ -925,13 +925,13 @@ short RMCharacter::findPath(short source, short destination) {
// Find the shortest path
while (!finish) {
- minCost = 32000; // Reset the minimum cost
- error = 1; // Possible error
+ short minCost = 32000; // Reset the minimum cost
+ error = true; // Possible error
// 1st cycle: explore possible new nodes
for (int i = 0; i < cur->_numbBox; i++) {
if (valid[i] == 1) {
- error = 0; // Failure de-bunked
+ error = false; // Failure de-bunked
int j = 0;
while (((box[i]._adj[j]) != 1) && (j < cur->_numbBox))
j++;
@@ -1851,10 +1851,9 @@ void RMGameBoxes::loadState(byte *state) {
assert(nloc <= _nLocBoxes);
- int nbox;
// For each location, read the number of boxes and their status
for (int i = 1; i <= nloc; i++) {
- nbox = READ_LE_UINT32(state);
+ int nbox = READ_LE_UINT32(state);
state += 4;
for (int j = 0; j < nbox ; j++) {
diff --git a/engines/tony/loc.h b/engines/tony/loc.h
index 1306316136..ac65a4a0bd 100644
--- a/engines/tony/loc.h
+++ b/engines/tony/loc.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -395,7 +395,7 @@ private:
private:
int inWhichBox(const RMPoint &pt);
- short findPath(short source, short destination);
+ bool findPath(short source, short destination);
RMPoint searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint point);
RMPoint nearestPoint(const RMPoint &punto);
diff --git a/engines/tony/mpal/expr.cpp b/engines/tony/mpal/expr.cpp
index 7dc640ba7c..1fdf637062 100644
--- a/engines/tony/mpal/expr.cpp
+++ b/engines/tony/mpal/expr.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
diff --git a/engines/tony/mpal/expr.h b/engines/tony/mpal/expr.h
index 256d09bb9b..6ac1963356 100644
--- a/engines/tony/mpal/expr.h
+++ b/engines/tony/mpal/expr.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp
index 4eb84d1406..8d030f1e52 100644
--- a/engines/tony/mpal/loadmpc.cpp
+++ b/engines/tony/mpal/loadmpc.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
@@ -139,8 +138,6 @@ static void FreeScript(LpMpalScript lpmsScript) {
* @returns Pointer to the buffer after the item, or NULL on failure.
*/
static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
- byte *lpLock;
-
lpmdDialog->_nObj = READ_LE_UINT32(lpBuf);
lpBuf += 4;
@@ -156,7 +153,7 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
lpmdDialog->_periodNums[i] = READ_LE_UINT16(lpBuf);
lpBuf += 2;
lpmdDialog->_periods[i] = globalAllocate(GMEM_MOVEABLE | GMEM_ZEROINIT, *lpBuf + 1);
- lpLock = (byte *)globalLock(lpmdDialog->_periods[i]);
+ byte *lpLock = (byte *)globalLock(lpmdDialog->_periods[i]);
Common::copy(lpBuf + 1, lpBuf + 1 + *lpBuf, lpLock);
globalUnlock(lpmdDialog->_periods[i]);
lpBuf += (*lpBuf) + 1;
diff --git a/engines/tony/mpal/loadmpc.h b/engines/tony/mpal/loadmpc.h
index 20956288aa..479cf5f99b 100644
--- a/engines/tony/mpal/loadmpc.h
+++ b/engines/tony/mpal/loadmpc.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp
index a04a769528..314d6f3ed5 100644
--- a/engines/tony/mpal/lzo.cpp
+++ b/engines/tony/mpal/lzo.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/* minilzo.c -- mini subset of the LZO real-time data compression library
@@ -70,15 +69,9 @@ namespace Tony {
namespace MPAL {
#define pd(a, b) ((uint32) ((a) - (b)))
-
#define TEST_IP (ip < ip_end)
-#define TEST_OP 1
-#define NEED_IP(x) ((void) 0)
-#define NEED_OP(x) ((void) 0)
-#define TEST_LB(m_pos) ((void) 0)
#define M2_MAX_OFFSET 0x0800
-#define LZO1X
/**
* Decompresses an LZO compressed resource
@@ -87,425 +80,142 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len)
register byte *op;
register const byte *ip;
register uint32 t = 0;
-#if defined(COPY_DICT)
- uint32 m_off;
- const byte *dict_end;
-#else
register const byte *m_pos;
-#endif
const byte * const ip_end = in + in_len;
-#if defined(HAVE_ANY_OP)
- byte * const op_end = out + *out_len;
-#endif
-#if defined(LZO1Z)
- uint32 last_m_off = 0;
-#endif
-
-#if defined(COPY_DICT)
- if (dict)
- {
- if (dict_len > M4_MAX_OFFSET)
- {
- dict += dict_len - M4_MAX_OFFSET;
- dict_len = M4_MAX_OFFSET;
- }
- dict_end = dict + dict_len;
- }
- else
- {
- dict_len = 0;
- dict_end = NULL;
- }
-#endif
*out_len = 0;
op = out;
ip = in;
- if (*ip > 17)
- {
+ if (*ip > 17) {
t = *ip++ - 17;
if (t < 4)
goto match_next;
- assert(t > 0); NEED_OP(t); NEED_IP(t+1);
- do *op++ = *ip++; while (--t > 0);
+ assert(t > 0);
+ do
+ *op++ = *ip++;
+ while (--t > 0);
goto first_literal_run;
}
- while (TEST_IP && TEST_OP)
- {
+ while (TEST_IP) {
t = *ip++;
if (t >= 16)
goto match;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
+ if (t == 0) {
+ while (*ip == 0) {
t += 255;
ip++;
- NEED_IP(1);
}
t += 15 + *ip++;
}
- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
-#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4)
- t += 3;
- if (t >= 8) do
- {
- UA_COPY64(op, ip);
- op += 8; ip += 8; t -= 8;
- } while (t >= 8);
- if (t >= 4)
- {
- UA_COPY32(op, ip);
- op += 4; ip += 4; t -= 4;
- }
- if (t > 0)
- {
+ assert(t > 0);
+
+ *op++ = *ip++;
+ *op++ = *ip++;
+ *op++ = *ip++;
+ do
*op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
- }
-#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
-#if !defined(LZO_UNALIGNED_OK_4)
- if (PTR_ALIGNED2_4(op, ip))
- {
-#endif
- UA_COPY32(op, ip);
- op += 4; ip += 4;
- if (--t > 0)
- {
- if (t >= 4)
- {
- do {
- UA_COPY32(op, ip);
- op += 4; ip += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *ip++; while (--t > 0);
- }
- else
- do *op++ = *ip++; while (--t > 0);
- }
-#if !defined(LZO_UNALIGNED_OK_4)
- }
- else
-#endif
-#endif
-#if !defined(LZO_UNALIGNED_OK_4) && !defined(LZO_UNALIGNED_OK_8)
- {
- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
- do *op++ = *ip++; while (--t > 0);
- }
-#endif
+ while (--t > 0);
first_literal_run:
-
t = *ip++;
if (t >= 16)
goto match;
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
-#else
- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
-#endif
- NEED_OP(3);
- t = 3; COPY_DICT(t, m_off)
-#else
-#if defined(LZO1Z)
- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
-#else
+
m_pos = op - (1 + M2_MAX_OFFSET);
m_pos -= t >> 2;
m_pos -= *ip++ << 2;
-#endif
- TEST_LB(m_pos); NEED_OP(3);
- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
-#endif
+
+ *op++ = *m_pos++;
+ *op++ = *m_pos++;
+ *op++ = *m_pos;
+
goto match_done;
do {
match:
- if (t >= 64)
- {
-#if defined(COPY_DICT)
-#if defined(LZO1X)
- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
- t = (t >> 5) - 1;
-#elif defined(LZO1Y)
- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
- t = (t >> 4) - 3;
-#elif defined(LZO1Z)
- m_off = t & 0x1f;
- if (m_off >= 0x1c)
- m_off = last_m_off;
- else
- {
- m_off = 1 + (m_off << 6) + (*ip++ >> 2);
- last_m_off = m_off;
- }
- t = (t >> 5) - 1;
-#endif
-#else
-#if defined(LZO1X)
+ if (t >= 64) {
m_pos = op - 1;
m_pos -= (t >> 2) & 7;
m_pos -= *ip++ << 3;
t = (t >> 5) - 1;
-#elif defined(LZO1Y)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 3;
- m_pos -= *ip++ << 2;
- t = (t >> 4) - 3;
-#elif defined(LZO1Z)
- {
- uint32 off = t & 0x1f;
- m_pos = op;
- if (off >= 0x1c)
- {
- assert(last_m_off > 0);
- m_pos -= last_m_off;
- }
- else
- {
- off = 1 + (off << 6) + (*ip++ >> 2);
- m_pos -= off;
- last_m_off = off;
- }
- }
- t = (t >> 5) - 1;
-#endif
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
+ assert(t > 0);
goto copy_match;
-#endif
- }
- else if (t >= 32)
- {
+ } else if (t >= 32) {
t &= 31;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
+ if (t == 0) {
+ while (*ip == 0) {
t += 255;
ip++;
- NEED_IP(1);
}
t += 31 + *ip++;
}
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- last_m_off = m_off;
-#else
- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
-#endif
-#else
-#if defined(LZO1Z)
- {
- uint32 off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- m_pos = op - off;
- last_m_off = off;
- }
-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos = op - 1;
- m_pos -= UA_GET16(ip) >> 2;
-#else
m_pos = op - 1;
m_pos -= (ip[0] >> 2) + (ip[1] << 6);
-#endif
-#endif
ip += 2;
- }
- else if (t >= 16)
- {
-#if defined(COPY_DICT)
- m_off = (t & 8) << 11;
-#else
+ } else if (t >= 16) {
m_pos = op;
m_pos -= (t & 8) << 11;
-#endif
t &= 7;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
+ if (t == 0) {
+ while (*ip == 0) {
t += 255;
ip++;
- NEED_IP(1);
}
t += 7 + *ip++;
}
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off += (ip[0] << 6) + (ip[1] >> 2);
-#else
- m_off += (ip[0] >> 2) + (ip[1] << 6);
-#endif
- ip += 2;
- if (m_off == 0)
- goto eof_found;
- m_off += 0x4000;
-#if defined(LZO1Z)
- last_m_off = m_off;
-#endif
-#else
-#if defined(LZO1Z)
- m_pos -= (ip[0] << 6) + (ip[1] >> 2);
-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos -= UA_GET16(ip) >> 2;
-#else
m_pos -= (ip[0] >> 2) + (ip[1] << 6);
-#endif
ip += 2;
if (m_pos == op)
goto eof_found;
m_pos -= 0x4000;
-#if defined(LZO1Z)
- last_m_off = pd((const byte *)op, m_pos);
-#endif
-#endif
- }
- else
- {
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = 1 + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
-#else
- m_off = 1 + (t >> 2) + (*ip++ << 2);
-#endif
- NEED_OP(2);
- t = 2; COPY_DICT(t, m_off)
-#else
-#if defined(LZO1Z)
- t = 1 + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
-#else
+ } else {
m_pos = op - 1;
m_pos -= t >> 2;
m_pos -= *ip++ << 2;
-#endif
- TEST_LB(m_pos); NEED_OP(2);
- *op++ = *m_pos++; *op++ = *m_pos;
-#endif
+ *op++ = *m_pos++;
+ *op++ = *m_pos;
goto match_done;
}
-#if defined(COPY_DICT)
-
- NEED_OP(t+3-1);
- t += 3-1; COPY_DICT(t, m_off)
-
-#else
-
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
-#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4)
- if (op - m_pos >= 8)
- {
- t += (3 - 1);
- if (t >= 8) do
- {
- UA_COPY64(op, m_pos);
- op += 8; m_pos += 8; t -= 8;
- } while (t >= 8);
- if (t >= 4)
- {
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4;
- }
- if (t > 0)
- {
- *op++ = m_pos[0];
- if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } }
- }
- }
- else
-#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
-#if !defined(LZO_UNALIGNED_OK_4)
- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op, m_pos))
- {
- assert((op - m_pos) >= 4);
-#else
- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
- {
-#endif
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4 - (3 - 1);
- do {
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *m_pos++; while (--t > 0);
- }
- else
-#endif
+ assert(t > 0);
{
copy_match:
- *op++ = *m_pos++; *op++ = *m_pos++;
- do *op++ = *m_pos++; while (--t > 0);
+ *op++ = *m_pos++;
+ *op++ = *m_pos++;
+ do
+ *op++ = *m_pos++;
+ while (--t > 0);
}
-#endif
-
match_done:
-#if defined(LZO1Z)
- t = ip[-1] & 3;
-#else
t = ip[-2] & 3;
-#endif
if (t == 0)
break;
match_next:
- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
-#if 0
- do *op++ = *ip++; while (--t > 0);
-#else
+ assert(t > 0);
+ assert(t < 4);
*op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
-#endif
+ if (t > 1) {
+ *op++ = *ip++;
+ if (t > 2)
+ *op++ = *ip++;
+ }
t = *ip++;
- } while (TEST_IP && TEST_OP);
+ } while (TEST_IP);
}
-#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP)
- *out_len = pd(op, out);
- return LZO_E_EOF_NOT_FOUND;
-#endif
-
eof_found:
assert(t == 1);
*out_len = pd(op, out);
return (ip == ip_end ? LZO_E_OK :
(ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
-#if defined(HAVE_NEED_IP)
-input_overrun:
- *out_len = pd(op, out);
- return LZO_E_INPUT_OVERRUN;
-#endif
-
-#if defined(HAVE_NEED_OP)
-output_overrun:
- *out_len = pd(op, out);
- return LZO_E_OUTPUT_OVERRUN;
-#endif
-
-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-lookbehind_overrun:
- *out_len = pd(op, out);
- return LZO_E_LOOKBEHIND_OVERRUN;
-#endif
}
} // end of namespace MPAL
-
} // end of namespace Tony
diff --git a/engines/tony/mpal/lzo.h b/engines/tony/mpal/lzo.h
index ebb1c4b516..172900f053 100644
--- a/engines/tony/mpal/lzo.h
+++ b/engines/tony/mpal/lzo.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/* minilzo.c -- mini subset of the LZO real-time data compression library
@@ -76,36 +75,15 @@ namespace MPAL {
* normal events.
*/
#define LZO_E_OK 0
-#define LZO_E_ERROR (-1)
-#define LZO_E_OUT_OF_MEMORY (-2) /* [lzo_alloc_func_t failure] */
-#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
#define LZO_E_INPUT_OVERRUN (-4)
-#define LZO_E_OUTPUT_OVERRUN (-5)
-#define LZO_E_LOOKBEHIND_OVERRUN (-6)
-#define LZO_E_EOF_NOT_FOUND (-7)
#define LZO_E_INPUT_NOT_CONSUMED (-8)
-#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
-#define LZO_E_INVALID_ARGUMENT (-10)
-
-#define LZO1X_999_MEM_COMPRESS ((uint32) (14 * 16384L * sizeof(uint16)))
/**
* Decompresses an LZO compressed resource
*/
int lzo1x_decompress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len);
-/**
- * Comrpess a data block into an LZO stream
- */
-int lzo1x_1_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem);
-
-/**
- * better compression ratio at the cost of more memory and time
- */
-int lzo1x_999_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem);
-
} // end of namespace MPAL
-
} // end of namespace Tony
#endif /* already included */
diff --git a/engines/tony/mpal/memory.cpp b/engines/tony/mpal/memory.cpp
index 9737fe0abf..4076f710de 100644
--- a/engines/tony/mpal/memory.cpp
+++ b/engines/tony/mpal/memory.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/algorithm.h"
diff --git a/engines/tony/mpal/memory.h b/engines/tony/mpal/memory.h
index 9c21cc20e6..7739fdfa48 100644
--- a/engines/tony/mpal/memory.h
+++ b/engines/tony/mpal/memory.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TONY_MPAL_MEMORY
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp
index 19e3d43df4..c813b354b0 100644
--- a/engines/tony/mpal/mpal.cpp
+++ b/engines/tony/mpal/mpal.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
@@ -1519,13 +1518,12 @@ void mpalFree() {
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns numeric results.
*/
uint32 mpalQueryDWORD(uint16 wQueryType, ...) {
Common::String buf;
uint32 dwRet = 0;
- char *n;
va_list v;
va_start(v, wQueryType);
@@ -1626,7 +1624,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) {
*/
lockVar();
int x = GETARG(uint32);
- n = GETARG(char *);
+ char *n = GETARG(char *);
buf = Common::String::format("Status.%u", x);
if (varGetValue(buf.c_str()) <= 0)
n[0]='\0';
@@ -1716,11 +1714,10 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) {
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns a pointer or handle.
*/
MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
- char *n;
Common::String buf;
va_list v;
va_start(v, wQueryType);
@@ -1798,12 +1795,9 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
error("mpalQuery(MPQ_ITEM_IS_ACTIVE, uint32 nItem) used incorrect variant");
} else if (wQueryType == MPQ_ITEM_NAME) {
- /*
- * uint32 mpalQuery(MPQ_ITEM_NAME, uint32 nItem, char *lpszName);
- */
lockVar();
int x = GETARG(uint32);
- n = GETARG(char *);
+ char *n = GETARG(char *);
buf = Common::String::format("Status.%u", x);
if (varGetValue(buf.c_str()) <= 0)
n[0] = '\0';
@@ -1873,7 +1867,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that needs to run within a co-routine context.
*/
void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet) {
diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h
index 2d22ee8faf..af24c46697 100644
--- a/engines/tony/mpal/mpal.h
+++ b/engines/tony/mpal/mpal.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
@@ -392,7 +391,7 @@ void mpalFree();
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns numeric results.
*/
uint32 mpalQueryDWORD(uint16 wQueryType, ...);
@@ -403,7 +402,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...);
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that returns a pointer or handle.
*/
MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...);
@@ -414,7 +413,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...);
*
* @param wQueryType Type of query. The list is in the QueryTypes enum.
* @returns 4 bytes depending on the type of query
- * @remarks This is the specialised version of the original single mpalQuery
+ * @remarks This is the specialized version of the original single mpalQuery
* method that needs to run within a co-routine context.
*/
void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet);
diff --git a/engines/tony/mpal/mpaldll.h b/engines/tony/mpal/mpaldll.h
index 92ddf8fc5a..68969497c1 100644
--- a/engines/tony/mpal/mpaldll.h
+++ b/engines/tony/mpal/mpaldll.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
/*
* This code is based on original Tony Tough source code
diff --git a/engines/tony/mpal/mpalutils.cpp b/engines/tony/mpal/mpalutils.cpp
index 0919aed5ac..84c8a68919 100644
--- a/engines/tony/mpal/mpalutils.cpp
+++ b/engines/tony/mpal/mpalutils.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "tony/mpal/mpalutils.h"
diff --git a/engines/tony/mpal/mpalutils.h b/engines/tony/mpal/mpalutils.h
index f351f22196..9ef534c632 100644
--- a/engines/tony/mpal/mpalutils.h
+++ b/engines/tony/mpal/mpalutils.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef TONY_MPAL_MPALUTILS
diff --git a/engines/tony/resid.h b/engines/tony/resid.h
index 0d601b7dd6..93c008144a 100644
--- a/engines/tony/resid.h
+++ b/engines/tony/resid.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 74d32c7c0f..2a4eb826f3 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/sound.h b/engines/tony/sound.h
index 7422de02b3..446dc68d80 100644
--- a/engines/tony/sound.h
+++ b/engines/tony/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 43a2f639d9..2857bb93f8 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/tony.h b/engines/tony/tony.h
index cdc7d7e20a..40a5184c31 100644
--- a/engines/tony/tony.h
+++ b/engines/tony/tony.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index 46c018728e..224d923142 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/tonychar.h b/engines/tony/tonychar.h
index d9f18f61ec..5c5be9ca4e 100644
--- a/engines/tony/tonychar.h
+++ b/engines/tony/tonychar.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/utils.cpp b/engines/tony/utils.cpp
index 81060146b7..d70073542f 100644
--- a/engines/tony/utils.cpp
+++ b/engines/tony/utils.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/utils.h b/engines/tony/utils.h
index 9f13e5f19b..eb2f3c74d3 100644
--- a/engines/tony/utils.h
+++ b/engines/tony/utils.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index 02991975ce..5c50a50a57 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tony/window.h b/engines/tony/window.h
index 2cc9bfd37c..df1932071c 100644
--- a/engines/tony/window.h
+++ b/engines/tony/window.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 19e997af34..ec23fea186 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/anim.h b/engines/toon/anim.h
index cd550b2621..ca0d25685b 100644
--- a/engines/toon/anim.h
+++ b/engines/toon/anim.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index 303f6774fa..82544375d5 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/audio.h b/engines/toon/audio.h
index 25063603eb..afac92d4be 100644
--- a/engines/toon/audio.h
+++ b/engines/toon/audio.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp
index baab8888cf..cab31795f7 100644
--- a/engines/toon/character.cpp
+++ b/engines/toon/character.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
#include "common/system.h"
diff --git a/engines/toon/character.h b/engines/toon/character.h
index b248e7ccf2..1e0ad9c2b7 100644
--- a/engines/toon/character.h
+++ b/engines/toon/character.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_CHARACTER_H
#define TOON_CHARACTER_H
diff --git a/engines/toon/console.cpp b/engines/toon/console.cpp
index 18f81e1323..8c01c603fe 100644
--- a/engines/toon/console.cpp
+++ b/engines/toon/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/console.h b/engines/toon/console.h
index 25ce7627a1..f545b67404 100644
--- a/engines/toon/console.h
+++ b/engines/toon/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/conversation.cpp b/engines/toon/conversation.cpp
index 01ee1efaed..99aa488430 100644
--- a/engines/toon/conversation.cpp
+++ b/engines/toon/conversation.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "toon/conversation.h"
diff --git a/engines/toon/conversation.h b/engines/toon/conversation.h
index 3e459a9734..b03dae606c 100644
--- a/engines/toon/conversation.h
+++ b/engines/toon/conversation.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_CONVERSATION_H
#define TOON_CONVERSATION_H
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp
index cee7a23796..4f82514213 100644
--- a/engines/toon/detection.cpp
+++ b/engines/toon/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -179,10 +179,9 @@ SaveStateList ToonMetaEngine::listSaves(const char *target) const {
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- int slotNum = 0;
for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
- slotNum = atoi(filename->c_str() + filename->size() - 3);
+ int slotNum = atoi(filename->c_str() + filename->size() - 3);
if (slotNum >= 0 && slotNum <= 99) {
Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
diff --git a/engines/toon/drew.cpp b/engines/toon/drew.cpp
index dfd3f515fa..a0569a2d78 100644
--- a/engines/toon/drew.cpp
+++ b/engines/toon/drew.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/toon/drew.h b/engines/toon/drew.h
index ff1b619125..941df473d1 100644
--- a/engines/toon/drew.h
+++ b/engines/toon/drew.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_DREW_H
#define TOON_DREW_H
diff --git a/engines/toon/flux.cpp b/engines/toon/flux.cpp
index 70aa40fb36..14218ba4ef 100644
--- a/engines/toon/flux.cpp
+++ b/engines/toon/flux.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
diff --git a/engines/toon/flux.h b/engines/toon/flux.h
index 1dc0d9c55f..a5778e5466 100644
--- a/engines/toon/flux.h
+++ b/engines/toon/flux.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_FLUX_H
#define TOON_FLUX_H
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 2ba4eff652..ab941e5de9 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
#include "common/rect.h"
diff --git a/engines/toon/font.h b/engines/toon/font.h
index 2a46ad3559..bbbccd09c8 100644
--- a/engines/toon/font.h
+++ b/engines/toon/font.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_FONT_H
#define TOON_FONT_H
diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp
index 8b8f0ab577..04368df5ca 100644
--- a/engines/toon/hotspot.cpp
+++ b/engines/toon/hotspot.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
diff --git a/engines/toon/hotspot.h b/engines/toon/hotspot.h
index 3852e2e42e..782d06a9fe 100644
--- a/engines/toon/hotspot.h
+++ b/engines/toon/hotspot.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_HOTSPOT_H
#define TOON_HOTSPOT_H
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index 9e8514d0a8..498e4021e2 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
#include "common/events.h"
diff --git a/engines/toon/movie.h b/engines/toon/movie.h
index 14287d87fd..54d4fd4dc7 100644
--- a/engines/toon/movie.h
+++ b/engines/toon/movie.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_MOVIE_H
#define TOON_MOVIE_H
diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp
index 336847e73c..fdc35983dc 100644
--- a/engines/toon/path.cpp
+++ b/engines/toon/path.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
diff --git a/engines/toon/path.h b/engines/toon/path.h
index 59f74ef286..c69954bded 100644
--- a/engines/toon/path.h
+++ b/engines/toon/path.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_PATH_H
#define TOON_PATH_H
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 4927f50e08..51077c0b17 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "toon/picture.h"
#include "toon/tools.h"
@@ -268,15 +268,14 @@ void Picture::floodFillNotWalkableOnMask(int16 x, int16 y) {
// Stack-based floodFill algorithm based on
// http://student.kuleuven.be/~m0216922/CG/files/floodfill.cpp
Common::Stack<Common::Point> stack;
- bool spanLeft, spanRight;
stack.push(Common::Point(x, y));
while (!stack.empty()) {
Common::Point pt = stack.pop();
while (_data[pt.x + pt.y * _width] & 0x1F && pt.y >= 0)
pt.y--;
pt.y++;
- spanLeft = false;
- spanRight = false;
+ bool spanLeft = false;
+ bool spanRight = false;
while (_data[pt.x + pt.y * _width] & 0x1F && pt.y < _height) {
_data[pt.x + pt.y * _width] &= 0xE0;
if (!spanLeft && pt.x > 0 && _data[pt.x - 1 + pt.y * _width] & 0x1F) {
diff --git a/engines/toon/picture.h b/engines/toon/picture.h
index 5e79612a39..0e853e4ed5 100644
--- a/engines/toon/picture.h
+++ b/engines/toon/picture.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_PICTURE_H
#define TOON_PICTURE_H
diff --git a/engines/toon/resource.cpp b/engines/toon/resource.cpp
index ffcabbd348..f7c02d5f10 100644
--- a/engines/toon/resource.cpp
+++ b/engines/toon/resource.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "toon/resource.h"
#include "common/debug.h"
diff --git a/engines/toon/resource.h b/engines/toon/resource.h
index b432a1d335..6991fae5a7 100644
--- a/engines/toon/resource.h
+++ b/engines/toon/resource.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_RESOURCE_H
#define TOON_RESOURCE_H
diff --git a/engines/toon/script.cpp b/engines/toon/script.cpp
index d752c277db..a99e398200 100644
--- a/engines/toon/script.cpp
+++ b/engines/toon/script.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
#include "common/endian.h"
diff --git a/engines/toon/script.h b/engines/toon/script.h
index 8ef085f383..3f1413984d 100644
--- a/engines/toon/script.h
+++ b/engines/toon/script.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_SCRIPT_H
#define TOON_SCRIPT_H
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index 70baaaef22..5e8ff09a86 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
#include "common/system.h"
diff --git a/engines/toon/script_func.h b/engines/toon/script_func.h
index e22c4b34fa..bab26d4c28 100644
--- a/engines/toon/script_func.h
+++ b/engines/toon/script_func.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef SCRIPT_FUNC_H
#define SCRIPT_FUNC_H
diff --git a/engines/toon/state.cpp b/engines/toon/state.cpp
index fffa8cf529..6ac5808219 100644
--- a/engines/toon/state.cpp
+++ b/engines/toon/state.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
diff --git a/engines/toon/state.h b/engines/toon/state.h
index 4004b8b4f0..88ec4eb560 100644
--- a/engines/toon/state.h
+++ b/engines/toon/state.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_STATE_H
#define TOON_STATE_H
diff --git a/engines/toon/text.cpp b/engines/toon/text.cpp
index bd4583d799..75b4d4f021 100644
--- a/engines/toon/text.cpp
+++ b/engines/toon/text.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
diff --git a/engines/toon/text.h b/engines/toon/text.h
index cd575736b7..10358a7327 100644
--- a/engines/toon/text.h
+++ b/engines/toon/text.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_TEXT_H
#define TOON_TEXT_H
diff --git a/engines/toon/tools.cpp b/engines/toon/tools.cpp
index f5c77aca69..e224f2708b 100644
--- a/engines/toon/tools.cpp
+++ b/engines/toon/tools.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/debug.h"
diff --git a/engines/toon/tools.h b/engines/toon/tools.h
index 44c0fc4644..d80ec006b0 100644
--- a/engines/toon/tools.h
+++ b/engines/toon/tools.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_TOOLS_H
#define TOON_TOOLS_H
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 7b1456b05c..14e7d104d2 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/system.h"
#include "common/events.h"
@@ -184,10 +184,10 @@ void ToonEngine::parseInput() {
Common::Event event;
while (_event->pollEvent(event)) {
- bool hasModifier = event.kbd.hasFlags(Common::KBD_ALT|Common::KBD_CTRL|Common::KBD_SHIFT);
+ const bool hasModifier = (event.kbd.flags & Common::KBD_NON_STICKY) != 0;
switch (event.type) {
case Common::EVENT_KEYDOWN:
- if ((event.kbd.ascii == 27 || event.kbd.ascii == 32) && !hasModifier) {
+ if ((event.kbd.keycode == Common::KEYCODE_ESCAPE || event.kbd.keycode == Common::KEYCODE_SPACE) && !hasModifier) {
_audioManager->stopCurrentVoice();
}
if (event.kbd.keycode == Common::KEYCODE_F5 && !hasModifier) {
@@ -198,21 +198,21 @@ void ToonEngine::parseInput() {
if (canLoadGameStateCurrently())
loadGame(-1);
}
- if (event.kbd.ascii == 't' && !hasModifier) {
+ if (event.kbd.keycode == Common::KEYCODE_t && !hasModifier) {
_showConversationText = !_showConversationText;
}
- if (event.kbd.ascii == 'm' && !hasModifier) {
+ if (event.kbd.keycode == Common::KEYCODE_m && !hasModifier) {
_audioManager->muteMusic(!_audioManager->isMusicMuted());
}
- if (event.kbd.ascii == 'd' && !hasModifier) {
+ if (event.kbd.keycode == Common::KEYCODE_d && !hasModifier) {
_audioManager->muteVoice(!_audioManager->isVoiceMuted());
}
- if (event.kbd.ascii == 's' && !hasModifier) {
+ if (event.kbd.keycode == Common::KEYCODE_s && !hasModifier) {
_audioManager->muteSfx(!_audioManager->isSfxMuted());
}
if (event.kbd.flags & Common::KBD_ALT) {
- int slotNum = event.kbd.ascii - '0';
+ int slotNum = event.kbd.keycode - (event.kbd.keycode >= Common::KEYCODE_KP0 ? Common::KEYCODE_KP0 : Common::KEYCODE_0);
if (slotNum >= 0 && slotNum <= 9 && canSaveGameStateCurrently()) {
if (saveGame(slotNum, "")) {
// ok
@@ -229,7 +229,7 @@ void ToonEngine::parseInput() {
}
if (event.kbd.flags & Common::KBD_CTRL) {
- int slotNum = event.kbd.ascii - '0';
+ int slotNum = event.kbd.keycode - (event.kbd.keycode >= Common::KEYCODE_KP0 ? Common::KEYCODE_KP0 : Common::KEYCODE_0);
if (slotNum >= 0 && slotNum <= 9 && canLoadGameStateCurrently()) {
if (loadGame(slotNum)) {
// ok
@@ -634,7 +634,6 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
bool doExit = false;
bool exitGame = false;
- int clickingOn, clickRelease;
int menuMask = MAINMENUMASK_BASE;
Common::SeekableReadStream *mainmenuMusicFile = NULL;
AudioStreamInstance *mainmenuMusic = NULL;
@@ -644,8 +643,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
dirtyAllScreen();
while (!doExit) {
- clickingOn = MAINMENUHOTSPOT_NONE;
- clickRelease = false;
+ int clickingOn = MAINMENUHOTSPOT_NONE;
+ int clickRelease = false;
if (!musicPlaying) {
mainmenuMusicFile = resources()->openFile("BR091013.MUS");
@@ -3615,7 +3614,7 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
createMouseItem(21);
rearrangeInventory();
return 1;
- } else if (itemSrc == 0x6b || itemSrc == 0x6c || itemSrc == 0x6f || itemSrc == 108 || itemSrc == 112) {
+ } else if (itemSrc == 0x6b || itemSrc == 0x6c || itemSrc == 0x6f || itemSrc == 0x70) {
sayLines(2, 1292);
return 1;
}
@@ -4617,15 +4616,13 @@ void ToonEngine::unloadToonDat() {
}
char **ToonEngine::loadTextsVariants(Common::File &in) {
- int numTexts;
- int entryLen;
int len;
char **res = 0;
char *pos = 0;
for (int varnt = 0; varnt < _numVariant; varnt++) {
- numTexts = in.readUint16BE();
- entryLen = in.readUint16BE();
+ int numTexts = in.readUint16BE();
+ int entryLen = in.readUint16BE();
pos = (char *)malloc(entryLen);
if (varnt == _gameVariant) {
res = (char **)malloc(sizeof(char *) * numTexts);
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index 0ff351804f..6903e5de57 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef TOON_TOON_H
#define TOON_TOON_H
diff --git a/engines/touche/console.cpp b/engines/touche/console.cpp
index 2c4c6a0da1..c4272038dc 100644
--- a/engines/touche/console.cpp
+++ b/engines/touche/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/console.h b/engines/touche/console.h
index 43a303ad77..ed7620a820 100644
--- a/engines/touche/console.h
+++ b/engines/touche/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index 0662e718d5..97a14e5bc1 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/graphics.cpp b/engines/touche/graphics.cpp
index 6e565327ba..95ef16e9bd 100644
--- a/engines/touche/graphics.cpp
+++ b/engines/touche/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/graphics.h b/engines/touche/graphics.h
index 5b2ea39a24..3fdbf9b145 100644
--- a/engines/touche/graphics.h
+++ b/engines/touche/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index 85ca519f05..19c10af8de 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -569,29 +569,29 @@ int ToucheEngine::displayQuitDialog() {
quitLoop = true;
switch (_language) {
case Common::FR_FRA:
- if (event.kbd.ascii == 'o' || event.kbd.ascii == 'O') {
+ if (event.kbd.keycode == Common::KEYCODE_o) {
ret = 1;
}
break;
case Common::DE_DEU:
- if (event.kbd.ascii == 'j' || event.kbd.ascii == 'J') {
+ if (event.kbd.keycode == Common::KEYCODE_j) {
ret = 1;
}
break;
case Common::ES_ESP:
- if (event.kbd.ascii == 's' || event.kbd.ascii == 'S') {
+ if (event.kbd.keycode == Common::KEYCODE_s) {
ret = 1;
}
break;
case Common::PL_POL:
- if (event.kbd.ascii == 's' || event.kbd.ascii == 'S' || event.kbd.ascii == 't' || event.kbd.ascii == 'T') {
+ if (event.kbd.keycode == Common::KEYCODE_s || event.kbd.keycode == Common::KEYCODE_t) {
ret = 1;
}
break;
default:
// According to cyx, the Italian version uses the same
// keys as the English one.
- if (event.kbd.ascii == 'y' || event.kbd.ascii == 'Y') {
+ if (event.kbd.keycode == Common::KEYCODE_y) {
ret = 1;
}
break;
diff --git a/engines/touche/midi.cpp b/engines/touche/midi.cpp
index da14baa484..96813077ce 100644
--- a/engines/touche/midi.cpp
+++ b/engines/touche/midi.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/midi.h b/engines/touche/midi.h
index 24f9da0474..e54d43209c 100644
--- a/engines/touche/midi.h
+++ b/engines/touche/midi.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/opcodes.cpp b/engines/touche/opcodes.cpp
index 18677eae26..ee7f3a9b6b 100644
--- a/engines/touche/opcodes.cpp
+++ b/engines/touche/opcodes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 9625224316..16a95d307f 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp
index a054299ecd..d44a3d43ff 100644
--- a/engines/touche/saveload.cpp
+++ b/engines/touche/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/staticres.cpp b/engines/touche/staticres.cpp
index 23b76558e4..d2359dd130 100644
--- a/engines/touche/staticres.cpp
+++ b/engines/touche/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index b3e3ca5b50..09697d0e4a 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -416,13 +416,13 @@ void ToucheEngine::processEvents(bool handleKeyEvents) {
this->getDebugger()->onFrame();
}
} else {
- if (event.kbd.ascii == 't') {
+ if (event.kbd.keycode == Common::KEYCODE_t) {
++_talkTextMode;
if (_talkTextMode == kTalkModeCount) {
_talkTextMode = 0;
}
displayTextMode(-(92 + _talkTextMode));
- } else if (event.kbd.ascii == ' ') {
+ } else if (event.kbd.keycode == Common::KEYCODE_SPACE) {
updateKeyCharTalk(2);
}
}
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 9cc42b0c68..3da33f593b 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_dialogs.cpp b/engines/tsage/blue_force/blueforce_dialogs.cpp
index 23701c9e5b..2f337ac549 100644
--- a/engines/tsage/blue_force/blueforce_dialogs.cpp
+++ b/engines/tsage/blue_force/blueforce_dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_dialogs.h b/engines/tsage/blue_force/blueforce_dialogs.h
index 76de7d19d9..77017db9d0 100644
--- a/engines/tsage/blue_force/blueforce_dialogs.h
+++ b/engines/tsage/blue_force/blueforce_dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index c8a0117bcf..e6e71399dc 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h
index 0045980820..cb3c62dd3a 100644
--- a/engines/tsage/blue_force/blueforce_logic.h
+++ b/engines/tsage/blue_force/blueforce_logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp
index 06be605c1a..1e94e44b74 100644
--- a/engines/tsage/blue_force/blueforce_scenes0.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes0.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes0.h b/engines/tsage/blue_force/blueforce_scenes0.h
index e7ee06e779..c6f380338d 100644
--- a/engines/tsage/blue_force/blueforce_scenes0.h
+++ b/engines/tsage/blue_force/blueforce_scenes0.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp
index fa877ea6c9..1cbebd140e 100644
--- a/engines/tsage/blue_force/blueforce_scenes1.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes1.h b/engines/tsage/blue_force/blueforce_scenes1.h
index ddde200370..8b65c97bb2 100644
--- a/engines/tsage/blue_force/blueforce_scenes1.h
+++ b/engines/tsage/blue_force/blueforce_scenes1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp
index e444c8b91d..65ff85155f 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes2.h b/engines/tsage/blue_force/blueforce_scenes2.h
index 17e749d7a1..6ae324517a 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.h
+++ b/engines/tsage/blue_force/blueforce_scenes2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp
index feaf789392..0f7324f5c8 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -4438,7 +4438,7 @@ void Scene360::postInit(SceneObjectList *OwnerList) {
BF_GLOBALS._player._moveDiff.y = 4;
BF_GLOBALS._player.enableControl();
- if ((BF_GLOBALS._sceneManager._previousScene == 355) || (BF_GLOBALS._sceneManager._previousScene != 370)) {
+ if (BF_GLOBALS._sceneManager._previousScene != 370) {
BF_GLOBALS._player.setPosition(Common::Point(253, 135));
BF_GLOBALS._player.setStrip(2);
diff --git a/engines/tsage/blue_force/blueforce_scenes3.h b/engines/tsage/blue_force/blueforce_scenes3.h
index 894c3e5ffd..e437fd3a92 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.h
+++ b/engines/tsage/blue_force/blueforce_scenes3.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp
index 2b4c0ff348..50f8499b3b 100644
--- a/engines/tsage/blue_force/blueforce_scenes4.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -140,7 +140,7 @@ void Scene410::Action5::signal() {
ADD_PLAYER_MOVER(114, 133);
} else {
ADD_PLAYER_MOVER(195, 139);
- }
+ }
break;
case 1:
BF_GLOBALS._player.updateAngle(scene->_passenger._position);
diff --git a/engines/tsage/blue_force/blueforce_scenes4.h b/engines/tsage/blue_force/blueforce_scenes4.h
index e5877df4f0..9a6df24add 100644
--- a/engines/tsage/blue_force/blueforce_scenes4.h
+++ b/engines/tsage/blue_force/blueforce_scenes4.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp
index 101a39c4b7..562facd000 100644
--- a/engines/tsage/blue_force/blueforce_scenes5.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes5.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1623,7 +1623,7 @@ void Scene570::PasswordEntry::process(Event &event) {
checkPassword();
remove();
- } else if ((key >= 32) || (key <= 126)) {
+ } else if ((key >= 32) && (key <= 126)) {
// Valid character pressed
if (_entryBuffer.size() < 10)
_entryBuffer += (char)key;
diff --git a/engines/tsage/blue_force/blueforce_scenes5.h b/engines/tsage/blue_force/blueforce_scenes5.h
index 71c7f3d8f1..7c5bbb3feb 100644
--- a/engines/tsage/blue_force/blueforce_scenes5.h
+++ b/engines/tsage/blue_force/blueforce_scenes5.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes6.cpp b/engines/tsage/blue_force/blueforce_scenes6.cpp
index b20092492f..92534d3095 100644
--- a/engines/tsage/blue_force/blueforce_scenes6.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes6.h b/engines/tsage/blue_force/blueforce_scenes6.h
index 3f9c14aa11..7ace22f5a6 100644
--- a/engines/tsage/blue_force/blueforce_scenes6.h
+++ b/engines/tsage/blue_force/blueforce_scenes6.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes7.cpp b/engines/tsage/blue_force/blueforce_scenes7.cpp
index 2f52c4df95..268c755299 100644
--- a/engines/tsage/blue_force/blueforce_scenes7.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes7.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes7.h b/engines/tsage/blue_force/blueforce_scenes7.h
index 161d94cc2c..91fb4c5ab2 100644
--- a/engines/tsage/blue_force/blueforce_scenes7.h
+++ b/engines/tsage/blue_force/blueforce_scenes7.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp
index f78a332be9..6855fd41b9 100644
--- a/engines/tsage/blue_force/blueforce_scenes8.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes8.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes8.h b/engines/tsage/blue_force/blueforce_scenes8.h
index b9e6ebd640..140327e85d 100644
--- a/engines/tsage/blue_force/blueforce_scenes8.h
+++ b/engines/tsage/blue_force/blueforce_scenes8.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp
index 405a436f55..53000d6997 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes9.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -516,7 +516,7 @@ void Scene900::postInit(SceneObjectList *OwnerList) {
_door.setPosition(Common::Point(847, 45));
_door._flag = 1;
- if ((BF_GLOBALS._sceneManager._previousScene == 880) || (BF_GLOBALS._sceneManager._previousScene != 910)) {
+ if (BF_GLOBALS._sceneManager._previousScene != 910) {
BF_GLOBALS._walkRegions.disableRegion(26);
BF_GLOBALS._player.disableControl();
if (BF_GLOBALS._bookmark == bFinishedWGreen) {
diff --git a/engines/tsage/blue_force/blueforce_scenes9.h b/engines/tsage/blue_force/blueforce_scenes9.h
index 8bf7f343a1..52935debd4 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.h
+++ b/engines/tsage/blue_force/blueforce_scenes9.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_speakers.cpp b/engines/tsage/blue_force/blueforce_speakers.cpp
index b15d2f4716..ea73cc9d7f 100644
--- a/engines/tsage/blue_force/blueforce_speakers.cpp
+++ b/engines/tsage/blue_force/blueforce_speakers.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/blue_force/blueforce_speakers.h b/engines/tsage/blue_force/blueforce_speakers.h
index e9150df056..dfe6f51039 100644
--- a/engines/tsage/blue_force/blueforce_speakers.h
+++ b/engines/tsage/blue_force/blueforce_speakers.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index ba8cfb82a9..d1faca5dac 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -449,8 +449,13 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
// Draw the dialog
draw();
+
g_globals->_events.showCursor();
+ // Force the display of an arrow cursor during discussions in R2R
+ if (g_vm->getGameID() == GType_Ringworld2)
+ R2_GLOBALS._events.setCursor(CURSOR_ARROW);
+
// WORKAROUND: On-screen dialogs are really meant to use a GfxManager instance
// for their lifetime, which prevents saving or loading. Since I don't want to spend a lot
// of time refactoring this already working dialog, fake it by putting a dummy gfxmanager at
diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h
index 8aa91ec3ef..3f4d14f785 100644
--- a/engines/tsage/converse.h
+++ b/engines/tsage/converse.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 16fe45044b..f35aa583e2 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1593,12 +1593,12 @@ bool SceneItem::startAction(CursorType action, Event &event) {
}
void SceneItem::doAction(int action) {
- const char *msg = NULL;
-
if (g_vm->getGameID() == GType_Ringworld2) {
Event dummyEvent;
((Ringworld2::SceneExt *)GLOBALS._sceneManager._scene)->display((CursorType)action, dummyEvent);
} else {
+ const char *msg = NULL;
+
switch ((int)action) {
case CURSOR_LOOK:
msg = LOOK_SCENE_HOTSPOT;
@@ -2721,7 +2721,7 @@ GfxSurface SceneObject::getFrame() {
_visageImages.setVisage(_visage, _strip);
GfxSurface frame = _visageImages.getFrame(_frame);
- // Reset any centroid adjustment flags, in
+ // Reset any centroid adjustment flags, in
frame._flags &= ~(FRAME_FLIP_CENTROID_X | FRAME_FLIP_CENTROID_Y);
// For later games, check whether the appropriate object flags are set for flipping
@@ -2909,7 +2909,6 @@ void BackgroundSceneObject::copySceneToBackground() {
void SceneObjectList::draw() {
Common::Array<SceneObject *> objList;
int paneNum = 0;
- int xAmount = 0, yAmount = 0;
if (_objList.size() == 0) {
// Alternate draw mode
@@ -2936,6 +2935,7 @@ void SceneObjectList::draw() {
g_globals->_scrollFollower->_position.x - g_globals->_sceneManager._scene->_sceneBounds.left,
g_globals->_scrollFollower->_position.y - g_globals->_sceneManager._scene->_sceneBounds.top);
int loadCount = 0;
+ int xAmount = 0, yAmount = 0;
if (objPos.x >= scrollerRect.right) {
xAmount = 8;
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index c285fba669..8b1deadaeb 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -465,7 +465,7 @@ enum AnimateMode {ANIM_MODE_NONE = 0, ANIM_MODE_1 = 1, ANIM_MODE_2 = 2, ANIM_MOD
};
// Actor effect enumeration used in Return to Ringworld 2
-enum Effect { EFFECT_NONE = 0, EFFECT_SHADED = 1, EFFECT_3 = 3,
+enum Effect { EFFECT_NONE = 0, EFFECT_SHADED = 1, EFFECT_SMOKE = 3,
EFFECT_SHADOW_MAP = 5, EFFECT_SHADED2 = 6 };
class SceneObject;
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index e81e5cddb3..5a520b0e89 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -640,58 +640,58 @@ bool Ringworld2Debugger::Cmd_ListObjects(int argc, const char **argv) {
}
DebugPrintf("Available objects for this game are:\n");
- DebugPrintf("1 - R2_OPTO_DISK\n");
- DebugPrintf("2 - R2_READER\n");
- DebugPrintf("3 - R2_NEGATOR_GUN\n");
- DebugPrintf("4 - R2_STEPPING_DISKS\n");
- DebugPrintf("5 - R2_ATTRACTOR_UNIT\n");
- DebugPrintf("6 - R2_SENSOR_PROBE\n");
- DebugPrintf("7 - R2_SONIC_STUNNER\n");
- DebugPrintf("8 - R2_CABLE_HARNESS\n");
- DebugPrintf("9 - R2_COM_SCANNER\n");
- DebugPrintf("10 - R2_SPENT_POWER_CAPSULE\n");
- DebugPrintf("11 - R2_CHARGED_POWER_CAPSULE\n");
- DebugPrintf("12 - R2_AEROSOL\n");
- DebugPrintf("13 - R2_REMOTE_CONTROL\n");
- DebugPrintf("14 - R2_OPTICAL_FIBRE\n");
- DebugPrintf("15 - R2_CLAMP\n");
- DebugPrintf("16 - R2_ATTRACTOR_CABLE_HARNESS\n");
- DebugPrintf("17 - R2_FUEL_CELL\n");
- DebugPrintf("18 - R2_GYROSCOPE\n");
- DebugPrintf("19 - R2_AIRBAG\n");
- DebugPrintf("20 - R2_REBREATHER_TANK\n");
- DebugPrintf("21 - R2_RESERVE_REBREATHER_TANK\n");
- DebugPrintf("22 - R2_GUIDANCE_MODULE\n");
- DebugPrintf("23 - R2_THRUSTER_VALVE\n");
- DebugPrintf("24 - R2_BALLOON_BACKPACK\n");
- DebugPrintf("25 - R2_RADAR_MECHANISM\n");
- DebugPrintf("26 - R2_JOYSTICK\n");
- DebugPrintf("27 - R2_IGNITOR\n");
- DebugPrintf("28 - R2_DIAGNOSTICS_DISPLAY\n");
- DebugPrintf("29 - R2_GLASS_DOME\n");
- DebugPrintf("30 - R2_WICK_LAMP\n");
- DebugPrintf("31 - R2_SCRITH_KEY\n");
- DebugPrintf("32 - R2_TANNER_MASK\n");
- DebugPrintf("33 - R2_PURE_GRAIN_ALCOHOL\n");
- DebugPrintf("34 - R2_SAPPHIRE_BLUE\n");
- DebugPrintf("35 - R2_ANCIENT_SCROLLS\n");
- DebugPrintf("36 - R2_FLUTE\n");
- DebugPrintf("37 - R2_GUNPOWDER\n");
- DebugPrintf("38 - R2_NONAME\n");
- DebugPrintf("39 - R2_COM_SCANNER_2\n");
- DebugPrintf("40 - R2_SUPERCONDUCTOR_WIRE\n");
- DebugPrintf("41 - R2_PILLOW\n");
- DebugPrintf("42 - R2_FOOD_TRAY\n");
- DebugPrintf("43 - R2_LASER_HACKSAW\n");
- DebugPrintf("44 - R2_PHOTON_STUNNER\n");
- DebugPrintf("45 - R2_BATTERY\n");
- DebugPrintf("46 - R2_SOAKED_FACEMASK\n");
- DebugPrintf("47 - R2_LIGHT_BULB\n");
- DebugPrintf("48 - R2_ALCOHOL_LAMP\n");
- DebugPrintf("49 - R2_ALCOHOL_LAMP_2\n");
- DebugPrintf("50 - R2_ALCOHOL_LAMP_3\n");
- DebugPrintf("51 - R2_BROKEN_DISPLAY\n");
- DebugPrintf("52 - R2_TOOLBOX\n");
+ DebugPrintf("1 - Scene %d - R2_OPTO_DISK\n", BF_INVENTORY.getObjectScene(1));
+ DebugPrintf("2 - Scene %d - R2_READER\n", BF_INVENTORY.getObjectScene(2));
+ DebugPrintf("3 - Scene %d - R2_NEGATOR_GUN\n", BF_INVENTORY.getObjectScene(3));
+ DebugPrintf("4 - Scene %d - R2_STEPPING_DISKS\n", BF_INVENTORY.getObjectScene(4));
+ DebugPrintf("5 - Scene %d - R2_ATTRACTOR_UNIT\n", BF_INVENTORY.getObjectScene(5));
+ DebugPrintf("6 - Scene %d - R2_SENSOR_PROBE\n", BF_INVENTORY.getObjectScene(6));
+ DebugPrintf("7 - Scene %d - R2_SONIC_STUNNER\n", BF_INVENTORY.getObjectScene(7));
+ DebugPrintf("8 - Scene %d - R2_CABLE_HARNESS\n", BF_INVENTORY.getObjectScene(8));
+ DebugPrintf("9 - Scene %d - R2_COM_SCANNER\n", BF_INVENTORY.getObjectScene(9));
+ DebugPrintf("10 - Scene %d - R2_SPENT_POWER_CAPSULE\n", BF_INVENTORY.getObjectScene(10));
+ DebugPrintf("11 - Scene %d - R2_CHARGED_POWER_CAPSULE\n", BF_INVENTORY.getObjectScene(11));
+ DebugPrintf("12 - Scene %d - R2_AEROSOL\n", BF_INVENTORY.getObjectScene(12));
+ DebugPrintf("13 - Scene %d - R2_REMOTE_CONTROL\n", BF_INVENTORY.getObjectScene(13));
+ DebugPrintf("14 - Scene %d - R2_OPTICAL_FIBER\n", BF_INVENTORY.getObjectScene(14));
+ DebugPrintf("15 - Scene %d - R2_CLAMP\n", BF_INVENTORY.getObjectScene(15));
+ DebugPrintf("16 - Scene %d - R2_ATTRACTOR_CABLE_HARNESS\n", BF_INVENTORY.getObjectScene(16));
+ DebugPrintf("17 - Scene %d - R2_FUEL_CELL\n", BF_INVENTORY.getObjectScene(17));
+ DebugPrintf("18 - Scene %d - R2_GYROSCOPE\n", BF_INVENTORY.getObjectScene(18));
+ DebugPrintf("19 - Scene %d - R2_AIRBAG\n", BF_INVENTORY.getObjectScene(19));
+ DebugPrintf("20 - Scene %d - R2_REBREATHER_TANK\n", BF_INVENTORY.getObjectScene(20));
+ DebugPrintf("21 - Scene %d - R2_RESERVE_REBREATHER_TANK\n", BF_INVENTORY.getObjectScene(21));
+ DebugPrintf("22 - Scene %d - R2_GUIDANCE_MODULE\n", BF_INVENTORY.getObjectScene(22));
+ DebugPrintf("23 - Scene %d - R2_THRUSTER_VALVE\n", BF_INVENTORY.getObjectScene(23));
+ DebugPrintf("24 - Scene %d - R2_BALLOON_BACKPACK\n", BF_INVENTORY.getObjectScene(24));
+ DebugPrintf("25 - Scene %d - R2_RADAR_MECHANISM\n", BF_INVENTORY.getObjectScene(25));
+ DebugPrintf("26 - Scene %d - R2_JOYSTICK\n", BF_INVENTORY.getObjectScene(26));
+ DebugPrintf("27 - Scene %d - R2_IGNITOR\n", BF_INVENTORY.getObjectScene(27));
+ DebugPrintf("28 - Scene %d - R2_DIAGNOSTICS_DISPLAY\n", BF_INVENTORY.getObjectScene(28));
+ DebugPrintf("29 - Scene %d - R2_GLASS_DOME\n", BF_INVENTORY.getObjectScene(29));
+ DebugPrintf("30 - Scene %d - R2_WICK_LAMP\n", BF_INVENTORY.getObjectScene(30));
+ DebugPrintf("31 - Scene %d - R2_SCRITH_KEY\n", BF_INVENTORY.getObjectScene(31));
+ DebugPrintf("32 - Scene %d - R2_TANNER_MASK\n", BF_INVENTORY.getObjectScene(32));
+ DebugPrintf("33 - Scene %d - R2_PURE_GRAIN_ALCOHOL\n", BF_INVENTORY.getObjectScene(33));
+ DebugPrintf("34 - Scene %d - R2_SAPPHIRE_BLUE\n", BF_INVENTORY.getObjectScene(34));
+ DebugPrintf("35 - Scene %d - R2_ANCIENT_SCROLLS\n", BF_INVENTORY.getObjectScene(35));
+ DebugPrintf("36 - Scene %d - R2_FLUTE\n", BF_INVENTORY.getObjectScene(36));
+ DebugPrintf("37 - Scene %d - R2_GUNPOWDER\n", BF_INVENTORY.getObjectScene(37));
+ DebugPrintf("38 - Scene %d - R2_NONAME\n", BF_INVENTORY.getObjectScene(38));
+ DebugPrintf("39 - Scene %d - R2_COM_SCANNER_2\n", BF_INVENTORY.getObjectScene(39));
+ DebugPrintf("40 - Scene %d - R2_SUPERCONDUCTOR_WIRE\n", BF_INVENTORY.getObjectScene(40));
+ DebugPrintf("41 - Scene %d - R2_PILLOW\n", BF_INVENTORY.getObjectScene(41));
+ DebugPrintf("42 - Scene %d - R2_FOOD_TRAY\n", BF_INVENTORY.getObjectScene(42));
+ DebugPrintf("43 - Scene %d - R2_LASER_HACKSAW\n", BF_INVENTORY.getObjectScene(43));
+ DebugPrintf("44 - Scene %d - R2_PHOTON_STUNNER\n", BF_INVENTORY.getObjectScene(44));
+ DebugPrintf("45 - Scene %d - R2_BATTERY\n", BF_INVENTORY.getObjectScene(45));
+ DebugPrintf("46 - Scene %d - R2_SOAKED_FACEMASK\n", BF_INVENTORY.getObjectScene(46));
+ DebugPrintf("47 - Scene %d - R2_LIGHT_BULB\n", BF_INVENTORY.getObjectScene(47));
+ DebugPrintf("48 - Scene %d - R2_ALCOHOL_LAMP\n", BF_INVENTORY.getObjectScene(48));
+ DebugPrintf("49 - Scene %d - R2_ALCOHOL_LAMP_2\n", BF_INVENTORY.getObjectScene(49));
+ DebugPrintf("50 - Scene %d - R2_ALCOHOL_LAMP_3\n", BF_INVENTORY.getObjectScene(50));
+ DebugPrintf("51 - Scene %d - R2_BROKEN_DISPLAY\n", BF_INVENTORY.getObjectScene(51));
+ DebugPrintf("52 - Scene %d - R2_TOOLBOX\n", BF_INVENTORY.getObjectScene(52));
return true;
}
diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h
index c9b7e75039..610f45de64 100644
--- a/engines/tsage/debugger.h
+++ b/engines/tsage/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index 5eae7557d2..9d61b4d182 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -129,10 +129,10 @@ public:
if (in) {
if (TsAGE::Saver::readSavegameHeader(in, header)) {
- saveList.push_back(SaveStateDescriptor(slot, header.saveName));
+ saveList.push_back(SaveStateDescriptor(slot, header._saveName));
- header.thumbnail->free();
- delete header.thumbnail;
+ header._thumbnail->free();
+ delete header._thumbnail;
}
delete in;
@@ -162,11 +162,11 @@ public:
delete f;
// Create the return descriptor
- SaveStateDescriptor desc(slot, header.saveName);
- desc.setThumbnail(header.thumbnail);
- desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay);
- desc.setSaveTime(header.saveHour, header.saveMinutes);
- desc.setPlayTime(header.totalFrames * GAME_FRAME_TIME);
+ SaveStateDescriptor desc(slot, header._saveName);
+ desc.setThumbnail(header._thumbnail);
+ desc.setSaveDate(header._saveYear, header._saveMonth, header._saveDay);
+ desc.setSaveTime(header._saveHour, header._saveMinutes);
+ desc.setPlayTime(header._totalFrames * GAME_FRAME_TIME);
return desc;
}
@@ -176,7 +176,7 @@ public:
};
#if PLUGIN_ENABLED_DYNAMIC(TSAGE)
-REGISTER_PLUGIN_DYNAMIC(TSAGE, PLUGIN_TYPE_ENGINE, TSageMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(TSAGE, PLUGIN_TYPE_ENGINE, TSageMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(TSAGE, PLUGIN_TYPE_ENGINE, TSageMetaEngine);
+ REGISTER_PLUGIN_STATIC(TSAGE, PLUGIN_TYPE_ENGINE, TSageMetaEngine);
#endif
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index 123f04f8e2..da283a27e7 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index 43833f53b9..dd4bc6aa86 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h
index 33b55093d0..8ab37f6c93 100644
--- a/engines/tsage/dialogs.h
+++ b/engines/tsage/dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index 0ba60384bf..0491c043a4 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index 9ef4813e47..a3d96abef4 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -90,7 +90,7 @@ enum CursorType {
R2_ATTRACTOR_UNIT = 5, R2_SENSOR_PROBE = 6, R2_SONIC_STUNNER = 7,
R2_CABLE_HARNESS = 8, R2_COM_SCANNER = 9, R2_SPENT_POWER_CAPSULE = 10,
R2_CHARGED_POWER_CAPSULE = 11, R2_AEROSOL = 12, R2_REMOTE_CONTROL = 13,
- R2_OPTICAL_FIBRE = 14, R2_CLAMP = 15, R2_ATTRACTOR_CABLE_HARNESS = 16,
+ R2_OPTICAL_FIBER = 14, R2_CLAMP = 15, R2_ATTRACTOR_CABLE_HARNESS = 16,
R2_FUEL_CELL = 17, R2_GYROSCOPE = 18, R2_AIRBAG = 19, R2_REBREATHER_TANK = 20,
R2_RESERVE_REBREATHER_TANK = 21, R2_GUIDANCE_MODULE = 22, R2_THRUSTER_VALVE = 23,
R2_BALLOON_BACKPACK = 24, R2_RADAR_MECHANISM = 25, R2_JOYSTICK = 26,
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 9b1b0f1dcb..e75febfdbc 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -63,6 +63,7 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
reset();
_stripNum = 0;
_gfxEdgeAdjust = 3;
+ _gfxFontNumber = 0;
if (g_vm->getGameID() == GType_Ringworld) {
if (g_vm->getFeatures() & GF_DEMO) {
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 777697edbd..1194fe8b9c 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 97857aca34..fa5d1a3b6a 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -199,9 +199,9 @@ void Rect::resize(const GfxSurface &surface, int xp, int yp, int percent) {
this->moveTo(xp, yp);
- int xa = (surface._flags & FRAME_FLIP_CENTROID_X) == 0 ? surface._centroid.x :
+ int xa = (surface._flags & FRAME_FLIP_CENTROID_X) == 0 ? surface._centroid.x :
bounds.width() - (surface._centroid.x + 1);
- int ya = (surface._flags & FRAME_FLIP_CENTROID_Y) == 0 ? surface._centroid.y :
+ int ya = (surface._flags & FRAME_FLIP_CENTROID_Y) == 0 ? surface._centroid.y :
bounds.height() - (surface._centroid.y + 1);
int xd = xa * percent / 100;
@@ -1483,7 +1483,6 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
const char *nextWord = NULL;
const char *sStart = s;
int numChars = 1;
- int strWidth = 1;
char nextChar;
for (;;) {
@@ -1497,7 +1496,7 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
nextWord = s;
}
- strWidth = getStringWidth(sStart, numChars);
+ int strWidth = getStringWidth(sStart, numChars);
if (strWidth > maxWidth) {
if (nextWord) {
s = nextWord;
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index 47961dd02a..cdb4826528 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index 5987d78067..d4b922a1c3 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/resources.h b/engines/tsage/resources.h
index 45cecf8521..a7536a3c2d 100644
--- a/engines/tsage/resources.h
+++ b/engines/tsage/resources.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_demo.cpp b/engines/tsage/ringworld/ringworld_demo.cpp
index fedb19c804..cd2ab07a50 100644
--- a/engines/tsage/ringworld/ringworld_demo.cpp
+++ b/engines/tsage/ringworld/ringworld_demo.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_demo.h b/engines/tsage/ringworld/ringworld_demo.h
index 7c0ac39285..2b93a40049 100644
--- a/engines/tsage/ringworld/ringworld_demo.h
+++ b/engines/tsage/ringworld/ringworld_demo.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_dialogs.cpp b/engines/tsage/ringworld/ringworld_dialogs.cpp
index 4728e66cd9..226a943f08 100644
--- a/engines/tsage/ringworld/ringworld_dialogs.cpp
+++ b/engines/tsage/ringworld/ringworld_dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -385,7 +385,6 @@ void InventoryDialog::execute() {
if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory())
RING_INVENTORY._selectedItem->setCursor();
- GfxElement *hiliteObj;
bool lookFlag = false;
_gfxManager.activate();
@@ -399,7 +398,7 @@ void InventoryDialog::execute() {
if (g_vm->shouldQuit())
break;
- hiliteObj = NULL;
+ GfxElement *hiliteObj = nullptr;
if ((event.eventType == EVENT_BUTTON_DOWN) && !_bounds.contains(event.mousePos))
break;
diff --git a/engines/tsage/ringworld/ringworld_dialogs.h b/engines/tsage/ringworld/ringworld_dialogs.h
index b14b3f6d78..68ac0a05f9 100644
--- a/engines/tsage/ringworld/ringworld_dialogs.h
+++ b/engines/tsage/ringworld/ringworld_dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp
index 1e9d14cdcf..1d8293cffd 100644
--- a/engines/tsage/ringworld/ringworld_logic.cpp
+++ b/engines/tsage/ringworld/ringworld_logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_logic.h b/engines/tsage/ringworld/ringworld_logic.h
index e902ac127f..d384593989 100644
--- a/engines/tsage/ringworld/ringworld_logic.h
+++ b/engines/tsage/ringworld/ringworld_logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes1.cpp b/engines/tsage/ringworld/ringworld_scenes1.cpp
index df456f9ced..9eacc5ff10 100644
--- a/engines/tsage/ringworld/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes1.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1789,7 +1789,7 @@ Scene50::Scene50() :
_background(0, CURSOR_LOOK, 50, 3, LIST_END),
_item1(0, OBJECT_SCANNER, 50, 15, CURSOR_USE, 50, 16, CURSOR_LOOK, 50, 3, LIST_END),
_entrance(0, CURSOR_LOOK, 50, 7, LIST_END),
- // The original was using dialog 50/3 for CURSOR_LOOK, which is too generic.
+ // The original was using dialog 50/3 for CURSOR_LOOK, which is too generic.
_bulwark(8, OBJECT_STUNNER, 50, 14, OBJECT_SCANNER, 50, 13, CURSOR_LOOK, 30, 0, LIST_END),
_tree(9, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_USE, 40, 41, CURSOR_LOOK, 50, 5, LIST_END),
_flagstones(10, OBJECT_SCANNER, 50, 17, OBJECT_STUNNER, 50, 18, CURSOR_LOOK, 50, 6, CURSOR_USE, 30, 8, LIST_END) {
diff --git a/engines/tsage/ringworld/ringworld_scenes1.h b/engines/tsage/ringworld/ringworld_scenes1.h
index d52d4fb6ec..9f6de58e30 100644
--- a/engines/tsage/ringworld/ringworld_scenes1.h
+++ b/engines/tsage/ringworld/ringworld_scenes1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes10.cpp b/engines/tsage/ringworld/ringworld_scenes10.cpp
index eac181e350..c4874c0f59 100644
--- a/engines/tsage/ringworld/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes10.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1217,7 +1217,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
g_globals->_events.setCursor(CURSOR_WALK);
g_globals->_player.disableControl();
- if ((g_globals->_sceneManager._previousScene == 9200) || (g_globals->_sceneManager._previousScene != 9850)) {
+ if (g_globals->_sceneManager._previousScene != 9850) {
_sceneMode = 0;
if (RING_INVENTORY._helmet._sceneNumber != 1) {
setAction(&_sequenceManager, this, 9501, &g_globals->_player, &_candle, NULL);
diff --git a/engines/tsage/ringworld/ringworld_scenes10.h b/engines/tsage/ringworld/ringworld_scenes10.h
index 48859ab454..ff1a6e9070 100644
--- a/engines/tsage/ringworld/ringworld_scenes10.h
+++ b/engines/tsage/ringworld/ringworld_scenes10.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes2.cpp b/engines/tsage/ringworld/ringworld_scenes2.cpp
index e07c9253e6..1140f6f3d1 100644
--- a/engines/tsage/ringworld/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes2.h b/engines/tsage/ringworld/ringworld_scenes2.h
index 382d9d4157..825cd04c17 100644
--- a/engines/tsage/ringworld/ringworld_scenes2.h
+++ b/engines/tsage/ringworld/ringworld_scenes2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes3.cpp b/engines/tsage/ringworld/ringworld_scenes3.cpp
index e834e659b5..d8556c691e 100644
--- a/engines/tsage/ringworld/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -4946,8 +4946,6 @@ void Scene2310::synchronize(Serializer &s) {
}
void Scene2310::process(Event &event) {
- int frameNum = 0;
-
if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN)) {
int idx = 0;
while (idx < 5) {
@@ -4961,7 +4959,7 @@ void Scene2310::process(Event &event) {
if (_wireIndex == 5) {
// No wire is currently active, so start moving designated wire
_wireIndex = idx;
- frameNum = idx + 2;
+ int frameNum = idx + 2;
if (event.mousePos.y > 105)
idx = findObject(idx);
diff --git a/engines/tsage/ringworld/ringworld_scenes3.h b/engines/tsage/ringworld/ringworld_scenes3.h
index fafb72fcea..a371f800b9 100644
--- a/engines/tsage/ringworld/ringworld_scenes3.h
+++ b/engines/tsage/ringworld/ringworld_scenes3.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes4.cpp b/engines/tsage/ringworld/ringworld_scenes4.cpp
index 98bf0158e7..4d40b34eea 100644
--- a/engines/tsage/ringworld/ringworld_scenes4.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes4.h b/engines/tsage/ringworld/ringworld_scenes4.h
index 64706805bc..72913ea8f2 100644
--- a/engines/tsage/ringworld/ringworld_scenes4.h
+++ b/engines/tsage/ringworld/ringworld_scenes4.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes5.cpp b/engines/tsage/ringworld/ringworld_scenes5.cpp
index 1242f9f448..cb8a89de80 100644
--- a/engines/tsage/ringworld/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes5.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes5.h b/engines/tsage/ringworld/ringworld_scenes5.h
index b49d2a6f02..3010c7b401 100644
--- a/engines/tsage/ringworld/ringworld_scenes5.h
+++ b/engines/tsage/ringworld/ringworld_scenes5.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes6.cpp b/engines/tsage/ringworld/ringworld_scenes6.cpp
index 777eed2aab..74f834c64f 100644
--- a/engines/tsage/ringworld/ringworld_scenes6.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes6.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes6.h b/engines/tsage/ringworld/ringworld_scenes6.h
index 4c10e4a711..fcc7f900ce 100644
--- a/engines/tsage/ringworld/ringworld_scenes6.h
+++ b/engines/tsage/ringworld/ringworld_scenes6.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes8.cpp b/engines/tsage/ringworld/ringworld_scenes8.cpp
index f9156479e5..60bd72e1ef 100644
--- a/engines/tsage/ringworld/ringworld_scenes8.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes8.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_scenes8.h b/engines/tsage/ringworld/ringworld_scenes8.h
index fa441f87da..ad5a91514e 100644
--- a/engines/tsage/ringworld/ringworld_scenes8.h
+++ b/engines/tsage/ringworld/ringworld_scenes8.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_speakers.cpp b/engines/tsage/ringworld/ringworld_speakers.cpp
index dc80df40a3..a4ce95928c 100644
--- a/engines/tsage/ringworld/ringworld_speakers.cpp
+++ b/engines/tsage/ringworld/ringworld_speakers.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld/ringworld_speakers.h b/engines/tsage/ringworld/ringworld_speakers.h
index 305984a184..59e25dc166 100644
--- a/engines/tsage/ringworld/ringworld_speakers.h
+++ b/engines/tsage/ringworld/ringworld_speakers.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
index eb15585247..dfbb281cfb 100644
--- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp
+++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -197,19 +197,24 @@ int RightClickDialog::execute() {
void CharacterDialog::show() {
CharacterDialog *dlg = new CharacterDialog();
+ CursorType cursorNum = R2_GLOBALS._events.getCursor();
+
+ // Reset the current cursor
+ R2_GLOBALS._events.setCursor(CURSOR_ARROW);
+
dlg->draw();
// Make the default button the currently active character
GfxButton *btn = NULL;
int oldCharacter = R2_GLOBALS._player._characterIndex;
switch (oldCharacter) {
- case 1:
+ case R2_QUINN:
btn = &dlg->_btnQuinn;
break;
- case 2:
+ case R2_SEEKER:
btn = &dlg->_btnSeeker;
break;
- case 3:
+ case R2_MIRANDA:
btn = &dlg->_btnMiranda;
break;
default:
@@ -317,7 +322,13 @@ void CharacterDialog::show() {
// Change to whichever scene the newly selected character is in
R2_GLOBALS._sceneManager.changeScene(R2_GLOBALS._player._characterScene[R2_GLOBALS._player._characterIndex]);
- }
+
+ // Force the reset the current cursor
+ R2_GLOBALS._events.setCursor(CURSOR_USE);
+
+ } else
+ // Restore previous cursor
+ R2_GLOBALS._events.setCursor(cursorNum);
}
CharacterDialog::CharacterDialog() {
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.h b/engines/tsage/ringworld2/ringworld2_dialogs.h
index 0c19ae4371..8ef35c9024 100644
--- a/engines/tsage/ringworld2/ringworld2_dialogs.h
+++ b/engines/tsage/ringworld2/ringworld2_dialogs.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 39e398023d..c5c6de980c 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -294,7 +294,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
// Confrontation
return new Scene3400();
case 3500:
- // Flub tube maze
+ // Flub tube maze
return new Scene3500();
case 3600:
// Cutscene - walking at gunpoint
@@ -561,14 +561,14 @@ void SceneExt::saveCharacter(int characterIndex) {
void SceneExt::scalePalette(int RFactor, int GFactor, int BFactor) {
byte *tmpPal = R2_GLOBALS._scenePalette._palette;
byte newR, newG, newB;
- int tmp, varC, varD = 0;
+ int tmp, varD = 0;
for (int i = 0; i < 256; i++) {
newR = (RFactor * tmpPal[(3 * i)]) / 100;
newG = (GFactor * tmpPal[(3 * i) + 1]) / 100;
newB = (BFactor * tmpPal[(3 * i) + 2]) / 100;
- varC = 769;
+ int varC = 769;
for (int j = 255; j >= 0; j--) {
tmp = abs(tmpPal[(3 * j)] - newR);
if (tmp >= varC)
@@ -625,6 +625,11 @@ void SceneHandlerExt::process(Event &event) {
SceneHandler::process(event);
}
+void SceneHandlerExt::dispatch() {
+ R2_GLOBALS._playStream.dispatch();
+ SceneHandler::dispatch();
+}
+
void SceneHandlerExt::postLoad(int priorSceneBeforeLoad, int currentSceneBeforeLoad) {
// Set up the shading maps used for showing the player in shadows
setupPaletteMaps();
@@ -809,7 +814,7 @@ Ringworld2InvObjectList::Ringworld2InvObjectList():
_chargedPowerCapsule(1, 12),
_aerosol(1, 13),
_remoteControl(1, 14),
- _opticalFibre(1, 15),
+ _opticalFiber(1, 15),
_clamp(1, 16),
_attractorHarness(1, 17),
_fuelCell(2, 2),
@@ -864,7 +869,7 @@ Ringworld2InvObjectList::Ringworld2InvObjectList():
_itemList.push_back(&_chargedPowerCapsule);
_itemList.push_back(&_aerosol);
_itemList.push_back(&_remoteControl);
- _itemList.push_back(&_opticalFibre);
+ _itemList.push_back(&_opticalFiber);
_itemList.push_back(&_clamp);
_itemList.push_back(&_attractorHarness);
_itemList.push_back(&_fuelCell);
@@ -928,7 +933,7 @@ void Ringworld2InvObjectList::reset() {
setObjectScene(R2_CHARGED_POWER_CAPSULE, 400);
setObjectScene(R2_AEROSOL, 500);
setObjectScene(R2_REMOTE_CONTROL, 1550);
- setObjectScene(R2_OPTICAL_FIBRE, 850);
+ setObjectScene(R2_OPTICAL_FIBER, 850);
setObjectScene(R2_CLAMP, 850);
setObjectScene(R2_ATTRACTOR_CABLE_HARNESS, 0);
setObjectScene(R2_FUEL_CELL, 1550);
@@ -1210,6 +1215,12 @@ void Ringworld2Game::processEvent(Event &event) {
R2_GLOBALS._events.setCursorFromFlag();
break;
+ case Common::KEYCODE_F5:
+ // F5 - Save
+ saveGame();
+ R2_GLOBALS._events.setCursorFromFlag();
+ break;
+
case Common::KEYCODE_F7:
// F7 - Restore
restoreGame();
@@ -1421,7 +1432,7 @@ void SceneExit::process(Event &event) {
if (!R2_GLOBALS._insetUp) {
SceneArea::process(event);
- if (_enabled) {
+ if (_enabled && R2_GLOBALS._player._enabled) {
if (event.eventType == EVENT_BUTTON_DOWN) {
if (!_bounds.contains(mousePos))
_moving = false;
@@ -2329,7 +2340,7 @@ void ScannerDialog::Button::reset() {
case 1800:
if (R2_GLOBALS._rimLocation < 1201)
scanner._obj4.setup(4, 3, 3);
- else if (R2_GLOBALS._rimLocation < 1201)
+ else if (R2_GLOBALS._rimLocation > 1201)
scanner._obj4.setup(4, 3, 4);
else
scanner._obj4.setup(4, 3, 5);
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index c9695c921d..31d801fa55 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -114,6 +114,7 @@ public:
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void process(Event &event);
virtual void postLoad(int priorSceneBeforeLoad, int currentSceneBeforeLoad);
+ virtual void dispatch();
void setupPaletteMaps();
};
@@ -177,7 +178,7 @@ public:
InvObject _chargedPowerCapsule;
InvObject _aerosol;
InvObject _remoteControl;
- InvObject _opticalFibre;
+ InvObject _opticalFiber;
InvObject _clamp;
InvObject _attractorHarness;
InvObject _fuelCell;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 3fd728ce5b..b82565332a 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1678,7 +1678,7 @@ void Scene180::signal() {
case 24:
case 26:
case 46:
- setSceneDelay((R2_GLOBALS._speechSubtitles & 1) ? 1 : 18);
+ setSceneDelay((R2_GLOBALS._speechSubtitles & SPEECH_TEXT) ? 1 : 18);
break;
case 13:
@@ -2561,7 +2561,7 @@ void Scene205Demo::postInit(SceneObjectList *OwnerList) {
loadScene(1000);
R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._player.enableControl();
-
+
SceneExt::postInit();
_sound1.play(337);
@@ -2993,7 +2993,7 @@ void Scene300::Action4::signal() {
bool Scene300::QuinnWorkstation::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
- if (R2_GLOBALS._player._characterIndex != 1)
+ if (R2_GLOBALS._player._characterIndex != R2_QUINN)
SceneItem::display2(300, 46);
else if (R2_GLOBALS.getFlag(44)) {
R2_GLOBALS._player.setAction(NULL);
@@ -3024,7 +3024,7 @@ bool Scene300::QuinnWorkstation::startAction(CursorType action, Event &event) {
bool Scene300::MirandaWorkstation::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
- if (R2_GLOBALS._player._characterIndex != 3)
+ if (R2_GLOBALS._player._characterIndex != R2_MIRANDA)
SceneItem::display2(300, 49);
else
R2_GLOBALS._sceneManager.changeScene(325);
@@ -3054,7 +3054,7 @@ bool Scene300::SeekerWorkstation::startAction(CursorType action, Event &event) {
break;
case CURSOR_USE:
- if (R2_GLOBALS._player._characterIndex != 2)
+ if (R2_GLOBALS._player._characterIndex != R2_SEEKER)
SceneItem::display2(300, 48);
else
R2_GLOBALS._sceneManager.changeScene(325);
@@ -3465,7 +3465,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
_background.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 300, 0, -1, -1, 1, NULL);
switch (R2_GLOBALS._player._characterIndex) {
- case 1:
+ case R2_QUINN:
_sceneMode = 300;
switch (R2_GLOBALS._sceneManager._previousScene) {
@@ -3483,10 +3483,13 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
if (R2_GLOBALS.getFlag(55)) {
if (R2_GLOBALS.getFlag(57)) {
+ // Little hack to get the correct sentence order
+ R2_GLOBALS._stripManager_lookupList[8] = 2;
+
R2_GLOBALS.clearFlag(60);
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
_sceneMode = 16;
- _stripManager.start(404, this);
+ _stripManager.start3(404, this, R2_GLOBALS._stripManager_lookupList);
} else {
R2_GLOBALS._player.enableControl();
R2_GLOBALS._player._canWalk = false;
@@ -3554,7 +3557,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
}
break;
- case 3:
+ case R2_MIRANDA:
if (R2_GLOBALS._sceneManager._previousScene == 1500) {
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3150;
R2_GLOBALS._player._characterScene[R2_MIRANDA] = 3150;
@@ -3639,7 +3642,7 @@ void Scene300::signal() {
default:
R2_GLOBALS._player.enableControl(CURSOR_TALK);
- if ((R2_GLOBALS._player._characterIndex != 1) || R2_GLOBALS.getFlag(44))
+ if ((R2_GLOBALS._player._characterIndex != R2_QUINN) || R2_GLOBALS.getFlag(44))
R2_GLOBALS._player._canWalk = false;
break;
}
@@ -4151,11 +4154,22 @@ void Scene325::signal() {
--v;
if (_priorConsoleAction == 5)
v += 8;
+
if (R2_GLOBALS.getFlag(51) && (v == 2))
R2_GLOBALS.setFlag(57);
if (R2_GLOBALS.getFlag(44) && !R2_GLOBALS.getFlag(51)) {
if (v != 13) {
+ if (_priorConsoleAction == 6) {
+ // Fix for original game bug.
+ // The passive short scan geographical and astronomical sentences
+ // are inverted in the original game.
+ if (v == 6)
+ v = 8;
+ else if (v == 8)
+ v = 6;
+ }
+
setMessage(328, v);
} else {
_scannerLocation = 864;
@@ -4302,12 +4316,12 @@ void Scene325::signal() {
if (_soundCount)
--_soundCount;
- if (!_soundCount || (R2_GLOBALS._speechSubtitles == 2)) {
+ if (!_soundCount || !(R2_GLOBALS._speechSubtitles & SPEECH_VOICE)) {
_soundIndex = 0;
R2_GLOBALS._playStream.stop();
} else {
_sceneMode = 15;
- R2_GLOBALS._playStream.play(_soundQueue[_soundIndex], this);
+ R2_GLOBALS._playStream.play(_soundQueue[_soundIndex++], this);
}
break;
default:
@@ -4513,6 +4527,7 @@ void Scene325::consoleAction(int id) {
case 14:
if (R2_GLOBALS.getFlag(55)) {
consoleAction(4);
+ // Workaround for original game bug.
// Empty message crashing the game. It should be a warning message forbidding to switch to active scan
// SceneItem::display2(329, 17);
} else {
@@ -4688,7 +4703,7 @@ void Scene325::setMessage(int resNum, int lineNum) {
R2_GLOBALS._sceneObjects->draw();
- if ((_soundCount != 0) && (R2_GLOBALS._speechSubtitles != 2)) {
+ if ((_soundCount != 0) && (R2_GLOBALS._speechSubtitles & SPEECH_VOICE)) {
_sceneMode = 15;
R2_GLOBALS._playStream.play(_soundQueue[_soundIndex++], this);
}
@@ -5753,24 +5768,47 @@ bool Scene600::Smoke::startAction(CursorType action, Event &event) {
return false;
}
-GfxSurface Scene600::Smoke::getFrame() {
- GfxSurface frame = SceneActor::getFrame();
+void Scene600::Smoke::draw() {
+ // Effect should always be active on smoke, but since the original had this
+ // check, include it here too
+ if (_effect == EFFECT_NONE) {
+ SceneActor::draw();
+ return;
+ }
+
+ // Determine the area of the screen to be updated
+ Rect destRect = _bounds;
+ destRect.translate(-g_globals->_sceneManager._scene->_sceneBounds.left,
+ -g_globals->_sceneManager._scene->_sceneBounds.top);
+
+ // Get the smoke frame, screen reference, and pixel palette translation map
+ GfxSurface frame = getFrame();
+ Graphics::Surface s = frame.lockSurface();
+ Graphics::Surface screen = g_globals->gfxManager().getSurface().lockSurface();
+ byte *pixelMap = static_cast<Scene600 *>(R2_GLOBALS._sceneManager._scene)->_pixelMap;
- if (_effect) {
- // Translate the frame using the scene's pixel map
- byte *pixelMap = static_cast<Scene600 *>(R2_GLOBALS._sceneManager._scene)->_pixelMap;
- Graphics::Surface surface = frame.lockSurface();
- byte *srcP = (byte *)surface.getPixels();
+ // Loop through every pixel of the frame. Any pixel of the frame that's not a
+ // tranparency, get the same pixel from the screen background, and shade it using
+ // the scene's pixel translation map
+ for (int yp = 0; yp < s.h; ++yp) {
+ byte *frameSrcP = (byte *)s.getBasePtr(0, yp);
+ byte *screenP = (byte *)screen.getBasePtr(destRect.left, destRect.top + yp);
- while (srcP < ((byte *)surface.getBasePtr(0, surface.h))) {
- *srcP = pixelMap[*srcP];
- srcP++;
+ for (int xp = 0; xp < s.w; ++xp, ++frameSrcP, ++screenP) {
+ if (*frameSrcP != frame._transColor) {
+ *frameSrcP = pixelMap[*screenP];
+ }
}
-
- frame.unlockSurface();
}
- return frame;
+ // Finished updating the frame
+ frame.unlockSurface();
+ g_globals->gfxManager().getSurface().unlockSurface();
+
+ // Draw the processed frame
+ Region *priorityRegion = g_globals->_sceneManager._scene->_priorities.find(_priority);
+ g_globals->gfxManager().copyFrom(frame, destRect, priorityRegion);
+
}
bool Scene600::Doorway::startAction(CursorType action, Event &event) {
@@ -5846,7 +5884,7 @@ bool Scene600::Laser::startAction(CursorType action, Event &event) {
scene->_smoke.postInit();
scene->_smoke.setup(601, 3, 1);
- scene->_smoke._effect = EFFECT_3;
+ scene->_smoke._effect = EFFECT_SMOKE;
scene->_smoke._moveDiff = Common::Point(1, 1);
scene->_smoke._moveRate = 2;
scene->_smoke._numFrames = 3;
@@ -6027,7 +6065,7 @@ void Scene600::postInit(SceneObjectList *OwnerList) {
_smoke._numFrames = 3;
_smoke.animate(ANIM_MODE_2, NULL);
_smoke.fixPriority(130);
- _smoke._effect = EFFECT_3;
+ _smoke._effect = EFFECT_SMOKE;
_smoke.setDetails(600, 24, 25, 26, 1, (SceneItem *) NULL);
_smoke.signal();
}
@@ -6098,7 +6136,7 @@ void Scene600::signal() {
R2_INVENTORY.setObjectScene(R2_AEROSOL, 600);
R2_GLOBALS.setFlag(5);
- _smoke._effect = EFFECT_3;
+ _smoke._effect = EFFECT_SMOKE;
_smoke.signal();
break;
case 606:
@@ -6686,19 +6724,19 @@ bool Scene800::Button::startAction(CursorType action, Event &event) {
}
bool Scene800::CableJunction::startAction(CursorType action, Event &event) {
- if (action != R2_OPTICAL_FIBRE) {
+ if (action != R2_OPTICAL_FIBER) {
return NamedHotspot::startAction(action, event);
} else {
Scene800 *scene = (Scene800 *)R2_GLOBALS._sceneManager._scene;
R2_GLOBALS._player.disableControl();
- scene->_opticalFibre.postInit();
+ scene->_opticalFiber.postInit();
scene->_sceneMode = 803;
if (R2_INVENTORY.getObjectScene(R2_READER) == 800)
- scene->setAction(&scene->_sequenceManager1, scene, 813, &R2_GLOBALS._player, &scene->_opticalFibre, &scene->_reader, NULL);
+ scene->setAction(&scene->_sequenceManager1, scene, 813, &R2_GLOBALS._player, &scene->_opticalFiber, &scene->_reader, NULL);
else
- scene->setAction(&scene->_sequenceManager1, scene, 803, &R2_GLOBALS._player, &scene->_opticalFibre, NULL);
+ scene->setAction(&scene->_sequenceManager1, scene, 803, &R2_GLOBALS._player, &scene->_opticalFiber, NULL);
return true;
}
@@ -6716,8 +6754,8 @@ bool Scene800::DeviceSlot::startAction(CursorType action, Event &event) {
_lookLineNum = 27;
scene->_sceneMode = 809;
- if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 800)
- scene->setAction(&scene->_sequenceManager1, scene, 815, &R2_GLOBALS._player, &scene->_reader, &scene->_opticalFibre, NULL);
+ if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) == 800)
+ scene->setAction(&scene->_sequenceManager1, scene, 815, &R2_GLOBALS._player, &scene->_reader, &scene->_opticalFiber, NULL);
else
scene->setAction(&scene->_sequenceManager1, scene, 809, &R2_GLOBALS._player, &scene->_reader, NULL);
return true;
@@ -6726,9 +6764,9 @@ bool Scene800::DeviceSlot::startAction(CursorType action, Event &event) {
scene->_reader.postInit();
scene->_sceneMode = 804;
- if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 800) {
+ if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) == 800) {
scene->setAction(&scene->_sequenceManager1, scene, 814, &R2_GLOBALS._player,
- &scene->_reader, &scene->_opticalFibre, NULL);
+ &scene->_reader, &scene->_opticalFiber, NULL);
} else {
scene->setAction(&scene->_sequenceManager1, scene, 804, &R2_GLOBALS._player,
&scene->_reader, NULL);
@@ -6844,22 +6882,22 @@ void Scene800::postInit(SceneObjectList *OwnerList) {
_autodocCover.setPosition(Common::Point(119, 161));
_autodocCover.setDetails(800, 6, 7, -1, 1, (SceneItem *)NULL);
- if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 800) {
- _opticalFibre.postInit();
+ if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) == 800) {
+ _opticalFiber.postInit();
if (R2_INVENTORY.getObjectScene(R2_READER) == 800)
- _opticalFibre.setup(800, 4, 1);
+ _opticalFiber.setup(800, 4, 1);
else
- _opticalFibre.setup(800, 7, 2);
+ _opticalFiber.setup(800, 7, 2);
- _opticalFibre.setPosition(Common::Point(220, 124));
- _opticalFibre.fixPriority(140);
+ _opticalFiber.setPosition(Common::Point(220, 124));
+ _opticalFiber.fixPriority(140);
}
if (R2_INVENTORY.getObjectScene(R2_READER) == 800) {
_reader.postInit();
- if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 800) {
- _opticalFibre.setup(800, 4, 1);
+ if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) == 800) {
+ _opticalFiber.setup(800, 4, 1);
_reader.hide();
} else {
_reader.setup(800, 7, 1);
@@ -6934,7 +6972,7 @@ void Scene800::signal() {
break;
case 803:
R2_GLOBALS._player.enableControl();
- R2_INVENTORY.setObjectScene(R2_OPTICAL_FIBRE, 800);
+ R2_INVENTORY.setObjectScene(R2_OPTICAL_FIBER, 800);
break;
case 804:
R2_GLOBALS._player.enableControl();
@@ -7230,7 +7268,7 @@ void Scene825::doButtonPress(int buttonId) {
if (R2_GLOBALS.getFlag(4)) {
if ((R2_INVENTORY.getObjectScene(R2_READER) != 800) ||
- (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) != 800)) {
+ (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) != 800)) {
_sceneText.setPosition(Common::Point(116, 75));
_sceneText.setup(ACCESS_CODE_REQUIRED);
} else if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) != 800) {
@@ -7247,7 +7285,7 @@ void Scene825::doButtonPress(int buttonId) {
R2_GLOBALS.setFlag(2);
if ((R2_INVENTORY.getObjectScene(R2_READER) != 800) ||
- (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) != 800)) {
+ (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) != 800)) {
_sceneText.setPosition(Common::Point(116, 75));
_sceneText.setup(ACCESS_CODE_REQUIRED);
} else {
@@ -7347,14 +7385,14 @@ void Scene825::doButtonPress(int buttonId) {
*--------------------------------------------------------------------------*/
bool Scene850::Indicator::startAction(CursorType action, Event &event) {
- if ((action != CURSOR_USE) || (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) != 850))
+ if ((action != CURSOR_USE) || (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) != 850))
return NamedHotspot::startAction(action, event);
else {
Scene850 *scene = (Scene850 *)R2_GLOBALS._sceneManager._scene;
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 851;
- scene->setAction(&scene->_sequenceManager1, scene, 851, &R2_GLOBALS._player, &scene->_fibre, NULL);
+ scene->setAction(&scene->_sequenceManager1, scene, 851, &R2_GLOBALS._player, &scene->_fiber, NULL);
return true;
}
}
@@ -7453,10 +7491,10 @@ void Scene850::postInit(SceneObjectList *OwnerList) {
_panel.fixPriority(82);
_panel.setDetails(850, 24, -1, -1, 1, (SceneItem *)NULL);
- if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 850) {
- _fibre.postInit();
- _fibre.setup(850, 6, 1);
- _fibre.setPosition(Common::Point(280, 87));
+ if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBER) == 850) {
+ _fiber.postInit();
+ _fiber.setup(850, 6, 1);
+ _fiber.setPosition(Common::Point(280, 87));
}
R2_GLOBALS._player.postInit();
@@ -7503,8 +7541,8 @@ void Scene850::signal() {
R2_GLOBALS._player.enableControl();
break;
case 851:
- R2_INVENTORY.setObjectScene(R2_OPTICAL_FIBRE, 1);
- _fibre.remove();
+ R2_INVENTORY.setObjectScene(R2_OPTICAL_FIBER, 1);
+ _fiber.remove();
R2_GLOBALS._player.enableControl();
break;
case 852:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h
index 216039a348..f50c9a92a2 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -661,7 +661,7 @@ class Scene600 : public SceneExt {
public:
virtual void signal();
virtual bool startAction(CursorType action, Event &event);
- virtual GfxSurface getFrame();
+ virtual void draw();
};
class Doorway : public SceneActor {
public:
@@ -809,7 +809,7 @@ public:
Button _button;
CableJunction _cableJunction;
DeviceSlot _deviceSlot;
- SceneActor _autodocCover, _opticalFibre, _reader;
+ SceneActor _autodocCover, _opticalFiber, _reader;
Door _door;
Tray _tray;
ComScanner _comScanner;
@@ -885,7 +885,7 @@ public:
NamedHotspot _background, _eastDoor, _compartment, _sickBayIndicator;
NamedHotspot _liftControls;
Indicator _indicator;
- SceneActor _spark, _fibre;
+ SceneActor _spark, _fiber;
LiftDoor _liftDoor;
SickBayDoor _sickBayDoor;
Clamp _clamp;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 075420a1c9..110c3ff510 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -5,15 +5,15 @@
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU GenWeral Public License
+ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2277,11 +2277,11 @@ void Scene1337::Action1337::waitFrames(int32 frameCount) {
g_globals->_events.getEvent(event);
curFrame = g_globals->_events.getFrameNumber();
}
-
+
// CHECKME: The original is calling _eventManager.waitEvent();
}
-/**
+/**
* Display instructions
*/
void Scene1337::Action1::signal() {
@@ -3366,7 +3366,7 @@ void Scene1337::Action3::signal() {
}
}
-/**
+/**
* Action used to handle the other players' turn
*/
void Scene1337::Action4::signal() {
@@ -3542,7 +3542,7 @@ void Scene1337::Action4::signal() {
}
}
-/**
+/**
* Animations for discarding a card
*/
void Scene1337::Action5::signal() {
@@ -3587,7 +3587,7 @@ void Scene1337::Action5::signal() {
}
}
-/**
+/**
* Animations for playing a platform card
*/
void Scene1337::Action6::signal() {
@@ -3913,8 +3913,6 @@ void Scene1337::Action10::signal() {
void Scene1337::Action11::signal() {
Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
- bool noAction = true;
-
switch (_actionIndex++) {
case 0: {
scene->_actionCard2->_card.postInit();
@@ -3944,6 +3942,8 @@ void Scene1337::Action11::signal() {
scene->_aSound1.play(57);
bool found = false;
+ bool noAction = true;
+
int i = -1;
switch (scene->_actionIdx2) {
@@ -4529,9 +4529,9 @@ void Scene1337::actionDisplay(int resNum, int lineNum, int x, int y, int keepOnS
// TODO: Check if it's normal that arg5 is unused and replaced by an hardcoded 0 value
// May hide an original bug
- SceneItem::display(resNum, lineNum, SET_X, x, SET_Y, y, SET_KEEP_ONSCREEN, 0,
- SET_WIDTH, width, SET_POS_MODE, -1, SET_TEXT_MODE, textMode,
- SET_FONT, fontNum, SET_FG_COLOR, colFG, SET_EXT_BGCOLOR, colBGExt,
+ SceneItem::display(resNum, lineNum, SET_X, x, SET_Y, y, SET_KEEP_ONSCREEN, 0,
+ SET_WIDTH, width, SET_POS_MODE, -1, SET_TEXT_MODE, textMode,
+ SET_FONT, fontNum, SET_FG_COLOR, colFG, SET_EXT_BGCOLOR, colBGExt,
SET_EXT_FGCOLOR, colFGExt, LIST_END);
}
@@ -5411,10 +5411,10 @@ void Scene1337::showOptionsDialog() {
}
void Scene1337::handleClick(int arg1, Common::Point pt) {
- bool found = false;
int curReg = R2_GLOBALS._sceneRegions.indexOf(g_globals->_events._mousePos);
if (arg1 == 3) {
+ bool found = false;
int i;
for (i = 0; i <= 7; i++) {
if ( _gameBoardSide[2]._outpostStation[i].isIn(pt)
@@ -5956,7 +5956,7 @@ void Scene1337::handlePlayer1() {
break;
}
}
- // The original was only updating in the rndVal block,
+ // The original was only updating in the rndVal block,
// which was a bug as the checks were stopping at this point
rndVal--;
if (rndVal < 0)
@@ -6261,7 +6261,7 @@ void Scene1337::handlePlayer2() {
return;
} else {
// The original code is calling a function full of dead code.
- // Only this message remains after a cleanup.
+ // Only this message remains after a cleanup.
MessageDialog::show(WRONG_ANSWER_MSG, OK_BTN_STRING);
//
handleAutoplayPlayer2();
@@ -6635,11 +6635,11 @@ void Scene1337::setCursorData(int resNum, int rlbNum, int frameNum) {
_cursorCurFrame = frameNum;
if (!frameNum) {
- // Should be a hardcoded cursor displaying only a dot.
+ // Should be a hardcoded cursor displaying only a dot.
// FIXME: Use another cursor when possible
R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
} else {
- // TODO: The original was using some ressource caching, which was useless and complex
+ // TODO: The original was using some ressource caching, which was useless and complex
// and which has been removed. This cursor behavior clearly made intensive use of this caching...
// We now have to find a way to cache these cursor pointers and avoid loading them multiple times per seconds
uint size;
@@ -6697,7 +6697,7 @@ void Scene1337::OptionsDialog::show() {
R2_GLOBALS._sceneManager.changeScene(125);
else if (btn == &dlg->_restartGame)
R2_GLOBALS._sceneManager.changeScene(1330);
-
+
// Remove the dialog
dlg->remove();
delete dlg;
@@ -7439,7 +7439,7 @@ void Scene1550::DishControlsWindow::setup2(int visage, int stripFrameNum, int fr
if (scene->_dish._frame == 1)
_lever.setup(1559, 2, 1);
else
- _lever.setup(1559, 2, 2);
+ _lever.setup(1559, 2, 5);
_lever.setPosition(Common::Point(156, 103));
_lever.fixPriority(251);
_lever.setDetails(1550, 69, -1, -1, 2, (SceneItem *) NULL);
@@ -7773,7 +7773,7 @@ void Scene1550::signal() {
_dishControlsWindow.remove();
_sceneMode = 20;
setAction(&_sequenceManager1, this, 1566, &_dish, &_dishTowerShadow, NULL);
- R2_GLOBALS.setFlag(21);
+ R2_GLOBALS.setFlag(19);
break;
case 24:
_dishControlsWindow.remove();
@@ -8560,7 +8560,7 @@ void Scene1550::enterArea() {
int varA = 0;
- // This section handles checks if the ARM spacecraft have not yet seized
+ // This section handles checks if the ARM spacecraft have not yet seized
// control of Lance of Truth.
if (!R2_GLOBALS.getFlag(16)) {
switch (R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y - 2) {
@@ -8654,9 +8654,9 @@ void Scene1550::enterArea() {
default:
break;
}
- if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y > 0) &&
- (R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x <= 29) &&
- ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x < 20) ||
+ if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y > 0) &&
+ (R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x <= 29) &&
+ ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x < 20) ||
(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y > 7))) {
// In an area where the cutscene can be triggered, so start it
R2_GLOBALS.setFlag(16);
@@ -8699,7 +8699,7 @@ void Scene1550::enterArea() {
warning("missing for loop, to be implemented");
warning("gfx_draw_slice");
}
- warning("Missing sub2957D()");
+ warning("gfx_flip_screen()");
warning("gfx_set_pane_p()");
#endif
R2_GLOBALS._sceneManager._fadeMode = FADEMODE_IMMEDIATE;
@@ -11095,7 +11095,7 @@ bool Scene1800::Doors::startAction(CursorType action, Event &event) {
} else {
// Seeker failing to force open doors
scene->_sceneMode = 1813;
- // Original was using 1813 in setAction too, but it somewhat broken.
+ // Original was using 1813 in setAction too, but it somewhat broken.
// Seeker goes 2 pixels to high, hiding behind the door
scene->setAction(&scene->_sequenceManager, scene, 1808, &R2_GLOBALS._player, &scene->_doors, NULL);
}
@@ -11190,7 +11190,7 @@ void Scene1800::SouthExit::changeScene() {
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
scene->setAction(&scene->_sequenceManager, scene, 1802, &R2_GLOBALS._player, &scene->_companion, NULL);
else
- scene->setAction(&scene->_sequenceManager, scene, 1802, &R2_GLOBALS._player, &scene->_companion, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 1803, &R2_GLOBALS._player, &scene->_companion, NULL);
}
}
@@ -13182,7 +13182,7 @@ bool Scene1945::Ladder::startAction(CursorType action, Event &event) {
} else if ( ((R2_GLOBALS._player._position.x == 197) && (R2_GLOBALS._player._position.y == 158))
|| ((R2_GLOBALS._player._position.x == 191) && (R2_GLOBALS._player._position.y == 142)) ) {
scene->_sceneMode = 1947;
- } else if ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 50)
+ } else if ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 50)
&& (event.mousePos.y >= 30)) {
scene->_sceneMode = 1940;
} else {
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h
index c809353051..91c4b88391 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index f928f3635c..bd8a0cdd0d 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -4872,10 +4872,10 @@ void Scene2900::Map::drawBlock(const byte *data, int xp, int yp,
void Scene2900::Map::moveArea(Rect &r, int xAmt, int yAmt) {
Rect tempRect = r;
tempRect.translate(xAmt, yAmt);
- int xpSrc, xpDest, width;
- int ypSrc, ypDest, height;
if (tempRect.intersects(r)) {
+ int xpSrc, xpDest, width;
+ int ypSrc, ypDest, height;
if (xAmt >= 0) {
xpSrc = tempRect.left;
width = tempRect.width() - xAmt;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index 3960d93f94..1339504712 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 5b41a85326..3f32503fdf 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1275,7 +1275,7 @@ void Scene3250::signal() {
}
void Scene3250::dispatch() {
- if ((R2_GLOBALS._player._visage == 3250) && (R2_GLOBALS._player._strip == 3) && (R2_GLOBALS._player._effect == 0)) {
+ if ((R2_GLOBALS._player._visage == 3250) && (R2_GLOBALS._player._strip == 3) && (R2_GLOBALS._player._effect == EFFECT_NONE)) {
R2_GLOBALS._player._effect = EFFECT_SHADED2;
R2_GLOBALS._player._shade = 6;
}
@@ -2221,24 +2221,24 @@ void Scene3375::signal() {
}
void Scene3375::dispatch() {
- if ((R2_GLOBALS._player._position.y >= 168) && (R2_GLOBALS._player._effect == 1))
+ if ((R2_GLOBALS._player._position.y >= 168) && (R2_GLOBALS._player._effect == EFFECT_SHADED))
R2_GLOBALS._player._effect = EFFECT_SHADED2;
- else if ((R2_GLOBALS._player._position.y < 168) && (R2_GLOBALS._player._effect == 6))
+ else if ((R2_GLOBALS._player._position.y < 168) && (R2_GLOBALS._player._effect == EFFECT_SHADED2))
R2_GLOBALS._player._effect = EFFECT_SHADED;
- if ((_companion1._position.y >= 168) && (_companion1._effect == 1))
+ if ((_companion1._position.y >= 168) && (_companion1._effect == EFFECT_SHADED))
_companion1._effect = EFFECT_SHADED2;
- else if ((_companion1._position.y < 168) && (_companion1._effect == 6))
+ else if ((_companion1._position.y < 168) && (_companion1._effect == EFFECT_SHADED2))
_companion1._effect = EFFECT_SHADED;
- if ((_companion2._position.y >= 168) && (_companion2._effect == 1))
+ if ((_companion2._position.y >= 168) && (_companion2._effect == EFFECT_SHADED))
_companion2._effect = EFFECT_SHADED2;
- else if ((_companion2._position.y < 168) && (_companion2._effect == 6))
+ else if ((_companion2._position.y < 168) && (_companion2._effect == EFFECT_SHADED2))
_companion2._effect = EFFECT_SHADED;
- if ((_webbster._position.y >= 168) && (_webbster._effect == 1))
+ if ((_webbster._position.y >= 168) && (_webbster._effect == EFFECT_SHADED))
_webbster._effect = EFFECT_SHADED2;
- else if ((_webbster._position.y < 168) && (_webbster._effect == 6))
+ else if ((_webbster._position.y < 168) && (_webbster._effect == EFFECT_SHADED2))
_webbster._effect = EFFECT_SHADED;
Scene::dispatch();
@@ -3896,7 +3896,6 @@ void Scene3500::dispatch() {
int16 mazePosY = 0;
int deltaX = 0;
int deltaY = 0;
- int tmpCellId = 0;
int cellId = 0;
if ((_mazeChangeAmount == 0) && !_postFixupFl) {
@@ -3912,7 +3911,7 @@ void Scene3500::dispatch() {
mazePosY = _mazeUI.cellFromY(_mazePosition.y + 46) - 46;
deltaX = abs(mazePosX - newMazeX);
deltaY = abs(mazePosY - newMazeY);
- tmpCellId = 0;
+ int tmpCellId = 0;
switch (_mazeDirection) {
case MAZEDIR_NORTH:
@@ -3956,7 +3955,7 @@ void Scene3500::dispatch() {
if ( (((cellId == 23) || (cellId == 24) || (cellId == 4)) && (newMazeY <= mazePosY) && (_mazePosition.y>= mazePosY))
|| (((cellId == 25) || (cellId == 26) || (cellId == 5) || (cellId == 14) || (cellId == 15)) && (_mazeChangeAmount >= deltaY) && (_mazeChangeAmount > 3) && (_action1._turningFl != 0)) ) {
newMazeY = mazePosY;
- if ((cellId != 25) && (cellId != 26) && (cellId != 5) && (cellId != 14) && (cellId == 15))
+ if ((cellId != 25) && (cellId != 26) && (cellId != 5) && (cellId != 14) && (cellId != 15))
R2_GLOBALS._sound2.play(339);
_rotation->_idxChange = 0;
_speed = 0;
@@ -4469,7 +4468,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
_quinn.changeZoom(-1);
_quinn._effect = EFFECT_SHADED;
- if (R2_GLOBALS._player._characterIndex != 1)
+ if (R2_GLOBALS._player._characterIndex != R2_QUINN)
_quinn.setDetails(9001, 0, -1, -1, 1, (SceneItem *) NULL);
_seeker.postInit();
@@ -4478,7 +4477,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
_seeker.changeZoom(-1);
_seeker._effect = EFFECT_SHADED;
- if (R2_GLOBALS._player._characterIndex != 2)
+ if (R2_GLOBALS._player._characterIndex != R2_SEEKER)
_seeker.setDetails(9002, 1, -1, -1, 1, (SceneItem *) NULL);
_miranda.postInit();
@@ -4486,7 +4485,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
_miranda.changeZoom(-1);
_miranda._effect = EFFECT_SHADED;
- if (R2_GLOBALS._player._characterIndex != 3)
+ if (R2_GLOBALS._player._characterIndex != R2_MIRANDA)
_miranda.setDetails(9003, 1, -1, -1, 1, (SceneItem *) NULL);
R2_GLOBALS._player.postInit();
@@ -5049,6 +5048,7 @@ void Scene3700::signal() {
Scene3800::Scene3800() {
_desertDirection = 0;
+ _skylineRect.set(0, 0, 320, 87);
}
void Scene3800::synchronize(Serializer &s) {
@@ -5221,7 +5221,8 @@ void Scene3800::initExits() {
}
void Scene3800::enterArea() {
- R2_GLOBALS._player.disableControl();
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+
switch (_desertDirection) {
case 0:
R2_GLOBALS._player.postInit();
@@ -5347,7 +5348,6 @@ void Scene3800::postInit(SceneObjectList *OwnerList) {
_westExit.setDetails(Rect(0, 87, 14, 168), EXITCURSOR_W, 3800);
_westExit.setDest(Common::Point(7, 145));
- _skylineRect.set(0, 0, 320, 87);
_background.setDetails(Rect(0, 0, 320, 200), 3800, 0, 1, 2, 1, (SceneItem *) NULL);
enterArea();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h
index e6f74d6e53..c73f8548e4 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp
index 494a31a829..6d4ef4ab75 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.cpp
+++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h
index d70652ff97..4a794f65c8 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.h
+++ b/engines/tsage/ringworld2/ringworld2_speakers.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index f9e84e8913..9954b929b2 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -141,8 +141,8 @@ Common::Error Saver::save(int slot, const Common::String &saveName) {
// Write out the savegame header
tSageSavegameHeader header;
- header.saveName = saveName;
- header.version = TSAGE_SAVEGAME_VERSION;
+ header._saveName = saveName;
+ header._version = TSAGE_SAVEGAME_VERSION;
writeSavegameHeader(saveFile, header);
// Save out objects that need to come at the start of the savegame
@@ -190,11 +190,11 @@ Common::Error Saver::restore(int slot) {
// Read in the savegame header
tSageSavegameHeader header;
readSavegameHeader(saveFile, header);
- if (header.thumbnail)
- header.thumbnail->free();
- delete header.thumbnail;
+ if (header._thumbnail)
+ header._thumbnail->free();
+ delete header._thumbnail;
- serializer.setSaveVersion(header.version);
+ serializer.setSaveVersion(header._version);
// Load in data for objects that need to come at the start of the savegame
for (Common::List<SaveListener *>::iterator i = _listeners.begin(); i != _listeners.end(); ++i) {
@@ -242,34 +242,34 @@ const char *SAVEGAME_STR = "SCUMMVM_TSAGE";
bool Saver::readSavegameHeader(Common::InSaveFile *in, tSageSavegameHeader &header) {
char saveIdentBuffer[SAVEGAME_STR_SIZE + 1];
- header.thumbnail = NULL;
+ header._thumbnail = NULL;
// Validate the header Id
in->read(saveIdentBuffer, SAVEGAME_STR_SIZE + 1);
if (strncmp(saveIdentBuffer, SAVEGAME_STR, SAVEGAME_STR_SIZE))
return false;
- header.version = in->readByte();
- if (header.version > TSAGE_SAVEGAME_VERSION)
+ header._version = in->readByte();
+ if (header._version > TSAGE_SAVEGAME_VERSION)
return false;
// Read in the string
- header.saveName.clear();
+ header._saveName.clear();
char ch;
- while ((ch = (char)in->readByte()) != '\0') header.saveName += ch;
+ while ((ch = (char)in->readByte()) != '\0') header._saveName += ch;
// Get the thumbnail
- header.thumbnail = Graphics::loadThumbnail(*in);
- if (!header.thumbnail)
+ header._thumbnail = Graphics::loadThumbnail(*in);
+ if (!header._thumbnail)
return false;
// Read in save date/time
- header.saveYear = in->readSint16LE();
- header.saveMonth = in->readSint16LE();
- header.saveDay = in->readSint16LE();
- header.saveHour = in->readSint16LE();
- header.saveMinutes = in->readSint16LE();
- header.totalFrames = in->readUint32LE();
+ header._saveYear = in->readSint16LE();
+ header._saveMonth = in->readSint16LE();
+ header._saveDay = in->readSint16LE();
+ header._saveHour = in->readSint16LE();
+ header._saveMinutes = in->readSint16LE();
+ header._totalFrames = in->readUint32LE();
return true;
}
@@ -281,7 +281,7 @@ void Saver::writeSavegameHeader(Common::OutSaveFile *out, tSageSavegameHeader &h
out->writeByte(TSAGE_SAVEGAME_VERSION);
// Write savegame name
- out->write(header.saveName.c_str(), header.saveName.size() + 1);
+ out->write(header._saveName.c_str(), header._saveName.size() + 1);
// Get the active palette
uint8 thumbPalette[256 * 3];
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h
index 42fd4f3282..be5ff51ffb 100644
--- a/engines/tsage/saveload.h
+++ b/engines/tsage/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -38,12 +38,12 @@ typedef void (*SaveNotifierFn)(bool postFlag);
class SavedObject;
struct tSageSavegameHeader {
- uint8 version;
- Common::String saveName;
- Graphics::Surface *thumbnail;
- int saveYear, saveMonth, saveDay;
- int saveHour, saveMinutes;
- int totalFrames;
+ uint8 _version;
+ Common::String _saveName;
+ Graphics::Surface *_thumbnail;
+ int _saveYear, _saveMonth, _saveDay;
+ int _saveHour, _saveMinutes;
+ int _totalFrames;
};
/*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index b41e8175c6..80ce1e3ecc 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -150,6 +150,7 @@ void SceneManager::fadeInIfNecessary() {
void SceneManager::changeScene(int newSceneNumber) {
debug(1, "changeScene(%d)", newSceneNumber);
+
// Fade out the scene
ScenePalette scenePalette;
uint32 adjustData = 0;
diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h
index 4d36192cec..9e3857af5e 100644
--- a/engines/tsage/scenes.h
+++ b/engines/tsage/scenes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 6633d15c26..c5c38505a7 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -468,8 +468,9 @@ void SoundManager::sfProcessFading() {
if (vtStruct->_voiceType == VOICETYPE_1) {
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
- if (vtStruct->_entries[idx]._type1._field6 >= -1)
- ++vtStruct->_entries[idx]._type1._field6;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[idx]._type1;
+ if (vte._field6 >= -1)
+ ++vte._field6;
}
}
}
@@ -499,22 +500,22 @@ void SoundManager::sfUpdateVoiceStructs() {
if (vs->_voiceType == VOICETYPE_0) {
for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
- VoiceStructEntry &vse = vs->_entries[idx];
+ VoiceStructEntryType0 &vte = vs->_entries[idx]._type0;
- vse._type0._sound = vse._type0._sound2;
- vse._type0._channelNum = vse._type0._channelNum2;
- vse._type0._priority = vse._type0._priority2;
- vse._type0._fieldA = vse._type0._field12;
+ vte._sound = vte._sound2;
+ vte._channelNum = vte._channelNum2;
+ vte._priority = vte._priority2;
+ vte._fieldA = vte._field12;
}
} else {
vs->_field3 = vs->_numVoices;
for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
- VoiceStructEntry &vse = vs->_entries[idx];
+ VoiceStructEntryType1 &vte = vs->_entries[idx]._type1;
- vse._type1._sound = vse._type1._sound2;
- vse._type1._channelNum = vse._type1._channelNum2;
- vse._type1._priority = vse._type1._priority2;
+ vte._sound = vte._sound2;
+ vte._channelNum = vte._channelNum2;
+ vte._priority = vte._priority2;
}
}
}
@@ -529,16 +530,16 @@ void SoundManager::sfUpdateVoiceStructs2() {
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
if (vtStruct->_voiceType == VOICETYPE_0) {
- VoiceStructEntryType0 &vse = vtStruct->_entries[idx]._type0;
- vse._sound2 = vse._sound;
- vse._channelNum2 = vse._channelNum;
- vse._priority2 = vse._priority;
- vse._field12 = vse._fieldA;
+ VoiceStructEntryType0 &vte = vtStruct->_entries[idx]._type0;
+ vte._sound2 = vte._sound;
+ vte._channelNum2 = vte._channelNum;
+ vte._priority2 = vte._priority;
+ vte._field12 = vte._fieldA;
} else {
- VoiceStructEntryType1 &vse = vtStruct->_entries[idx]._type1;
- vse._sound2 = vse._sound;
- vse._channelNum2 = vse._channelNum;
- vse._priority2 = vse._priority;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[idx]._type1;
+ vte._sound2 = vte._sound;
+ vte._channelNum2 = vte._channelNum;
+ vte._priority2 = vte._priority;
}
}
}
@@ -724,7 +725,7 @@ void SoundManager::sfRethinkSoundDrivers() {
ve._type0._sound = NULL;
ve._type0._channelNum = 0;
ve._type0._priority = 0;
- ve._type0._fieldA = 0;
+ ve._type0._fieldA = false;
vs->_entries.push_back(ve);
}
@@ -773,32 +774,31 @@ void SoundManager::sfRethinkVoiceTypes() {
if (vs->_voiceType == VOICETYPE_0) {
for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
- VoiceStructEntry &vse = vs->_entries[idx];
- vse._type0._sound3 = vse._type0._sound;
- vse._type0._channelNum3 = vse._type0._channelNum;
- vse._type0._priority3 = vse._type0._priority;
- vse._type0._field1A = vse._type0._fieldA;
- vse._type0._sound = NULL;
- vse._type0._channelNum = 0;
- vse._type0._priority = 0;
- vse._type0._fieldA = 0;
- vse._type0._sound2 = NULL;
- vse._type0._channelNum2 = 0;
- vse._type0._priority2 = 0;
- vse._type0._field12 = 0;
+ VoiceStructEntryType0 &vte = vs->_entries[idx]._type0;
+ vte._sound3 = vte._sound;
+ vte._channelNum3 = vte._channelNum;
+ vte._priority3 = vte._priority;
+ vte._sound = NULL;
+ vte._channelNum = 0;
+ vte._priority = 0;
+ vte._fieldA = false;
+ vte._sound2 = NULL;
+ vte._channelNum2 = 0;
+ vte._priority2 = 0;
+ vte._field12 = false;
}
} else {
for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
- VoiceStructEntry &vse = vs->_entries[idx];
- vse._type1._sound3 = vse._type1._sound;
- vse._type1._channelNum3 = vse._type1._channelNum;
- vse._type1._priority3 = vse._type1._priority;
- vse._type1._sound = NULL;
- vse._type1._channelNum = 0;
- vse._type1._priority = 0;
- vse._type1._sound2 = NULL;
- vse._type1._channelNum2 = 0;
- vse._type1._priority2 = 0;
+ VoiceStructEntryType1 &vte = vs->_entries[idx]._type1;
+ vte._sound3 = vte._sound;
+ vte._channelNum3 = vte._channelNum;
+ vte._priority3 = vte._priority;
+ vte._sound = NULL;
+ vte._channelNum = 0;
+ vte._priority = 0;
+ vte._sound2 = NULL;
+ vte._channelNum2 = 0;
+ vte._priority2 = 0;
}
// Reset the number of voices available
@@ -858,10 +858,11 @@ void SoundManager::sfRethinkVoiceTypes() {
if (numVoices >= chNumVoices) {
int channelCount = chNumVoices, idx = 0;
while (channelCount > 0) {
- if (!vtStruct->_entries[idx]._type1._sound2) {
- vtStruct->_entries[idx]._type1._sound2 = sound;
- vtStruct->_entries[idx]._type1._channelNum2 = foundIndex;
- vtStruct->_entries[idx]._type1._priority2 = foundPriority;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[idx]._type1;
+ if (!vte._sound2) {
+ vte._sound2 = sound;
+ vte._channelNum2 = foundIndex;
+ vte._priority2 = foundPriority;
--channelCount;
}
++idx;
@@ -881,10 +882,11 @@ void SoundManager::sfRethinkVoiceTypes() {
}
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
- if (vtStruct->_entries[idx]._type1._priority2 == maxPriority) {
- vtStruct->_entries[idx]._type1._sound2 = NULL;
- vtStruct->_entries[idx]._type1._channelNum2 = 0;
- vtStruct->_entries[idx]._type1._priority2 = 0;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[idx]._type1;
+ if (vte._priority2 == maxPriority) {
+ vte._sound2 = NULL;
+ vte._channelNum2 = 0;
+ vte._priority2 = 0;
++numVoices;
}
}
@@ -892,10 +894,11 @@ void SoundManager::sfRethinkVoiceTypes() {
int voicesCtr = chNumVoices;
for (uint idx = 0; (idx < vtStruct->_entries.size()) && (voicesCtr > 0); ++idx) {
- if (!vtStruct->_entries[idx]._type1._sound2) {
- vtStruct->_entries[idx]._type1._sound2 = sound;
- vtStruct->_entries[idx]._type1._channelNum2 = foundIndex;
- vtStruct->_entries[idx]._type1._priority2 = foundPriority;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[idx]._type1;
+ if (!vte._sound2) {
+ vte._sound2 = sound;
+ vte._channelNum2 = foundIndex;
+ vte._priority2 = foundPriority;
--voicesCtr;
}
}
@@ -932,10 +935,11 @@ void SoundManager::sfRethinkVoiceTypes() {
}
if (entryIndex != -1) {
- vtStruct->_entries[entryIndex]._type0._sound2 = sound;
- vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
- vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
- vtStruct->_entries[entryIndex]._type0._field12 = 0;
+ VoiceStructEntryType0 &vte = vtStruct->_entries[entryIndex]._type0;
+ vte._sound2 = sound;
+ vte._channelNum2 = foundIndex;
+ vte._priority2 = foundPriority;
+ vte._field12 = false;
continue;
}
@@ -953,10 +957,11 @@ void SoundManager::sfRethinkVoiceTypes() {
}
if (entryIndex != -1) {
- vtStruct->_entries[entryIndex]._type0._sound2 = sound;
- vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
- vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
- vtStruct->_entries[entryIndex]._type0._field12 = 0;
+ VoiceStructEntryType0 &vte = vtStruct->_entries[entryIndex]._type0;
+ vte._sound2 = sound;
+ vte._channelNum2 = foundIndex;
+ vte._priority2 = foundPriority;
+ vte._field12 = false;
continue;
}
@@ -978,10 +983,11 @@ void SoundManager::sfRethinkVoiceTypes() {
}
if (entryIndex != -1) {
- vtStruct->_entries[entryIndex]._type0._sound2 = sound;
- vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
- vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
- vtStruct->_entries[entryIndex]._type0._field12 = 0;
+ VoiceStructEntryType0 &vte = vtStruct->_entries[entryIndex]._type0;
+ vte._sound2 = sound;
+ vte._channelNum2 = foundIndex;
+ vte._priority2 = foundPriority;
+ vte._field12 = false;
continue;
}
@@ -1017,10 +1023,11 @@ void SoundManager::sfRethinkVoiceTypes() {
continue;
if (entryIndex != -1) {
- vtStruct->_entries[entryIndex]._type0._sound2 = sound;
- vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
- vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
- vtStruct->_entries[entryIndex]._type0._field12 = 1;
+ VoiceStructEntryType0 &vte = vtStruct->_entries[entryIndex]._type0;
+ vte._sound2 = sound;
+ vte._channelNum2 = foundIndex;
+ vte._priority2 = foundPriority;
+ vte._field12 = true;
continue;
}
@@ -1035,14 +1042,15 @@ void SoundManager::sfRethinkVoiceTypes() {
for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
if (vtStruct->_entries[idx]._field1) {
- if (!vtStruct->_entries[idx]._type0._sound2) {
+ VoiceStructEntryType0 &vte = vtStruct->_entries[idx]._type0;
+ if (!vte._sound2) {
if (vtStruct->_entries[idx]._voiceNum > maxVoiceNum) {
maxVoiceNum = vtStruct->_entries[idx]._voiceNum;
voiceIndex = idx;
}
} else {
- if (vtStruct->_entries[idx]._type0._priority2 > maxPriority) {
- maxPriority = vtStruct->_entries[idx]._type0._priority2;
+ if (vte._priority2 > maxPriority) {
+ maxPriority = vte._priority2;
priorityIndex = idx;
}
}
@@ -1060,7 +1068,7 @@ void SoundManager::sfRethinkVoiceTypes() {
vteSrc._sound2 = sound;
vteSrc._channelNum2 = foundIndex;
vteSrc._priority2 = foundPriority;
- vteSrc._field12 = 1;
+ vteSrc._field12 = true;
continue;
}
@@ -1084,7 +1092,7 @@ void SoundManager::sfRethinkVoiceTypes() {
vteSrc._sound2 = sound;
vteSrc._channelNum2 = foundIndex;
vteSrc._priority2 = foundPriority;
- vteSrc._field12 = 1;
+ vteSrc._field12 = true;
continue;
}
}
@@ -1115,10 +1123,10 @@ void SoundManager::sfRethinkVoiceTypes() {
++total;
vse._priority = vse._priority2;
- vse._fieldA = 1;
+ vse._fieldA = true;
vse._sound2 = NULL;
- if (total) {
+ if ((total) && vse._sound) {
driver->proc24(vse._channelNum, idx, vse._sound, 123, 0);
driver->proc24(vse._channelNum, idx, vse._sound, 1, vse._sound->_chModulation[vse._channelNum]);
driver->proc24(vse._channelNum, idx, vse._sound, 7,
@@ -1135,7 +1143,7 @@ void SoundManager::sfRethinkVoiceTypes() {
vse._sound = NULL;
vse._channelNum = 0;
vse._priority = 0;
- vse._fieldA = 0;
+ vse._fieldA = false;
}
}
@@ -1148,13 +1156,13 @@ void SoundManager::sfRethinkVoiceTypes() {
continue;
for (uint entryIndex = 0; entryIndex < vs->_entries.size(); ++entryIndex) {
- if ((vs->_entries[entryIndex]._type0._sound3 != sound) ||
- (vs->_entries[entryIndex]._type0._channelNum3 != channelNum)) {
+ VoiceStructEntryType0 &vteCur = vs->_entries[entryIndex]._type0;
+ if ((vteCur._sound3 != sound) || (vteCur._channelNum3 != channelNum)) {
// Found match
- vs->_entries[entryIndex]._type0._sound = sound;
- vs->_entries[entryIndex]._type0._channelNum = channelNum;
- vs->_entries[entryIndex]._type0._priority = vse._priority2;
- vs->_entries[entryIndex]._type0._fieldA = 0;
+ vteCur._sound = sound;
+ vteCur._channelNum = channelNum;
+ vteCur._priority = vse._priority2;
+ vteCur._fieldA = false;
vse._sound2 = NULL;
break;
}
@@ -1185,7 +1193,7 @@ void SoundManager::sfRethinkVoiceTypes() {
vseFound._sound = vse._sound2;
vseFound._channelNum = vse._channelNum2;
vseFound._priority = vse._priority2;
- vseFound._fieldA = 0;
+ vseFound._fieldA = false;
SoundDriver *driver = vs->_entries[foundIndex]._driver;
assert(driver);
@@ -1215,10 +1223,10 @@ void SoundManager::sfRethinkVoiceTypes() {
} else {
// Type 1
for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
- VoiceStructEntry &vse = vs->_entries[idx];
- vse._type1._sound = NULL;
- vse._type1._channelNum = 0;
- vse._type1._priority = 0;
+ VoiceStructEntryType1 &vte = vs->_entries[idx]._type1;
+ vte._sound = NULL;
+ vte._channelNum = 0;
+ vte._priority = 0;
}
for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
@@ -2188,9 +2196,10 @@ void Sound::soPlaySound(VoiceTypeStruct *vtStruct, const byte *channelData, int
SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
assert(driver);
- vtStruct->_entries[entryIndex]._type1._field6 = 0;
- vtStruct->_entries[entryIndex]._type1._field4 = v0;
- vtStruct->_entries[entryIndex]._type1._field5 = 0;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[entryIndex]._type1;
+ vte._field6 = 0;
+ vte._field4 = v0;
+ vte._field5 = 0;
driver->playSound(channelData, 0, _chProgram[channelNum], vtStruct->_entries[entryIndex]._voiceNum, v0, v1);
}
@@ -2207,9 +2216,10 @@ void Sound::soPlaySound2(VoiceTypeStruct *vtStruct, const byte *channelData, int
assert(driver);
byte *trackData = _channelData[trackCtr];
- vtStruct->_entries[entryIndex]._type1._field6 = 0;
- vtStruct->_entries[entryIndex]._type1._field4 = v0;
- vtStruct->_entries[entryIndex]._type1._field5 = 0;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[entryIndex]._type1;
+ vte._field6 = 0;
+ vte._field4 = v0;
+ vte._field5 = 0;
int v1, v2;
driver->playSound(trackData, 14, -1, vtStruct->_entries[entryIndex]._voiceNum, v0, 0x7F);
@@ -2336,9 +2346,10 @@ void Sound::soServiceTrackType1(int trackIndex, const byte *channelData) {
SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
assert(driver);
- vtStruct->_entries[entryIndex]._type1._field6 = 0;
- vtStruct->_entries[entryIndex]._type1._field4 = *(channelData + 1);
- vtStruct->_entries[entryIndex]._type1._field5 = 0;
+ VoiceStructEntryType1 &vte = vtStruct->_entries[entryIndex]._type1;
+ vte._field6 = 0;
+ vte._field4 = *(channelData + 1);
+ vte._field5 = 0;
int v1, v2;
driver->playSound(channelData, 14, -1, vtStruct->_entries[entryIndex]._voiceNum, *(channelData + 1), 0x7f);
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index fefe8ad101..49558b4bca 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -118,15 +118,14 @@ struct VoiceStructEntryType0 {
Sound *_sound;
int _channelNum;
int _priority;
- int _fieldA;
+ bool _fieldA;
Sound *_sound2;
int _channelNum2;
int _priority2;
- int _field12;
+ bool _field12;
Sound *_sound3;
int _channelNum3;
int _priority3;
- int _field1A;
};
struct VoiceStructEntryType1 {
diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp
index fb08195180..311f7965c7 100644
--- a/engines/tsage/staticres.cpp
+++ b/engines/tsage/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h
index 334a240f28..f6fef378ae 100644
--- a/engines/tsage/staticres.h
+++ b/engines/tsage/staticres.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 36708e373e..0b882d5cbf 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index e69fe0612a..ea4f5da6ea 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp
index ae5c6c8cee..45bfe2b5ea 100644
--- a/engines/tsage/user_interface.cpp
+++ b/engines/tsage/user_interface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -297,8 +297,8 @@ void UICollection::r2rDrawFrame() {
GLOBALS._screenSurface.copyFrom(vertLine, SCREEN_WIDTH - 4, 3);
// Restrict drawing area to exclude the borders at the edge of the screen
- R2_GLOBALS._screenSurface._clipRect = Rect(4, 4, SCREEN_WIDTH - 4,
- SCREEN_HEIGHT - 4);
+ R2_GLOBALS._screenSurface._clipRect = Rect(4, 3, SCREEN_WIDTH - 4,
+ SCREEN_HEIGHT - 3);
}
/*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/user_interface.h b/engines/tsage/user_interface.h
index bc2398bf05..7cde2900f8 100644
--- a/engines/tsage/user_interface.h
+++ b/engines/tsage/user_interface.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tucker/console.cpp b/engines/tucker/console.cpp
index 17ba2038d0..49e0ac479f 100644
--- a/engines/tucker/console.cpp
+++ b/engines/tucker/console.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tucker/console.h b/engines/tucker/console.h
index 6be56d5594..22f4d5803f 100644
--- a/engines/tucker/console.h
+++ b/engines/tucker/console.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp
index e4a74f6c37..3d7859e4fd 100644
--- a/engines/tucker/detection.cpp
+++ b/engines/tucker/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tucker/graphics.cpp b/engines/tucker/graphics.cpp
index e6fb70ac16..b9c184e2bb 100644
--- a/engines/tucker/graphics.cpp
+++ b/engines/tucker/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -163,13 +163,13 @@ void Graphics::copyRect(uint8 *dst, int dstPitch, uint8 *src, int srcPitch, int
}
void Graphics::drawStringChar(uint8 *dst, int xDst, int yDst, int pitch, uint8 chr, uint8 chrColor, const uint8 *src) {
- if (chr < 32 || chr - 32 >= _charset.xCount * _charset.yCount) {
+ if (chr < 32 || chr - 32 >= _charset._xCount * _charset._yCount) {
return;
}
- const int h = MIN(_charset.charH, 200 - yDst);
- const int w = MIN(_charset.charW, pitch - xDst);
+ const int h = MIN(_charset._charH, 200 - yDst);
+ const int w = MIN(_charset._charW, pitch - xDst);
dst += yDst * pitch + xDst;
- int offset = (chr - 32) * _charset.charH * _charset.charW;
+ int offset = (chr - 32) * _charset._charH * _charset._charW;
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w; ++x) {
const int color = src[offset++];
@@ -189,22 +189,22 @@ void Graphics::setCharset(CharsetType type) {
_charsetType = type;
switch (type) {
case kCharsetTypeDefault:
- _charset.charW = 10;
- _charset.charH = 10;
- _charset.xCount = 32;
- _charset.yCount = 7;
+ _charset._charW = 10;
+ _charset._charH = 10;
+ _charset._xCount = 32;
+ _charset._yCount = 7;
break;
case kCharsetTypeEng:
- _charset.charW = 10;
- _charset.charH = 8;
- _charset.xCount = 32;
- _charset.yCount = 3;
+ _charset._charW = 10;
+ _charset._charH = 8;
+ _charset._xCount = 32;
+ _charset._yCount = 3;
break;
case kCharsetTypeCredits:
- _charset.charW = 19;
- _charset.charH = 10;
- _charset.xCount = 16;
- _charset.yCount = 7;
+ _charset._charW = 19;
+ _charset._charH = 10;
+ _charset._xCount = 16;
+ _charset._yCount = 7;
break;
}
}
diff --git a/engines/tucker/graphics.h b/engines/tucker/graphics.h
index 2b4a57d65d..3e48179a30 100644
--- a/engines/tucker/graphics.h
+++ b/engines/tucker/graphics.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -34,16 +34,14 @@ enum CharsetType {
};
struct Charset {
- int charW;
- int charH;
- int xCount;
- int yCount;
+ int _charW;
+ int _charH;
+ int _xCount;
+ int _yCount;
};
class Graphics {
public:
-
-
static int encodeRLE(const uint8 *src, uint8 *dst, int w, int h);
static int encodeRAW(const uint8 *src, uint8 *dst, int w, int h);
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp
index f6d34c295b..b5fb10c59e 100644
--- a/engines/tucker/locations.cpp
+++ b/engines/tucker/locations.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -33,8 +33,8 @@ static const int _data3UpdateLocation1_yTable[] = { 152, 8, 95 };
void TuckerEngine::execData3PreUpdate_locationNum1() {
if (_flagsTable[1] == 1) {
_flagsTable[1] = 2;
- _locationSoundsTable[3].type = 2;
- startSound(_locationSoundsTable[3].offset, 3, _locationSoundsTable[3].volume);
+ _locationSoundsTable[3]._type = 2;
+ startSound(_locationSoundsTable[3]._offset, 3, _locationSoundsTable[3]._volume);
}
_mapSequenceFlagsLocationTable[0] = (_flagsTable[1] > 0) ? 1 : 0;
if (_updateLocationCounter == 0) {
@@ -66,7 +66,7 @@ void TuckerEngine::execData3PreUpdate_locationNum1Helper1() {
}
}
if (_updateLocationFlagsTable[0] == 1 && _updateLocationCounter == 0) {
- setVolumeSound(12, _locationSoundsTable[12].volume);
+ setVolumeSound(12, _locationSoundsTable[12]._volume);
} else {
setVolumeSound(12, 0);
}
@@ -122,7 +122,7 @@ void TuckerEngine::execData3PostUpdate_locationNum1() {
if (_flagsTable[63] == 0) {
if (getRandomNumber() < 400) {
_flagsTable[63] = 1;
- startSound(_locationSoundsTable[2].offset, 2, _locationSoundsTable[2].volume);
+ startSound(_locationSoundsTable[2]._offset, 2, _locationSoundsTable[2]._volume);
}
}
_locationHeightTable[1] = (_yPosCurrent > 104) ? 60 : 0;
@@ -130,48 +130,48 @@ void TuckerEngine::execData3PostUpdate_locationNum1() {
void TuckerEngine::updateSprite_locationNum2() {
if (_flagsTable[9] == 2) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
return;
}
if (_flagsTable[9] == 1) {
if (_flagsTable[10] == 1) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].state = 4;
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._state = 4;
+ _spritesTable[0]._needUpdate = true;
} else {
- _spritesTable[0].needUpdate = 0;
- _spritesTable[0].state = 5;
+ _spritesTable[0]._needUpdate = false;
+ _spritesTable[0]._state = 5;
_flagsTable[10] = 1;
- _spritesTable[0].gfxBackgroundOffset = 0;
+ _spritesTable[0]._gfxBackgroundOffset = 0;
}
return;
}
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].state = 3;
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._state = 3;
+ _spritesTable[0]._needUpdate = true;
return;
}
if (_csDataHandled) {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = false;
if (_flagsTable[199] == 0) {
_flagsTable[199] = 1;
setCharacterAnimation(0, 0);
} else if (getRandomNumber() > 20000) {
- _spritesTable[0].state = 6;
+ _spritesTable[0]._state = 6;
} else {
- _spritesTable[0].state = 3;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._state = 3;
+ _spritesTable[0]._updateDelay = 5;
}
} else {
if (_flagsTable[199] == 0) {
_flagsTable[199] = 1;
setCharacterAnimation(1, 0);
} else if (getRandomNumber() < 20000) {
- _spritesTable[0].state = 1;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._state = 1;
+ _spritesTable[0]._updateDelay = 5;
} else {
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
}
}
}
@@ -199,7 +199,7 @@ void TuckerEngine::execData3PreUpdate_locationNum2() {
if (_updateLocationYPosTable2[i] > _updateLocationYMaxTable[i]) {
_updateLocationYPosTable2[i] = 0;
const int num = (getRandomNumber() < 16000) ? 2 : 3;
- startSound(_locationSoundsTable[num].offset, num, _locationSoundsTable[num].volume);
+ startSound(_locationSoundsTable[num]._offset, num, _locationSoundsTable[num]._volume);
}
} else if (getRandomNumber() > 32000) {
const int num = getRandomNumber() / 8192;
@@ -243,9 +243,9 @@ void TuckerEngine::updateSprite_locationNum3_0(int i) {
int num;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
num = 5;
- _spritesTable[i].needUpdate = 1;
- } else if (_spritesTable[i].prevState == 5 && _spritesTable[i].animationFrame == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = true;
+ } else if (_spritesTable[i]._prevState == 5 && _spritesTable[i]._animationFrame == 1) {
+ _spritesTable[i]._needUpdate = false;
int r = getRandomNumber();
if (r < 12000) {
num = 3;
@@ -256,11 +256,11 @@ void TuckerEngine::updateSprite_locationNum3_0(int i) {
}
} else {
num = 5;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 10;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 10;
}
- _spritesTable[i].state = num;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._state = num;
+ _spritesTable[i]._prevAnimationFrame = true;
}
void TuckerEngine::updateSprite_locationNum3_1(int i) {
@@ -268,44 +268,44 @@ void TuckerEngine::updateSprite_locationNum3_1(int i) {
if (_flagsTable[207] == 1) {
num = -1;
} else if (_flagsTable[203] == 1) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
num = 20;
_flagsTable[203] = 2;
} else if (_flagsTable[203] == 2) {
num = 12;
} else if (_flagsTable[203] == 3) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
num = 19;
_flagsTable[203] = 0;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
if (_flagsTable[21] == 0) {
num = 7;
} else {
num = 8;
}
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (_csDataHandled) {
num = 6;
if (getRandomNumber() < 32000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- } else if (_spritesTable[i].state == 6 && _spritesTable[i].animationFrame == 1) {
+ } else if (_spritesTable[i]._state == 6 && _spritesTable[i]._animationFrame == 1) {
if (getRandomNumber() < 20000) {
num = 11;
- _spritesTable[i].defaultUpdateDelay = 5;
+ _spritesTable[i]._defaultUpdateDelay = 5;
} else {
num = 10;
}
} else {
num = 6;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 10;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 10;
}
}
- _spritesTable[i].state = num;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = num;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum3_2(int i) {
@@ -314,32 +314,32 @@ void TuckerEngine::updateSprite_locationNum3_2(int i) {
_flagsTable[205] = 0;
num = 18;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
num = 17;
} else if (_flagsTable[45] == 1) {
_flagsTable[45] = 2;
num = 16;
} else if (_flagsTable[45] == 2) {
num = 17;
- _spritesTable[i].updateDelay = 5;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._updateDelay = 5;
+ _spritesTable[i]._needUpdate = false;
} else if (_flagsTable[45] == 3) {
_flagsTable[45] = 0;
num = 16;
- _updateSpriteFlag2 = 1;
+ _updateSpriteFlag2 = true;
} else {
- _spritesTable[i].needUpdate = 0;
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter <= 5) {
+ _spritesTable[i]._needUpdate = false;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter <= 5) {
num = 14;
} else {
- if (_spritesTable[i].counter > 8) {
- _spritesTable[i].counter = 0;
+ if (_spritesTable[i]._counter > 8) {
+ _spritesTable[i]._counter = 0;
}
num = 15;
}
}
- _spritesTable[i].state = num;
+ _spritesTable[i]._state = num;
}
void TuckerEngine::execData3PreUpdate_locationNum3() {
@@ -362,36 +362,36 @@ void TuckerEngine::updateSprite_locationNum4(int i) {
if (_flagsTable[9] == 2) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 1;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
state = 2;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum4() {
if (_flagsTable[6] == 0) {
setVolumeSound(0, 0);
} else {
- setVolumeSound(0, _locationSoundsTable[0].volume);
+ setVolumeSound(0, _locationSoundsTable[0]._volume);
}
}
void TuckerEngine::updateSprite_locationNum5_0() {
- ++_spritesTable[0].counter;
- if (_spritesTable[0].counter > 100) {
- _spritesTable[0].counter = 0;
- _spritesTable[0].state = 1;
- _locationSoundsTable[1].type = 2;
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
- } else if (_spritesTable[0].counter == 50) {
- _locationSoundsTable[1].type = 2;
- _spritesTable[0].state = 2;
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
- } else {
- _spritesTable[0].state = -1;
+ ++_spritesTable[0]._counter;
+ if (_spritesTable[0]._counter > 100) {
+ _spritesTable[0]._counter = 0;
+ _spritesTable[0]._state = 1;
+ _locationSoundsTable[1]._type = 2;
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
+ } else if (_spritesTable[0]._counter == 50) {
+ _locationSoundsTable[1]._type = 2;
+ _spritesTable[0]._state = 2;
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
+ } else {
+ _spritesTable[0]._state = -1;
if (isSoundPlaying(1)) {
stopSound(1);
}
@@ -399,7 +399,7 @@ void TuckerEngine::updateSprite_locationNum5_0() {
}
void TuckerEngine::updateSprite_locationNum5_1(int i) {
- _spritesTable[i].state = 3;
+ _spritesTable[i]._state = 3;
}
void TuckerEngine::updateSprite_locationNum6_0(int i) {
@@ -410,29 +410,29 @@ void TuckerEngine::updateSprite_locationNum6_0(int i) {
state = 14;
} else if (_flagsTable[26] == 4 || _flagsTable[26] == 5) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = true;
state = 3;
- _spritesTable[0].counter = 0;
+ _spritesTable[0]._counter = 0;
} else if (_xPosCurrent < 370 && _flagsTable[26] == 4) {
state = 2;
- } else if (_spritesTable[0].counter == 0) {
+ } else if (_spritesTable[0]._counter == 0) {
setCharacterAnimation(0, 0);
- _updateSpriteFlag1 = 1;
- ++_spritesTable[0].counter;
+ _updateSpriteFlag1 = true;
+ ++_spritesTable[0]._counter;
return;
} else {
state = 1;
- _spritesTable[0].updateDelay = 2;
- ++_spritesTable[0].counter;
- if (_spritesTable[0].counter > 100) {
- _spritesTable[0].counter = 0;
+ _spritesTable[0]._updateDelay = 2;
+ ++_spritesTable[0]._counter;
+ if (_spritesTable[0]._counter > 100) {
+ _spritesTable[0]._counter = 0;
}
}
} else {
state = -1;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum6_1(int i) {
@@ -440,18 +440,18 @@ void TuckerEngine::updateSprite_locationNum6_1(int i) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
if (_flagsTable[209] == 1) {
state = 9;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 10;
}
} else {
if (getRandomNumber() < 30000 || (_csDataHandled && _xPosCurrent == 248)) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 7;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 7;
_miscSoundFxNum[0] = 3;
_miscSoundFxDelayCounter[0] = 70;
@@ -459,7 +459,7 @@ void TuckerEngine::updateSprite_locationNum6_1(int i) {
_miscSoundFxDelayCounter[1] = 25;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum6_2(int i) {
@@ -467,13 +467,13 @@ void TuckerEngine::updateSprite_locationNum6_2(int i) {
if (_flagsTable[26] < 5 || _flagsTable[207] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 12;
} else {
state = 12;
- _spritesTable[i].updateDelay = 2;
+ _spritesTable[i]._updateDelay = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum6() {
@@ -483,11 +483,11 @@ void TuckerEngine::execData3PreUpdate_locationNum6() {
if (_flagsTable[26] == 2) {
_currentSpriteAnimationLength = 2;
_currentSpriteAnimationFrame = 112;
- if (_spritesTable[0].xSource < 45) {
+ if (_spritesTable[0]._xSource < 45) {
_currentSpriteAnimationFrame2 = 144;
- } else if (_spritesTable[0].xSource > 80) {
+ } else if (_spritesTable[0]._xSource > 80) {
_currentSpriteAnimationFrame2 = 147;
- } else if (_spritesTable[0].xSource < 60) {
+ } else if (_spritesTable[0]._xSource < 60) {
_currentSpriteAnimationFrame2 = 145;
} else {
_currentSpriteAnimationFrame2 = 146;
@@ -500,24 +500,24 @@ void TuckerEngine::execData3PreUpdate_locationNum6Helper1() {
if (_flagsTable[26] == 1) {
if (_flagsTable[27] < 15) {
if (_flagsTable[27] == 0) {
- startSound(_locationSoundsTable[2].offset, 2, _locationSoundsTable[2].volume);
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
+ startSound(_locationSoundsTable[2]._offset, 2, _locationSoundsTable[2]._volume);
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
}
++_flagsTable[27];
- setVolumeSound(0, _locationSoundsTable[0].volume - _flagsTable[27] * 5);
- setVolumeMusic(0, _locationMusicsTable[0].volume - _flagsTable[27] * 5);
+ setVolumeSound(0, _locationSoundsTable[0]._volume - _flagsTable[27] * 5);
+ setVolumeMusic(0, _locationMusicsTable[0]._volume - _flagsTable[27] * 5);
}
} else if (_flagsTable[26] == 3) {
if (_flagsTable[27] > 0) {
if (_flagsTable[27] == 15) {
- startSound(_locationSoundsTable[2].offset, 2, _locationSoundsTable[2].volume);
+ startSound(_locationSoundsTable[2]._offset, 2, _locationSoundsTable[2]._volume);
}
--_flagsTable[27];
- setVolumeSound(0, _locationSoundsTable[0].volume - _flagsTable[27] * 5);
- setVolumeMusic(0, _locationMusicsTable[0].volume - _flagsTable[27] * 5);
+ setVolumeSound(0, _locationSoundsTable[0]._volume - _flagsTable[27] * 5);
+ setVolumeMusic(0, _locationMusicsTable[0]._volume - _flagsTable[27] * 5);
int volume = _flagsTable[27];
- if (volume < _locationSoundsTable[1].volume) {
- volume = _locationSoundsTable[1].volume;
+ if (volume < _locationSoundsTable[1]._volume) {
+ volume = _locationSoundsTable[1]._volume;
}
setVolumeSound(1, volume);
}
@@ -538,12 +538,12 @@ void TuckerEngine::execData3PreUpdate_locationNum6Helper1() {
x2 = 15 - _flagsTable[27];
}
for (int i = 0; i < x1; ++i) {
- execData3PreUpdate_locationNum6Helper2(20 * 640 + 325 + i * 8, _data3GfxBuf + _dataTable[238].sourceOffset);
- execData3PreUpdate_locationNum6Helper2(20 * 640 + 445 - i * 8, _data3GfxBuf + _dataTable[238].sourceOffset);
+ execData3PreUpdate_locationNum6Helper2(20 * 640 + 325 + i * 8, _data3GfxBuf + _dataTable[238]._sourceOffset);
+ execData3PreUpdate_locationNum6Helper2(20 * 640 + 445 - i * 8, _data3GfxBuf + _dataTable[238]._sourceOffset);
}
for (int i = 0; i < x2; ++i) {
- execData3PreUpdate_locationNum6Helper3(20 * 640 + 325 + x1 * 8 + i * 4, _data3GfxBuf + _dataTable[238].sourceOffset);
- execData3PreUpdate_locationNum6Helper3(20 * 640 + 449 - x1 * 8 - i * 4, _data3GfxBuf + _dataTable[238].sourceOffset);
+ execData3PreUpdate_locationNum6Helper3(20 * 640 + 325 + x1 * 8 + i * 4, _data3GfxBuf + _dataTable[238]._sourceOffset);
+ execData3PreUpdate_locationNum6Helper3(20 * 640 + 449 - x1 * 8 - i * 4, _data3GfxBuf + _dataTable[238]._sourceOffset);
}
addDirtyRect(0, 20, 640, 51);
}
@@ -583,37 +583,37 @@ void TuckerEngine::execData3PostUpdate_locationNum6() {
void TuckerEngine::updateSprite_locationNum7_0(int i) {
int state;
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 4;
} else {
- _spritesTable[i].needUpdate = 0;
- if (_spritesTable[i].counter > 0) {
+ _spritesTable[i]._needUpdate = false;
+ if (_spritesTable[i]._counter > 0) {
state = 2;
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._counter = 0;
} else {
state = 1;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum7_1(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 5;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum8_0(int i) {
- _spritesTable[i].state = (_flagsTable[28] < 20) ? -1 : 7;
+ _spritesTable[i]._state = (_flagsTable[28] < 20) ? -1 : 7;
}
void TuckerEngine::updateSprite_locationNum8_1(int i) {
@@ -622,20 +622,20 @@ void TuckerEngine::updateSprite_locationNum8_1(int i) {
state = -1;
} else if (_flagsTable[28] == 18) {
state = 6;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
} else if (_flagsTable[29] == 0) {
state = 1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 1) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 3;
}
if (_flagsTable[28] == 19) {
_flagsTable[28] = 20;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PostUpdate_locationNum8() {
@@ -662,7 +662,7 @@ void TuckerEngine::execData3PostUpdate_locationNum8() {
_updateLocationYPosTable2[0] += 2;
if (_updateLocationYPosTable2[0] > 120) {
_updateLocationYPosTable2[0] = 0;
- startSound(_locationSoundsTable[2].offset, 2, _locationSoundsTable[2].volume);
+ startSound(_locationSoundsTable[2]._offset, 2, _locationSoundsTable[2]._volume);
}
}
if (_flagsTable[28] > 1 && _flagsTable[28] < 5) {
@@ -674,82 +674,82 @@ void TuckerEngine::execData3PostUpdate_locationNum8() {
void TuckerEngine::updateSprite_locationNum9_0(int i) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[i].needUpdate = 1;
- _spritesTable[i].state = 3;
+ _spritesTable[i]._needUpdate = true;
+ _spritesTable[i]._state = 3;
} else if (_updateLocationCounter2 > 0 || getRandomNumber() > 30000) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
if (_updateLocationCounter2 == 0) {
_updateLocationCounter2 = 6;
}
} else if (getRandomNumber() > 30000) {
- _spritesTable[i].state = 2;
- _spritesTable[i].defaultUpdateDelay = 5;
+ _spritesTable[i]._state = 2;
+ _spritesTable[i]._defaultUpdateDelay = 5;
} else {
- _spritesTable[i].state = 1;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 10;
+ _spritesTable[i]._state = 1;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 10;
}
}
void TuckerEngine::updateSprite_locationNum9_1(int i) {
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > 10) {
- _spritesTable[i].counter = 0;
- _spritesTable[i].state = 5;
- _spritesTable[i].defaultUpdateDelay = 5;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > 10) {
+ _spritesTable[i]._counter = 0;
+ _spritesTable[i]._state = 5;
+ _spritesTable[i]._defaultUpdateDelay = 5;
} else {
- _spritesTable[i].state = 4;
+ _spritesTable[i]._state = 4;
}
}
void TuckerEngine::updateSprite_locationNum9_2(int i) {
- _spritesTable[i].state = 6;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 6;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum9() {
if (_flagsTable[7] < 2) {
_flagsTable[7] = 2;
}
- if (_flagsTable[8] == 0 && _locationMusicsTable[0].volume != 0) {
- _locationMusicsTable[0].volume = 0;
+ if (_flagsTable[8] == 0 && _locationMusicsTable[0]._volume != 0) {
+ _locationMusicsTable[0]._volume = 0;
} else {
- _locationMusicsTable[0].volume = _xPosCurrent / 40;
+ _locationMusicsTable[0]._volume = _xPosCurrent / 40;
}
- setVolumeMusic(0, _locationMusicsTable[0].volume);
+ setVolumeMusic(0, _locationMusicsTable[0]._volume);
if (!isSoundPlaying(1) && getRandomNumber() > 32000) {
int i = getRandomNumber() / 5500 + 3;
assert(i >= 0 && i < kLocationSoundsTableSize);
- startSound(_locationSoundsTable[i].offset, i, _locationSoundsTable[i].volume);
+ startSound(_locationSoundsTable[i]._offset, i, _locationSoundsTable[i]._volume);
}
if (_flagsTable[8] == 2 && _locationMaskType == 0) {
_flagsTable[8] = 0;
- startSound(_locationSoundsTable[7].offset, 7, _locationSoundsTable[7].volume);
+ startSound(_locationSoundsTable[7]._offset, 7, _locationSoundsTable[7]._volume);
}
}
void TuckerEngine::execData3PostUpdate_locationNum9() {
- if (_spritesTable[1].state == 4) {
- if (_spritesTable[1].flipX == 1) {
+ if (_spritesTable[1]._state == 4) {
+ if (_spritesTable[1]._flipX) {
--_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] < -50) {
- _spritesTable[1].flipX = 0;
+ _spritesTable[1]._flipX = false;
_updateLocationXPosTable2[0] = -50;
}
} else {
++_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] > 500) {
- _spritesTable[1].flipX = 1;
+ _spritesTable[1]._flipX = true;
_updateLocationXPosTable2[0] = 500;
}
}
}
- _spritesTable[1].gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
+ _spritesTable[1]._gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
for (int i = 1; i < 3; ++i) {
- _spritesTable[i].colorType = 1;
- _spritesTable[i].yMaxBackground = 60;
+ _spritesTable[i]._colorType = 1;
+ _spritesTable[i]._yMaxBackground = 60;
drawSprite(i);
- _spritesTable[i].colorType = 0;
+ _spritesTable[i]._colorType = 0;
}
}
@@ -759,7 +759,7 @@ void TuckerEngine::updateSprite_locationNum10() {
if (_flagsTable[99] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = true;
if (r < 26000) {
state = 1;
} else if (r < 29000) {
@@ -769,12 +769,12 @@ void TuckerEngine::updateSprite_locationNum10() {
}
} else if (_csDataHandled) {
state = 2;
- _spritesTable[0].updateDelay = 4;
+ _spritesTable[0]._updateDelay = 4;
} else {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = false;
if (r > 26000) {
state = 5;
- _spritesTable[0].prevAnimationFrame = 1;
+ _spritesTable[0]._prevAnimationFrame = true;
} else if (r > 24000) {
state = 6;
_miscSoundFxDelayCounter[0] = 120;
@@ -783,7 +783,7 @@ void TuckerEngine::updateSprite_locationNum10() {
setCharacterAnimation(0, 0);
}
}
- _spritesTable[0].state = state;
+ _spritesTable[0]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum10() {
@@ -797,8 +797,8 @@ void TuckerEngine::execData3PreUpdate_locationNum10() {
if (_flagsTable[47] == 1 && _inventoryItemsState[26] == 1) {
_flagsTable[47] = 2;
}
- if (_spritesTable[0].state == 6 && _spritesTable[0].animationFrame == 18 && !isSoundPlaying(0)) {
- startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
+ if (_spritesTable[0]._state == 6 && _spritesTable[0]._animationFrame == 18 && !isSoundPlaying(0)) {
+ startSound(_locationSoundsTable[0]._offset, 0, _locationSoundsTable[0]._volume);
}
if (_flagsTable[230] == 1 && getRandomNumber() > 32000) {
_flagsTable[230] = 0;
@@ -808,52 +808,52 @@ void TuckerEngine::execData3PreUpdate_locationNum10() {
void TuckerEngine::updateSprite_locationNum11_0(int i) {
const int r = getRandomNumber();
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
- _spritesTable[i].state = 2;
+ _spritesTable[i]._needUpdate = true;
+ _spritesTable[i]._state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (r > 28000) {
- _spritesTable[i].state = 3;
+ _spritesTable[i]._state = 3;
} else if (r > 20000) {
- _spritesTable[i].state = 4;
+ _spritesTable[i]._state = 4;
} else {
- _spritesTable[i].state = 3;
- _spritesTable[i].animationFrame = 1;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._state = 3;
+ _spritesTable[i]._animationFrame = 1;
+ _spritesTable[i]._updateDelay = 5;
}
}
}
void TuckerEngine::updateSprite_locationNum11_1(int i) {
if (getRandomNumber() > 20000) {
- _spritesTable[i].state = 5;
+ _spritesTable[i]._state = 5;
} else {
- _spritesTable[i].animationFrame = 14;
- _updateSpriteFlag1 = 1;
- _spritesTable[i].state = 5;
+ _spritesTable[i]._animationFrame = 14;
+ _updateSpriteFlag1 = true;
+ _spritesTable[i]._state = 5;
}
}
void TuckerEngine::updateSprite_locationNum11_2(int i) {
if (getRandomNumber() > 20000) {
- _spritesTable[i].state = 6;
+ _spritesTable[i]._state = 6;
} else {
- _spritesTable[i].animationFrame = 17;
- _spritesTable[i].state = 6;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = 17;
+ _spritesTable[i]._state = 6;
+ _updateSpriteFlag1 = true;
}
}
void TuckerEngine::updateSprite_locationNum11_3(int i) {
- _spritesTable[i].state = 7;
+ _spritesTable[i]._state = 7;
}
void TuckerEngine::updateSprite_locationNum11_4(int i) {
if (getRandomNumber() > 30000 && _flagsTable[55] < 2) {
- _spritesTable[i].state = 1;
- startSound(_locationSoundsTable[6].offset, 6, _locationSoundsTable[6].volume);
+ _spritesTable[i]._state = 1;
+ startSound(_locationSoundsTable[6]._offset, 6, _locationSoundsTable[6]._volume);
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
}
@@ -866,10 +866,10 @@ void TuckerEngine::updateSprite_locationNum12_0(int i) {
if (_flagsTable[207] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (_updateLocationCounter2 < 4) {
state = 1;
} else if (_updateLocationCounter2 < 8) {
@@ -878,7 +878,7 @@ void TuckerEngine::updateSprite_locationNum12_0(int i) {
state = 4;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum12_1(int i) {
@@ -891,7 +891,7 @@ void TuckerEngine::updateSprite_locationNum12_1(int i) {
} else {
state = 8;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum12() {
@@ -899,13 +899,13 @@ void TuckerEngine::execData3PreUpdate_locationNum12() {
_flagsTable[38] = 1;
}
if (_flagsTable[41] == 0) {
- if (_locationMusicsTable[0].volume != 100) {
- _locationMusicsTable[0].volume = 100;
+ if (_locationMusicsTable[0]._volume != 100) {
+ _locationMusicsTable[0]._volume = 100;
setVolumeMusic(0, 100);
}
} else {
- if (_locationMusicsTable[0].volume != 20) {
- _locationMusicsTable[0].volume = 20;
+ if (_locationMusicsTable[0]._volume != 20) {
+ _locationMusicsTable[0]._volume = 20;
setVolumeMusic(0, 20);
}
}
@@ -917,44 +917,44 @@ void TuckerEngine::updateSprite_locationNum13(int i) {
if (_flagsTable[202] == 0) {
_flagsTable[202] = 1;
state = 3;
- _spritesTable[i].stateIndex = -1;
+ _spritesTable[i]._stateIndex = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 4;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 5;
}
} else if (_flagsTable[202] == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
_flagsTable[202] = 0;
state = 6;
} else {
setCharacterAnimation(0, 0);
return;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum13() {
if (_flagsTable[69] == 0) {
if (getRandomNumber() > 31000) {
_flagsTable[69] = 1;
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
} else if (isSoundPlaying(1)) {
stopSound(1);
}
}
_flagsTable[8] = 2;
- if (_spritesTable[0].state == 1) {
- if (_spritesTable[0].animationFrame > 10 && _spritesTable[0].animationFrame < 20) {
+ if (_spritesTable[0]._state == 1) {
+ if (_spritesTable[0]._animationFrame > 10 && _spritesTable[0]._animationFrame < 20) {
if (!isSoundPlaying(0)) {
- startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
+ startSound(_locationSoundsTable[0]._offset, 0, _locationSoundsTable[0]._volume);
}
}
}
if (isSoundPlaying(0)) {
- if (_spritesTable[0].animationFrame > 10 && _spritesTable[0].animationFrame < 20) {
+ if (_spritesTable[0]._animationFrame > 10 && _spritesTable[0]._animationFrame < 20) {
stopSound(0);
}
}
@@ -963,12 +963,12 @@ void TuckerEngine::execData3PreUpdate_locationNum13() {
void TuckerEngine::updateSprite_locationNum14(int i) {
int state = 2;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = (getRandomNumber() < 12000) ? 1 : 3;
} else if (getRandomNumber() < 26000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum14() {
@@ -988,7 +988,7 @@ void TuckerEngine::execData3PreUpdate_locationNum14() {
num = 7;
}
if (num != -1) {
- startSound(_locationSoundsTable[num].offset, num, _locationSoundsTable[num].volume);
+ startSound(_locationSoundsTable[num]._offset, num, _locationSoundsTable[num]._volume);
}
}
_locationHeightTable[14] = (_xPosCurrent < 100) ? 0 : 60;
@@ -1008,11 +1008,11 @@ void TuckerEngine::execData3PreUpdate_locationNum14() {
}
const int num = _updateLocation14ObjNum[i];
if (num > 0) {
- const int w = _dataTable[num].xSize;
- const int h = _dataTable[num].ySize;
+ const int w = _dataTable[num]._xSize;
+ const int h = _dataTable[num]._ySize;
const int x = _updateLocationXPosTable2[i] - w / 2;
const int y = _updateLocationYPosTable2[i] / 16 - h / 2;
- Graphics::decodeRLE_248(_locationBackgroundGfxBuf + y * 640 + x, _data3GfxBuf + _dataTable[num].sourceOffset, w, h, 0, 0, false);
+ Graphics::decodeRLE_248(_locationBackgroundGfxBuf + y * 640 + x, _data3GfxBuf + _dataTable[num]._sourceOffset, w, h, 0, 0, false);
addDirtyRect(x, y, w, h);
}
}
@@ -1063,41 +1063,41 @@ void TuckerEngine::execData3PostUpdate_locationNum14() {
}
void TuckerEngine::updateSprite_locationNum15_0(int i) {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
void TuckerEngine::updateSprite_locationNum15_1(int i) {
int state;
int r = getRandomNumber();
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 6;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (r < 26000) {
state = 5;
} else if (r < 29000) {
state = 2;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._prevAnimationFrame = true;
} else {
state = 4;
- _spritesTable[4].counter = 1;
+ _spritesTable[4]._counter = 1;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum15_2(int i) {
- _spritesTable[i].state = 3;
- if (_spritesTable[4].counter > 0) {
- ++_spritesTable[4].counter;
- if (_spritesTable[4].counter > 6) {
- _spritesTable[4].counter = 0;
+ _spritesTable[i]._state = 3;
+ if (_spritesTable[4]._counter > 0) {
+ ++_spritesTable[4]._counter;
+ if (_spritesTable[4]._counter > 6) {
+ _spritesTable[4]._counter = 0;
} else {
- _spritesTable[i].updateDelay = 2;
+ _spritesTable[i]._updateDelay = 2;
}
} else {
- _spritesTable[i].updateDelay = 2;
+ _spritesTable[i]._updateDelay = 2;
}
}
@@ -1106,7 +1106,7 @@ void TuckerEngine::execData3PreUpdate_locationNum15() {
if (_updateLocationFadePaletteCounter > 500) {
if (!isSoundPlaying(1) && getRandomNumber() > 31000) {
const int i = getRandomNumber() / 4714;
- startSound(_locationSoundsTable[i].offset, i, _locationSoundsTable[i].volume);
+ startSound(_locationSoundsTable[i]._offset, i, _locationSoundsTable[i]._volume);
_updateLocationFadePaletteCounter = 0;
}
}
@@ -1123,21 +1123,21 @@ void TuckerEngine::updateSprite_locationNum16_0(int i) {
} else if (_flagsTable[82] == 2) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- if (_spritesTable[0].needUpdate == 0) {
- _spritesTable[0].needUpdate = 1;
+ if (!_spritesTable[0]._needUpdate) {
+ _spritesTable[0]._needUpdate = true;
state = 1;
} else {
state = 1;
- _spritesTable[0].animationFrame = 2;
- _updateSpriteFlag1 = 1;
+ _spritesTable[0]._animationFrame = 2;
+ _updateSpriteFlag1 = true;
}
} else if (_csDataHandled) {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = false;
state = 4;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else if (r < 30000) {
state = 4;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else if (r < 31000) {
state = 4;
if (_xPosCurrent < 300) {
@@ -1149,7 +1149,7 @@ void TuckerEngine::updateSprite_locationNum16_0(int i) {
} else {
state = 6;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum16_1(int i) {
@@ -1164,18 +1164,18 @@ void TuckerEngine::updateSprite_locationNum16_1(int i) {
} else if (_flagsTable[60] == 0) {
state = 10;
if (isSoundPlaying(1)) {
- _locationSoundsTable[1].type = 2;
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
+ _locationSoundsTable[1]._type = 2;
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
}
} else {
state = 9;
if (isSoundPlaying(0)) {
- _locationSoundsTable[0].type = 2;
- startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
+ _locationSoundsTable[0]._type = 2;
+ startSound(_locationSoundsTable[0]._offset, 0, _locationSoundsTable[0]._volume);
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum16_2(int i) {
@@ -1183,27 +1183,27 @@ void TuckerEngine::updateSprite_locationNum16_2(int i) {
if (_flagsTable[78] == 0) {
if (_flagsTable[60] == 1 && _flagsTable[61] == 1) {
_flagsTable[78] = 1;
- startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
+ startSound(_locationSoundsTable[5]._offset, 5, _locationSoundsTable[5]._volume);
state = 7;
}
} else if (_flagsTable[78] == 1) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 8;
} else {
if (getRandomNumber() > 32000) {
state = 7;
} else if (getRandomNumber() > 10000) {
state = 13;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
state = 13;
}
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum16() {
@@ -1218,26 +1218,26 @@ void TuckerEngine::updateSprite_locationNum17() {
} else if (_flagsTable[82] == 2) {
_flagsTable[82] = 3;
_disableCharactersPath = true;
- _spritesTable[0].gfxBackgroundOffset = 100;
+ _spritesTable[0]._gfxBackgroundOffset = 100;
state = 1;
- _spritesTable[0].backgroundOffset = -1;
- } else if (_spritesTable[0].gfxBackgroundOffset < -160) {
+ _spritesTable[0]._backgroundOffset = -1;
+ } else if (_spritesTable[0]._gfxBackgroundOffset < -160) {
state = -1;
} else {
state = 1;
- _spritesTable[0].yMaxBackground = 0;
- _spritesTable[0].colorType = 1;
+ _spritesTable[0]._yMaxBackground = 0;
+ _spritesTable[0]._colorType = 1;
}
- _spritesTable[0].state = state;
+ _spritesTable[0]._state = state;
}
void TuckerEngine::updateSprite_locationNum18() {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = true;
state = 2;
} else {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = false;
state = 1;
const int r = getRandomNumber();
if (r > 31000) {
@@ -1246,54 +1246,54 @@ void TuckerEngine::updateSprite_locationNum18() {
state = 4;
}
}
- _spritesTable[0].gfxBackgroundOffset = 0;
- _spritesTable[0].backgroundOffset = 0;
- _spritesTable[0].state = state;
+ _spritesTable[0]._gfxBackgroundOffset = 0;
+ _spritesTable[0]._backgroundOffset = 0;
+ _spritesTable[0]._state = state;
}
void TuckerEngine::updateSprite_locationNum19_0(int i) {
int state;
if (_flagsTable[206] == 1) {
state = 7;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
_flagsTable[206] = 0;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- ++_spritesTable[i].counter;
- _spritesTable[i].needUpdate = 1;
- if (_spritesTable[i].counter > 10) {
- _spritesTable[i].counter = 0;
+ ++_spritesTable[i]._counter;
+ _spritesTable[i]._needUpdate = true;
+ if (_spritesTable[i]._counter > 10) {
+ _spritesTable[i]._counter = 0;
state = 2;
} else {
state = 1;
}
} else {
- _spritesTable[i].needUpdate = 0;
- if (_spritesTable[i].counter > 10) {
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._needUpdate = false;
+ if (_spritesTable[i]._counter > 10) {
+ _spritesTable[i]._counter = 0;
}
- if (_spritesTable[i].counter == 2) {
+ if (_spritesTable[i]._counter == 2) {
state = 4;
- _spritesTable[i].prevAnimationFrame = 1;
- } else if (_spritesTable[i].counter == 5) {
+ _spritesTable[i]._prevAnimationFrame = true;
+ } else if (_spritesTable[i]._counter == 5) {
state = 5;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._prevAnimationFrame = true;
} else {
state = 5;
- _spritesTable[i].updateDelay = 6;
+ _spritesTable[i]._updateDelay = 6;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._prevAnimationFrame = true;
}
void TuckerEngine::updateSprite_locationNum19_1(int i) {
- _spritesTable[i].state = 9;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 9;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum19_2(int i) {
- _spritesTable[i].gfxBackgroundOffset = 320;
- _spritesTable[i].state = -1;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = -1;
}
void TuckerEngine::updateSprite_locationNum19_3(int i) {
@@ -1313,36 +1313,36 @@ void TuckerEngine::updateSprite_locationNum21() {
} else if (_flagsTable[58] == 3) {
state = 6;
_flagsTable[58] = 4;
- _locationSoundsTable[0].volume = 60;
- _locationSoundsTable[5].volume = 60;
+ _locationSoundsTable[0]._volume = 60;
+ _locationSoundsTable[5]._volume = 60;
} else if (_flagsTable[58] == 4) {
state = 7;
- _locationSoundsTable[4].volume = 60;
+ _locationSoundsTable[4]._volume = 60;
} else if (_flagsTable[59] == 4) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = true;
_flagsTable[59] = 2;
state = 2;
setVolumeSound(2, 0);
} else if (_flagsTable[59] == 3) {
_flagsTable[59] = 0;
state = 4;
- setVolumeSound(2, _locationSoundsTable[2].volume);
+ setVolumeSound(2, _locationSoundsTable[2]._volume);
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
+ _spritesTable[0]._needUpdate = true;
state = 3;
} else if (_flagsTable[59] == 2) {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = false;
state = 3;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else if (_flagsTable[15] == 1) {
state = 3;
- _spritesTable[0].updateDelay = 5;
+ _spritesTable[0]._updateDelay = 5;
} else {
- _spritesTable[0].needUpdate = 0;
+ _spritesTable[0]._needUpdate = false;
state = 1;
}
- _spritesTable[0].state = state;
- _spritesTable[0].gfxBackgroundOffset = 320;
+ _spritesTable[0]._state = state;
+ _spritesTable[0]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum21() {
@@ -1351,7 +1351,7 @@ void TuckerEngine::execData3PreUpdate_locationNum21() {
_pendingActionDelay = 0;
_flagsTable[59] = 1;
_nextAction = 2;
- _csDataLoaded = 0;
+ _csDataLoaded = false;
}
if (_flagsTable[58] > 0 && !isSoundPlaying(0)) {
const int r = getRandomNumber();
@@ -1364,17 +1364,17 @@ void TuckerEngine::execData3PreUpdate_locationNum21() {
} else {
num = 5;
}
- startSound(_locationSoundsTable[num].offset, num, _locationSoundsTable[num].volume);
+ startSound(_locationSoundsTable[num]._offset, num, _locationSoundsTable[num]._volume);
}
}
- if (_spritesTable[0].state == 6) {
- if (_spritesTable[0].animationFrame < 18) {
- _spritesTable[0].gfxBackgroundOffset = 320 + _spritesTable[0].animationFrame * 638;
+ if (_spritesTable[0]._state == 6) {
+ if (_spritesTable[0]._animationFrame < 18) {
+ _spritesTable[0]._gfxBackgroundOffset = 320 + _spritesTable[0]._animationFrame * 638;
} else {
- _spritesTable[0].gfxBackgroundOffset = 11840 - _spritesTable[0].animationFrame * 2;
+ _spritesTable[0]._gfxBackgroundOffset = 11840 - _spritesTable[0]._animationFrame * 2;
}
} else {
- _spritesTable[0].gfxBackgroundOffset = 320;
+ _spritesTable[0]._gfxBackgroundOffset = 320;
}
if (_inventoryItemsState[19] > 0) {
_flagsTable[43] = 1;
@@ -1397,20 +1397,20 @@ void TuckerEngine::execData3PreUpdate_locationNum22() {
}
if (_flagsTable[210] < 2 && !_csDataHandled && _flagsTable[54] == 1) {
_nextAction = 25;
- _csDataLoaded = 0;
+ _csDataLoaded = false;
_flagsTable[210] = 2;
}
}
void TuckerEngine::updateSprite_locationNum22() {
if (_flagsTable[207] == 1) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- _spritesTable[0].needUpdate = 1;
- _spritesTable[0].state = 2;
+ _spritesTable[0]._needUpdate = true;
+ _spritesTable[0]._state = 2;
} else {
- _spritesTable[0].needUpdate = 0;
- _spritesTable[0].state = 1;
+ _spritesTable[0]._needUpdate = false;
+ _spritesTable[0]._state = 1;
}
}
@@ -1421,37 +1421,37 @@ void TuckerEngine::updateSprite_locationNum23_0(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum23_1(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 14;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 25;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 13;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum23_2(int i) {
int state = 0;
if (_flagsTable[210] == 0) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 6;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = (getRandomNumber() < 25000) ? 4 : 5;
}
} else if (_flagsTable[210] == 1) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
if (_flagsTable[211] == 10) {
state = 34;
} else if (_flagsTable[211] == 0) {
@@ -1461,7 +1461,7 @@ void TuckerEngine::updateSprite_locationNum23_2(int i) {
state = 31;
}
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (_flagsTable[211] == 1) {
state = 32;
_flagsTable[211] = 0;
@@ -1471,10 +1471,10 @@ void TuckerEngine::updateSprite_locationNum23_2(int i) {
}
} else if (_flagsTable[210] == 2) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 33;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (_flagsTable[212] == 0) {
state = 3;
_flagsTable[212] = 1;
@@ -1488,7 +1488,7 @@ void TuckerEngine::updateSprite_locationNum23_2(int i) {
} else {
state = 24;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum23_3(int i) {
@@ -1496,13 +1496,13 @@ void TuckerEngine::updateSprite_locationNum23_3(int i) {
if (_flagsTable[210] == 0 || _flagsTable[210] == 2) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 8;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 9;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum24_0(int i) {
@@ -1512,40 +1512,40 @@ void TuckerEngine::updateSprite_locationNum24_0(int i) {
state = 5;
} else if (_flagsTable[103] == 0) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 1;
if (getRandomNumber() < 30000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
}
} else if (_flagsTable[103] == 1 || _flagsTable[103] == 3) {
state = -1;
} else {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 4;
} else {
if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 6;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 6;
}
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum24_1(int i) {
if (_flagsTable[103] > 1) {
- _spritesTable[i].state = 3;
+ _spritesTable[i]._state = 3;
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
}
@@ -1554,11 +1554,11 @@ void TuckerEngine::updateSprite_locationNum24_2(int i) {
if (_flagsTable[214] > 1) {
state = -1;
} else if (_flagsTable[214] == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
_flagsTable[214] = 2;
state = 9;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
if (_flagsTable[213] == 1) {
state = 10;
} else if (_flagsTable[213] == 2) {
@@ -1567,10 +1567,10 @@ void TuckerEngine::updateSprite_locationNum24_2(int i) {
state = 8;
}
} else {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 7;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum24_3(int i) {
@@ -1585,18 +1585,18 @@ void TuckerEngine::updateSprite_locationNum24_3(int i) {
} else {
state = 11;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum24() {
- _characterPrevBackFrontFacing = 0;
+ _characterPrevBackFrontFacing = false;
if (_flagsTable[112] == 0) {
_yPosCurrent = 132;
_xPosCurrent = 112;
} else if (_inventoryItemsState[2] == 1 && _inventoryItemsState[11] == 1 && _flagsTable[156] == 1 && _flagsTable[145] == 3) {
_flagsTable[156] = 2;
_nextAction = 61;
- _csDataLoaded = 0;
+ _csDataLoaded = false;
}
if (_flagsTable[103] > 0 && (_inventoryItemsState[2] > 0 || _inventoryItemsState[11] > 0 || _flagsTable[156] > 0 || _flagsTable[145] == 3) && _flagsTable[217] == 0) {
_flagsTable[217] = 1;
@@ -1619,9 +1619,9 @@ void TuckerEngine::updateSprite_locationNum26_0(int i) {
if (_flagsTable[125] > 0 && _flagsTable[125] < 300) {
_flagsTable[126] = 1;
}
- _spritesTable[i].gfxBackgroundOffset = _flagsTable[125];
- _spritesTable[i].state = 1;
- _spritesTable[i].colorType = 99;
+ _spritesTable[i]._gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[i]._state = 1;
+ _spritesTable[i]._colorType = 99;
}
void TuckerEngine::updateSprite_locationNum26_1(int i) {
@@ -1630,23 +1630,23 @@ void TuckerEngine::updateSprite_locationNum26_1(int i) {
state = -1;
} else if (_flagsTable[125] > 299) {
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
state = 2;
}
- _spritesTable[i].gfxBackgroundOffset = _flagsTable[125];
- _spritesTable[i].colorType = 1;
- _spritesTable[i].state = state;
+ _spritesTable[i]._gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[i]._colorType = 1;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum26() {
- _characterPrevBackFrontFacing = 1;
- _spritesTable[1].gfxBackgroundOffset = _flagsTable[125];
- _spritesTable[0].gfxBackgroundOffset = _flagsTable[125];
+ _characterPrevBackFrontFacing = true;
+ _spritesTable[1]._gfxBackgroundOffset = _flagsTable[125];
+ _spritesTable[0]._gfxBackgroundOffset = _flagsTable[125];
if (_flagsTable[125] > 0 && _flagsTable[125] < 300) {
if (!isSoundPlaying(5)) {
- startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
- startSound(_locationSoundsTable[6].offset, 6, _locationSoundsTable[6].volume);
+ startSound(_locationSoundsTable[5]._offset, 5, _locationSoundsTable[5]._volume);
+ startSound(_locationSoundsTable[6]._offset, 6, _locationSoundsTable[6]._volume);
}
++_flagsTable[125];
_flagsTable[126] = 1;
@@ -1656,7 +1656,7 @@ void TuckerEngine::execData3PreUpdate_locationNum26() {
stopSound(6);
}
}
- if (_panelLockedFlag == 0) {
+ if (!_panelLockedFlag) {
if (_xPosCurrent > 207 && _xPosCurrent < 256) {
_objectKeysLocationTable[26] = 0;
_objectKeysPosXTable[26] = 260;
@@ -1674,21 +1674,21 @@ void TuckerEngine::updateSprite_locationNum27(int i) {
state = 1;
_flagsTable[155] = 4;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 3;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 3;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum27() {
- _characterPrevBackFrontFacing = 0;
+ _characterPrevBackFrontFacing = false;
}
void TuckerEngine::execData3PostUpdate_locationNum27() {
@@ -1701,36 +1701,36 @@ void TuckerEngine::updateSprite_locationNum28_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 4;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
- _spritesTable[i].needUpdate = 0;
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > 30) {
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._needUpdate = false;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > 30) {
+ _spritesTable[i]._counter = 0;
}
if (_flagsTable[86] == 1) {
- if (_spritesTable[i].counter == 16 || _spritesTable[i].counter == 27) {
+ if (_spritesTable[i]._counter == 16 || _spritesTable[i]._counter == 27) {
state = 3;
} else {
state = 3;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
} else {
- if (_spritesTable[i].counter == 5 || _spritesTable[i].counter == 11) {
+ if (_spritesTable[i]._counter == 5 || _spritesTable[i]._counter == 11) {
state = 5;
- } else if (_spritesTable[i].counter == 16 || _spritesTable[i].counter == 27) {
+ } else if (_spritesTable[i]._counter == 16 || _spritesTable[i]._counter == 27) {
state = 6;
} else {
state = 6;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum28_1(int i) {
- _spritesTable[i].state = (_flagsTable[86] == 1) ? 1 : -1;
+ _spritesTable[i]._state = (_flagsTable[86] == 1) ? 1 : -1;
}
void TuckerEngine::updateSprite_locationNum28_2(int i) {
@@ -1741,14 +1741,14 @@ void TuckerEngine::updateSprite_locationNum28_2(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum28() {
if (_flagsTable[86] == 0 && _xPosCurrent > 265 && _nextAction == 0) {
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
_nextAction = 21;
- _csDataLoaded = 0;
+ _csDataLoaded = false;
_pendingActionDelay = 0;
_pendingActionIndex = 0;
_currentActionVerb = 0;
@@ -1762,21 +1762,21 @@ void TuckerEngine::execData3PostUpdate_locationNum28() {
}
void TuckerEngine::updateSprite_locationNum29_0(int i) {
- _spritesTable[i].state = (getRandomNumber() < 32000) ? -1 : 2;
+ _spritesTable[i]._state = (getRandomNumber() < 32000) ? -1 : 2;
}
void TuckerEngine::updateSprite_locationNum29_1(int i) {
int state = -1;
if (getRandomNumber() >= 32000) {
state = 1;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum29_2(int i) {
- _spritesTable[i].state = 3;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 3;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum29() {
@@ -1797,22 +1797,22 @@ void TuckerEngine::execData3PreUpdate_locationNum29() {
}
_system->getPaletteManager()->setPalette(scrollPal, 118, 5);
if (_flagsTable[143] == 1) {
- _locationObjectsTable[2].xPos = 999;
- _locationObjectsTable[3].xPos = 187;
+ _locationObjectsTable[2]._xPos = 999;
+ _locationObjectsTable[3]._xPos = 187;
} else {
- _locationObjectsTable[2].xPos = 187;
- _locationObjectsTable[3].xPos = 999;
+ _locationObjectsTable[2]._xPos = 187;
+ _locationObjectsTable[3]._xPos = 999;
}
}
}
void TuckerEngine::updateSprite_locationNum30_34(int i) {
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
}
void TuckerEngine::execData3PreUpdate_locationNum30() {
if (!isSoundPlaying(1) && getRandomNumber() > 32500) {
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
}
}
@@ -1829,7 +1829,7 @@ void TuckerEngine::execData3PreUpdate_locationNum31() {
}
void TuckerEngine::execData3PreUpdate_locationNum32() {
- if (_spritesTable[0].state == 12 && _spritesTable[0].animationFrame < 22) {
+ if (_spritesTable[0]._state == 12 && _spritesTable[0]._animationFrame < 22) {
_flagsTable[113] = 1;
} else {
_flagsTable[113] = 0;
@@ -1843,16 +1843,16 @@ void TuckerEngine::execData3PostUpdate_locationNum32() {
}
void TuckerEngine::updateSprite_locationNum31_0(int i) {
- _spritesTable[i].state = (getRandomNumber() < 32000) ? 3 : 1;
+ _spritesTable[i]._state = (getRandomNumber() < 32000) ? 3 : 1;
}
void TuckerEngine::updateSprite_locationNum31_1(int i) {
- _spritesTable[i].state = (_flagsTable[86] == 1) ? 2 : -1;
+ _spritesTable[i]._state = (_flagsTable[86] == 1) ? 2 : -1;
}
void TuckerEngine::updateSprite_locationNum32_0(int i) {
static const uint8 stateTable[] = { 12, 1, 11, 1, 11, 2, 1, 5, 5, 11, 1, 5, 5, 5 };
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
if (_flagsTable[123] == 2) {
_flagsTable[123] = 0;
}
@@ -1862,42 +1862,42 @@ void TuckerEngine::updateSprite_locationNum32_0(int i) {
_flagsTable[222] = 2;
} else if (_flagsTable[222] == 2) {
state = 19;
- _spritesTable[i].animationFrame = 23;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = 23;
+ _updateSpriteFlag1 = true;
} else if (_flagsTable[123] == 1) {
state = 17;
_flagsTable[123] = 2;
} else if (_flagsTable[222] == 3) {
state = 18;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 4;
} else if (_csDataHandled) {
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
- if (_spritesTable[i].counter > 13) {
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._needUpdate = false;
+ if (_spritesTable[i]._counter > 13) {
+ _spritesTable[i]._counter = 0;
}
- state = stateTable[_spritesTable[i].counter];
+ state = stateTable[_spritesTable[i]._counter];
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum33_0(int i) {
int state = 5;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 7;
} else if (_flagsTable[87] == 1) {
state = 8;
} else if (_flagsTable[222] == 5) {
state = 4;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = (getRandomNumber() < 30000) ? 5 : 6;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum33_1(int i) {
@@ -1909,7 +1909,7 @@ void TuckerEngine::updateSprite_locationNum33_1(int i) {
} else {
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum33_2(int i) {
@@ -1921,37 +1921,37 @@ void TuckerEngine::updateSprite_locationNum33_2(int i) {
} else {
state = 9;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum33() {
if (_xPosCurrent < 90) {
if (_flagsTable[105] == 0) {
_flagsTable[105] = 3;
- startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
+ startSound(_locationSoundsTable[5]._offset, 5, _locationSoundsTable[5]._volume);
}
} else {
if (_flagsTable[105] == 1) {
_flagsTable[105] = 2;
- startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
+ startSound(_locationSoundsTable[5]._offset, 5, _locationSoundsTable[5]._volume);
}
}
if (_xPosCurrent > 230) {
if (_flagsTable[106] == 0) {
_flagsTable[106] = 3;
- startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
+ startSound(_locationSoundsTable[5]._offset, 5, _locationSoundsTable[5]._volume);
}
} else {
if (_flagsTable[106] == 1) {
_flagsTable[106] = 2;
- startSound(_locationSoundsTable[5].offset, 5, _locationSoundsTable[5].volume);
+ startSound(_locationSoundsTable[5]._offset, 5, _locationSoundsTable[5]._volume);
}
}
}
void TuckerEngine::execData3PreUpdate_locationNum34() {
if (_flagsTable[143] == 1) {
- _locationObjectsTable[0].xPos = 0;
+ _locationObjectsTable[0]._xPos = 0;
}
}
@@ -1962,7 +1962,7 @@ void TuckerEngine::execData3PreUpdate_locationNum35() {
}
void TuckerEngine::updateSprite_locationNum36(int i) {
- _spritesTable[i].state = (getRandomNumber() < 32000) ? 1 : 2;
+ _spritesTable[i]._state = (getRandomNumber() < 32000) ? 1 : 2;
}
void TuckerEngine::execData3PreUpdate_locationNum36() {
@@ -1978,12 +1978,12 @@ void TuckerEngine::execData3PreUpdate_locationNum36() {
void TuckerEngine::updateSprite_locationNum37(int i) {
int j = i + 1;
int offset = 200 - i * 45;
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > offset) {
- _spritesTable[i].state = j;
- _spritesTable[i].counter = 0;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > offset) {
+ _spritesTable[i]._state = j;
+ _spritesTable[i]._counter = 0;
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
}
@@ -2001,16 +2001,16 @@ void TuckerEngine::updateSprite_locationNum41(int i) {
state = 1;
_flagsTable[158] = 2;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 3;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 4;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum41() {
@@ -2020,10 +2020,10 @@ void TuckerEngine::execData3PreUpdate_locationNum41() {
} else if (_backgroundSpriteCurrentFrame == 7) {
_flagsTable[77] = 0;
}
- if (_changeBackgroundSprite == 0) {
+ if (!_changeBackgroundSprite) {
if (_backgroundSpriteCurrentFrame == 16 && !isSoundPlaying(4)) {
- _locationSoundsTable[4].type = 2;
- startSound(_locationSoundsTable[4].offset, 4, _locationSoundsTable[4].volume);
+ _locationSoundsTable[4]._type = 2;
+ startSound(_locationSoundsTable[4]._offset, 4, _locationSoundsTable[4]._volume);
} else {
if (_backgroundSpriteCurrentFrame == 28) {
stopSound(4);
@@ -2031,8 +2031,8 @@ void TuckerEngine::execData3PreUpdate_locationNum41() {
}
} else {
if (_backgroundSpriteCurrentFrame == 28 && !isSoundPlaying(4)) {
- _locationSoundsTable[4].type = 2;
- startSound(_locationSoundsTable[4].offset, 4, _locationSoundsTable[4].volume);
+ _locationSoundsTable[4]._type = 2;
+ startSound(_locationSoundsTable[4]._offset, 4, _locationSoundsTable[4]._volume);
} else {
if (_backgroundSpriteCurrentFrame == 18) {
stopSound(4);
@@ -2040,11 +2040,11 @@ void TuckerEngine::execData3PreUpdate_locationNum41() {
}
}
}
- if (_panelLockedFlag == 1 && _yPosCurrent > 130 && _selectedObject.yPos > 135 && _nextAction == 0 && _flagsTable[223] == 0) {
- _panelLockedFlag = 0;
+ if (_panelLockedFlag && _yPosCurrent > 130 && _selectedObject._yPos > 135 && _nextAction == 0 && _flagsTable[223] == 0) {
+ _panelLockedFlag = false;
_csDataLoaded = false;
_nextLocationNum = 0;
- _selectedObject.locationObject_locationNum = 0;
+ _selectedObject._locationObjectLocationNum = 0;
_locationMaskType = 0;
_nextAction = _flagsTable[163] + 32;
++_flagsTable[163];
@@ -2057,9 +2057,9 @@ void TuckerEngine::execData3PreUpdate_locationNum41() {
}
}
if (_flagsTable[77] == 0) {
- _locationObjectsTable[3].xPos = 230;
+ _locationObjectsTable[3]._xPos = 230;
} else {
- _locationObjectsTable[3].xPos = 930;
+ _locationObjectsTable[3]._xPos = 930;
}
}
}
@@ -2076,13 +2076,13 @@ void TuckerEngine::updateSprite_locationNum42(int i) {
_flagsTable[223] = 3;
} else if (_flagsTable[223] == 3) {
state = 5;
- _spritesTable[i].updateDelay = 5;
- _spritesTable[i].state = _spritesTable[i].firstFrame - 1; // FIXME: bug, fxNum ?
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._updateDelay = 5;
+ _spritesTable[i]._state = _spritesTable[i]._firstFrame - 1; // FIXME: bug, fxNum ?
+ _updateSpriteFlag1 = true;
} else {
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum42() {
@@ -2094,18 +2094,18 @@ void TuckerEngine::updateSprite_locationNum43_2(int i) {
if (_flagsTable[237] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 5;
- } else if (_csDataHandled || _spritesTable[i].counter == 2) {
- _spritesTable[i].needUpdate = 0;
+ } else if (_csDataHandled || _spritesTable[i]._counter == 2) {
+ _spritesTable[i]._needUpdate = false;
state = 6;
- } else if (_spritesTable[i].counter == 0) {
+ } else if (_spritesTable[i]._counter == 0) {
state = 3;
} else {
state = 4;
- _spritesTable[i].counter = 2;
+ _spritesTable[i]._counter = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum43_3(int i) {
@@ -2114,12 +2114,12 @@ void TuckerEngine::updateSprite_locationNum43_3(int i) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 7;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
state = 8;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum43_4(int i) {
@@ -2128,38 +2128,38 @@ void TuckerEngine::updateSprite_locationNum43_4(int i) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 9;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
state = 10;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum43_5(int i) {
- _spritesTable[i].state = (_flagsTable[236] < 4) ? -1 : 11;
+ _spritesTable[i]._state = (_flagsTable[236] < 4) ? -1 : 11;
}
void TuckerEngine::updateSprite_locationNum43_6(int i) {
- _spritesTable[i].state = (_flagsTable[236] < 4) ? -1 : 12;
+ _spritesTable[i]._state = (_flagsTable[236] < 4) ? -1 : 12;
}
void TuckerEngine::execData3PreUpdate_locationNum43() {
- if (_panelLockedFlag == 1 && _xPosCurrent > 67 && _selectedObject.xPos > 68 && _locationMaskType == 0) {
- _panelLockedFlag = 0;
- _csDataLoaded = 0;
+ if (_panelLockedFlag && _xPosCurrent > 67 && _selectedObject._xPos > 68 && _locationMaskType == 0) {
+ _panelLockedFlag = false;
+ _csDataLoaded = false;
_nextAction = 5;
}
- if (_xPosCurrent > 55 && _spritesTable[2].counter == 0) {
- _spritesTable[2].counter = 1;
+ if (_xPosCurrent > 55 && _spritesTable[2]._counter == 0) {
+ _spritesTable[2]._counter = 1;
}
}
void TuckerEngine::execData3PreUpdate_locationNum44() {
if (_backgroundSpriteCurrentAnimation == 1) {
if (!isSoundPlaying(3) && _backgroundSpriteCurrentFrame == 1) {
- _locationSoundsTable[3].type = 2;
- startSound(_locationSoundsTable[3].offset, 3, _locationSoundsTable[3].volume);
+ _locationSoundsTable[3]._type = 2;
+ startSound(_locationSoundsTable[3]._offset, 3, _locationSoundsTable[3]._volume);
}
if (_backgroundSpriteCurrentFrame == 21) {
_flagsTable[77] = 1;
@@ -2169,7 +2169,7 @@ void TuckerEngine::execData3PreUpdate_locationNum44() {
}
} else if (_backgroundSpriteCurrentAnimation == 4) {
if (_backgroundSpriteCurrentFrame == 20 && !isSoundPlaying(3)) {
- startSound(_locationSoundsTable[3].offset, 3, _locationSoundsTable[3].volume);
+ startSound(_locationSoundsTable[3]._offset, 3, _locationSoundsTable[3]._volume);
}
}
}
@@ -2182,14 +2182,14 @@ void TuckerEngine::updateSprite_locationNum48(int i) {
_flagsTable[160] = 3;
state = 3;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum49(int i) {
@@ -2211,20 +2211,20 @@ void TuckerEngine::updateSprite_locationNum49(int i) {
_flagsTable[185] = 0;
state = 4;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (getRandomNumber() < 30000 || _backgroundSpriteCurrentAnimation <= -1) {
state = 3;
- _spritesTable[i].updateDelay = 1;
+ _spritesTable[i]._updateDelay = 1;
} else if (getRandomNumber() < 16000) {
state = 5;
} else {
state = 6;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum49() {
@@ -2272,38 +2272,38 @@ void TuckerEngine::updateSprite_locationNum50(int i) {
_flagsTable[240] = 1;
}
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
+ _updateSpriteFlag1 = true;
state = i + 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum51(int i) {
if (i == 2) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
} else if (i == 0) {
static const int stateTable[] = { 3, 3, 4, 5, 3, 3, 5, 4, 3, 3, 4, 5, 4, 4 };
- ++_spritesTable[i].counter;
- if (_spritesTable[i].counter > 13) {
- _spritesTable[i].counter = 0;
+ ++_spritesTable[i]._counter;
+ if (_spritesTable[i]._counter > 13) {
+ _spritesTable[i]._counter = 0;
}
- _spritesTable[i].state = stateTable[_spritesTable[i].counter];
+ _spritesTable[i]._state = stateTable[_spritesTable[i]._counter];
} else {
i = 1;
- _spritesTable[i].state = 6;
+ _spritesTable[i]._state = 6;
}
- _spritesTable[i].colorType = 1;
- _spritesTable[i].yMaxBackground = 0;
+ _spritesTable[i]._colorType = 1;
+ _spritesTable[i]._yMaxBackground = 0;
}
void TuckerEngine::execData3PreUpdate_locationNum52() {
- if (_selectedObject.xPos > 108 && _panelLockedFlag > 0 && _nextAction == 0 && _locationMaskType == 0) {
+ if (_selectedObject._xPos > 108 && _panelLockedFlag && _nextAction == 0 && _locationMaskType == 0) {
_nextAction = 1;
- _csDataLoaded = 0;
+ _csDataLoaded = false;
}
}
@@ -2313,21 +2313,21 @@ void TuckerEngine::updateSprite_locationNum53_0(int i) {
}
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 1;
} else if (_flagsTable[197] == 1) {
state = 3;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
_flagsTable[197] = 2;
} else if (_flagsTable[192] == 1) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 5;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum53_1(int i) {
@@ -2339,14 +2339,14 @@ void TuckerEngine::updateSprite_locationNum53_1(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum53() {
if (_flagsTable[192] == 0 && _xPosCurrent < 200 && _nextAction == 0) {
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
_nextAction = 14;
- _csDataLoaded = 0;
+ _csDataLoaded = false;
_pendingActionDelay = 0;
_pendingActionIndex = 0;
_currentActionVerb = 0;
@@ -2354,55 +2354,52 @@ void TuckerEngine::execData3PreUpdate_locationNum53() {
}
void TuckerEngine::updateSprite_locationNum54(int i) {
- int state = 3;
if (_flagsTable[141] == 2) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
setCharacterAnimation(0, i);
_flagsTable[141] = 1;
- _spritesTable[i].counter = 0;
- } else if (_flagsTable[141] == 1 && _spritesTable[i].counter < 40) {
+ _spritesTable[i]._counter = 0;
+ } else if (_flagsTable[141] == 1 && _spritesTable[i]._counter < 40) {
setCharacterAnimation(1, i);
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
} else if (_flagsTable[141] == 1) {
setCharacterAnimation(2, i);
_flagsTable[141] = 3;
} else {
+ int state = 3;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 2;
+ _spritesTable[i]._needUpdate = true;
state = (getRandomNumber() < 12000) ? 2 : 4;
} else if (_flagsTable[141] == 3) {
- state = 3;
_flagsTable[141] = 0;
_flagsTable[224] = 1;
- _spritesTable[i].counter = 0;
- if (_panelLockedFlag == 0 && _xPosCurrent > 130 && _inventoryItemsState[17] == 0) {
+ _spritesTable[i]._counter = 0;
+ if (!_panelLockedFlag && _xPosCurrent > 130 && _inventoryItemsState[17] == 0) {
_nextAction = 18;
_csDataLoaded = false;
}
} else if (getRandomNumber() < 26000) {
- state = 3;
- _spritesTable[i].needUpdate = 0;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._needUpdate = false;
+ _spritesTable[i]._updateDelay = 5;
} else {
- state = 3;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
if (_inventoryItemsState[17] == 1) {
_flagsTable[224] = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
}
void TuckerEngine::updateSprite_locationNum55(int i) {
if (_flagsTable[193] > 0 && _flagsTable[193] < 14) {
setCharacterAnimation(_flagsTable[193] - 1, i);
- _updateSpriteFlag1 = 1;
+ _updateSpriteFlag1 = true;
if (_flagsTable[193] == 1 || _flagsTable[193] == 3 || _flagsTable[193] == 5 || _flagsTable[193] == 7 || _flagsTable[193] == 11 || _flagsTable[193] == 13) {
++_flagsTable[193];
}
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
if (_flagsTable[193] == 14) {
_flagsTable[193] = 15;
}
@@ -2411,26 +2408,26 @@ void TuckerEngine::updateSprite_locationNum55(int i) {
void TuckerEngine::updateSprite_locationNum56(int i) {
int state;
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
if (_flagsTable[153] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum57_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (getRandomNumber() < 30000) {
state = 1;
} else if (getRandomNumber() < 16000) {
@@ -2439,15 +2436,15 @@ void TuckerEngine::updateSprite_locationNum57_0(int i) {
state = 2;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum57_1(int i) {
int state = 6;
if (getRandomNumber() < 30000) {
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum57() {
@@ -2472,20 +2469,20 @@ void TuckerEngine::updateSprite_locationNum58(int i) {
_flagsTable[190] = 3;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum58() {
// workaround original game glitch #2872348: do not change position on location change
if (_nextLocationNum == 0 && _flagsTable[190] < 3 && _xPosCurrent > 310) {
_xPosCurrent = 310;
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
}
- if (_flagsTable[190] > 0 && _locationSoundsTable[0].volume > 0) {
- _locationSoundsTable[0].volume = 0;
- _locationSoundsTable[4].volume = 0;
- _locationSoundsTable[5].volume = 0;
+ if (_flagsTable[190] > 0 && _locationSoundsTable[0]._volume > 0) {
+ _locationSoundsTable[0]._volume = 0;
+ _locationSoundsTable[4]._volume = 0;
+ _locationSoundsTable[5]._volume = 0;
if (isSoundPlaying(0)) {
stopSound(0);
}
@@ -2498,27 +2495,27 @@ void TuckerEngine::updateSprite_locationNum59(int i) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 3;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else if (_csDataHandled) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (_flagsTable[199] == 0) {
_flagsTable[199] = 1;
setCharacterAnimation(0, 0);
return;
}
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 3;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (_flagsTable[199] == 1) {
_flagsTable[199] = 0;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
setCharacterAnimation(1, 0);
return;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum60_0(int i) {
@@ -2526,34 +2523,34 @@ void TuckerEngine::updateSprite_locationNum60_0(int i) {
if (_flagsTable[186] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 9;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = (getRandomNumber() > 32000) ? 8 : 7;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum60_1(int i) {
int state;
if (_flagsTable[186] == 1) {
_flagsTable[186] = 2;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 2;
} else if (_flagsTable[186] == 2) {
state = 6;
_flagsTable[187] = 1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 1;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = (getRandomNumber() > 32000) ? 5 : 4;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PostUpdate_locationNum60() {
@@ -2569,19 +2566,19 @@ void TuckerEngine::updateSprite_locationNum61_0(int i) {
} else if (_flagsTable[88] == 2) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 0) {
- if (_spritesTable[i].needUpdate == 0) {
- _spritesTable[i].needUpdate = 1;
+ if (!_spritesTable[i]._needUpdate) {
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
state = 2;
- _spritesTable[0].animationFrame = 2;
- _updateSpriteFlag1 = 1;
+ _spritesTable[0]._animationFrame = 2;
+ _updateSpriteFlag1 = true;
}
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
if (r < 30000) {
state = 7;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (r < 31000) {
state = 7;
} else if (r < 32000) {
@@ -2590,7 +2587,7 @@ void TuckerEngine::updateSprite_locationNum61_0(int i) {
state = 6;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum61_1(int i) {
@@ -2598,19 +2595,19 @@ void TuckerEngine::updateSprite_locationNum61_1(int i) {
if (_flagsTable[151] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 14;
} else if (_csDataHandled || getRandomNumber() < 29000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 12;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (getRandomNumber() < 20000) {
state = 12;
} else {
state = 13;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum61_2(int i) {
@@ -2651,8 +2648,8 @@ void TuckerEngine::updateSprite_locationNum61_2(int i) {
if (_flagsTable[136] != 2) {
_flagsTable[150] = 0;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum61() {
@@ -2676,13 +2673,13 @@ void TuckerEngine::updateSprite_locationNum63_0(int i) {
} else if (_flagsTable[132] != 2 || _flagsTable[133] != 1 || _flagsTable[136] > 0) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 6;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_1(int i) {
@@ -2694,16 +2691,16 @@ void TuckerEngine::updateSprite_locationNum63_1(int i) {
state = 8;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_2(int i) {
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
int state = -1;
if (_flagsTable[132] == 2 && _flagsTable[133] == 1 && _flagsTable[136] <= 0) {
if (_flagsTable[226] == 0) {
state = 9;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else if (_flagsTable[226] == 1) {
state = 9;
_flagsTable[226] = 2;
@@ -2714,16 +2711,16 @@ void TuckerEngine::updateSprite_locationNum63_2(int i) {
state = 10;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_3(int i) {
- ++_spritesTable[i].counter;
+ ++_spritesTable[i]._counter;
int state = -1;
if (_flagsTable[132] == 2 && _flagsTable[133] == 1 && _flagsTable[136] <= 0) {
- if (_spritesTable[i].counter > 80) {
+ if (_spritesTable[i]._counter > 80) {
state = 7;
- _spritesTable[i].counter = 0;
+ _spritesTable[i]._counter = 0;
} else if (getRandomNumber() > 32000) {
state = 2;
} else if (getRandomNumber() > 32000) {
@@ -2732,7 +2729,7 @@ void TuckerEngine::updateSprite_locationNum63_3(int i) {
state = 8;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum63_4(int i) {
@@ -2740,7 +2737,7 @@ void TuckerEngine::updateSprite_locationNum63_4(int i) {
if (_flagsTable[132] == 2 && _flagsTable[133] == 1 && _flagsTable[136] == 0) {
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum63() {
@@ -2764,8 +2761,8 @@ void TuckerEngine::execData3PreUpdate_locationNum63() {
} else {
if (_flagsTable[132] == 0 || (_flagsTable[132] == 2 && _flagsTable[136] > 0)) {
if (!isSoundPlaying(1)) {
- _locationSoundsTable[1].type = 2;
- startSound(_locationSoundsTable[1].offset, 1, _locationSoundsTable[1].volume);
+ _locationSoundsTable[1]._type = 2;
+ startSound(_locationSoundsTable[1]._offset, 1, _locationSoundsTable[1]._volume);
}
} else {
if (isSoundPlaying(1)) {
@@ -2774,8 +2771,8 @@ void TuckerEngine::execData3PreUpdate_locationNum63() {
}
if (_flagsTable[132] == 1) {
if (!isSoundPlaying(0)) {
- _locationSoundsTable[0].type = 2;
- startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
+ _locationSoundsTable[0]._type = 2;
+ startSound(_locationSoundsTable[0]._offset, 0, _locationSoundsTable[0]._volume);
}
} else {
if (isSoundPlaying(0)) {
@@ -2784,7 +2781,7 @@ void TuckerEngine::execData3PreUpdate_locationNum63() {
}
if (_flagsTable[132] == 2 && _flagsTable[136] == 0) {
if (!isSoundPlaying(2)) {
- startSound(_locationSoundsTable[2].offset, 2, _locationSoundsTable[2].volume);
+ startSound(_locationSoundsTable[2]._offset, 2, _locationSoundsTable[2]._volume);
}
} else {
if (isSoundPlaying(2)) {
@@ -2807,7 +2804,7 @@ void TuckerEngine::updateSprite_locationNum65(int i) {
if (_flagsTable[188] == 1) {
_flagsTable[188] = 2;
state = 1;
- _spritesTable[i].gfxBackgroundOffset = 100;
+ _spritesTable[i]._gfxBackgroundOffset = 100;
} else if (_flagsTable[188] > 0 && _flagsTable[189] > 0) {
state = -1;
if (_xPosCurrent < 150 || _yPosCurrent > 240) {
@@ -2826,7 +2823,7 @@ void TuckerEngine::updateSprite_locationNum65(int i) {
_flagsTable[189] = 0;
}
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum65() {
@@ -2836,66 +2833,66 @@ void TuckerEngine::execData3PreUpdate_locationNum65() {
void TuckerEngine::updateSprite_locationNum66_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum66_1(int i) {
int state;
if (_flagsTable[191] == 0 && _xPosCurrent > 568) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 8;
} else {
state = 10;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
} else {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 9;
} else if (getRandomNumber() > 30000) {
state = 6;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 7;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
}
}
- _spritesTable[i].state = state;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = state;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::updateSprite_locationNum66_2(int i) {
- _spritesTable[i].disabled = 1;
- _spritesTable[i].state = 3;
+ _spritesTable[i]._disabled = true;
+ _spritesTable[i]._state = 3;
}
void TuckerEngine::updateSprite_locationNum66_3(int i) {
- _spritesTable[i].state = 4;
+ _spritesTable[i]._state = 4;
}
void TuckerEngine::updateSprite_locationNum66_4(int i) {
- _spritesTable[i].state = 5;
- _spritesTable[i].gfxBackgroundOffset = 320;
+ _spritesTable[i]._state = 5;
+ _spritesTable[i]._gfxBackgroundOffset = 320;
}
void TuckerEngine::execData3PreUpdate_locationNum66() {
// FIXME: shouldn't be executed after using the map
_flagsTable[137] = 0;
if (_xPosCurrent > 583 && _flagsTable[191] == 0 && _nextAction == 0 && _locationMaskType == 0) {
- _panelLockedFlag = 0;
- _csDataLoaded = 0;
+ _panelLockedFlag = false;
+ _csDataLoaded = false;
_nextLocationNum = 0;
- _selectedObject.locationObject_locationNum = 0;
+ _selectedObject._locationObjectLocationNum = 0;
if (_flagsTable[131] == 0) {
_nextAction = 13;
} else if (_flagsTable[130] == 0) {
@@ -2907,25 +2904,25 @@ void TuckerEngine::execData3PreUpdate_locationNum66() {
}
void TuckerEngine::execData3PostUpdate_locationNum66() {
- if (_spritesTable[2].flipX == 1) {
+ if (_spritesTable[2]._flipX) {
--_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] < -50) {
- _spritesTable[2].flipX = 0;
+ _spritesTable[2]._flipX = false;
_updateLocationXPosTable2[0] = -50;
}
} else {
++_updateLocationXPosTable2[0];
if (_updateLocationXPosTable2[0] > 500) {
- _spritesTable[2].flipX = 1;
+ _spritesTable[2]._flipX = true;
_updateLocationXPosTable2[0] = 500;
}
}
- _spritesTable[2].gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
+ _spritesTable[2]._gfxBackgroundOffset = _updateLocationXPosTable2[0] + 8320;
const int spr = 2;
- _spritesTable[spr].colorType = 1;
- _spritesTable[spr].yMaxBackground = 0;
+ _spritesTable[spr]._colorType = 1;
+ _spritesTable[spr]._yMaxBackground = 0;
drawSprite(spr);
- _spritesTable[spr].colorType = 0;
+ _spritesTable[spr]._colorType = 0;
}
void TuckerEngine::updateSprite_locationNum69_1(int i) {
@@ -2939,10 +2936,10 @@ void TuckerEngine::updateSprite_locationNum69_1(int i) {
} else if (_flagsTable[236] == 4) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 9;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
state = 14;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
} else if (_flagsTable[236] == 5) {
state = 7;
@@ -2950,7 +2947,7 @@ void TuckerEngine::updateSprite_locationNum69_1(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum69_2(int i) {
@@ -2966,10 +2963,10 @@ void TuckerEngine::updateSprite_locationNum69_2(int i) {
} else if (_flagsTable[237] == 4 || _flagsTable[237] == 2 || _flagsTable[237] == 3 || _flagsTable[237] == 7) {
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 10;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
state = 12;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
} else if (_flagsTable[237] == 5) {
state = 16;
@@ -2983,7 +2980,7 @@ void TuckerEngine::updateSprite_locationNum69_2(int i) {
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum69_3(int i) {
@@ -2997,21 +2994,21 @@ void TuckerEngine::updateSprite_locationNum69_3(int i) {
_flagsTable[238] = 1;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
state = 11;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
state = 13;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
}
} else {
state = -1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::execData3PreUpdate_locationNum70() {
const uint8 color = 103;
if (_execData3Counter == 0) {
- startSound(_locationSoundsTable[6].offset, 6, _locationSoundsTable[6].volume);
+ startSound(_locationSoundsTable[6]._offset, 6, _locationSoundsTable[6]._volume);
_execData3Counter = 1;
_flagsTable[143] = 0;
_updateLocation70StringLen = 0;
@@ -3041,7 +3038,7 @@ void TuckerEngine::execData3PreUpdate_locationNum70Helper() {
if (_lastKeyPressed == Common::KEYCODE_BACKSPACE || _lastKeyPressed == Common::KEYCODE_DELETE) {
if (_updateLocation70StringLen > 0) {
--_updateLocation70StringLen;
- startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
+ startSound(_locationSoundsTable[0]._offset, 0, _locationSoundsTable[0]._volume);
}
} else if (_lastKeyPressed == Common::KEYCODE_RETURN) {
_flagsTable[143] = 1;
@@ -3052,7 +3049,7 @@ void TuckerEngine::execData3PreUpdate_locationNum70Helper() {
_flagsTable[143] = 2;
}
const int num = (_flagsTable[143] == 1) ? 4 : 5;
- startSound(_locationSoundsTable[num].offset, num, _locationSoundsTable[num].volume);
+ startSound(_locationSoundsTable[num]._offset, num, _locationSoundsTable[num]._volume);
} else if (_updateLocation70StringLen < 19) {
uint8 chr = 0;
switch (_lastKeyPressed) {
@@ -3089,7 +3086,7 @@ void TuckerEngine::execData3PreUpdate_locationNum70Helper() {
}
break;
}
- startSound(_locationSoundsTable[0].offset, 0, _locationSoundsTable[0].volume);
+ startSound(_locationSoundsTable[0]._offset, 0, _locationSoundsTable[0]._volume);
if (chr > 0) {
_updateLocation70String[_updateLocation70StringLen] = chr;
++_updateLocation70StringLen;
@@ -3104,17 +3101,17 @@ void TuckerEngine::updateSprite_locationNum71(int i) {
if (_flagsTable[155] != 6 || _flagsTable[207] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 1;
} else if (getRandomNumber() < 30000) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 2;
- _spritesTable[i].updateDelay = 5;
+ _spritesTable[i]._updateDelay = 5;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum72(int i) {
@@ -3122,28 +3119,28 @@ void TuckerEngine::updateSprite_locationNum72(int i) {
if (_flagsTable[155] == 7 || _flagsTable[207] == 1) {
state = -1;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 2;
} else {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 1;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum74(int i) {
static const uint8 stateTable[] = { 1, 3, 5, 5, 10, 16, 16 };
int num = _flagsTable[236] - 74;
if (stateTable[num] + i == 21) {
- if (_updateLocationFlag == 0) {
- _updateLocationFlag = 1;
+ if (!_updateLocationFlag) {
+ _updateLocationFlag = true;
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
+ _updateSpriteFlag1 = true;
}
}
- _spritesTable[i].state = stateTable[num] + i;
+ _spritesTable[i]._state = stateTable[num] + i;
}
void TuckerEngine::updateSprite_locationNum79(int i) {
@@ -3153,43 +3150,43 @@ void TuckerEngine::updateSprite_locationNum79(int i) {
_flagsTable[227] = 1;
} else if (_flagsTable[227] == 1 && _charSpeechSoundCounter > 0) {
state = 2;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else if (_flagsTable[227] == 2) {
state = 3;
_flagsTable[227] = 3;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
+ _updateSpriteFlag1 = true;
state = 3;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum81_0(int i) {
int state;
if (_charSpeechSoundCounter > 0 && _actionCharacterNum == i) {
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
state = 3;
_flagsTable[288] = 1;
} else if (_flagsTable[288] < 2) {
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
state = 2;
if (_flagsTable[288] == 1) {
_flagsTable[288] = 2;
}
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
+ _updateSpriteFlag1 = true;
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
void TuckerEngine::updateSprite_locationNum81_1(int i) {
- _spritesTable[i].state = 1;
+ _spritesTable[i]._state = 1;
}
void TuckerEngine::updateSprite_locationNum82(int i) {
@@ -3197,20 +3194,20 @@ void TuckerEngine::updateSprite_locationNum82(int i) {
if (_charSpeechSoundCounter > 0) {
state = 1;
_flagsTable[229] = 1;
- _spritesTable[i].needUpdate = 1;
+ _spritesTable[i]._needUpdate = true;
} else if (_flagsTable[229] == 0) {
state = 1;
} else if (_flagsTable[229] == 1) {
state = 2;
_flagsTable[229] = 2;
- _spritesTable[i].needUpdate = 0;
+ _spritesTable[i]._needUpdate = false;
} else {
- _spritesTable[i].animationFrame = _spritesTable[i].firstFrame - 1;
- _spritesTable[i].updateDelay = 5;
- _updateSpriteFlag1 = 1;
+ _spritesTable[i]._animationFrame = _spritesTable[i]._firstFrame - 1;
+ _spritesTable[i]._updateDelay = 5;
+ _updateSpriteFlag1 = true;
state = 2;
}
- _spritesTable[i].state = state;
+ _spritesTable[i]._state = state;
}
} // namespace Tucker
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index 1b04f3fae9..5f06334720 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -30,7 +30,8 @@
#include "audio/decoders/wave.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pcx.h"
+
+#include "image/pcx.h"
#include "tucker/tucker.h"
#include "tucker/graphics.h"
@@ -126,7 +127,7 @@ public:
}
bool findNextToken(DataToken t) {
- const char *token = 0;
+ const char *token = nullptr;
switch (t) {
case kDataTokenDw:
token = "dw";
@@ -278,7 +279,7 @@ Audio::RewindableAudioStream *CompressedSound::load(CompressedSoundType type, in
void TuckerEngine::loadImage(const char *fname, uint8 *dst, int type) {
char filename[80];
- strcpy(filename, fname);
+ Common::strlcpy(filename, fname, sizeof(filename));
Common::File f;
if (!f.open(filename)) {
@@ -302,7 +303,7 @@ void TuckerEngine::loadImage(const char *fname, uint8 *dst, int type) {
}
}
- ::Graphics::PCXDecoder pcx;
+ Image::PCXDecoder pcx;
if (!pcx.loadStream(f))
error("Error while reading PCX image");
@@ -350,11 +351,11 @@ void TuckerEngine::loadCharset2() {
}
void TuckerEngine::loadCharsetHelper() {
- const int charW = Graphics::_charset.charW;
- const int charH = Graphics::_charset.charH;
+ const int charW = Graphics::_charset._charW;
+ const int charH = Graphics::_charset._charH;
int offset = 0;
- for (int y = 0; y < Graphics::_charset.yCount; ++y) {
- for (int x = 0; x < Graphics::_charset.xCount; ++x) {
+ for (int y = 0; y < Graphics::_charset._yCount; ++y) {
+ for (int x = 0; x < Graphics::_charset._xCount; ++x) {
offset += Graphics::encodeRAW(_loadTempBuf + (y * 320) * charH + x * charW, _charsetGfxBuf + offset, charW, charH);
}
}
@@ -407,8 +408,8 @@ void TuckerEngine::loadBudSpr(int startOffset) {
loadImage(filename.c_str(), _loadTempBuf, 0);
++frame;
}
- int sz = Graphics::encodeRLE(_loadTempBuf + _spriteFramesTable[i].sourceOffset, _spritesGfxBuf + spriteOffset, _spriteFramesTable[i].xSize, _spriteFramesTable[i].ySize);
- _spriteFramesTable[i].sourceOffset = spriteOffset;
+ int sz = Graphics::encodeRLE(_loadTempBuf + _spriteFramesTable[i]._sourceOffset, _spritesGfxBuf + spriteOffset, _spriteFramesTable[i]._xSize, _spriteFramesTable[i]._ySize);
+ _spriteFramesTable[i]._sourceOffset = spriteOffset;
spriteOffset += sz;
}
}
@@ -430,16 +431,16 @@ int TuckerEngine::loadCTable01(int index, int firstSpriteNum, int *framesCount)
}
const int y = t.getNextInteger();
SpriteFrame *c = &_spriteFramesTable[lastSpriteNum++];
- c->sourceOffset = y * 320 + x;
- c->xSize = t.getNextInteger();
- c->ySize = t.getNextInteger();
- c->xOffset = t.getNextInteger();
- if (c->xOffset > 300) {
- c->xOffset -= 500;
+ c->_sourceOffset = y * 320 + x;
+ c->_xSize = t.getNextInteger();
+ c->_ySize = t.getNextInteger();
+ c->_xOffset = t.getNextInteger();
+ if (c->_xOffset > 300) {
+ c->_xOffset -= 500;
}
- c->yOffset = t.getNextInteger();
- if (c->yOffset > 300) {
- c->yOffset -= 500;
+ c->_yOffset = t.getNextInteger();
+ if (c->_yOffset > 300) {
+ c->_yOffset -= 500;
}
}
}
@@ -454,17 +455,17 @@ void TuckerEngine::loadCTable02(int fl) {
loadFile("ctable02.c", _loadTempBuf);
DataTokenizer t(_loadTempBuf, _fileLoadSize);
while (t.findNextToken(kDataTokenDw)) {
- _spriteAnimationsTable[entry].numParts = t.getNextInteger();
- if (_spriteAnimationsTable[entry].numParts < 1) {
+ _spriteAnimationsTable[entry]._numParts = t.getNextInteger();
+ if (_spriteAnimationsTable[entry]._numParts < 1) {
return;
}
- _spriteAnimationsTable[entry].rotateFlag = t.getNextInteger();
+ _spriteAnimationsTable[entry]._rotateFlag = t.getNextInteger();
int num = t.getNextInteger();
if (num != fl) {
continue;
}
int start = 0;
- _spriteAnimationsTable[entry].firstFrameIndex = i;
+ _spriteAnimationsTable[entry]._firstFrameIndex = i;
while (start != 999) {
start = t.getNextInteger();
if (start == 9999) { // end marker in the demo version
@@ -570,12 +571,12 @@ void TuckerEngine::loadData() {
const int x = t.getNextInteger();
const int y = t.getNextInteger();
Data *d = &_dataTable[_dataCount];
- d->sourceOffset = y * 320 + x;
- d->xSize = t.getNextInteger();
- d->ySize = t.getNextInteger();
- d->xDest = t.getNextInteger();
- d->yDest = t.getNextInteger();
- d->index = count;
+ d->_sourceOffset = y * 320 + x;
+ d->_xSize = t.getNextInteger();
+ d->_ySize = t.getNextInteger();
+ d->_xDest = t.getNextInteger();
+ d->_yDest = t.getNextInteger();
+ d->_index = count;
}
++objNum;
++count;
@@ -591,9 +592,9 @@ void TuckerEngine::loadData() {
int TuckerEngine::loadDataHelper(int offset, int index) {
for (int i = 0; i < _dataCount + 1; ++i) {
- if (_dataTable[i].index == index) {
- int sz = Graphics::encodeRLE(_loadTempBuf + _dataTable[i].sourceOffset, _data3GfxBuf + offset, _dataTable[i].xSize, _dataTable[i].ySize);
- _dataTable[i].sourceOffset = offset;
+ if (_dataTable[i]._index == index) {
+ int sz = Graphics::encodeRLE(_loadTempBuf + _dataTable[i]._sourceOffset, _data3GfxBuf + offset, _dataTable[i]._xSize, _dataTable[i]._ySize);
+ _dataTable[i]._sourceOffset = offset;
offset += sz;
}
}
@@ -625,7 +626,7 @@ void TuckerEngine::loadData3() {
}
assert(_locationAnimationsCount < kLocationAnimationsTableSize);
LocationAnimation *d = &_locationAnimationsTable[_locationAnimationsCount++];
- d->graphicNum = num;
+ d->_graphicNum = num;
const int seqNum = t.getNextInteger();
if (seqNum > 0) {
int anim = 0;
@@ -635,22 +636,22 @@ void TuckerEngine::loadData3() {
}
++anim;
}
- d->animCurrentCounter = d->animInitCounter = anim;
+ d->_animCurrentCounter = d->_animInitCounter = anim;
while (_staticData3Table[anim + 1] != 999) {
++anim;
}
- d->animLastCounter = anim;
+ d->_animLastCounter = anim;
} else {
- d->animLastCounter = 0;
+ d->_animLastCounter = 0;
}
- d->getFlag = t.getNextInteger();
- d->inventoryNum = t.getNextInteger();
- d->flagNum = t.getNextInteger();
- d->flagValue = t.getNextInteger();
- d->selectable = t.getNextInteger();
- d->standX = t.getNextInteger();
- d->standY = t.getNextInteger();
- d->drawFlag = 0;
+ d->_getFlag = t.getNextInteger();
+ d->_inventoryNum = t.getNextInteger();
+ d->_flagNum = t.getNextInteger();
+ d->_flagValue = t.getNextInteger();
+ d->_selectable = t.getNextInteger();
+ d->_standX = t.getNextInteger();
+ d->_standY = t.getNextInteger();
+ d->_drawFlag = false;
}
}
}
@@ -672,22 +673,22 @@ void TuckerEngine::loadData4() {
}
assert(_locationObjectsCount < kLocationObjectsTableSize);
LocationObject *d = &_locationObjectsTable[_locationObjectsCount++];
- d->xPos = i;
- d->yPos = t.getNextInteger();
- d->xSize = t.getNextInteger();
- d->ySize = t.getNextInteger();
- d->standX = t.getNextInteger();
- d->standY = t.getNextInteger();
- d->textNum = t.getNextInteger();
- d->cursorNum = t.getNextInteger();
- d->locationNum = t.getNextInteger();
- if (d->locationNum > 0) {
- d->toX = t.getNextInteger();
- d->toY = t.getNextInteger();
- d->toX2 = t.getNextInteger();
- d->toY2 = t.getNextInteger();
- d->toWalkX2 = t.getNextInteger();
- d->toWalkY2 = t.getNextInteger();
+ d->_xPos = i;
+ d->_yPos = t.getNextInteger();
+ d->_xSize = t.getNextInteger();
+ d->_ySize = t.getNextInteger();
+ d->_standX = t.getNextInteger();
+ d->_standY = t.getNextInteger();
+ d->_textNum = t.getNextInteger();
+ d->_cursorNum = t.getNextInteger();
+ d->_locationNum = t.getNextInteger();
+ if (d->_locationNum > 0) {
+ d->_toX = t.getNextInteger();
+ d->_toY = t.getNextInteger();
+ d->_toX2 = t.getNextInteger();
+ d->_toY2 = t.getNextInteger();
+ d->_toWalkX2 = t.getNextInteger();
+ d->_toWalkY2 = t.getNextInteger();
}
}
}
@@ -725,20 +726,20 @@ void TuckerEngine::loadActionFile() {
int keyD = t.getNextInteger();
int keyE = t.getNextInteger();
Action *action = &_actionsTable[_actionsCount++];
- action->key = keyE * 1000000 + keyD * 100000 + keyA * 10000 + keyB * 1000 + keyC;
- action->testFlag1Num = t.getNextInteger();
- action->testFlag1Value = t.getNextInteger();
- action->testFlag2Num = t.getNextInteger();
- action->testFlag2Value = t.getNextInteger();
- action->speech = t.getNextInteger();
- action->flipX = t.getNextInteger();
- action->index = t.getNextInteger();
- action->delay = t.getNextInteger();
- action->setFlagNum = t.getNextInteger();
- assert(action->setFlagNum >= 0 && action->setFlagNum < kFlagsTableSize);
- action->setFlagValue = t.getNextInteger();
- action->fxNum = t.getNextInteger();
- action->fxDelay = t.getNextInteger();
+ action->_key = keyE * 1000000 + keyD * 100000 + keyA * 10000 + keyB * 1000 + keyC;
+ action->_testFlag1Num = t.getNextInteger();
+ action->_testFlag1Value = t.getNextInteger();
+ action->_testFlag2Num = t.getNextInteger();
+ action->_testFlag2Value = t.getNextInteger();
+ action->_speech = t.getNextInteger();
+ action->_flipX = t.getNextInteger();
+ action->_index = t.getNextInteger();
+ action->_delay = t.getNextInteger();
+ action->_setFlagNum = t.getNextInteger();
+ assert(action->_setFlagNum >= 0 && action->_setFlagNum < kFlagsTableSize);
+ action->_setFlagValue = t.getNextInteger();
+ action->_fxNum = t.getNextInteger();
+ action->_fxDelay = t.getNextInteger();
}
}
}
@@ -755,17 +756,17 @@ void TuckerEngine::loadCharPos() {
}
assert(_charPosCount < 4);
CharPos *charPos = &_charPosTable[_charPosCount++];
- charPos->xPos = i;
- charPos->yPos = t.getNextInteger();
- charPos->xSize = t.getNextInteger();
- charPos->ySize = t.getNextInteger();
- charPos->xWalkTo = t.getNextInteger();
- charPos->yWalkTo = t.getNextInteger();
- charPos->flagNum = t.getNextInteger();
- charPos->flagValue = t.getNextInteger();
- charPos->direction = t.getNextInteger();
- charPos->name = t.getNextInteger();
- charPos->description = t.getNextInteger();
+ charPos->_xPos = i;
+ charPos->_yPos = t.getNextInteger();
+ charPos->_xSize = t.getNextInteger();
+ charPos->_ySize = t.getNextInteger();
+ charPos->_xWalkTo = t.getNextInteger();
+ charPos->_yWalkTo = t.getNextInteger();
+ charPos->_flagNum = t.getNextInteger();
+ charPos->_flagValue = t.getNextInteger();
+ charPos->_direction = t.getNextInteger();
+ charPos->_name = t.getNextInteger();
+ charPos->_description = t.getNextInteger();
}
int quitLoop = 0;
size_t count = 0;
@@ -818,9 +819,9 @@ void TuckerEngine::loadSprA02_01() {
void TuckerEngine::unloadSprA02_01() {
for (int i = 1; i < kSprA02TableSize; ++i) {
free(_sprA02Table[i]);
- _sprA02Table[i] = 0;
+ _sprA02Table[i] = nullptr;
}
- _sprA02Table[0] = 0;
+ _sprA02Table[0] = nullptr;
}
void TuckerEngine::loadSprC02_01() {
@@ -834,17 +835,17 @@ void TuckerEngine::loadSprC02_01() {
_spritesCount = _sprC02LookupTable2[_locationNum];
for (int i = 0; i < kMaxCharacters; ++i) {
memset(&_spritesTable[i], 0, sizeof(Sprite));
- _spritesTable[i].state = -1;
- _spritesTable[i].stateIndex = -1;
+ _spritesTable[i]._state = -1;
+ _spritesTable[i]._stateIndex = -1;
}
}
void TuckerEngine::unloadSprC02_01() {
for (int i = 1; i < kSprC02TableSize; ++i) {
free(_sprC02Table[i]);
- _sprC02Table[i] = 0;
+ _sprC02Table[i] = nullptr;
}
- _sprC02Table[0] = 0;
+ _sprC02Table[0] = nullptr;
}
void TuckerEngine::loadFx() {
@@ -856,35 +857,35 @@ void TuckerEngine::loadFx() {
_currentFxSet = 0;
for (int i = 0; i < _locationSoundsCount; ++i) {
LocationSound *s = &_locationSoundsTable[i];
- s->offset = 0;
- s->num = t.getNextInteger();
- s->volume = t.getNextInteger();
- s->type = t.getNextInteger();
- switch (s->type) {
+ s->_offset = 0;
+ s->_num = t.getNextInteger();
+ s->_volume = t.getNextInteger();
+ s->_type = t.getNextInteger();
+ switch (s->_type) {
case 5:
_currentFxSet = 1;
_currentFxIndex = i;
- _currentFxVolume = s->volume;
+ _currentFxVolume = s->_volume;
_currentFxDist = t.getNextInteger();
_currentFxScale = t.getNextInteger();
break;
case 6:
case 7:
case 8:
- s->startFxSpriteState = t.getNextInteger();
- s->startFxSpriteNum = t.getNextInteger();
- s->updateType = t.getNextInteger();
- if (s->type == 7) {
- s->flagNum = t.getNextInteger();
- s->flagValueStartFx = t.getNextInteger();
- s->stopFxSpriteState = t.getNextInteger();
- s->stopFxSpriteNum = t.getNextInteger();
- s->flagValueStopFx = t.getNextInteger();
+ s->_startFxSpriteState = t.getNextInteger();
+ s->_startFxSpriteNum = t.getNextInteger();
+ s->_updateType = t.getNextInteger();
+ if (s->_type == 7) {
+ s->_flagNum = t.getNextInteger();
+ s->_flagValueStartFx = t.getNextInteger();
+ s->_stopFxSpriteState = t.getNextInteger();
+ s->_stopFxSpriteNum = t.getNextInteger();
+ s->_flagValueStopFx = t.getNextInteger();
}
break;
}
- if (s->type == 8) {
- s->type = 6;
+ if (s->_type == 8) {
+ s->_type = 6;
}
}
t.findNextToken(kDataTokenDw);
@@ -895,10 +896,10 @@ void TuckerEngine::loadFx() {
int flagValue = t.getNextInteger();
if (flagValue == _flagsTable[flagNum]) {
LocationMusic *m = &_locationMusicsTable[_locationMusicsCount++];
- m->offset = 0;
- m->num = t.getNextInteger();
- m->volume = t.getNextInteger();
- m->flag = t.getNextInteger();
+ m->_offset = 0;
+ m->_num = t.getNextInteger();
+ m->_volume = t.getNextInteger();
+ m->_flag = t.getNextInteger();
} else {
for (int j = 0; j < 3; ++j) {
t.getNextInteger();
@@ -923,7 +924,7 @@ void TuckerEngine::loadSound(Audio::Mixer::SoundType type, int num, int volume,
return;
}
if (!stream) {
- const char *fmt = 0;
+ const char *fmt = nullptr;
switch (type) {
case Audio::Mixer::kSFXSoundType:
fmt = "fx/fx%d.wav";
@@ -1004,7 +1005,7 @@ void TuckerEngine::loadActionsTable() {
}
}
} else {
- if (_spritesTable[_csDataTableCount - 1].firstFrame - 1 != _spritesTable[_csDataTableCount - 1].animationFrame) {
+ if (_spritesTable[_csDataTableCount - 1]._firstFrame - 1 != _spritesTable[_csDataTableCount - 1]._animationFrame) {
break;
}
}
@@ -1030,7 +1031,7 @@ void TuckerEngine::loadActionsTable() {
_panelState = 0;
setCursorType(0);
_csDataHandled = false;
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_mouseClick = 1;
}
}
diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp
index 5133bc15e8..92da2d4d9b 100644
--- a/engines/tucker/saveload.cpp
+++ b/engines/tucker/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -64,8 +64,8 @@ void TuckerEngine::saveOrLoadGameStateData(S &s) {
saveOrLoadInt(s, _panelObjectsOffsetTable[i]);
}
saveOrLoadInt(s, _mainSpritesBaseOffset);
- saveOrLoadInt(s, _selectedObject.xPos);
- saveOrLoadInt(s, _selectedObject.yPos);
+ saveOrLoadInt(s, _selectedObject._xPos);
+ saveOrLoadInt(s, _selectedObject._yPos);
saveOrLoadInt(s, _locationNum);
saveOrLoadInt(s, _xPosCurrent);
saveOrLoadInt(s, _yPosCurrent);
diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp
index bd03eed00b..2fb881f77e 100644
--- a/engines/tucker/sequences.cpp
+++ b/engines/tucker/sequences.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -306,7 +306,7 @@ void TuckerEngine::handleMeanwhileSequence() {
void TuckerEngine::handleMapSequence() {
loadImage("map2.pcx", _quadBackgroundGfxBuf + 89600, 0);
loadImage("map1.pcx", _loadTempBuf, 1);
- _selectedObject.locationObject_locationNum = 0;
+ _selectedObject._locationObjectLocationNum = 0;
if (_flagsTable[7] > 0) {
copyMapRect(0, 0, 140, 86);
}
@@ -419,7 +419,7 @@ void TuckerEngine::copyMapRect(int x, int y, int w, int h) {
}
}
-int TuckerEngine::handleSpecialObjectSelectionSequence() {
+bool TuckerEngine::handleSpecialObjectSelectionSequence() {
char filename[40];
if (_partNum == 1 && _selectedObjectNum == 6) {
strcpy(filename, "news1.pcx");
@@ -436,7 +436,7 @@ int TuckerEngine::handleSpecialObjectSelectionSequence() {
} else if (_currentInfoString1SourceType == 1 && _currentActionObj1Num == 91) {
strcpy(filename, "memo.pcx");
} else {
- return 0;
+ return false;
}
while (_fadePaletteCounter > 0) {
fadeInPalette();
@@ -460,10 +460,10 @@ int TuckerEngine::handleSpecialObjectSelectionSequence() {
}
if (_partNum == 3 && _selectedObjectNum == 45) {
for (int i = 0; i < 13; ++i) {
- const int offset = _dataTable[204 + i].yDest * 640 + _dataTable[204 + i].xDest;
+ const int offset = _dataTable[204 + i]._yDest * 640 + _dataTable[204 + i]._xDest;
static const int itemsTable[] = { 15, 44, 25, 19, 21, 24, 12, 27, 20, 29, 35, 23, 3 };
if (_inventoryItemsState[itemsTable[i]] > 1) {
- Graphics::decodeRLE(_locationBackgroundGfxBuf + _scrollOffset + offset, _data3GfxBuf + _dataTable[204 + i].sourceOffset, _dataTable[204 + i].xSize, _dataTable[204 + i].ySize);
+ Graphics::decodeRLE(_locationBackgroundGfxBuf + _scrollOffset + offset, _data3GfxBuf + _dataTable[204 + i]._sourceOffset, _dataTable[204 + i]._xSize, _dataTable[204 + i]._ySize);
}
}
}
@@ -479,7 +479,7 @@ int TuckerEngine::handleSpecialObjectSelectionSequence() {
}
}
loadLoc();
- return 1;
+ return true;
}
AnimationSequencePlayer::AnimationSequencePlayer(OSystem *system, Audio::Mixer *mixer, Common::EventManager *event, CompressedSound *sound, int num)
@@ -487,11 +487,20 @@ AnimationSequencePlayer::AnimationSequencePlayer(OSystem *system, Audio::Mixer *
memset(_animationPalette, 0, sizeof(_animationPalette));
_soundSeqDataCount = 0;
_soundSeqDataIndex = 0;
- _soundSeqData = 0;
+ _soundSeqData = nullptr;
_offscreenBuffer = (uint8 *)malloc(kScreenWidth * kScreenHeight);
_updateScreenWidth = 0;
_updateScreenPicture = false;
- _picBufPtr = _pic2BufPtr = 0;
+ _picBufPtr = _pic2BufPtr = nullptr;
+
+ _changeToNextSequence = false;
+ _updateFunc = nullptr;
+ _updateFuncIndex = 0;
+ _updateScreenCounter = 0;
+ _updateScreenIndex = -1;
+ _frameCounter = 0;
+ _frameTime = 0;
+ _lastFrameTime = 1;
}
AnimationSequencePlayer::~AnimationSequencePlayer() {
@@ -722,13 +731,12 @@ void AnimationSequencePlayer::fadeOutPalette() {
void AnimationSequencePlayer::unloadAnimation() {
_mixer->stopAll();
free(_picBufPtr);
- _picBufPtr = 0;
free(_pic2BufPtr);
- _pic2BufPtr = 0;
+ _picBufPtr = _pic2BufPtr = nullptr;
}
uint8 *AnimationSequencePlayer::loadPicture(const char *fileName) {
- uint8 *p = 0;
+ uint8 *p = nullptr;
Common::File f;
if (f.open(fileName)) {
const int sz = f.size();
diff --git a/engines/tucker/staticres.cpp b/engines/tucker/staticres.cpp
index 388f5ba05c..b884851d7e 100644
--- a/engines/tucker/staticres.cpp
+++ b/engines/tucker/staticres.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 04e83efbe5..adf4be6b65 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -43,6 +43,33 @@ namespace Tucker {
TuckerEngine::TuckerEngine(OSystem *system, Common::Language language, uint32 flags)
: Engine(system), _gameLang(language), _gameFlags(flags), _rnd("tucker") {
_console = new TuckerConsole(this);
+
+ resetVariables();
+
+ _execData3Counter = 0;
+ _currentSaveLoadGameState = 1;
+ _fileLoadSize = 0;
+ _csDataSize = 0;
+
+ _player = nullptr;
+ _loadTempBuf = nullptr;
+ _cursorGfxBuf = nullptr;
+ _charsetGfxBuf = nullptr;
+ _panelGfxBuf = nullptr;
+ _itemsGfxBuf = nullptr;
+ _spritesGfxBuf = nullptr;
+ _locationBackgroundGfxBuf = nullptr;
+ _data5Buf = nullptr;
+ _data3GfxBuf = nullptr;
+ _quadBackgroundGfxBuf = nullptr;
+ _objTxtBuf = nullptr;
+ _panelObjectsGfxBuf = nullptr;
+ _ptTextBuf = nullptr;
+ _infoBarBuf = nullptr;
+ _bgTextBuf = nullptr;
+ _charNameBuf = nullptr;
+ _locationBackgroundMaskBuf = nullptr;
+ _csDataBuf = nullptr;
}
TuckerEngine::~TuckerEngine() {
@@ -84,17 +111,17 @@ void TuckerEngine::allocateBuffers() {
_charsetGfxBuf = (uint8 *)calloc(1, 22400);
_cursorGfxBuf = (uint8 *)calloc(1, 256 * 7);
_infoBarBuf = (uint8 *)calloc(1, 1000);
- _charNameBuf = 0;
- _bgTextBuf = 0;
- _objTxtBuf = 0;
+ _charNameBuf = nullptr;
+ _bgTextBuf = nullptr;
+ _objTxtBuf = nullptr;
_panelObjectsGfxBuf = (uint8 *)calloc(1, 20000);
- _data5Buf = 0;
+ _data5Buf = nullptr;
_data3GfxBuf = (uint8 *)calloc(1, 250000);
_quadBackgroundGfxBuf = (uint8 *)calloc(1, 320 * 140 * 4);
_locationBackgroundMaskBuf = (uint8 *)calloc(1, 640 * 140);
- _csDataBuf = 0;
+ _csDataBuf = nullptr;
_spritesGfxBuf = (uint8 *)calloc(1, 160000);
- _ptTextBuf = 0;
+ _ptTextBuf = nullptr;
memset(_charWidthTable, 0, sizeof(_charWidthTable));
}
@@ -119,7 +146,7 @@ void TuckerEngine::freeBuffers() {
free(_ptTextBuf);
}
-void TuckerEngine::restart() {
+void TuckerEngine::resetVariables() {
_quitGame = false;
_fastMode = false;
_syncCounter = 0;
@@ -131,15 +158,16 @@ void TuckerEngine::restart() {
_nextLocationNum = (_gameFlags & kGameFlagDemo) == 0 ? kStartupLocationGame : kStartupLocationDemo;
_gamePaused = false;
_gameDebug = false;
- _displayGameHints = false;
_displaySpeechText = (_gameFlags & kGameFlagNoSubtitles) == 0 ? ConfMan.getBool("subtitles") : false;
memset(_flagsTable, 0, sizeof(_flagsTable));
_gameHintsIndex = 0;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
_gameHintsStringNum = 0;
+ _displayGameHints = false;
+ _displayHintsText = false;
+
if ((_gameFlags & kGameFlagDemo) == 0) {
_locationWidthTable = _locationWidthTableGame;
_locationHeightTable = _locationHeightTableGame;
@@ -189,7 +217,7 @@ void TuckerEngine::restart() {
_switchPanelCounter = 0;
_conversationOptionsCount = 0;
_fadedPanel = false;
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
_conversationOptionLinesCount = 0;
memset(_inventoryItemsState, 0, sizeof(_inventoryItemsState));
memset(_inventoryObjectsList, 0, sizeof(_inventoryObjectsList));
@@ -223,11 +251,11 @@ void TuckerEngine::restart() {
_selectedCharacterNum = 0;
_actionObj1Type = _actionObj2Type = 0;
_actionObj1Num = _actionObj2Num = 0;
- _actionRequiresTwoObjects = 0;
- _actionVerbLocked = 0;
+ _actionRequiresTwoObjects = false;
+ _actionVerbLocked = false;
_actionPosX = 0;
_actionPosY = 0;
- _selectedObjectLocationMask = 0;
+ _selectedObjectLocationMask = false;
memset(&_selectedObject, 0, sizeof(_selectedObject));
_selectedCharacterDirection = 0;
_selectedCharacter2Num = 0;
@@ -247,10 +275,10 @@ void TuckerEngine::restart() {
_nextTableToLoadIndex = 0;
memset(_nextTableToLoadTable, 0, sizeof(_nextTableToLoadTable));
_soundInstructionIndex = 0;
- _tableInstructionsPtr = 0;
+ _tableInstructionsPtr = nullptr;
memset(_tableInstructionObj1Table, 0, sizeof(_tableInstructionObj1Table));
memset(_tableInstructionObj2Table, 0, sizeof(_tableInstructionObj2Table));
- _tableInstructionFlag = 0;
+ _tableInstructionFlag = false;
_tableInstructionItemNum1 = _tableInstructionItemNum2 = 0;
memset(_instructionsActionsTable, 0, sizeof(_instructionsActionsTable));
_validInstructionId = false;
@@ -266,7 +294,7 @@ void TuckerEngine::restart() {
_skipCurrentCharacterDraw = false;
_yPosCurrent = 131;
_xPosCurrent = 160;
- _characterSpeechDataPtr = 0;
+ _characterSpeechDataPtr = nullptr;
_ptTextOffset = 0;
memset(_characterAnimationsTable, 0, sizeof(_characterAnimationsTable));
memset(_characterStateTable, 0, sizeof(_characterStateTable));
@@ -279,26 +307,26 @@ void TuckerEngine::restart() {
_currentSpriteAnimationFrame2 = 0;
_characterAnimationIndex = -1;
_characterFacingDirection = _characterPrevFacingDirection = 0;
- _characterBackFrontFacing = _characterPrevBackFrontFacing = 0;
+ _characterBackFrontFacing = _characterPrevBackFrontFacing = false;
_characterAnimationNum = 0;
_noCharacterAnimationChange = 0;
- _changeBackgroundSprite = 0;
_characterSpriteAnimationFrameCounter = 0;
- _locationMaskIgnore = 0;
+ _locationMaskIgnore = false;
_locationMaskType = 0;
_locationMaskCounter = 0;
- _updateSpriteFlag1 = 0;
- _updateSpriteFlag2 = 0;
_handleMapCounter = 0;
_noPositionChangeAfterMap = false;
+ _changeBackgroundSprite = false;
+ _updateSpriteFlag1 = false;
+ _updateSpriteFlag2 = false;
- _mirroredDrawing = 0;
- _loadLocBufPtr = 0;
- _backgroundSpriteDataPtr = 0;
+ _mirroredDrawing = false;
+ _loadLocBufPtr = nullptr;
+ _backgroundSpriteDataPtr = nullptr;
_locationHeight = 0;
_scrollOffset = 0;
_currentGfxBackgroundCounter = 0;
- _currentGfxBackground = 0;
+ _currentGfxBackground = nullptr;
_fadePaletteCounter = 0;
memset(_currentPalette, 0, sizeof(_currentPalette));
_fullRedraw = false;
@@ -319,14 +347,14 @@ void TuckerEngine::restart() {
memset(_updateLocation14ObjNum, 0, sizeof(_updateLocation14ObjNum));
memset(_updateLocation14Delay, 0, sizeof(_updateLocation14Delay));
_updateLocationCounter2 = 0;
- _updateLocationFlag = 0;
+ _updateLocationFlag = false;
_updateLocation70StringLen = 0;
memset(_updateLocation70String, 0, sizeof(_updateLocation70String));
}
void TuckerEngine::mainLoop() {
allocateBuffers();
- restart();
+ resetVariables();
loadCharSizeDta();
if ((_gameFlags & kGameFlagDemo) != 0) {
@@ -352,7 +380,7 @@ void TuckerEngine::mainLoop() {
_flagsTable[219] = 1;
_flagsTable[105] = 1;
- _spriteAnimationFrameIndex = _spriteAnimationsTable[14].firstFrameIndex;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[14]._firstFrameIndex;
if (ConfMan.hasKey("save_slot")) {
const int slot = ConfMan.getInt("save_slot");
@@ -412,7 +440,7 @@ void TuckerEngine::mainLoop() {
}
if (_flagsTable[158] == 1) {
_flagsTable[158] = 0;
- _skipCurrentCharacterDraw = 1;
+ _skipCurrentCharacterDraw = true;
}
_mainLoopCounter1 = 0;
}
@@ -440,7 +468,7 @@ void TuckerEngine::mainLoop() {
updateGameHints();
}
if (_panelState == 0) {
- if (_panelLockedFlag == 1 || _pendingActionDelay > 0) {
+ if (_panelLockedFlag || _pendingActionDelay > 0) {
if (!_fadedPanel) {
updateItemsGfxColors(0x60, 0x80);
_fadedPanel = true;
@@ -450,7 +478,7 @@ void TuckerEngine::mainLoop() {
clearItemsGfx();
if (_gamePaused) {
drawPausedInfoBar();
- } else if (_gameHintsDisplayText == 1 && _mouseIdleCounter > 1000) {
+ } else if (_displayHintsText && _mouseIdleCounter > 1000) {
drawGameHintString();
} else {
drawInfoString();
@@ -466,10 +494,10 @@ void TuckerEngine::mainLoop() {
}
_currentGfxBackground = _quadBackgroundGfxBuf + (_currentGfxBackgroundCounter / 10) * 44800;
if (_fadePaletteCounter < 34 && _locationNum == 22) {
- _spritesTable[0].gfxBackgroundOffset = (_currentGfxBackgroundCounter / 10) * 640;
+ _spritesTable[0]._gfxBackgroundOffset = (_currentGfxBackgroundCounter / 10) * 640;
_mainSpritesBaseOffset = _currentGfxBackgroundCounter / 10;
if (_locationNum == 22 && _currentGfxBackgroundCounter <= 29) {
- _spritesTable[0].gfxBackgroundOffset = 640;
+ _spritesTable[0]._gfxBackgroundOffset = 640;
_mainSpritesBaseOffset = 1;
}
}
@@ -489,11 +517,11 @@ void TuckerEngine::mainLoop() {
drawData3();
execData3PreUpdate();
for (int i = 0; i < _spritesCount; ++i) {
- if (!_spritesTable[i].disabled) {
+ if (!_spritesTable[i]._disabled) {
drawSprite(i);
}
}
- if (_skipCurrentCharacterDraw != 1) {
+ if (!_skipCurrentCharacterDraw) {
if (_backgroundSpriteCurrentAnimation > -1 && _backgroundSpriteCurrentFrame > 0) {
drawBackgroundSprites();
} else {
@@ -522,7 +550,7 @@ void TuckerEngine::mainLoop() {
--_miscSoundFxDelayCounter[num];
if (_miscSoundFxDelayCounter[num] == 0) {
const int index = _miscSoundFxNum[num];
- startSound(_locationSoundsTable[index].offset, index, _locationSoundsTable[index].volume);
+ startSound(_locationSoundsTable[index]._offset, index, _locationSoundsTable[index]._volume);
}
}
}
@@ -565,7 +593,7 @@ void TuckerEngine::mainLoop() {
}
if (_inputKeys[kInputKeyHelp]) {
_inputKeys[kInputKeyHelp] = false;
- if (_displayGameHints && _gameHintsDisplayText == 1) {
+ if (_displayGameHints && _displayHintsText) {
_gameHintsStringNum = _gameHintsIndex + 1;
_mouseIdleCounter = 1100;
}
@@ -689,14 +717,14 @@ void TuckerEngine::setupNewLocation() {
_mainLoopCounter2 = 0;
_mainLoopCounter1 = 0;
_characterFacingDirection = 0;
- _actionVerbLocked = 0;
- _locationMaskIgnore = 0;
+ _actionVerbLocked = false;
+ _locationMaskIgnore = false;
_backgroundSprOffset = 0;
if (_backgroundSpriteCurrentAnimation > 0 && _backgroundSpriteCurrentFrame > 0) {
_backgroundSpriteCurrentAnimation = -1;
_backgroundSpriteCurrentFrame = 0;
}
- if (_panelLockedFlag == 0 || (_backgroundSpriteCurrentAnimation > 0 && _locationNum != 25)) {
+ if (!_panelLockedFlag || (_backgroundSpriteCurrentAnimation > 0 && _locationNum != 25)) {
_locationMaskType = 0;
} else {
_locationMaskType = 3;
@@ -829,8 +857,8 @@ void TuckerEngine::updateCharPosition() {
updateCharPositionHelper();
return;
case 1:
- if (_locationAnimationsTable[_selectedCharacter2Num].getFlag == 1) {
- _speechSoundNum = _speechSoundBaseNum + _locationAnimationsTable[_selectedCharacter2Num].inventoryNum;
+ if (_locationAnimationsTable[_selectedCharacter2Num]._getFlag == 1) {
+ _speechSoundNum = _speechSoundBaseNum + _locationAnimationsTable[_selectedCharacter2Num]._inventoryNum;
_characterSpeechDataPtr = _ptTextBuf;
updateCharPositionHelper();
return;
@@ -842,8 +870,8 @@ void TuckerEngine::updateCharPosition() {
break;
case 2:
_characterSpeechDataPtr = _ptTextBuf;
- _speechSoundNum = 2175 + _charPosTable[_selectedCharacterNum].description;
- if (_charPosTable[_selectedCharacterNum].description != 0) {
+ _speechSoundNum = 2175 + _charPosTable[_selectedCharacterNum]._description;
+ if (_charPosTable[_selectedCharacterNum]._description != 0) {
updateCharPositionHelper();
return;
}
@@ -852,59 +880,61 @@ void TuckerEngine::updateCharPosition() {
}
int actionKey = _currentActionObj2Num * 1000000 + _currentInfoString2SourceType * 100000 + _currentActionVerb * 10000 + _currentInfoString1SourceType * 1000 + _currentActionObj1Num;
debug(3, "updateCharPosition() actionKey %d", actionKey);
- int skip = 0;
- Action *action = 0;
- for (int i = 0; i < _actionsCount && skip == 0; ++i) {
+ bool skip = false;
+ Action *action = nullptr;
+ for (int i = 0; i < _actionsCount && !skip; ++i) {
action = &_actionsTable[i];
- if (action->key == actionKey) {
- skip = 1;
- if (action->testFlag1Num != 0) {
- if (action->testFlag1Num < 500) {
- if (_flagsTable[action->testFlag1Num] != action->testFlag1Value) {
- skip = 0;
+ if (action->_key == actionKey) {
+ skip = true;
+ if (action->_testFlag1Num != 0) {
+ if (action->_testFlag1Num < 500) {
+ if (action->_testFlag1Num >= 300)
+ error("updateCharPosition() - Unexpected value for _testFlag1Num : %d", action->_testFlag1Num);
+ if (_flagsTable[action->_testFlag1Num] != action->_testFlag1Value) {
+ skip = false;
}
- } else if (_inventoryItemsState[action->testFlag1Num - 500] != action->testFlag1Value) {
- skip = 0;
+ } else if (_inventoryItemsState[action->_testFlag1Num - 500] != action->_testFlag1Value) {
+ skip = false;
}
- debug(3, "updateCharPosition() flag1 %d value %d", action->testFlag1Num, action->testFlag1Value);
+ debug(3, "updateCharPosition() flag1 %d value %d", action->_testFlag1Num, action->_testFlag1Value);
}
- if (action->testFlag2Num != 0) {
- if (action->testFlag2Num < 500) {
- if (_flagsTable[action->testFlag2Num] != action->testFlag2Value) {
- skip = 0;
+ if (action->_testFlag2Num != 0) {
+ if (action->_testFlag2Num < 500) {
+ if (_flagsTable[action->_testFlag2Num] != action->_testFlag2Value) {
+ skip = false;
}
- } else if (_inventoryItemsState[action->testFlag2Num - 500] != action->testFlag2Value) {
- skip = 0;
+ } else if (_inventoryItemsState[action->_testFlag2Num - 500] != action->_testFlag2Value) {
+ skip = false;
}
- debug(3, "updateCharPosition() flag2 %d value %d", action->testFlag2Num, action->testFlag2Value);
+ debug(3, "updateCharPosition() flag2 %d value %d", action->_testFlag2Num, action->_testFlag2Value);
}
}
}
- if (skip == 0) {
+ if (!skip) {
playSpeechForAction(_currentActionVerb);
_currentActionVerb = 0;
return;
}
assert(action);
- if (action->speech != 6) {
- if (action->speech < 100) {
- _spriteAnimationFrameIndex = _spriteAnimationsTable[action->speech].firstFrameIndex;
- _currentSpriteAnimationLength = _spriteAnimationsTable[action->speech].numParts;
- _mirroredDrawing = action->flipX;
+ if (action->_speech != 6) {
+ if (action->_speech < 100) {
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[action->_speech]._firstFrameIndex;
+ _currentSpriteAnimationLength = _spriteAnimationsTable[action->_speech]._numParts;
+ _mirroredDrawing = (action->_flipX != 0);
_characterFacingDirection = 5;
_mainLoopCounter2 = 0;
} else {
- _backgroundSpriteCurrentAnimation = action->speech - 100;
+ _backgroundSpriteCurrentAnimation = action->_speech - 100;
_backgroundSpriteCurrentFrame = 0;
- _mirroredDrawing = 0;
+ _mirroredDrawing = false;
}
}
- _pendingActionDelay = action->delay;
- _charPositionFlagNum = action->setFlagNum;
- _charPositionFlagValue = action->setFlagValue;
- _pendingActionIndex = action->index;
- _characterSoundFxDelayCounter = action->fxDelay;
- _characterSoundFxNum = action->fxNum;
+ _pendingActionDelay = action->_delay;
+ _charPositionFlagNum = action->_setFlagNum;
+ _charPositionFlagValue = action->_setFlagValue;
+ _pendingActionIndex = action->_index;
+ _characterSoundFxDelayCounter = action->_fxDelay;
+ _characterSoundFxNum = action->_fxNum;
_previousActionVerb = _currentActionVerb;
_currentActionVerb = 0;
}
@@ -980,10 +1010,10 @@ void TuckerEngine::setBlackPalette() {
void TuckerEngine::updateCursor() {
setCursorNum(0);
- if (_backgroundSpriteCurrentAnimation == -1 && _panelLockedFlag == 0 && _selectedObject.locationObject_locationNum > 0) {
- _selectedObject.locationObject_locationNum = 0;
+ if (_backgroundSpriteCurrentAnimation == -1 && !_panelLockedFlag && _selectedObject._locationObjectLocationNum > 0) {
+ _selectedObject._locationObjectLocationNum = 0;
}
- if (_locationMaskType > 0 || _selectedObject.locationObject_locationNum > 0 || _pendingActionDelay > 0) {
+ if (_locationMaskType > 0 || _selectedObject._locationObjectLocationNum > 0 || _pendingActionDelay > 0) {
return;
}
if (_rightMouseButtonPressed) {
@@ -993,13 +1023,13 @@ void TuckerEngine::updateCursor() {
_actionVerb = 0;
}
_updateCursorFlag = true;
- _actionVerbLocked = 1;
+ _actionVerbLocked = true;
_actionRequiresTwoObjects = false;
}
} else {
_updateCursorFlag = false;
}
- if (_actionVerbLocked == 0) {
+ if (!_actionVerbLocked) {
setActionVerbUnderCursor();
if (_actionVerb == 0 && _locationNum == 63) {
_actionVerb = 8;
@@ -1016,7 +1046,7 @@ void TuckerEngine::updateCursor() {
} else {
num = getObjectUnderCursor();
if (num > -1) {
- _selectedObjectNum = _locationObjectsTable[num].textNum;
+ _selectedObjectNum = _locationObjectsTable[num]._textNum;
}
}
handleMouseClickOnInventoryObject();
@@ -1027,7 +1057,7 @@ void TuckerEngine::updateCursor() {
_selectedObjectNum = 0;
_selectedObjectType = 0;
}
- if (_actionVerbLocked == 0 && _selectedObjectType == 2 && _selectedObjectNum != 21) {
+ if (!_actionVerbLocked && _selectedObjectType == 2 && _selectedObjectNum != 21) {
_actionVerb = 2;
}
if (!_actionRequiresTwoObjects) {
@@ -1055,7 +1085,7 @@ void TuckerEngine::updateCursor() {
if (_mousePosY >= 150 && _mousePosX < 212) {
if (_mousePosX < 200) {
setActionVerbUnderCursor();
- _actionVerbLocked = 1;
+ _actionVerbLocked = true;
_actionRequiresTwoObjects = false;
} else if (_mousePosY < 175) {
moveDownInventoryObjects();
@@ -1066,13 +1096,13 @@ void TuckerEngine::updateCursor() {
if (_selectedObjectType == 3) {
setActionForInventoryObject();
} else if (_actionVerb != 0) {
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
setActionState();
} else if (_actionObj1Num == 261 || (_actionObj1Num == 205 && _flagsTable[143] == 0)) {
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
setActionState();
} else {
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_actionRequiresTwoObjects = false;
_currentActionVerb = 0;
setSelectedObjectKey();
@@ -1092,26 +1122,26 @@ void TuckerEngine::stopSounds() {
void TuckerEngine::playSounds() {
for (int i = 0; i < _locationSoundsCount; ++i) {
- if (_locationSoundsTable[i].type == 1 || _locationSoundsTable[i].type == 2 || _locationSoundsTable[i].type == 5 ||
- (_locationSoundsTable[i].type == 7 && _flagsTable[_locationSoundsTable[i].flagNum] == _locationSoundsTable[i].flagValueStartFx)) {
- startSound(_locationSoundsTable[i].offset, i, _locationSoundsTable[i].volume);
+ if (_locationSoundsTable[i]._type == 1 || _locationSoundsTable[i]._type == 2 || _locationSoundsTable[i]._type == 5 ||
+ (_locationSoundsTable[i]._type == 7 && _flagsTable[_locationSoundsTable[i]._flagNum] == _locationSoundsTable[i]._flagValueStartFx)) {
+ startSound(_locationSoundsTable[i]._offset, i, _locationSoundsTable[i]._volume);
}
}
for (int i = 0; i < _locationMusicsCount; ++i) {
- if (_locationMusicsTable[i].flag > 0) {
- startMusic(_locationMusicsTable[i].offset, i, _locationMusicsTable[i].volume);
+ if (_locationMusicsTable[i]._flag > 0) {
+ startMusic(_locationMusicsTable[i]._offset, i, _locationMusicsTable[i]._volume);
}
}
}
void TuckerEngine::updateCharactersPath() {
- if (_panelLockedFlag == 0) {
+ if (!_panelLockedFlag) {
return;
}
if (_backgroundSpriteCurrentAnimation != -1 && _locationNum != 25) {
- if (_xPosCurrent == _selectedObject.xPos && _yPosCurrent == _selectedObject.yPos) {
+ if (_xPosCurrent == _selectedObject._xPos && _yPosCurrent == _selectedObject._yPos) {
_locationMaskCounter = 1;
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
}
return;
}
@@ -1120,68 +1150,68 @@ void TuckerEngine::updateCharactersPath() {
if (_characterFacingDirection == 5) {
_characterPrevFacingDirection = 5;
}
- int flag = 0;
- if (_yPosCurrent > _selectedObject.yPos) {
- if (testLocationMask(_xPosCurrent, _yPosCurrent - 1) == 1) {
+ bool flag = false;
+ if (_yPosCurrent > _selectedObject._yPos) {
+ if (testLocationMask(_xPosCurrent, _yPosCurrent - 1)) {
--_yPosCurrent;
_characterFacingDirection = 4;
- flag = 1;
+ flag = true;
}
- } else if (_yPosCurrent < _selectedObject.yPos) {
- if (testLocationMask(_xPosCurrent, _yPosCurrent + 1) == 1) {
+ } else if (_yPosCurrent < _selectedObject._yPos) {
+ if (testLocationMask(_xPosCurrent, _yPosCurrent + 1)) {
++_yPosCurrent;
_characterFacingDirection = 2;
- flag = 1;
+ flag = true;
}
}
- if (_xPosCurrent > _selectedObject.xPos) {
- if (testLocationMask(_xPosCurrent - 1, _yPosCurrent) == 1) {
+ if (_xPosCurrent > _selectedObject._xPos) {
+ if (testLocationMask(_xPosCurrent - 1, _yPosCurrent)) {
--_xPosCurrent;
_characterFacingDirection = 3;
- _characterBackFrontFacing = 0;
- flag = 1;
+ _characterBackFrontFacing = false;
+ flag = true;
}
- } else if (_xPosCurrent < _selectedObject.xPos) {
- if (testLocationMask(_xPosCurrent + 1, _yPosCurrent) == 1) {
+ } else if (_xPosCurrent < _selectedObject._xPos) {
+ if (testLocationMask(_xPosCurrent + 1, _yPosCurrent)) {
++_xPosCurrent;
_characterFacingDirection = 1;
- _characterBackFrontFacing = 1;
- flag = 1;
+ _characterBackFrontFacing = true;
+ flag = true;
}
}
- if (flag == 0) {
- if (_selectedObjectLocationMask == 1) {
- _selectedObjectLocationMask = 0;
- _selectedObject.xPos = _selectedObject.xDefaultPos;
- _selectedObject.yPos = _selectedObject.yDefaultPos;
+ if (!flag) {
+ if (_selectedObjectLocationMask) {
+ _selectedObjectLocationMask = false;
+ _selectedObject._xPos = _selectedObject._xDefaultPos;
+ _selectedObject._yPos = _selectedObject._yDefaultPos;
} else {
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
_characterFacingDirection = 0;
- if (_xPosCurrent == _selectedObject.xPos && _yPosCurrent == _selectedObject.yPos) {
+ if (_xPosCurrent == _selectedObject._xPos && _yPosCurrent == _selectedObject._yPos) {
_locationMaskCounter = 1;
}
}
}
if (_locationNum == 25) {
- if ((_backgroundSpriteCurrentAnimation != 3 || _characterBackFrontFacing != 0) && (_backgroundSpriteCurrentAnimation != 6 || _characterBackFrontFacing != 1)) {
+ if ((_backgroundSpriteCurrentAnimation != 3 || _characterBackFrontFacing) && (_backgroundSpriteCurrentAnimation != 6 || !_characterBackFrontFacing)) {
_xPosCurrent = xPos;
_yPosCurrent = yPos;
return;
}
}
- if (_xPosCurrent != _selectedObject.xPos || _yPosCurrent != _selectedObject.yPos) {
+ if (_xPosCurrent != _selectedObject._xPos || _yPosCurrent != _selectedObject._yPos) {
return;
}
- if (_selectedObjectLocationMask != 0) {
+ if (_selectedObjectLocationMask) {
return;
}
_locationMaskCounter = 1;
- _panelLockedFlag = 0;
- _locationMaskIgnore = 0;
+ _panelLockedFlag = false;
+ _locationMaskIgnore = false;
if (_characterPrevFacingDirection <= 0 || _characterPrevFacingDirection >= 5) {
return;
}
- if (_selectedObject.locationObject_locationNum == 0) {
+ if (_selectedObject._locationObjectLocationNum == 0) {
_characterFacingDirection = 5;
while (_spriteAnimationFramesTable[_spriteAnimationFrameIndex] != 999) {
++_spriteAnimationFrameIndex;
@@ -1200,12 +1230,12 @@ void TuckerEngine::setSoundVolumeDistance() {
void TuckerEngine::updateData3DrawFlag() {
for (int i = 0; i < _locationAnimationsCount; ++i) {
LocationAnimation *a = &_locationAnimationsTable[i];
- if (a->flagNum > 0 && a->flagValue != _flagsTable[a->flagNum]) {
- a->drawFlag = 0;
- } else if (a->getFlag == 0) {
- a->drawFlag = 1;
+ if (a->_flagNum > 0 && a->_flagValue != _flagsTable[a->_flagNum]) {
+ a->_drawFlag = false;
+ } else if (a->_getFlag == 0) {
+ a->_drawFlag = true;
} else {
- a->drawFlag = (_inventoryItemsState[a->inventoryNum] == 0) ? 1 : 0;
+ a->_drawFlag = (_inventoryItemsState[a->_inventoryNum] == 0);
}
}
}
@@ -1214,26 +1244,26 @@ void TuckerEngine::updateData3() {
updateData3DrawFlag();
for (int i = 0; i < _locationAnimationsCount; ++i) {
LocationAnimation *a = &_locationAnimationsTable[i];
- if (a->animLastCounter != 0 && a->drawFlag != 0) {
- if (a->animLastCounter == a->animCurrentCounter) {
- a->animCurrentCounter = a->animInitCounter;
+ if (a->_animLastCounter != 0 && a->_drawFlag) {
+ if (a->_animLastCounter == a->_animCurrentCounter) {
+ a->_animCurrentCounter = a->_animInitCounter;
} else {
- ++a->animCurrentCounter;
+ ++a->_animCurrentCounter;
}
- const int index = a->animCurrentCounter;
+ const int index = a->_animCurrentCounter;
if (_staticData3Table[index] == 998) {
_flagsTable[_staticData3Table[index + 1]] = _staticData3Table[index + 2];
- a->animCurrentCounter = a->animInitCounter;
- a->drawFlag = 0;
+ a->_animCurrentCounter = a->_animInitCounter;
+ a->_drawFlag = false;
}
if (_locationNum == 24 && i == 0) {
// workaround bug #2872385: update fish animation sequence for correct
// position in aquarium.
- if (a->animInitCounter == 505 && a->animCurrentCounter == 513) {
- a->animCurrentCounter = 525;
+ if (a->_animInitCounter == 505 && a->_animCurrentCounter == 513) {
+ a->_animCurrentCounter = 525;
}
}
- a->graphicNum = _staticData3Table[a->animCurrentCounter];
+ a->_graphicNum = _staticData3Table[a->_animCurrentCounter];
}
}
updateData3DrawFlag();
@@ -1242,16 +1272,16 @@ void TuckerEngine::updateData3() {
void TuckerEngine::updateSfxData3_1() {
for (int i = 0; i < _locationSoundsCount; ++i) {
LocationSound *s = &_locationSoundsTable[i];
- if ((s->type == 6 || s->type == 7) && s->updateType == 1) {
+ if ((s->_type == 6 || s->_type == 7) && s->_updateType == 1) {
for (int j = 0; j < _spritesCount; ++j) {
- if (_spritesTable[j].animationFrame == s->startFxSpriteNum && _spritesTable[j].state == s->startFxSpriteState) {
- if (s->type == 7) {
- _flagsTable[s->flagNum] = s->flagValueStartFx;
+ if (_spritesTable[j]._animationFrame == s->_startFxSpriteNum && _spritesTable[j]._state == s->_startFxSpriteState) {
+ if (s->_type == 7) {
+ _flagsTable[s->_flagNum] = s->_flagValueStartFx;
}
- startSound(s->offset, i, s->volume);
- } else if (s->type == 7) {
- if (_spritesTable[j].animationFrame == s->stopFxSpriteNum && _spritesTable[j].state == s->stopFxSpriteState) {
- _flagsTable[s->flagNum] = s->flagValueStopFx;
+ startSound(s->_offset, i, s->_volume);
+ } else if (s->_type == 7) {
+ if (_spritesTable[j]._animationFrame == s->_stopFxSpriteNum && _spritesTable[j]._state == s->_stopFxSpriteState) {
+ _flagsTable[s->_flagNum] = s->_flagValueStopFx;
stopSound(i);
}
}
@@ -1263,15 +1293,15 @@ void TuckerEngine::updateSfxData3_1() {
void TuckerEngine::updateSfxData3_2() {
for (int i = 0; i < _locationSoundsCount; ++i) {
LocationSound *s = &_locationSoundsTable[i];
- if ((s->type == 6 || s->type == 7) && s->updateType == 0) {
- if (s->startFxSpriteNum == _backgroundSpriteCurrentFrame && s->startFxSpriteState == _backgroundSpriteCurrentAnimation) {
- if (s->type == 7) {
- _flagsTable[s->flagNum] = s->flagValueStartFx;
+ if ((s->_type == 6 || s->_type == 7) && s->_updateType == 0) {
+ if (s->_startFxSpriteNum == _backgroundSpriteCurrentFrame && s->_startFxSpriteState == _backgroundSpriteCurrentAnimation) {
+ if (s->_type == 7) {
+ _flagsTable[s->_flagNum] = s->_flagValueStartFx;
}
- startSound(s->offset, i, s->volume);
- } else if (s->type == 7) {
- if (s->stopFxSpriteNum == _backgroundSpriteCurrentFrame && s->stopFxSpriteState == _backgroundSpriteCurrentAnimation) {
- _flagsTable[s->flagNum] = s->flagValueStopFx;
+ startSound(s->_offset, i, s->_volume);
+ } else if (s->_type == 7) {
+ if (s->_stopFxSpriteNum == _backgroundSpriteCurrentFrame && s->_stopFxSpriteState == _backgroundSpriteCurrentAnimation) {
+ _flagsTable[s->_flagNum] = s->_flagValueStopFx;
stopSound(i);
}
}
@@ -1422,7 +1452,7 @@ void TuckerEngine::redrawPanelOverBackground() {
void TuckerEngine::drawConversationTexts() {
int y = 141;
- int flag = 0;
+ bool flag = false;
for (int i = 0; i < _conversationOptionsCount; ++i) {
int color = 108;
if ((_mousePosY > y && _mousePosY < y + 11) || _nextTableToLoadIndex == i) {
@@ -1431,11 +1461,11 @@ void TuckerEngine::drawConversationTexts() {
drawSpeechText(0, y, _characterSpeechDataPtr, _instructionsActionsTable[i], color);
if (_mousePosY > y && _mousePosY < _conversationOptionLinesCount * 10 + y + 1) {
_nextTableToLoadIndex = i;
- flag = 1;
+ flag = true;
}
y += _conversationOptionLinesCount * 10;
}
- if (flag == 0) {
+ if (!flag) {
_nextTableToLoadIndex = -1;
}
}
@@ -1471,31 +1501,31 @@ void TuckerEngine::updateGameHints() {
if (_gameHintsIndex == 0 && _flagsTable[3] > 0) {
_gameHintsIndex = 1;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
+ _displayHintsText = false;
} else if (_gameHintsIndex == 1 && _flagsTable[12] > 0) {
_gameHintsIndex = 2;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
+ _displayHintsText = false;
} else if (_gameHintsIndex == 2 && _flagsTable[20] > 0) {
_gameHintsIndex = 3;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
+ _displayHintsText = false;
} else if (_gameHintsIndex == 3 && _flagsTable[9] > 0) {
_gameHintsIndex = 4;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
+ _displayHintsText = false;
} else if (_gameHintsIndex == 4 && _flagsTable[23] > 0) {
_gameHintsIndex = 5;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
+ _displayHintsText = false;
} else if (_flagsTable[19] > 0) {
_gameHintsIndex = 6;
_gameHintsCounter = 0;
- _gameHintsDisplayText = 0;
+ _displayHintsText = false;
}
++_gameHintsCounter;
if (_gameHintsCounter > 1500) {
- _gameHintsDisplayText = 1;
+ _displayHintsText = true;
}
}
@@ -1503,7 +1533,7 @@ void TuckerEngine::startCharacterSounds() {
if (_characterSoundFxDelayCounter != 0) {
--_characterSoundFxDelayCounter;
if (_characterSoundFxDelayCounter <= 0) {
- startSound(_locationSoundsTable[_characterSoundFxNum].offset, _characterSoundFxNum, _locationSoundsTable[_characterSoundFxNum].volume);
+ startSound(_locationSoundsTable[_characterSoundFxNum]._offset, _characterSoundFxNum, _locationSoundsTable[_characterSoundFxNum]._volume);
}
}
}
@@ -1513,16 +1543,16 @@ void TuckerEngine::updateSoundsTypes3_4() {
return;
}
for (int i = 0; i < _locationSoundsCount; ++i) {
- switch (_locationSoundsTable[i].type) {
+ switch (_locationSoundsTable[i]._type) {
case 3:
if (getRandomNumber() >= 32300) {
- startSound(_locationSoundsTable[i].offset, 0, _locationSoundsTable[i].volume);
+ startSound(_locationSoundsTable[i]._offset, 0, _locationSoundsTable[i]._volume);
return;
}
break;
case 4:
if (getRandomNumber() >= 32763) {
- startSound(_locationSoundsTable[i].offset, 0, _locationSoundsTable[i].volume);
+ startSound(_locationSoundsTable[i]._offset, 0, _locationSoundsTable[i]._volume);
return;
}
break;
@@ -1532,11 +1562,11 @@ void TuckerEngine::updateSoundsTypes3_4() {
void TuckerEngine::drawData3() {
for (int i = 0; i < _locationAnimationsCount; ++i) {
- if (_locationAnimationsTable[i].drawFlag != 0) {
- int num = _locationAnimationsTable[i].graphicNum;
+ if (_locationAnimationsTable[i]._drawFlag) {
+ int num = _locationAnimationsTable[i]._graphicNum;
const Data *d = &_dataTable[num];
- Graphics::decodeRLE(_locationBackgroundGfxBuf + d->yDest * 640 + d->xDest, _data3GfxBuf + d->sourceOffset, d->xSize, d->ySize);
- addDirtyRect(d->xDest, d->yDest, d->xSize, d->ySize);
+ Graphics::decodeRLE(_locationBackgroundGfxBuf + d->_yDest * 640 + d->_xDest, _data3GfxBuf + d->_sourceOffset, d->_xSize, d->_ySize);
+ addDirtyRect(d->_xDest, d->_yDest, d->_xSize, d->_ySize);
}
}
}
@@ -1750,28 +1780,28 @@ void TuckerEngine::drawCurrentSprite() {
// Workaround original game glitch: location 14 contains some colors from [0xE0-0xF8] in a walkable area (tracker item #3106542)
const bool color248Only = (_locationNum == 14);
SpriteFrame *chr = &_spriteFramesTable[_currentSpriteAnimationFrame];
- int yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr->yOffset;
+ int yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr->_yOffset;
int xPos = _xPosCurrent;
- if (_mirroredDrawing == 0) {
- xPos += chr->xOffset - 14;
+ if (!_mirroredDrawing) {
+ xPos += chr->_xOffset - 14;
} else {
- xPos -= chr->xSize + chr->xOffset - 14;
+ xPos -= chr->_xSize + chr->_xOffset - 14;
}
- Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr->sourceOffset, chr->xSize, chr->ySize,
- chr->yOffset, _locationHeightTable[_locationNum], _mirroredDrawing != 0, color248Only);
- addDirtyRect(xPos, yPos, chr->xSize, chr->ySize);
+ Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr->_sourceOffset, chr->_xSize, chr->_ySize,
+ chr->_yOffset, _locationHeightTable[_locationNum], _mirroredDrawing, color248Only);
+ addDirtyRect(xPos, yPos, chr->_xSize, chr->_ySize);
if (_currentSpriteAnimationLength > 1) {
SpriteFrame *chr2 = &_spriteFramesTable[_currentSpriteAnimationFrame2];
- yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr2->yOffset;
+ yPos = _yPosCurrent + _mainSpritesBaseOffset - 54 + chr2->_yOffset;
xPos = _xPosCurrent;
- if (_mirroredDrawing == 0) {
- xPos += chr2->xOffset - 14;
+ if (!_mirroredDrawing) {
+ xPos += chr2->_xOffset - 14;
} else {
- xPos -= chr2->xSize + chr2->xOffset - 14;
+ xPos -= chr2->_xSize + chr2->_xOffset - 14;
}
- Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr2->sourceOffset, chr2->xSize, chr2->ySize,
- chr2->yOffset, _locationHeightTable[_locationNum], _mirroredDrawing != 0, color248Only);
- addDirtyRect(xPos, yPos, chr2->xSize, chr2->ySize);
+ Graphics::decodeRLE_248(_locationBackgroundGfxBuf + yPos * 640 + xPos, _spritesGfxBuf + chr2->_sourceOffset, chr2->_xSize, chr2->_ySize,
+ chr2->_yOffset, _locationHeightTable[_locationNum], _mirroredDrawing, color248Only);
+ addDirtyRect(xPos, yPos, chr2->_xSize, chr2->_ySize);
}
}
@@ -1790,8 +1820,8 @@ void TuckerEngine::setVolumeMusic(int index, int volume) {
}
void TuckerEngine::startSound(int offset, int index, int volume) {
- bool loop = (_locationSoundsTable[index].type == 2 || _locationSoundsTable[index].type == 5 || _locationSoundsTable[index].type == 7);
- loadSound(Audio::Mixer::kSFXSoundType, _locationSoundsTable[index].num, volume, loop, &_sfxHandles[index]);
+ bool loop = (_locationSoundsTable[index]._type == 2 || _locationSoundsTable[index]._type == 5 || _locationSoundsTable[index]._type == 7);
+ loadSound(Audio::Mixer::kSFXSoundType, _locationSoundsTable[index]._num, volume, loop, &_sfxHandles[index]);
}
void TuckerEngine::stopSound(int index) {
@@ -1803,8 +1833,8 @@ bool TuckerEngine::isSoundPlaying(int index) {
}
void TuckerEngine::startMusic(int offset, int index, int volume) {
- bool loop = (_locationMusicsTable[index].flag == 2);
- loadSound(Audio::Mixer::kMusicSoundType, _locationMusicsTable[index].num, volume, loop, &_musicHandles[index]);
+ bool loop = (_locationMusicsTable[index]._flag == 2);
+ loadSound(Audio::Mixer::kMusicSoundType, _locationMusicsTable[index]._num, volume, loop, &_musicHandles[index]);
}
void TuckerEngine::stopMusic(int index) {
@@ -1831,14 +1861,16 @@ void TuckerEngine::rememberSpeechSound() {
}
void TuckerEngine::redrawPanelItems() {
- const uint8 *src = 0;
- uint8 *dst = 0;
- int sz = 0;
if (_forceRedrawPanelItems || (_redrawPanelItemsCounter != 0 && _panelState == 0)) {
_forceRedrawPanelItems = false;
if (_redrawPanelItemsCounter > 0) {
--_redrawPanelItemsCounter;
}
+
+ const uint8 *src = nullptr;
+ uint8 *dst = nullptr;
+ int sz = 0;
+
switch (_panelState) {
case 0:
src = _panelGfxBuf;
@@ -1892,25 +1924,25 @@ void TuckerEngine::redrawPanelItemsHelper() {
void TuckerEngine::drawSprite(int num) {
Sprite *s = &_spritesTable[num];
- if (s->animationFrame <= s->firstFrame && s->animationFrame > 0 && s->state != -1) {
- const uint8 *p = s->animationData;
+ if (s->_animationFrame <= s->_firstFrame && s->_animationFrame > 0 && s->_state != -1) {
+ const uint8 *p = s->_animationData;
if (!p) {
return;
}
- int frameOffset = READ_LE_UINT24(p + s->animationFrame * 4);
+ int frameOffset = READ_LE_UINT24(p + s->_animationFrame * 4);
int srcW = READ_LE_UINT16(p + frameOffset);
int srcH = READ_LE_UINT16(p + frameOffset + 2);
int srcX = READ_LE_UINT16(p + frameOffset + 8);
int srcY = READ_LE_UINT16(p + frameOffset + 10);
- int xPos = s->gfxBackgroundOffset + srcX;
+ int xPos = s->_gfxBackgroundOffset + srcX;
if (xPos < 600 && (_scrollOffset + 320 < xPos || _scrollOffset - srcW > xPos)) {
return;
}
- s->xSource = srcX;
- s->gfxBackgroundOffset += s->backgroundOffset;
+ s->_xSource = srcX;
+ s->_gfxBackgroundOffset += s->_backgroundOffset;
uint8 *dstPtr = _locationBackgroundGfxBuf + srcY * 640 + xPos;
const uint8 *srcPtr = p + frameOffset + 12;
- switch (s->colorType) {
+ switch (s->_colorType) {
case 0:
Graphics::decodeRLE(dstPtr, srcPtr, srcW, srcH);
break;
@@ -1918,11 +1950,11 @@ void TuckerEngine::drawSprite(int num) {
Graphics::decodeRLE_224(dstPtr, srcPtr, srcW, srcH);
break;
default:
- Graphics::decodeRLE_248(dstPtr, srcPtr, srcW, srcH, 0, s->yMaxBackground, s->flipX != 0);
+ Graphics::decodeRLE_248(dstPtr, srcPtr, srcW, srcH, 0, s->_yMaxBackground, s->_flipX);
break;
}
- const int xR = srcX + (s->gfxBackgroundOffset % 640);
- const int yR = srcY + (s->gfxBackgroundOffset / 640);
+ const int xR = srcX + (s->_gfxBackgroundOffset % 640);
+ const int yR = srcY + (s->_gfxBackgroundOffset / 640);
addDirtyRect(xR, yR, srcW, srcH);
}
}
@@ -1938,7 +1970,7 @@ void TuckerEngine::drawPausedInfoBar() {
}
const uint8 *TuckerEngine::getStringBuf(int type) const {
- const uint8 *p = 0;
+ const uint8 *p = nullptr;
switch (type) {
case 0:
p = _data5Buf;
@@ -2031,7 +2063,7 @@ void TuckerEngine::updateCharacterAnimation() {
++_spriteAnimationFrameIndex;
}
_characterFacingDirection = 0;
- if (_changeBackgroundSprite == 1) {
+ if (_changeBackgroundSprite) {
if (_backgroundSpriteCurrentFrame == 0) {
_backgroundSpriteDataPtr = _sprA02Table[_backgroundSpriteCurrentAnimation];
_backgroundSpriteCurrentFrame = _backgroundSpriteLastFrame = READ_LE_UINT16(_backgroundSpriteDataPtr);
@@ -2040,7 +2072,7 @@ void TuckerEngine::updateCharacterAnimation() {
if (_backgroundSpriteCurrentFrame < 1) {
_backgroundSpriteCurrentAnimation = -1;
_backgroundSpriteCurrentFrame = 0;
- _changeBackgroundSprite = 0;
+ _changeBackgroundSprite = false;
if (_nextAction == 0) {
setCursorType(0);
}
@@ -2052,7 +2084,7 @@ void TuckerEngine::updateCharacterAnimation() {
assert(_backgroundSpriteCurrentAnimation >= 0 && _backgroundSpriteCurrentAnimation < kSprA02TableSize);
_backgroundSpriteDataPtr = _sprA02Table[_backgroundSpriteCurrentAnimation];
_backgroundSpriteLastFrame = READ_LE_UINT16(_backgroundSpriteDataPtr);
- } else if (_locationNum == 25 && _panelLockedFlag != 1 && (_backgroundSpriteCurrentAnimation == 3 || _backgroundSpriteCurrentAnimation == 6)) {
+ } else if (_locationNum == 25 && !_panelLockedFlag && (_backgroundSpriteCurrentAnimation == 3 || _backgroundSpriteCurrentAnimation == 6)) {
_backgroundSpriteCurrentFrame = 0;
_backgroundSpriteCurrentAnimation = -1;
} else {
@@ -2068,9 +2100,9 @@ void TuckerEngine::updateCharacterAnimation() {
}
}
if (_locationNum == 24 && _flagsTable[103] == 0) {
- if (_panelLockedFlag == 1) {
- _panelLockedFlag = 0;
- _selectedObject.locationObject_locationNum = 0;
+ if (_panelLockedFlag) {
+ _panelLockedFlag = false;
+ _selectedObject._locationObjectLocationNum = 0;
if (_actionVerb != 2) {
_speechSoundNum = 2236;
startSpeechSound(_speechSoundNum, _speechVolume);
@@ -2105,10 +2137,10 @@ void TuckerEngine::updateCharacterAnimation() {
}
} else if (_locationNum == 25) {
if (_backgroundSpriteCurrentFrame == 0) {
- if (_characterBackFrontFacing == 0) {
+ if (!_characterBackFrontFacing) {
if (_characterBackFrontFacing != _characterPrevBackFrontFacing) {
_backgroundSpriteCurrentAnimation = 10;
- } else if (_panelLockedFlag == 1) {
+ } else if (_panelLockedFlag) {
_backgroundSpriteCurrentAnimation = 3;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 99) {
_backgroundSpriteCurrentAnimation = 8;
@@ -2118,7 +2150,7 @@ void TuckerEngine::updateCharacterAnimation() {
} else {
if (_characterBackFrontFacing != _characterPrevBackFrontFacing) {
_backgroundSpriteCurrentAnimation = 2;
- } else if (_panelLockedFlag == 1) {
+ } else if (_panelLockedFlag) {
_backgroundSpriteCurrentAnimation = 6;
} else if (_charSpeechSoundCounter > 0 && _actionCharacterNum == 99) {
_backgroundSpriteCurrentAnimation = 9;
@@ -2143,7 +2175,7 @@ void TuckerEngine::updateCharacterAnimation() {
_backgroundSpriteLastFrame = READ_LE_UINT16(_backgroundSpriteDataPtr);
}
int frame = _spriteAnimationFramesTable[_spriteAnimationFrameIndex];
- if (_panelLockedFlag == 0 && _characterFacingDirection < 5 && _selectedObject.locationObject_locationNum == 0) {
+ if (!_panelLockedFlag && _characterFacingDirection < 5 && _selectedObject._locationObjectLocationNum == 0) {
_characterFacingDirection = 0;
}
if (_charSpeechSoundCounter > 0 && _characterFacingDirection != 6 && _actionCharacterNum == 99) {
@@ -2155,7 +2187,7 @@ void TuckerEngine::updateCharacterAnimation() {
}
int num = 0;
if (frame == 999 || (_characterFacingDirection != _characterPrevFacingDirection && _characterFacingDirection < 5)) {
- _mirroredDrawing = 0;
+ _mirroredDrawing = false;
if (_characterFacingDirection == 6) {
if (_csDataHandled) {
switch (_selectedCharacterDirection) {
@@ -2170,7 +2202,7 @@ void TuckerEngine::updateCharacterAnimation() {
break;
default:
num = 16;
- _mirroredDrawing = 1;
+ _mirroredDrawing = true;
break;
}
} else {
@@ -2182,7 +2214,7 @@ void TuckerEngine::updateCharacterAnimation() {
}
if (_characterFacingDirection == 0) {
if (_csDataHandled) {
- _mirroredDrawing = 0;
+ _mirroredDrawing = false;
switch (_selectedCharacterDirection) {
case 1:
num = 3;
@@ -2192,7 +2224,7 @@ void TuckerEngine::updateCharacterAnimation() {
break;
case 3:
num = 1;
- _mirroredDrawing = 1;
+ _mirroredDrawing = true;
break;
default:
num = 5;
@@ -2218,21 +2250,21 @@ void TuckerEngine::updateCharacterAnimation() {
break;
case 3:
num = 0;
- _mirroredDrawing = 1;
+ _mirroredDrawing = true;
break;
case 4:
num = 2;
break;
}
}
- _currentSpriteAnimationLength = _spriteAnimationsTable[num].numParts;
- _spriteAnimationFrameIndex = _spriteAnimationsTable[num].firstFrameIndex;
+ _currentSpriteAnimationLength = _spriteAnimationsTable[num]._numParts;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[num]._firstFrameIndex;
frame = _spriteAnimationFramesTable[_spriteAnimationFrameIndex];
}
if (_characterAnimationNum > 0) {
num = _characterAnimationNum;
- _currentSpriteAnimationLength = _spriteAnimationsTable[num].numParts;
- _spriteAnimationFrameIndex = _spriteAnimationsTable[num].firstFrameIndex;
+ _currentSpriteAnimationLength = _spriteAnimationsTable[num]._numParts;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[num]._firstFrameIndex;
frame = _spriteAnimationFramesTable[_spriteAnimationFrameIndex];
_characterAnimationNum = 0;
}
@@ -2287,10 +2319,10 @@ void TuckerEngine::handleMap() {
if (_handleMapCounter > 19) {
_handleMapCounter = 0;
_locationMaskCounter = 1;
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
}
}
- if (_panelLockedFlag == 0 && (_backgroundSpriteCurrentAnimation == -1 || _locationNum == 25) && _locationMaskType == 3) {
+ if (!_panelLockedFlag && (_backgroundSpriteCurrentAnimation == -1 || _locationNum == 25) && _locationMaskType == 3) {
setCursorType(0);
if (_locationMaskCounter == 1) {
_characterFacingDirection = 0;
@@ -2298,22 +2330,22 @@ void TuckerEngine::handleMap() {
}
return;
}
- if (_selectedObject.locationObject_locationNum != 0 && _locationMaskCounter != 0 && (_backgroundSpriteCurrentAnimation <= -1 || _locationNum == 25)) {
+ if (_selectedObject._locationObjectLocationNum != 0 && _locationMaskCounter != 0 && (_backgroundSpriteCurrentAnimation <= -1 || _locationNum == 25)) {
if (_locationNum == 25 || _backgroundSpriteCurrentAnimation != 4) {
if (_locationMaskType == 0) {
_locationMaskType = 1;
setCursorType(2);
- if (_selectedObject.locationObject_toWalkX2 > 800) {
- _backgroundSpriteCurrentAnimation = _selectedObject.locationObject_toWalkX2 - 900;
- if (_selectedObject.locationObject_toWalkY2 > 499) {
- _changeBackgroundSprite = 1;
- _backgroundSprOffset = _selectedObject.locationObject_toWalkY2 - 500;
+ if (_selectedObject._locationObjectToWalkX2 > 800) {
+ _backgroundSpriteCurrentAnimation = _selectedObject._locationObjectToWalkX2 - 900;
+ if (_selectedObject._locationObjectToWalkY2 > 499) {
+ _changeBackgroundSprite = true;
+ _backgroundSprOffset = _selectedObject._locationObjectToWalkY2 - 500;
} else {
- _backgroundSprOffset = _selectedObject.locationObject_toWalkY2;
- _changeBackgroundSprite = 0;
+ _backgroundSprOffset = _selectedObject._locationObjectToWalkY2;
+ _changeBackgroundSprite = false;
}
_backgroundSpriteCurrentFrame = 0;
- _mirroredDrawing = 0;
+ _mirroredDrawing = false;
if (_locationNum == 25) {
_backgroundSpriteDataPtr = _sprA02Table[_backgroundSpriteCurrentAnimation];
_backgroundSpriteLastFrame = READ_LE_UINT16(_backgroundSpriteDataPtr);
@@ -2321,17 +2353,17 @@ void TuckerEngine::handleMap() {
}
} else {
_locationMaskCounter = 0;
- _selectedObject.xPos = _selectedObject.locationObject_toWalkX2;
- _selectedObject.yPos = _selectedObject.locationObject_toWalkY2;
+ _selectedObject._xPos = _selectedObject._locationObjectToWalkX2;
+ _selectedObject._yPos = _selectedObject._locationObjectToWalkY2;
_handleMapCounter = 1;
- _panelLockedFlag = 1;
+ _panelLockedFlag = true;
}
return;
}
_locationMaskType = 2;
_panelState = 0;
setCursorType(0);
- if (_selectedObject.locationObject_locationNum == 99) {
+ if (_selectedObject._locationObjectLocationNum == 99) {
_noPositionChangeAfterMap = true;
handleMapSequence();
return;
@@ -2341,28 +2373,28 @@ void TuckerEngine::handleMap() {
redrawScreen(_scrollOffset);
_fadePaletteCounter = 34;
}
- _nextLocationNum = _selectedObject.locationObject_locationNum;
- _xPosCurrent = _selectedObject.locationObject_toX;
- _yPosCurrent = _selectedObject.locationObject_toY;
- if (_selectedObject.locationObject_toX2 > 800) {
- _backgroundSpriteCurrentAnimation = _selectedObject.locationObject_toX2 - 900;
- if (_selectedObject.locationObject_toY2 > 499) {
- _changeBackgroundSprite = 1;
- _backgroundSprOffset = _selectedObject.locationObject_toY2 - 500;
+ _nextLocationNum = _selectedObject._locationObjectLocationNum;
+ _xPosCurrent = _selectedObject._locationObjectToX;
+ _yPosCurrent = _selectedObject._locationObjectToY;
+ if (_selectedObject._locationObjectToX2 > 800) {
+ _backgroundSpriteCurrentAnimation = _selectedObject._locationObjectToX2 - 900;
+ if (_selectedObject._locationObjectToY2 > 499) {
+ _changeBackgroundSprite = true;
+ _backgroundSprOffset = _selectedObject._locationObjectToY2 - 500;
} else {
- _changeBackgroundSprite = 0;
- _backgroundSprOffset = _selectedObject.locationObject_toY2;
+ _changeBackgroundSprite = false;
+ _backgroundSprOffset = _selectedObject._locationObjectToY2;
}
_backgroundSpriteCurrentFrame = 0;
} else {
- _selectedObject.xPos = _selectedObject.locationObject_toX2;
- _selectedObject.yPos = _selectedObject.locationObject_toY2;
- _panelLockedFlag = 1;
+ _selectedObject._xPos = _selectedObject._locationObjectToX2;
+ _selectedObject._yPos = _selectedObject._locationObjectToY2;
+ _panelLockedFlag = true;
}
_scrollOffset = 0;
_handleMapCounter = 0;
_locationMaskCounter = 0;
- _selectedObject.locationObject_locationNum = 0;
+ _selectedObject._locationObjectLocationNum = 0;
}
}
}
@@ -2370,79 +2402,79 @@ void TuckerEngine::handleMap() {
void TuckerEngine::clearSprites() {
memset(_spritesTable, 0, sizeof(_spritesTable));
for (int i = 0; i < kMaxCharacters; ++i) {
- _spritesTable[i].state = -1;
- _spritesTable[i].stateIndex = -1;
+ _spritesTable[i]._state = -1;
+ _spritesTable[i]._stateIndex = -1;
}
}
void TuckerEngine::updateSprites() {
const int count = (_locationNum == 9) ? 3 : _spritesCount;
for (int i = 0; i < count; ++i) {
- if (_spritesTable[i].stateIndex > -1) {
- ++_spritesTable[i].stateIndex;
- if (_characterStateTable[_spritesTable[i].stateIndex] == 99) {
- _spritesTable[i].stateIndex = -1;
- _spritesTable[i].state = -1;
+ if (_spritesTable[i]._stateIndex > -1) {
+ ++_spritesTable[i]._stateIndex;
+ if (_characterStateTable[_spritesTable[i]._stateIndex] == 99) {
+ _spritesTable[i]._stateIndex = -1;
+ _spritesTable[i]._state = -1;
updateSprite(i);
} else {
- _spritesTable[i].animationFrame = _characterStateTable[_spritesTable[i].stateIndex];
+ _spritesTable[i]._animationFrame = _characterStateTable[_spritesTable[i]._stateIndex];
}
continue;
}
- if (_spritesTable[i].state == -1) {
+ if (_spritesTable[i]._state == -1) {
updateSprite(i);
continue;
}
- if (_charSpeechSoundCounter > 0 && i == _actionCharacterNum && _spritesTable[i].needUpdate == 0) {
+ if (_charSpeechSoundCounter > 0 && i == _actionCharacterNum && !_spritesTable[i]._needUpdate) {
updateSprite(i);
continue;
}
- if (_charSpeechSoundCounter == 0 && _spritesTable[i].needUpdate > 0) {
+ if (_charSpeechSoundCounter == 0 && _spritesTable[i]._needUpdate) {
updateSprite(i);
continue;
}
- if (_spritesTable[i].updateDelay > 0) {
- --_spritesTable[i].updateDelay;
- if (_spritesTable[i].updateDelay == 0) {
+ if (_spritesTable[i]._updateDelay > 0) {
+ --_spritesTable[i]._updateDelay;
+ if (_spritesTable[i]._updateDelay == 0) {
updateSprite(i);
}
continue;
}
- if (_spritesTable[i].defaultUpdateDelay > 0) {
- _spritesTable[i].updateDelay = _spritesTable[i].defaultUpdateDelay - 1;
- ++_spritesTable[i].animationFrame;
- if (_spritesTable[i].animationFrame == _spritesTable[i].firstFrame) {
+ if (_spritesTable[i]._defaultUpdateDelay > 0) {
+ _spritesTable[i]._updateDelay = _spritesTable[i]._defaultUpdateDelay - 1;
+ ++_spritesTable[i]._animationFrame;
+ if (_spritesTable[i]._animationFrame == _spritesTable[i]._firstFrame) {
updateSprite(i);
}
continue;
}
- if (_spritesTable[i].nextAnimationFrame == 0) {
- ++_spritesTable[i].animationFrame;
- if (_spritesTable[i].firstFrame - 1 < _spritesTable[i].animationFrame) {
- if (_spritesTable[i].prevAnimationFrame == 1) {
- --_spritesTable[i].animationFrame;
- _spritesTable[i].nextAnimationFrame = 1;
+ if (!_spritesTable[i]._nextAnimationFrame) {
+ ++_spritesTable[i]._animationFrame;
+ if (_spritesTable[i]._firstFrame - 1 < _spritesTable[i]._animationFrame) {
+ if (_spritesTable[i]._prevAnimationFrame) {
+ --_spritesTable[i]._animationFrame;
+ _spritesTable[i]._nextAnimationFrame = true;
} else {
updateSprite(i);
}
}
continue;
}
- --_spritesTable[i].animationFrame;
- if (_spritesTable[i].animationFrame == 0) {
+ --_spritesTable[i]._animationFrame;
+ if (_spritesTable[i]._animationFrame == 0) {
updateSprite(i);
}
}
}
void TuckerEngine::updateSprite(int i) {
- _spritesTable[i].prevState = _spritesTable[i].state;
- _spritesTable[i].prevAnimationFrame = 0;
- _spritesTable[i].nextAnimationFrame = 0;
- _updateSpriteFlag1 = 0;
- _updateSpriteFlag2 = 0;
- _spritesTable[i].defaultUpdateDelay = 0;
- _spritesTable[i].updateDelay = 0;
+ _spritesTable[i]._prevState = _spritesTable[i]._state;
+ _spritesTable[i]._prevAnimationFrame = false;
+ _spritesTable[i]._nextAnimationFrame = false;
+ _updateSpriteFlag1 = false;
+ _updateSpriteFlag2 = false;
+ _spritesTable[i]._defaultUpdateDelay = 0;
+ _spritesTable[i]._updateDelay = 0;
switch (_locationNum) {
case 2:
updateSprite_locationNum2();
@@ -2632,7 +2664,7 @@ void TuckerEngine::updateSprite(int i) {
if (i == 0) {
updateSprite_locationNum32_0(0);
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
break;
case 33:
@@ -2643,7 +2675,7 @@ void TuckerEngine::updateSprite(int i) {
} else if (i == 2) {
updateSprite_locationNum33_2(2);
} else {
- _spritesTable[i].state = 12;
+ _spritesTable[i]._state = 12;
}
break;
case 34:
@@ -2654,7 +2686,7 @@ void TuckerEngine::updateSprite(int i) {
break;
case 37:
if (i == 0) {
- _spritesTable[0].state = -1;
+ _spritesTable[0]._state = -1;
} else {
updateSprite_locationNum37(i);
}
@@ -2670,9 +2702,9 @@ void TuckerEngine::updateSprite(int i) {
updateSprite_locationNum43_2(i);
} else if (i < 2) {
if (_flagsTable[236] < 4) {
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
} else {
- _spritesTable[i].state = -1;
+ _spritesTable[i]._state = -1;
}
} else if (i == 3) {
updateSprite_locationNum43_3(3);
@@ -2685,10 +2717,10 @@ void TuckerEngine::updateSprite(int i) {
}
break;
case 45:
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
break;
case 47:
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
break;
case 48:
updateSprite_locationNum48(0);
@@ -2700,7 +2732,7 @@ void TuckerEngine::updateSprite(int i) {
if (i < 6) {
updateSprite_locationNum50(i);
} else {
- _spritesTable[i].state = i + 1;
+ _spritesTable[i]._state = i + 1;
}
break;
case 51:
@@ -2782,7 +2814,7 @@ void TuckerEngine::updateSprite(int i) {
break;
case 69:
if (i == 0) {
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
} else if (i == 1) {
updateSprite_locationNum69_1(1);
} else if (i == 2) {
@@ -2814,23 +2846,23 @@ void TuckerEngine::updateSprite(int i) {
updateSprite_locationNum82(0);
break;
case 98:
- _spritesTable[0].state = 1;
+ _spritesTable[0]._state = 1;
break;
}
- if (_spritesTable[i].stateIndex <= -1) {
- if (_updateSpriteFlag1 == 0) {
- _spritesTable[i].animationFrame = 1;
+ if (_spritesTable[i]._stateIndex <= -1) {
+ if (!_updateSpriteFlag1) {
+ _spritesTable[i]._animationFrame = 1;
}
- if (_spritesTable[i].state < 0 || !_sprC02Table[_spritesTable[i].state]) {
+ if (_spritesTable[i]._state < 0 || !_sprC02Table[_spritesTable[i]._state]) {
// warning("Invalid state %d for sprite %d location %d", _spritesTable[i].state, i, _locationNum);
return;
}
- _spritesTable[i].animationData = _sprC02Table[_spritesTable[i].state];
- _spritesTable[i].firstFrame = READ_LE_UINT16(_spritesTable[i].animationData);
- if (_updateSpriteFlag2 == 1) {
- _spritesTable[i].state = _spritesTable[i].firstFrame;
- _spritesTable[i].nextAnimationFrame = 1;
- _spritesTable[i].prevAnimationFrame = 1;
+ _spritesTable[i]._animationData = _sprC02Table[_spritesTable[i]._state];
+ _spritesTable[i]._firstFrame = READ_LE_UINT16(_spritesTable[i]._animationData);
+ if (_updateSpriteFlag2) {
+ _spritesTable[i]._state = _spritesTable[i]._firstFrame;
+ _spritesTable[i]._nextAnimationFrame = true;
+ _spritesTable[i]._prevAnimationFrame = true;
}
}
}
@@ -2844,7 +2876,7 @@ void TuckerEngine::drawStringInteger(int num, int x, int y, int digits) {
Graphics::drawStringChar(_locationBackgroundGfxBuf, _scrollOffset + x, y, 640, numStr[i], 102, _charsetGfxBuf);
x += 8;
}
- addDirtyRect(_scrollOffset + x, y, Graphics::_charset.charW * 3, Graphics::_charset.charH);
+ addDirtyRect(_scrollOffset + x, y, Graphics::_charset._charW * 3, Graphics::_charset._charH);
}
void TuckerEngine::drawStringAlt(int x, int y, int color, const uint8 *str, int strLen) {
@@ -2856,7 +2888,7 @@ void TuckerEngine::drawStringAlt(int x, int y, int color, const uint8 *str, int
x += _charWidthTable[chr];
++pos;
}
- addDirtyRect(xStart, y, x - xStart, Graphics::_charset.charH);
+ addDirtyRect(xStart, y, x - xStart, Graphics::_charset._charH);
}
void TuckerEngine::drawItemString(int x, int num, const uint8 *str) {
@@ -2911,15 +2943,15 @@ void TuckerEngine::updateItemsGfxColors(int color1, int color128) {
}
}
-int TuckerEngine::testLocationMask(int x, int y) {
- if (_locationMaskType > 0 || _locationMaskIgnore > 0) {
- return 1;
+bool TuckerEngine::testLocationMask(int x, int y) {
+ if (_locationMaskType > 0 || _locationMaskIgnore) {
+ return true;
}
if (_locationNum == 26 || _locationNum == 32) {
y -= 3;
}
const int offset = y * 640 + x;
- return _locationBackgroundMaskBuf[offset] > 0 ? 1 : 0;
+ return (_locationBackgroundMaskBuf[offset] > 0);
}
int TuckerEngine::getStringWidth(int num, const uint8 *ptr) {
@@ -3096,7 +3128,7 @@ int TuckerEngine::readTableInstructionParam(int len) {
++_tableInstructionsPtr;
--len;
}
- char *end = 0;
+ char *end = nullptr;
const int param = strtol((const char *)_tableInstructionsPtr, &end, 10);
if (end != (const char *)_tableInstructionsPtr + len) {
warning("Unexpected instruction parameter length %d (%d)", (int)(end - (const char *)_tableInstructionsPtr), len);
@@ -3123,7 +3155,7 @@ int TuckerEngine::executeTableInstruction() {
return 0;
case kCode_bub:
i = readTableInstructionParam(3);
- _spriteAnimationFrameIndex = _spriteAnimationsTable[i].firstFrameIndex;
+ _spriteAnimationFrameIndex = _spriteAnimationsTable[i]._firstFrameIndex;
_characterFacingDirection = 5;
_mainLoopCounter2 = 0;
return 0;
@@ -3137,13 +3169,13 @@ int TuckerEngine::executeTableInstruction() {
_selectedCharacterDirection = readTableInstructionParam(2);
return 0;
case kCode_bof:
- _skipCurrentCharacterDraw = 1;
+ _skipCurrentCharacterDraw = true;
return 0;
case kCode_buh:
_noCharacterAnimationChange = readTableInstructionParam(2);
return 0;
case kCode_bon:
- _skipCurrentCharacterDraw = 0;
+ _skipCurrentCharacterDraw = false;
return 0;
case kCode_bso:
_backgroundSprOffset = readTableInstructionParam(3);
@@ -3159,24 +3191,24 @@ int TuckerEngine::executeTableInstruction() {
_charSpeechSoundCounter = kDefaultCharSpeechSoundCounter;
return 0;
case kCode_buw:
- _selectedObject.xPos = readTableInstructionParam(3);
- _selectedObject.yPos = readTableInstructionParam(3);
- _locationMaskIgnore = 1;
- _panelLockedFlag = 1;
+ _selectedObject._xPos = readTableInstructionParam(3);
+ _selectedObject._yPos = readTableInstructionParam(3);
+ _locationMaskIgnore = true;
+ _panelLockedFlag = true;
return 0;
case kCode_bux:
_xPosCurrent = readTableInstructionParam(3);
_yPosCurrent = readTableInstructionParam(3);
return 0;
case kCode_c0a:
- _spritesTable[index].state = readTableInstructionParam(3);
- if (_spritesTable[index].state == 999) {
- _spritesTable[index].state = -1;
+ _spritesTable[index]._state = readTableInstructionParam(3);
+ if (_spritesTable[index]._state == 999) {
+ _spritesTable[index]._state = -1;
}
_mainLoopCounter1 = 0;
- _spritesTable[index].updateDelay = 0;
- _spritesTable[index].nextAnimationFrame = 0;
- _spritesTable[index].prevAnimationFrame = 0;
+ _spritesTable[index]._updateDelay = 0;
+ _spritesTable[index]._nextAnimationFrame = false;
+ _spritesTable[index]._prevAnimationFrame = false;
return 0;
case kCode_c0c:
setCharacterAnimation(readTableInstructionParam(3), index);
@@ -3187,7 +3219,7 @@ int TuckerEngine::executeTableInstruction() {
startSpeechSound(_partNum * 3000 + _ptTextOffset + _speechSoundNum - 3000, kMaxSoundVolume);
_charSpeechSoundCounter = kDefaultCharSpeechSoundCounter;
_actionTextColor = 181 + index;
- if (_tableInstructionFlag == 0) {
+ if (!_tableInstructionFlag) {
_actionPosX = _tableInstructionItemNum1;
_actionPosY = _tableInstructionItemNum2;
} else {
@@ -3210,8 +3242,8 @@ int TuckerEngine::executeTableInstruction() {
return 0;
case kCode_flx:
i = readTableInstructionParam(2);
- _locationSoundsTable[i].type = 2;
- startSound(_locationSoundsTable[i].offset, i, _locationSoundsTable[i].volume);
+ _locationSoundsTable[i]._type = 2;
+ startSound(_locationSoundsTable[i]._offset, i, _locationSoundsTable[i]._volume);
return 0;
case kCode_fxx:
i = readTableInstructionParam(2);
@@ -3221,7 +3253,7 @@ int TuckerEngine::executeTableInstruction() {
return 0;
case kCode_fx:
i = readTableInstructionParam(2);
- startSound(_locationSoundsTable[i].offset, i, _locationSoundsTable[i].volume);
+ startSound(_locationSoundsTable[i]._offset, i, _locationSoundsTable[i]._volume);
_soundInstructionIndex = i;
return 0;
case kCode_gfg:
@@ -3284,12 +3316,12 @@ int TuckerEngine::executeTableInstruction() {
_csDataLoaded = false;
return 3;
case kCode_ssp:
- _tableInstructionFlag = 0;
+ _tableInstructionFlag = false;
_tableInstructionItemNum1 = readTableInstructionParam(3);
_tableInstructionItemNum2 = readTableInstructionParam(3);
return 0;
case kCode_s0p:
- _tableInstructionFlag = 1;
+ _tableInstructionFlag = true;
_tableInstructionObj1Table[index] = readTableInstructionParam(3);
_tableInstructionObj2Table[index] = readTableInstructionParam(3);
return 0;
@@ -3380,21 +3412,21 @@ int TuckerEngine::getObjectUnderCursor() {
return -1;
}
for (int i = 0; i < _locationObjectsCount; ++i) {
- if (_mousePosX + _scrollOffset + 1 <= _locationObjectsTable[i].xPos) {
+ if (_mousePosX + _scrollOffset + 1 <= _locationObjectsTable[i]._xPos) {
continue;
}
- if (_mousePosX + _scrollOffset >= _locationObjectsTable[i].xPos + _locationObjectsTable[i].xSize) {
+ if (_mousePosX + _scrollOffset >= _locationObjectsTable[i]._xPos + _locationObjectsTable[i]._xSize) {
continue;
}
- if (_mousePosY <= _locationObjectsTable[i].yPos) {
+ if (_mousePosY <= _locationObjectsTable[i]._yPos) {
continue;
}
- if (_mousePosY >= _locationObjectsTable[i].yPos + _locationObjectsTable[i].ySize) {
+ if (_mousePosY >= _locationObjectsTable[i]._yPos + _locationObjectsTable[i]._ySize) {
continue;
}
_selectedObjectType = 0;
_selectedCharacterNum = i;
- setCursorNum(_locationObjectsTable[i].cursorNum);
+ setCursorNum(_locationObjectsTable[i]._cursorNum);
return i;
}
return -1;
@@ -3405,127 +3437,127 @@ void TuckerEngine::setSelectedObjectKey() {
if (_mousePosY > 139 && _nextAction == 0) {
return;
}
- _panelLockedFlag = 1;
+ _panelLockedFlag = true;
_locationMaskCounter = 0;
_actionRequiresTwoObjects = false;
- _selectedObject.yPos = 0;
- _selectedObject.locationObject_locationNum = 0;
+ _selectedObject._yPos = 0;
+ _selectedObject._locationObjectLocationNum = 0;
_pendingActionIndex = 0;
if (_selectedObjectType == 0) {
if (_selectedObjectNum == 0) {
- _selectedObject.xPos = x;
- _selectedObject.yPos = _mousePosY;
+ _selectedObject._xPos = x;
+ _selectedObject._yPos = _mousePosY;
} else {
- _selectedObject.xPos = _locationObjectsTable[_selectedCharacterNum].standX;
- _selectedObject.yPos = _locationObjectsTable[_selectedCharacterNum].standY;
+ _selectedObject._xPos = _locationObjectsTable[_selectedCharacterNum]._standX;
+ _selectedObject._yPos = _locationObjectsTable[_selectedCharacterNum]._standY;
if (_actionVerb == 0 || _actionVerb == 8) {
- _selectedObject.locationObject_locationNum = _locationObjectsTable[_selectedCharacterNum].locationNum;
- _selectedObject.locationObject_toX = _locationObjectsTable[_selectedCharacterNum].toX;
- _selectedObject.locationObject_toY = _locationObjectsTable[_selectedCharacterNum].toY;
- _selectedObject.locationObject_toX2 = _locationObjectsTable[_selectedCharacterNum].toX2;
- _selectedObject.locationObject_toY2 = _locationObjectsTable[_selectedCharacterNum].toY2;
- _selectedObject.locationObject_toWalkX2 = _locationObjectsTable[_selectedCharacterNum].toWalkX2;
- _selectedObject.locationObject_toWalkY2 = _locationObjectsTable[_selectedCharacterNum].toWalkY2;
+ _selectedObject._locationObjectLocationNum = _locationObjectsTable[_selectedCharacterNum]._locationNum;
+ _selectedObject._locationObjectToX = _locationObjectsTable[_selectedCharacterNum]._toX;
+ _selectedObject._locationObjectToY = _locationObjectsTable[_selectedCharacterNum]._toY;
+ _selectedObject._locationObjectToX2 = _locationObjectsTable[_selectedCharacterNum]._toX2;
+ _selectedObject._locationObjectToY2 = _locationObjectsTable[_selectedCharacterNum]._toY2;
+ _selectedObject._locationObjectToWalkX2 = _locationObjectsTable[_selectedCharacterNum]._toWalkX2;
+ _selectedObject._locationObjectToWalkY2 = _locationObjectsTable[_selectedCharacterNum]._toWalkY2;
}
}
} else {
switch (_selectedObjectType) {
case 1:
- _selectedObject.xPos = _locationAnimationsTable[_selectedCharacterNum].standX;
- _selectedObject.yPos = _locationAnimationsTable[_selectedCharacterNum].standY;
+ _selectedObject._xPos = _locationAnimationsTable[_selectedCharacterNum]._standX;
+ _selectedObject._yPos = _locationAnimationsTable[_selectedCharacterNum]._standY;
break;
case 2:
- _selectedObject.xPos = _charPosTable[_selectedCharacterNum].xWalkTo;
- _selectedObject.yPos = _charPosTable[_selectedCharacterNum].yWalkTo;
+ _selectedObject._xPos = _charPosTable[_selectedCharacterNum]._xWalkTo;
+ _selectedObject._yPos = _charPosTable[_selectedCharacterNum]._yWalkTo;
break;
case 3:
- _selectedObject.xPos = _xPosCurrent;
- _selectedObject.yPos = _yPosCurrent;
+ _selectedObject._xPos = _xPosCurrent;
+ _selectedObject._yPos = _yPosCurrent;
break;
}
}
- if (_selectedObject.yPos == 0) {
- _selectedObject.xPos = x;
- _selectedObject.yPos = _mousePosY;
+ if (_selectedObject._yPos == 0) {
+ _selectedObject._xPos = x;
+ _selectedObject._yPos = _mousePosY;
}
- _selectedObjectLocationMask = testLocationMask(_selectedObject.xPos, _selectedObject.yPos);
- if (_selectedObjectLocationMask == 0 && _objectKeysLocationTable[_locationNum] == 1) {
- if (_selectedObject.yPos < _objectKeysPosYTable[_locationNum]) {
- while (_selectedObjectLocationMask == 0 && _selectedObject.yPos < _objectKeysPosYTable[_locationNum]) {
- ++_selectedObject.yPos;
- _selectedObjectLocationMask = testLocationMask(_selectedObject.xPos, _selectedObject.yPos);
+ _selectedObjectLocationMask = testLocationMask(_selectedObject._xPos, _selectedObject._yPos);
+ if (!_selectedObjectLocationMask && _objectKeysLocationTable[_locationNum] == 1) {
+ if (_selectedObject._yPos < _objectKeysPosYTable[_locationNum]) {
+ while (!_selectedObjectLocationMask && _selectedObject._yPos < _objectKeysPosYTable[_locationNum]) {
+ ++_selectedObject._yPos;
+ _selectedObjectLocationMask = testLocationMask(_selectedObject._xPos, _selectedObject._yPos);
}
} else {
- while (_selectedObjectLocationMask == 0 && _selectedObject.yPos < _objectKeysPosYTable[_locationNum]) {
- --_selectedObject.yPos;
- _selectedObjectLocationMask = testLocationMask(_selectedObject.xPos, _selectedObject.yPos);
+ while (!_selectedObjectLocationMask && _selectedObject._yPos < _objectKeysPosYTable[_locationNum]) {
+ --_selectedObject._yPos;
+ _selectedObjectLocationMask = testLocationMask(_selectedObject._xPos, _selectedObject._yPos);
}
}
}
- if (_selectedObjectLocationMask == 1) {
- _selectedObjectLocationMask = testLocationMaskArea(_xPosCurrent, _yPosCurrent, _selectedObject.xPos, _selectedObject.yPos);
- if (_selectedObjectLocationMask == 1 && _objectKeysPosXTable[_locationNum] > 0) {
- _selectedObject.xDefaultPos = _selectedObject.xPos;
- _selectedObject.yDefaultPos = _selectedObject.yPos;
- _selectedObject.xPos = _objectKeysPosXTable[_locationNum];
- _selectedObject.yPos = _objectKeysPosYTable[_locationNum];
+ if (_selectedObjectLocationMask) {
+ _selectedObjectLocationMask = testLocationMaskArea(_xPosCurrent, _yPosCurrent, _selectedObject._xPos, _selectedObject._yPos);
+ if (_selectedObjectLocationMask && _objectKeysPosXTable[_locationNum] > 0) {
+ _selectedObject._xDefaultPos = _selectedObject._xPos;
+ _selectedObject._yDefaultPos = _selectedObject._yPos;
+ _selectedObject._xPos = _objectKeysPosXTable[_locationNum];
+ _selectedObject._yPos = _objectKeysPosYTable[_locationNum];
if (_objectKeysLocationTable[_locationNum] == 1) {
- _selectedObject.xPos = _selectedObject.xDefaultPos;
+ _selectedObject._xPos = _selectedObject._xDefaultPos;
}
}
}
}
void TuckerEngine::setCharacterAnimation(int count, int spr) {
- _spritesTable[spr].animationFrame = 0;
- _spritesTable[spr].stateIndex = 0;
+ _spritesTable[spr]._animationFrame = 0;
+ _spritesTable[spr]._stateIndex = 0;
for (int i = 0; i < count; ++i) {
- while (_characterStateTable[_spritesTable[spr].stateIndex] != 99) {
- ++_spritesTable[spr].stateIndex;
+ while (_characterStateTable[_spritesTable[spr]._stateIndex] != 99) {
+ ++_spritesTable[spr]._stateIndex;
}
- ++_spritesTable[spr].stateIndex;
+ ++_spritesTable[spr]._stateIndex;
}
- _spritesTable[spr].state = _characterStateTable[_spritesTable[spr].stateIndex];
- ++_spritesTable[spr].stateIndex;
- _spritesTable[spr].animationFrame = _characterStateTable[_spritesTable[spr].stateIndex];
- ++_spritesTable[spr].stateIndex;
- _spritesTable[spr].animationData = _sprC02Table[_spritesTable[spr].state];
- _spritesTable[spr].firstFrame = READ_LE_UINT16(_spritesTable[spr].animationData);
+ _spritesTable[spr]._state = _characterStateTable[_spritesTable[spr]._stateIndex];
+ ++_spritesTable[spr]._stateIndex;
+ _spritesTable[spr]._animationFrame = _characterStateTable[_spritesTable[spr]._stateIndex];
+ ++_spritesTable[spr]._stateIndex;
+ _spritesTable[spr]._animationData = _sprC02Table[_spritesTable[spr]._state];
+ _spritesTable[spr]._firstFrame = READ_LE_UINT16(_spritesTable[spr]._animationData);
}
-int TuckerEngine::testLocationMaskArea(int xBase, int yBase, int xPos, int yPos) {
+bool TuckerEngine::testLocationMaskArea(int xBase, int yBase, int xPos, int yPos) {
while (true) {
bool loop = false;
if (yBase > yPos) {
- if (testLocationMask(xBase, yBase - 1) == 1) {
+ if (testLocationMask(xBase, yBase - 1)) {
--yBase;
loop = true;
}
} else if (yBase < yPos) {
- if (testLocationMask(xBase, yBase + 1) == 1) {
+ if (testLocationMask(xBase, yBase + 1)) {
++yBase;
loop = true;
}
}
if (xBase > xPos) {
- if (testLocationMask(xBase - 1, yBase) == 1) {
+ if (testLocationMask(xBase - 1, yBase)) {
--xBase;
loop = true;
}
} else if (xBase < xPos) {
- if (testLocationMask(xBase + 1, yBase) == 1) {
+ if (testLocationMask(xBase + 1, yBase)) {
++xBase;
loop = true;
}
}
if (xBase == xPos && yBase == yPos) {
- return 0;
+ return false;
}
if (!loop) {
break;
}
}
- return 1;
+ return true;
}
void TuckerEngine::handleMouseClickOnInventoryObject() {
@@ -3548,7 +3580,7 @@ void TuckerEngine::handleMouseClickOnInventoryObject() {
_selectedObjectType = 0;
_selectedObjectNum = 0;
_actionVerb = 0;
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_forceRedrawPanelItems = true;
_panelState = 2;
setCursorType(1);
@@ -3573,7 +3605,7 @@ void TuckerEngine::handleMouseClickOnInventoryObject() {
_actionVerb = 0;
_selectedObjectType = 0;
_selectedObjectNum = 0;
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
}
}
break;
@@ -3585,23 +3617,23 @@ int TuckerEngine::setCharacterUnderCursor() {
return -1;
}
for (int i = 0; i < _charPosCount; ++i) {
- if (_mousePosX + _scrollOffset <= _charPosTable[i].xPos) {
+ if (_mousePosX + _scrollOffset <= _charPosTable[i]._xPos) {
continue;
}
- if (_mousePosX + _scrollOffset >= _charPosTable[i].xPos + _charPosTable[i].xSize) {
+ if (_mousePosX + _scrollOffset >= _charPosTable[i]._xPos + _charPosTable[i]._xSize) {
continue;
}
- if (_mousePosY <= _charPosTable[i].yPos) {
+ if (_mousePosY <= _charPosTable[i]._yPos) {
continue;
}
- if (_mousePosY >= _charPosTable[i].yPos + _charPosTable[i].ySize) {
+ if (_mousePosY >= _charPosTable[i]._yPos + _charPosTable[i]._ySize) {
continue;
}
- if (_charPosTable[i].flagNum == 0 || _flagsTable[_charPosTable[i].flagNum] == _charPosTable[i].flagValue) {
+ if (_charPosTable[i]._flagNum == 0 || _flagsTable[_charPosTable[i]._flagNum] == _charPosTable[i]._flagValue) {
_selectedObjectType = 2;
- _selectedCharacterDirection = _charPosTable[i].direction;
+ _selectedCharacterDirection = _charPosTable[i]._direction;
_selectedCharacterNum = i;
- return _charPosTable[i].name;
+ return _charPosTable[i]._name;
}
}
return -1;
@@ -3612,29 +3644,29 @@ int TuckerEngine::setLocationAnimationUnderCursor() {
return -1;
}
for (int i = _locationAnimationsCount - 1; i >= 0; --i) {
- if (_locationAnimationsTable[i].drawFlag == 0) {
+ if (!_locationAnimationsTable[i]._drawFlag)
continue;
- }
- int num = _locationAnimationsTable[i].graphicNum;
- if (_mousePosX + _scrollOffset + 1 <= _dataTable[num].xDest) {
+
+ int num = _locationAnimationsTable[i]._graphicNum;
+ if (_mousePosX + _scrollOffset + 1 <= _dataTable[num]._xDest) {
continue;
}
- if (_mousePosX + _scrollOffset >= _dataTable[num].xDest + _dataTable[num].xSize) {
+ if (_mousePosX + _scrollOffset >= _dataTable[num]._xDest + _dataTable[num]._xSize) {
continue;
}
- if (_mousePosY <= _dataTable[num].yDest) {
+ if (_mousePosY <= _dataTable[num]._yDest) {
continue;
}
- if (_mousePosY >= _dataTable[num].yDest + _dataTable[num].ySize) {
+ if (_mousePosY >= _dataTable[num]._yDest + _dataTable[num]._ySize) {
continue;
}
- if (_locationAnimationsTable[i].selectable == 0) {
+ if (_locationAnimationsTable[i]._selectable == 0) {
return -1;
}
_selectedObjectType = 1;
_selectedCharacterNum = i;
_selectedCharacter2Num = i;
- return _locationAnimationsTable[i].selectable;
+ return _locationAnimationsTable[i]._selectable;
}
return -1;
}
@@ -3642,14 +3674,14 @@ int TuckerEngine::setLocationAnimationUnderCursor() {
void TuckerEngine::setActionForInventoryObject() {
if (_actionVerb == 0 || _actionVerb == 2 || _actionVerb == 6 || _actionVerb == 7) {
playSpeechForAction(_actionVerb);
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_actionRequiresTwoObjects = false;
return;
}
if (_actionVerb == 3 || _actionVerb == 4) {
if (!(_partNum == 2 && _selectedObjectNum == 19) && !(_partNum == 3 && _selectedObjectNum == 42)) {
playSpeechForAction(_actionVerb);
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_actionRequiresTwoObjects = false;
return;
}
@@ -3659,13 +3691,13 @@ void TuckerEngine::setActionForInventoryObject() {
_currentActionObj2Num = _actionObj2Num;
_currentInfoString2SourceType = _actionObj2Type;
if (_actionVerb == 1 && _selectedObjectType == 3) {
- if (_panelLockedFlag == 1) {
+ if (_panelLockedFlag) {
if (_locationMaskType != 0) {
return;
}
- _panelLockedFlag = 0;
+ _panelLockedFlag = false;
}
- if (handleSpecialObjectSelectionSequence() == 1) {
+ if (handleSpecialObjectSelectionSequence()) {
return;
}
_speechSoundNum = _actionObj1Num + _speechSoundBaseNum;
@@ -3678,14 +3710,15 @@ void TuckerEngine::setActionForInventoryObject() {
_actionCharacterNum = 99;
setCursorType(2);
_charSpeechSoundCounter = kDefaultCharSpeechSoundCounter;
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_actionRequiresTwoObjects = false;
return;
}
- if ((_partNum == 3 && (_actionObj1Num == 6 || _actionObj1Num == 3 || _actionObj1Num == 17)) ||
+ // Items with unary usage i.e. "Use X", rather than "Use X on Y"
+ if ((_partNum == 3 && (_actionObj1Num == 6 || _actionObj1Num == 3 || _actionObj1Num == 17 || _actionObj1Num == 33)) ||
(_partNum == 2 && _actionObj1Num == 19) ||
(_partNum == 3 && (_actionObj1Num == 42 && _selectedObjectNum == 18)) ) {
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_actionRequiresTwoObjects = false;
_locationMaskCounter = 1;
setActionState();
@@ -3694,7 +3727,7 @@ void TuckerEngine::setActionForInventoryObject() {
if (!_actionRequiresTwoObjects) {
_actionRequiresTwoObjects = true;
} else {
- _actionVerbLocked = 0;
+ _actionVerbLocked = false;
_actionRequiresTwoObjects = false;
_locationMaskCounter = 1;
setActionState();
@@ -3754,12 +3787,12 @@ void TuckerEngine::drawSpeechText(int xStart, int y, const uint8 *dataPtr, int n
}
}
int count = 0;
- int flag = 0;
+ bool flag = false;
struct {
int w, count, offset;
} lines[5];
lines[0].offset = getPositionForLine(num, dataPtr);
- while (flag == 0 && count < 4) {
+ while (!flag && count < 4) {
int lineCharsCount, lineWidth;
flag = splitSpeechTextLines(dataPtr, lines[count].offset, x, lineCharsCount, lineWidth);
lines[count].w = lineWidth;
@@ -3788,7 +3821,7 @@ void TuckerEngine::drawSpeechText(int xStart, int y, const uint8 *dataPtr, int n
}
}
-int TuckerEngine::splitSpeechTextLines(const uint8 *dataPtr, int pos, int x, int &lineCharsCount, int &lineWidth) {
+bool TuckerEngine::splitSpeechTextLines(const uint8 *dataPtr, int pos, int x, int &lineCharsCount, int &lineWidth) {
int count = 0;
int w = 0;
lineCharsCount = 0;
@@ -3802,11 +3835,11 @@ int TuckerEngine::splitSpeechTextLines(const uint8 *dataPtr, int pos, int x, int
++count;
++pos;
}
- int ret = 0;
+ bool ret = false;
if (x + 1 > w) {
lineCharsCount = count;
lineWidth = w;
- ret = 1;
+ ret = true;
}
return ret;
}
@@ -3818,7 +3851,7 @@ void TuckerEngine::drawSpeechTextLine(const uint8 *dataPtr, int pos, int count,
x += _charWidthTable[dataPtr[pos]];
++pos;
}
- addDirtyRect(xStart, y, x - xStart, Graphics::_charset.charH);
+ addDirtyRect(xStart, y, x - xStart, Graphics::_charset._charH);
}
void TuckerEngine::redrawScreen(int offset) {
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index c9e4d986bb..adcd02b2fe 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -53,133 +53,133 @@ class RewindableAudioStream;
namespace Tucker {
struct Action {
- int key;
- int testFlag1Num;
- int testFlag1Value;
- int testFlag2Num;
- int testFlag2Value;
- int speech;
- int flipX;
- int index;
- int delay;
- int setFlagNum;
- int setFlagValue;
- int fxNum;
- int fxDelay;
+ int _key;
+ int _testFlag1Num;
+ int _testFlag1Value;
+ int _testFlag2Num;
+ int _testFlag2Value;
+ int _speech;
+ int _flipX;
+ int _index;
+ int _delay;
+ int _setFlagNum;
+ int _setFlagValue;
+ int _fxNum;
+ int _fxDelay;
};
struct Sprite {
- int state;
- int gfxBackgroundOffset;
- int updateDelay;
- int backgroundOffset;
- int needUpdate;
- int stateIndex;
- int counter;
- int disabled;
- int colorType;
- int animationFrame;
- int firstFrame;
- uint8 *animationData;
- int prevState;
- int nextAnimationFrame;
- int prevAnimationFrame;
- int defaultUpdateDelay;
- int xSource;
- int yMaxBackground;
- int flipX;
+ int _state;
+ int _gfxBackgroundOffset;
+ int _updateDelay;
+ int _backgroundOffset;
+ int _stateIndex;
+ int _counter;
+ int _colorType;
+ int _animationFrame;
+ int _firstFrame;
+ uint8 *_animationData;
+ int _prevState;
+ int _defaultUpdateDelay;
+ int _xSource;
+ int _yMaxBackground;
+ bool _disabled;
+ bool _flipX;
+ bool _needUpdate;
+ bool _nextAnimationFrame;
+ bool _prevAnimationFrame;
};
struct CharPos {
- int xPos;
- int yPos;
- int xSize;
- int ySize;
- int xWalkTo;
- int yWalkTo;
- int flagNum;
- int flagValue;
- int direction;
- int name;
- int description;
+ int _xPos;
+ int _yPos;
+ int _xSize;
+ int _ySize;
+ int _xWalkTo;
+ int _yWalkTo;
+ int _flagNum;
+ int _flagValue;
+ int _direction;
+ int _name;
+ int _description;
};
struct SpriteFrame {
- int sourceOffset;
- int xOffset;
- int yOffset;
- int xSize;
- int ySize;
+ int _sourceOffset;
+ int _xOffset;
+ int _yOffset;
+ int _xSize;
+ int _ySize;
};
struct SpriteAnimation {
- int numParts;
- int rotateFlag;
- int firstFrameIndex;
+ int _numParts;
+ int _rotateFlag; // Useless variable
+ int _firstFrameIndex;
};
struct Data {
- int sourceOffset;
- int xSize;
- int ySize;
- int xDest;
- int yDest;
- int index;
+ int _sourceOffset;
+ int _xSize;
+ int _ySize;
+ int _xDest;
+ int _yDest;
+ int _index;
};
struct LocationAnimation {
- int graphicNum;
- int animInitCounter;
- int animCurrentCounter;
- int animLastCounter;
- int getFlag;
- int inventoryNum;
- int flagNum;
- int flagValue;
- int selectable;
- int standX;
- int standY;
- int drawFlag;
+ int _graphicNum;
+ int _animInitCounter;
+ int _animCurrentCounter;
+ int _animLastCounter;
+ int _getFlag;
+ int _inventoryNum;
+ int _flagNum;
+ int _flagValue;
+ int _selectable;
+ int _standX;
+ int _standY;
+ bool _drawFlag;
};
struct LocationObject {
- int xPos;
- int yPos;
- int xSize;
- int ySize;
- int textNum;
- int locationNum;
- int toX;
- int toY;
- int toX2;
- int toY2;
- int toWalkX2;
- int toWalkY2;
- int standX;
- int standY;
- int cursorNum;
+ int _xPos;
+ int _yPos;
+ int _xSize;
+ int _ySize;
+ int _textNum;
+ int _locationNum;
+ int _toX;
+ int _toY;
+ int _toX2;
+ int _toY2;
+ int _toWalkX2;
+ int _toWalkY2;
+ int _standX;
+ int _standY;
+ int _cursorNum;
};
struct LocationSound {
- int startFxSpriteState;
- int startFxSpriteNum;
- int updateType;
- int stopFxSpriteState;
- int stopFxSpriteNum;
- int offset;
- int type;
- int volume;
- int flagValueStartFx;
- int flagValueStopFx;
- int flagNum;
- int num;
+ int _startFxSpriteState;
+ int _startFxSpriteNum;
+ int _updateType;
+ int _stopFxSpriteState;
+ int _stopFxSpriteNum;
+ int _offset;
+ int _type;
+ int _volume;
+ int _flagValueStartFx;
+ int _flagValueStopFx;
+ int _flagNum;
+ int _num;
};
struct LocationMusic {
- int flag;
- int offset;
- int volume;
- int num;
+ int _flag;
+ int _offset;
+ int _volume;
+ int _num;
};
enum {
@@ -232,7 +232,7 @@ enum CompressedSoundType {
class CompressedSound {
public:
- CompressedSound() : _compressedSoundType(-1) {}
+ CompressedSound() : _compressedSoundType(-1), _compressedSoundFlags(0) {}
void openFile();
void closeFile();
@@ -284,7 +284,7 @@ protected:
int getRandomNumber();
void allocateBuffers();
void freeBuffers();
- void restart();
+ void resetVariables();
void mainLoop();
void waitForTimer(int ticksCount);
void parseEvents();
@@ -356,7 +356,7 @@ protected:
void drawCreditsString(int x, int y, int num);
void updateCharSpeechSound(bool displayText);
void updateItemsGfxColors(int bit0, int bit7);
- int testLocationMask(int x, int y);
+ bool testLocationMask(int x, int y);
int getStringWidth(int num, const uint8 *ptr);
int getPositionForLine(int num, const uint8 *ptr);
void resetCharacterAnimationIndex(int count);
@@ -369,7 +369,7 @@ protected:
int getObjectUnderCursor();
void setSelectedObjectKey();
void setCharacterAnimation(int count, int spr);
- int testLocationMaskArea(int xBase, int yBase, int xPos, int yPos);
+ bool testLocationMaskArea(int xBase, int yBase, int xPos, int yPos);
void handleMouseClickOnInventoryObject();
int setCharacterUnderCursor();
int setLocationAnimationUnderCursor();
@@ -377,7 +377,7 @@ protected:
void setActionState();
void playSpeechForAction(int i);
void drawSpeechText(int xStart, int y, const uint8 *dataPtr, int num, int color);
- int splitSpeechTextLines(const uint8 *dataPtr, int pos, int x, int &lineCharsCount, int &lineWidth);
+ bool splitSpeechTextLines(const uint8 *dataPtr, int pos, int x, int &lineCharsCount, int &lineWidth);
void drawSpeechTextLine(const uint8 *dataPtr, int pos, int count, int x, int y, uint8 color);
void redrawScreen(int offset);
void redrawScreenRect(const Common::Rect &clip, const Common::Rect &dirty);
@@ -578,7 +578,7 @@ protected:
void handleMeanwhileSequence();
void handleMapSequence();
void copyMapRect(int x, int y, int w, int h);
- int handleSpecialObjectSelectionSequence();
+ bool handleSpecialObjectSelectionSequence();
uint8 *loadFile(const char *filename, uint8 *p);
void loadImage(const char *filename, uint8 *dst, int a);
@@ -630,14 +630,14 @@ protected:
bool _gameDebug;
bool _displayGameHints;
int _execData3Counter;
- bool _displaySpeechText;
int _currentSaveLoadGameState;
-
int _gameHintsIndex;
int _gameHintsCounter;
- int _gameHintsDisplayText;
int _gameHintsStringNum;
+ bool _displaySpeechText;
+ bool _displayHintsText;
+
int _fileLoadSize;
uint8 *_loadTempBuf;
uint8 *_cursorGfxBuf;
@@ -685,7 +685,7 @@ protected:
int _switchPanelCounter;
int _conversationOptionsCount;
bool _fadedPanel;
- int _panelLockedFlag;
+ bool _panelLockedFlag;
int _conversationOptionLinesCount;
int _inventoryItemsState[50];
int _inventoryObjectsList[40];
@@ -742,22 +742,22 @@ protected:
int _actionObj1Type, _actionObj2Type;
int _actionObj1Num, _actionObj2Num;
bool _actionRequiresTwoObjects;
- int _actionVerbLocked;
+ bool _actionVerbLocked;
int _actionPosX;
int _actionPosY;
- int _selectedObjectLocationMask;
+ bool _selectedObjectLocationMask;
struct {
- int xDefaultPos;
- int yDefaultPos;
- int xPos;
- int yPos;
- int locationObject_locationNum;
- int locationObject_toX;
- int locationObject_toY;
- int locationObject_toX2;
- int locationObject_toY2;
- int locationObject_toWalkX2;
- int locationObject_toWalkY2;
+ int _xDefaultPos;
+ int _yDefaultPos;
+ int _xPos;
+ int _yPos;
+ int _locationObjectLocationNum;
+ int _locationObjectToX;
+ int _locationObjectToY;
+ int _locationObjectToX2;
+ int _locationObjectToY2;
+ int _locationObjectToWalkX2;
+ int _locationObjectToWalkY2;
} _selectedObject;
int _selectedCharacterDirection;
int _selectedCharacter2Num;
@@ -780,7 +780,7 @@ protected:
const uint8 *_tableInstructionsPtr;
int _tableInstructionObj1Table[6];
int _tableInstructionObj2Table[6];
- int _tableInstructionFlag;
+ bool _tableInstructionFlag;
int _tableInstructionItemNum1, _tableInstructionItemNum2;
int _instructionsActionsTable[6];
bool _validInstructionId;
@@ -810,21 +810,21 @@ protected:
int _characterAnimationIndex;
int _characterFacingDirection;
int _characterPrevFacingDirection;
- int _characterBackFrontFacing;
- int _characterPrevBackFrontFacing;
+ bool _characterBackFrontFacing;
+ bool _characterPrevBackFrontFacing;
int _characterAnimationNum;
int _noCharacterAnimationChange;
- int _changeBackgroundSprite;
int _characterSpriteAnimationFrameCounter;
- int _locationMaskIgnore;
+ bool _locationMaskIgnore;
int _locationMaskType;
int _locationMaskCounter;
- int _updateSpriteFlag1;
- int _updateSpriteFlag2;
int _handleMapCounter;
bool _noPositionChangeAfterMap;
+ bool _changeBackgroundSprite;
+ bool _updateSpriteFlag1;
+ bool _updateSpriteFlag2;
- int _mirroredDrawing;
+ bool _mirroredDrawing;
uint8 *_loadLocBufPtr;
uint8 *_backgroundSpriteDataPtr;
int _locationHeight;
@@ -848,7 +848,7 @@ protected:
int _updateLocation14ObjNum[10];
int _updateLocation14Delay[10];
int _updateLocationCounter2;
- int _updateLocationFlag;
+ bool _updateLocationFlag;
int _updateLocation70StringLen;
uint8 _updateLocation70String[20];
diff --git a/engines/util.h b/engines/util.h
index 53899cb341..0e7b1e118b 100644
--- a/engines/util.h
+++ b/engines/util.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef ENGINES_UTIL_H
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp
new file mode 100644
index 0000000000..c1ded75f02
--- /dev/null
+++ b/engines/voyeur/animation.cpp
@@ -0,0 +1,501 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/animation.h"
+#include "voyeur/staticres.h"
+#include "voyeur/voyeur.h"
+#include "common/endian.h"
+#include "common/memstream.h"
+#include "common/system.h"
+#include "audio/decoders/raw.h"
+#include "graphics/surface.h"
+
+namespace Voyeur {
+
+// Number of audio frames to keep audio track topped up when playing back video
+#define SOUND_FRAMES_READAHEAD 3
+
+RL2Decoder::RL2Decoder(Audio::Mixer::SoundType soundType) : _soundType(soundType) {
+ _paletteStart = 0;
+ _fileStream = nullptr;
+ _soundFrameNumber = -1;
+
+ _audioTrack = nullptr;
+ _videoTrack = nullptr;
+}
+
+RL2Decoder::~RL2Decoder() {
+ close();
+}
+
+bool RL2Decoder::loadVideo(int videoId) {
+ Common::String filename = Common::String::format("%s.rl2",
+ ::Voyeur::SZ_FILENAMES[videoId * 2]);
+ return loadRL2File(filename, false);
+}
+
+bool RL2Decoder::loadRL2File(const Common::String &file, bool palFlag) {
+ bool result = VideoDecoder::loadFile(file);
+ _paletteStart = palFlag ? 0 : 128;
+ return result;
+}
+
+bool RL2Decoder::loadStream(Common::SeekableReadStream *stream) {
+ close();
+
+ // Load basic file information
+ _fileStream = stream;
+ _header.load(stream);
+ _paletteStart = 0;
+
+ // Check RL2 magic number
+ if (!_header.isValid()) {
+ warning("RL2Decoder::loadStream(): attempted to load non-RL2 data (0x%08X)", _header._signature);
+ return false;
+ }
+
+ // Add an audio track if sound is present
+ _audioTrack = nullptr;
+ if (_header._soundRate) {
+ _audioTrack = new RL2AudioTrack(_header, stream, _soundType);
+ addTrack(_audioTrack);
+ }
+
+ // Create a video track
+ _videoTrack = new RL2VideoTrack(_header, _audioTrack, stream);
+ addTrack(_videoTrack);
+
+ // Load the offset/sizes of the video's audio data
+ _soundFrames.reserve(_header._numFrames);
+ for (int frameNumber = 0; frameNumber < _header._numFrames; ++frameNumber) {
+ int offset = _header._frameOffsets[frameNumber];
+ int size = _header._frameSoundSizes[frameNumber];
+
+ _soundFrames.push_back(SoundFrame(offset, size));
+ }
+
+ return true;
+}
+
+const Common::List<Common::Rect> *RL2Decoder::getDirtyRects() const {
+ if (_videoTrack)
+ return _videoTrack->getDirtyRects();
+
+ return nullptr;
+}
+
+void RL2Decoder::clearDirtyRects() {
+ if (_videoTrack)
+ _videoTrack->clearDirtyRects();
+}
+
+void RL2Decoder::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) {
+ if (_videoTrack)
+ _videoTrack->copyDirtyRectsToBuffer(dst, pitch);
+}
+
+void RL2Decoder::readNextPacket() {
+ int frameNumber = getCurFrame();
+ RL2AudioTrack *audioTrack = getRL2AudioTrack();
+
+ // Handle queueing sound data
+ if (_soundFrameNumber == -1)
+ _soundFrameNumber = (frameNumber == -1) ? 0 : frameNumber;
+
+ while (audioTrack->numQueuedStreams() < SOUND_FRAMES_READAHEAD &&
+ (_soundFrameNumber < (int)_soundFrames.size())) {
+ _fileStream->seek(_soundFrames[_soundFrameNumber]._offset);
+ audioTrack->queueSound(_fileStream, _soundFrames[_soundFrameNumber]._size);
+ ++_soundFrameNumber;
+ }
+}
+
+bool RL2Decoder::seekIntern(const Audio::Timestamp &where) {
+ _soundFrameNumber = -1;
+ return VideoDecoder::seekIntern(where);
+}
+
+void RL2Decoder::close() {
+ VideoDecoder::close();
+ delete _fileStream;
+ _fileStream = nullptr;
+ _soundFrameNumber = -1;
+}
+
+/*------------------------------------------------------------------------*/
+
+RL2Decoder::SoundFrame::SoundFrame(int offset, int size) {
+ _offset = offset;
+ _size = size;
+}
+
+/*------------------------------------------------------------------------*/
+
+RL2Decoder::RL2FileHeader::RL2FileHeader() {
+ _frameOffsets = nullptr;
+ _frameSoundSizes = nullptr;
+
+ _channels = 0;
+ _colorCount = 0;
+ _numFrames = 0;
+ _rate = 0;
+ _soundRate = 0;
+ _videoBase = 0;
+ _backSize = 0;
+ _signature = MKTAG('N', 'O', 'N', 'E');
+ _form = 0;
+ _dataSize = 0;
+ _method = 0;
+ _defSoundSize = 0;
+}
+
+RL2Decoder::RL2FileHeader::~RL2FileHeader() {
+ delete[] _frameOffsets;
+ delete[] _frameSoundSizes;
+}
+
+void RL2Decoder::RL2FileHeader::load(Common::SeekableReadStream *stream) {
+ stream->seek(0);
+
+ _form = stream->readUint32LE();
+ _backSize = stream->readUint32LE();
+ _signature = stream->readUint32BE();
+
+ if (!isValid())
+ return;
+
+ _dataSize = stream->readUint32LE();
+ _numFrames = stream->readUint32LE();
+ _method = stream->readUint16LE();
+ _soundRate = stream->readUint16LE();
+ _rate = stream->readUint16LE();
+ _channels = stream->readUint16LE();
+ _defSoundSize = stream->readUint16LE();
+ _videoBase = stream->readUint16LE();
+ _colorCount = stream->readUint32LE();
+ assert(_colorCount <= 256);
+
+ stream->read(_palette, 768);
+
+ // Skip over background frame, if any, and the list of overall frame sizes (which we don't use)
+ stream->skip(_backSize + 4 * _numFrames);
+
+ // Load frame offsets
+ delete[] _frameOffsets;
+ _frameOffsets = new uint32[_numFrames];
+ for (int i = 0; i < _numFrames; ++i)
+ _frameOffsets[i] = stream->readUint32LE();
+
+ // Load the size of the sound portion of each frame
+ delete[] _frameSoundSizes;
+ _frameSoundSizes = new int[_numFrames];
+ for (int i = 0; i < _numFrames; ++i)
+ _frameSoundSizes[i] = stream->readUint32LE() & 0xffff;
+}
+
+bool RL2Decoder::RL2FileHeader::isValid() const {
+ return _signature == MKTAG('R','L','V','2') || _signature == MKTAG('R','L','V','3');
+}
+
+Common::Rational RL2Decoder::RL2FileHeader::getFrameRate() const {
+ return (_soundRate > 0) ? Common::Rational(_rate, _defSoundSize) :
+ Common::Rational(11025, 1103);
+}
+
+/*------------------------------------------------------------------------*/
+
+RL2Decoder::RL2VideoTrack::RL2VideoTrack(const RL2FileHeader &header, RL2AudioTrack *audioTrack,
+ Common::SeekableReadStream *stream): _header(header), _fileStream(stream) {
+
+ _frameOffsets = nullptr;
+
+ // Set up surfaces
+ _surface = new Graphics::Surface();
+ _surface->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
+ _backSurface = nullptr;
+
+ _hasBackFrame = header._backSize != 0;
+ if (_hasBackFrame)
+ initBackSurface();
+
+ _videoBase = header._videoBase;
+ _dirtyPalette = header._colorCount > 0;
+
+ _curFrame = -1;
+ _initialFrame = true;
+}
+
+RL2Decoder::RL2VideoTrack::~RL2VideoTrack() {
+ // Free surfaces
+ _surface->free();
+ delete _surface;
+ if (_backSurface) {
+ _backSurface->free();
+ delete _backSurface;
+ }
+}
+
+void RL2Decoder::RL2VideoTrack::initBackSurface() {
+ _backSurface = new Graphics::Surface();
+ _backSurface->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
+}
+
+bool RL2Decoder::RL2VideoTrack::seek(const Audio::Timestamp &time) {
+ int frame = getFrameAtTime(time);
+
+ if (frame < 0 || frame >= _header._numFrames)
+ return false;
+
+ _curFrame = frame;
+ return true;
+}
+
+uint16 RL2Decoder::RL2VideoTrack::getWidth() const {
+ return _surface->w;
+}
+
+uint16 RL2Decoder::RL2VideoTrack::getHeight() const {
+ return _surface->h;
+}
+
+Graphics::PixelFormat RL2Decoder::RL2VideoTrack::getPixelFormat() const {
+ return _surface->format;
+}
+
+const Graphics::Surface *RL2Decoder::RL2VideoTrack::decodeNextFrame() {
+ if (_initialFrame && _hasBackFrame) {
+ // Read in the initial background frame
+ _fileStream->seek(0x324);
+ rl2DecodeFrameWithoutTransparency(0);
+
+ Common::copy((byte *)_surface->getPixels(), (byte *)_surface->getPixels() + (320 * 200),
+ (byte *)_backSurface->getPixels());
+ _dirtyRects.push_back(Common::Rect(0, 0, _surface->w, _surface->h));
+ _initialFrame = false;
+ }
+
+ // Move to the next frame data
+ _fileStream->seek(_header._frameOffsets[++_curFrame]);
+
+ // If there's any sound data, pass it to the audio track
+ _fileStream->seek(_header._frameSoundSizes[_curFrame], SEEK_CUR);
+
+ // Decode the graphic data using the appropriate method depending on whether the animation
+ // has a background or just raw frames without any background transparency
+ if (_backSurface) {
+ rl2DecodeFrameWithTransparency(_videoBase);
+ } else {
+ rl2DecodeFrameWithoutTransparency(_videoBase);
+ }
+
+ return _surface;
+}
+
+void RL2Decoder::RL2VideoTrack::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) {
+ for (Common::List<Common::Rect>::const_iterator it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
+ for (int y = (*it).top; y < (*it).bottom; ++y) {
+ const int x = (*it).left;
+ memcpy(dst + y * pitch + x, (byte *)_surface->getPixels() + y * getWidth() + x, (*it).right - x);
+ }
+ }
+
+ clearDirtyRects();
+}
+
+void RL2Decoder::RL2VideoTrack::copyFrame(uint8 *data) {
+ memcpy((byte *)_surface->getPixels(), data, getWidth() * getHeight());
+
+ // Redraw
+ _dirtyRects.clear();
+ _dirtyRects.push_back(Common::Rect(0, 0, getWidth(), getHeight()));
+}
+
+void RL2Decoder::RL2VideoTrack::rl2DecodeFrameWithoutTransparency(int screenOffset) {
+ if (screenOffset == -1)
+ screenOffset = _videoBase;
+ int frameSize = _surface->w * _surface->h - screenOffset;
+ byte *destP = (byte *)_surface->getPixels();
+
+ // Main frame decode loop
+ byte nextByte;
+ for (;;) {
+ nextByte = _fileStream->readByte();
+
+ if (nextByte < 0x80) {
+ // Simple byte to copy to output
+ assert(frameSize > 0);
+ *destP++ = nextByte;
+ --frameSize;
+ } else if (nextByte > 0x80) {
+ // Lower 7 bits a run length for the following byte
+ int runLength = _fileStream->readByte();
+ runLength = MIN(runLength, frameSize);
+
+ Common::fill(destP, destP + runLength, nextByte & 0x7f);
+ destP += runLength;
+ frameSize -= runLength;
+ } else {
+ // Follow byte run length for zeroes. If zero, indicates end of image
+ int runLength = _fileStream->readByte();
+ if (runLength == 0)
+ break;
+
+ runLength = MIN(runLength, frameSize);
+ Common::fill(destP, destP + runLength, 0);
+ destP += runLength;
+ frameSize -= runLength;
+ }
+ }
+
+ // If there's any remaining screen area, zero it out
+ byte *endP = (byte *)_surface->getPixels() + _surface->w * _surface->h;
+ if (destP != endP)
+ Common::fill(destP, endP, 0);
+}
+
+void RL2Decoder::RL2VideoTrack::rl2DecodeFrameWithTransparency(int screenOffset) {
+ int frameSize = _surface->w * _surface->h - screenOffset;
+ byte *refP = (byte *)_backSurface->getPixels();
+ byte *destP = (byte *)_surface->getPixels();
+
+ // If there's a screen offset, copy unchanged initial pixels from reference surface
+ if (screenOffset > 0)
+ Common::copy(refP, refP + screenOffset, destP);
+
+ // Main decode loop
+ while (frameSize > 0) {
+ byte nextByte = _fileStream->readByte();
+
+ if (nextByte == 0) {
+ // Move one single byte from reference surface
+ assert(frameSize > 0);
+ destP[screenOffset] = refP[screenOffset];
+ ++screenOffset;
+ --frameSize;
+ } else if (nextByte < 0x80) {
+ // Single 7-bit pixel to output (128-255)
+ assert(frameSize > 0);
+ destP[screenOffset] = nextByte | 0x80;
+ ++screenOffset;
+ --frameSize;
+ } else if (nextByte == 0x80) {
+ int runLength = _fileStream->readByte();
+ if (runLength == 0)
+ return;
+
+ // Run length of transparency (i.e. pixels to copy from reference frame)
+ runLength = MIN(runLength, frameSize);
+
+ Common::copy(refP + screenOffset, refP + screenOffset + runLength, destP + screenOffset);
+ screenOffset += runLength;
+ frameSize -= runLength;
+ } else {
+ // Run length of a single pixel value
+ int runLength = _fileStream->readByte();
+ runLength = MIN(runLength, frameSize);
+
+ Common::fill(destP + screenOffset, destP + screenOffset + runLength, nextByte);
+ screenOffset += runLength;
+ frameSize -= runLength;
+ }
+ }
+
+ // If there's a remaining section of the screen not covered, copy it from reference surface
+ if (screenOffset < (_surface->w * _surface->h))
+ Common::copy(refP + screenOffset, refP + (_surface->w * _surface->h), destP + screenOffset);
+}
+
+Graphics::Surface *RL2Decoder::RL2VideoTrack::getBackSurface() {
+ if (!_backSurface)
+ initBackSurface();
+
+ return _backSurface;
+}
+
+/*------------------------------------------------------------------------*/
+
+RL2Decoder::RL2AudioTrack::RL2AudioTrack(const RL2FileHeader &header, Common::SeekableReadStream *stream, Audio::Mixer::SoundType soundType):
+ _header(header), _soundType(soundType) {
+ // Create audio straem for the audio track
+ _audStream = Audio::makeQueuingAudioStream(_header._rate, _header._channels == 2);
+}
+
+RL2Decoder::RL2AudioTrack::~RL2AudioTrack() {
+ delete _audStream;
+}
+
+void RL2Decoder::RL2AudioTrack::queueSound(Common::SeekableReadStream *stream, int size) {
+ // Queue the sound data
+ byte *data = (byte *)malloc(size);
+ stream->read(data, size);
+ Common::MemoryReadStream *memoryStream = new Common::MemoryReadStream(data, size,
+ DisposeAfterUse::YES);
+
+ _audStream->queueAudioStream(Audio::makeRawStream(memoryStream, _header._rate,
+ Audio::FLAG_UNSIGNED, DisposeAfterUse::YES), DisposeAfterUse::YES);
+}
+
+Audio::AudioStream *RL2Decoder::RL2AudioTrack::getAudioStream() const {
+ return _audStream;
+}
+
+void RL2Decoder::play(VoyeurEngine *vm, int resourceOffset,
+ byte *frames, byte *imgPos) {
+ vm->flipPageAndWait();
+ int paletteStart = getPaletteStart();
+ int paletteCount = getPaletteCount();
+
+ PictureResource videoFrame(getRL2VideoTrack()->getBackSurface());
+ int picCtr = 0;
+ while (!vm->shouldQuit() && !endOfVideo() && !vm->_eventsManager->_mouseClicked) {
+ if (hasDirtyPalette()) {
+ const byte *palette = getPalette();
+
+ vm->_graphicsManager->setPalette128(palette, paletteStart, paletteCount);
+ }
+
+ if (needsUpdate()) {
+ if (frames) {
+ // If reached a point where a new background is needed, load it
+ // and copy over to the video decoder
+ if (getCurFrame() >= READ_LE_UINT16(frames + picCtr * 4)) {
+ PictureResource *newPic = vm->_bVoy->boltEntry(0x302 + picCtr)._picResource;
+ Common::Point pt(READ_LE_UINT16(imgPos + 4 * picCtr) - 32,
+ READ_LE_UINT16(imgPos + 4 * picCtr + 2) - 20);
+
+ vm->_graphicsManager->sDrawPic(newPic, &videoFrame, pt);
+ ++picCtr;
+ }
+ }
+
+ // Decode the next frame and display
+ const Graphics::Surface *frame = decodeNextFrame();
+ Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200,
+ (byte *)vm->_graphicsManager->_screenSurface.getPixels());
+ }
+
+ vm->_eventsManager->getMouseInfo();
+ g_system->delayMillis(10);
+ }
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h
new file mode 100644
index 0000000000..b17e998214
--- /dev/null
+++ b/engines/voyeur/animation.h
@@ -0,0 +1,195 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_ANIMATION_H
+#define VOYEUR_ANIMATION_H
+
+#include "video/video_decoder.h"
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+#include "audio/timestamp.h"
+#include "common/array.h"
+#include "common/list.h"
+#include "common/rect.h"
+#include "common/stream.h"
+#include "voyeur/files.h"
+
+namespace Voyeur {
+
+class VoyeurEngine;
+
+/**
+ * Decoder for RL2 videos.
+ *
+ * Video decoder used in engines:
+ * - voyeur
+ */
+class RL2Decoder : public Video::VideoDecoder {
+private:
+ class RL2FileHeader {
+ public:
+ RL2FileHeader();
+ ~RL2FileHeader();
+
+ int _channels;
+ int _colorCount;
+ int _numFrames;
+ int _rate;
+ int _soundRate;
+ int _videoBase;
+ int *_frameSoundSizes;
+
+ uint32 _backSize;
+ uint32 _signature;
+ uint32 *_frameOffsets;
+
+ byte _palette[768];
+
+ void load(Common::SeekableReadStream *stream);
+ Common::Rational getFrameRate() const;
+ bool isValid() const;
+
+ private:
+ uint32 _form; // Unused variable
+ uint32 _dataSize; // Unused variable
+ int _method; // Unused variable
+ int _defSoundSize;
+ };
+
+ class SoundFrame {
+ public:
+ int _offset;
+ int _size;
+
+ SoundFrame(int offset, int size);
+ };
+
+ class RL2AudioTrack : public AudioTrack {
+ private:
+ Audio::Mixer::SoundType _soundType;
+ const RL2FileHeader &_header;
+ Audio::QueuingAudioStream *_audStream;
+ protected:
+ Audio::AudioStream *getAudioStream() const;
+ public:
+ RL2AudioTrack(const RL2FileHeader &header, Common::SeekableReadStream *stream,
+ Audio::Mixer::SoundType soundType);
+ ~RL2AudioTrack();
+
+ Audio::Mixer::SoundType getSoundType() const { return _soundType; }
+ int numQueuedStreams() const { return _audStream->numQueuedStreams(); }
+ virtual bool isSeekable() const { return true; }
+ virtual bool seek(const Audio::Timestamp &time) { return true; }
+
+ void queueSound(Common::SeekableReadStream *stream, int size);
+ };
+
+ class RL2VideoTrack : public FixedRateVideoTrack {
+ public:
+ RL2VideoTrack(const RL2FileHeader &header, RL2AudioTrack *audioTrack,
+ Common::SeekableReadStream *stream);
+ ~RL2VideoTrack();
+
+ uint16 getWidth() const;
+ uint16 getHeight() const;
+ Graphics::Surface *getSurface() { return _surface; }
+ Graphics::Surface *getBackSurface();
+ Graphics::PixelFormat getPixelFormat() const;
+ int getCurFrame() const { return _curFrame; }
+ int getFrameCount() const { return _header._numFrames; }
+ const Graphics::Surface *decodeNextFrame();
+ const byte *getPalette() const { _dirtyPalette = false; return _header._palette; }
+ int getPaletteCount() const { return _header._colorCount; }
+ bool hasDirtyPalette() const { return _dirtyPalette; }
+ const Common::List<Common::Rect> *getDirtyRects() const { return &_dirtyRects; }
+ void clearDirtyRects() { _dirtyRects.clear(); }
+ void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
+
+ virtual Common::Rational getFrameRate() const { return _header.getFrameRate(); }
+ virtual bool isSeekable() const { return true; }
+ virtual bool seek(const Audio::Timestamp &time);
+ private:
+ Common::SeekableReadStream *_fileStream;
+ const RL2FileHeader &_header;
+ Graphics::Surface *_surface;
+ Graphics::Surface *_backSurface;
+ bool _hasBackFrame;
+
+ mutable bool _dirtyPalette;
+
+ bool _initialFrame;
+ int _curFrame;
+ uint32 _videoBase;
+ uint32 *_frameOffsets;
+
+ Common::List<Common::Rect> _dirtyRects;
+
+ void copyFrame(uint8 *data);
+ void rl2DecodeFrameWithTransparency(int screenOffset);
+ void rl2DecodeFrameWithoutTransparency(int screenOffset = -1);
+ void initBackSurface();
+ };
+
+private:
+ RL2AudioTrack *_audioTrack;
+ RL2VideoTrack *_videoTrack;
+ Common::SeekableReadStream *_fileStream;
+ Audio::Mixer::SoundType _soundType;
+ RL2FileHeader _header;
+ int _paletteStart;
+ Common::Array<SoundFrame> _soundFrames;
+ int _soundFrameNumber;
+ const Common::List<Common::Rect> *getDirtyRects() const;
+
+ void clearDirtyRects();
+ void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
+ int getPaletteStart() const { return _paletteStart; }
+ const RL2FileHeader &getHeader() { return _header; }
+ virtual void readNextPacket();
+ virtual bool seekIntern(const Audio::Timestamp &time);
+
+public:
+ RL2Decoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
+ virtual ~RL2Decoder();
+
+ virtual void close();
+
+ bool loadStream(Common::SeekableReadStream *stream);
+ bool loadRL2File(const Common::String &file, bool palFlag);
+ bool loadVideo(int videoId);
+ int getPaletteCount() const { return _header._colorCount; }
+
+ /**
+ * Play back a given Voyeur RL2 video
+ * @param vm Engine reference
+ * @param resourceOffset Starting resource to use for frame pictures
+ * @param frames Optional frame numbers resource for when to apply image data
+ * @param imgPos Position to draw image data
+ */
+ void play(VoyeurEngine *vm, int resourceOffset = 0, byte *frames = NULL, byte *imgPos = NULL);
+ RL2VideoTrack *getRL2VideoTrack() { return _videoTrack; }
+ RL2AudioTrack *getRL2AudioTrack() { return _audioTrack; }
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_ANIMATION_H */
diff --git a/engines/voyeur/configure.engine b/engines/voyeur/configure.engine
new file mode 100644
index 0000000000..23891fccb7
--- /dev/null
+++ b/engines/voyeur/configure.engine
@@ -0,0 +1,4 @@
+
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine voyeur "Voyeur" no
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
new file mode 100644
index 0000000000..cc0b81a313
--- /dev/null
+++ b/engines/voyeur/data.cpp
@@ -0,0 +1,371 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/data.h"
+#include "voyeur/voyeur.h"
+
+namespace Voyeur {
+
+void VoyeurEvent::synchronize(Common::Serializer &s) {
+ s.syncAsByte(_hour);
+ s.syncAsByte(_minute);
+ s.syncAsByte(_isAM);
+ s.syncAsByte(_type);
+ s.syncAsSint16LE(_audioVideoId);
+ s.syncAsSint16LE(_computerOn);
+ s.syncAsSint16LE(_computerOff);
+ s.syncAsSint16LE(_dead);
+}
+
+/*------------------------------------------------------------------------*/
+
+SVoy::SVoy(VoyeurEngine *vm):_vm(vm) {
+ // Initialize all the data fields
+ _abortInterface = false;
+ _isAM = false;
+ Common::fill(&_phoneCallsReceived[0], &_phoneCallsReceived[5], false);
+ Common::fill(&_roomHotspotsEnabled[0], &_roomHotspotsEnabled[20], false);
+ _victimMurdered = false;
+
+ _audioVisualStartTime = 0;
+ _audioVisualDuration = 0;
+ _boltGroupId2 = 0;
+ _computerTextId = -1;
+ _computerTimeMin = _computerTimeMax = 0;
+ _eventCount = 0;
+ _fadingStep1 = 0;
+ _fadingStep2 = 0;
+ _fadingType = 0;
+ _incriminatedVictimNumber = 0;
+ _musicStartTime = 0;
+ _playStampMode = 0;
+ _switchBGNum = 0;
+ _transitionId = 0;
+ _victimNumber = 0;
+ _videoEventId = 0;
+ _vocSecondsOffset = 0;
+ _RTANum = 0;
+ _RTVLimit = 0;
+ _RTVNum = 0;
+ _viewBounds = nullptr;
+ Common::fill(&_evPicPtrs[0], &_evPicPtrs[6], (PictureResource *)nullptr);
+ Common::fill(&_evCmPtrs[0], &_evCmPtrs[6], (CMapResource *)nullptr);
+ _policeEvent = 0;
+
+ _eventFlags = EVTFLAG_TIME_DISABLED;
+ _fadingAmount1 = _fadingAmount2 = 127;
+ _murderThreshold = 9999;
+ _aptLoadMode = -1;
+ _eventFlags |= EVTFLAG_100;
+ _totalPhoneCalls = 0;
+
+ for (int i = 0; i < 6; i++)
+ _evPicPtrs[i] = nullptr;
+ for (int i = 0; i < 1000; i++) {
+ _events[i]._hour = 0;
+ _events[i]._minute = 0;
+ _events[i]._isAM = true;
+ _events[i]._type = EVTYPE_NONE;
+ _events[i]._audioVideoId = -1;
+ _events[i]._computerOn = 0;
+ _events[i]._computerOff = 0;
+ _events[i]._dead = 0;
+ }
+ for (int i = 0; i < 6; i++)
+ _evCmPtrs[i] = nullptr;
+}
+
+void SVoy::addEvent(int hour, int minute, VoyeurEventType type, int audioVideoId,
+ int on, int off, int dead) {
+ VoyeurEvent &e = _events[_eventCount++];
+
+ e._type = type;
+ e._hour = hour;
+ e._minute = minute;
+ e._isAM = hour < 12;
+ e._audioVideoId = audioVideoId;
+ e._computerOn = on;
+ e._computerOff = off;
+ e._dead = dead;
+}
+
+void SVoy::synchronize(Common::Serializer &s) {
+ s.syncAsByte(_isAM);
+ s.syncAsSint16LE(_RTANum);
+ s.syncAsSint16LE(_RTVNum);
+ s.syncAsSint16LE(_switchBGNum);
+
+ _videoHotspotTimes.synchronize(s);
+ _audioHotspotTimes.synchronize(s);
+ _evidenceHotspotTimes.synchronize(s);
+
+ for (int idx = 0; idx < 20; ++idx) {
+ s.syncAsByte(_roomHotspotsEnabled[idx]);
+ }
+
+ s.syncAsSint16LE(_audioVisualStartTime);
+ s.syncAsSint16LE(_audioVisualDuration);
+ s.syncAsSint16LE(_vocSecondsOffset);
+ s.syncAsSint16LE(_abortInterface);
+ s.syncAsSint16LE(_playStampMode);
+ s.syncAsSint16LE(_aptLoadMode);
+ s.syncAsSint16LE(_transitionId);
+ s.syncAsSint16LE(_RTVLimit);
+ s.syncAsSint16LE(_eventFlags);
+ s.syncAsSint16LE(_boltGroupId2);
+
+ s.syncAsSint16LE(_musicStartTime);
+ s.syncAsSint16LE(_totalPhoneCalls);
+ s.syncAsSint16LE(_computerTextId);
+ s.syncAsSint16LE(_computerTimeMin);
+ s.syncAsSint16LE(_computerTimeMax);
+ s.syncAsSint16LE(_victimMurdered);
+ s.syncAsSint16LE(_murderThreshold);
+
+ // Events
+ s.syncAsUint16LE(_eventCount);
+ for (int idx = 0; idx < _eventCount; ++idx)
+ _events[idx].synchronize(s);
+
+ s.syncAsSint16LE(_fadingAmount1);
+ s.syncAsSint16LE(_fadingAmount2);
+ s.syncAsSint16LE(_fadingStep1);
+ s.syncAsSint16LE(_fadingStep2);
+ s.syncAsSint16LE(_fadingType);
+ s.syncAsSint16LE(_victimNumber);
+ s.syncAsSint16LE(_incriminatedVictimNumber);
+ s.syncAsSint16LE(_videoEventId);
+
+ if (s.isLoading()) {
+ // Reset apartment loading mode to initial game value
+ _aptLoadMode = 140;
+ _viewBounds = nullptr;
+ }
+}
+
+void SVoy::addVideoEventStart() {
+ VoyeurEvent &e = _events[_eventCount];
+ e._hour = _vm->_gameHour;
+ e._minute = _vm->_gameMinute;
+ e._isAM = _isAM;
+ e._type = EVTYPE_VIDEO;
+ e._audioVideoId = _vm->_audioVideoId;
+ e._computerOn = _vocSecondsOffset;
+ e._dead = _vm->_eventsManager->_videoDead;
+}
+
+void SVoy::addVideoEventEnd() {
+ VoyeurEvent &e = _events[_eventCount];
+ e._computerOff = _RTVNum - _audioVisualStartTime - _vocSecondsOffset;
+ if (_eventCount < (TOTAL_EVENTS - 1))
+ ++_eventCount;
+}
+
+void SVoy::addAudioEventStart() {
+ VoyeurEvent &e = _events[_eventCount];
+ e._hour = _vm->_gameHour;
+ e._minute = _vm->_gameMinute;
+ e._isAM = _isAM;
+ e._type = EVTYPE_AUDIO;
+ e._audioVideoId = _vm->_audioVideoId;
+ e._computerOn = _vocSecondsOffset;
+ e._dead = _vm->_eventsManager->_videoDead;
+}
+
+void SVoy::addAudioEventEnd() {
+ VoyeurEvent &e = _events[_eventCount];
+ e._computerOff = _RTVNum - _audioVisualStartTime - _vocSecondsOffset;
+ if (_eventCount < (TOTAL_EVENTS - 1))
+ ++_eventCount;
+}
+
+void SVoy::addEvidEventStart(int v) {
+ VoyeurEvent &e = _events[_eventCount];
+ e._hour = _vm->_gameHour;
+ e._minute = _vm->_gameMinute;
+ e._isAM = _isAM;
+ e._type = EVTYPE_EVID;
+ e._audioVideoId = _vm->_playStampGroupId;
+ e._computerOn = _boltGroupId2;
+ e._computerOff = v;
+}
+
+void SVoy::addEvidEventEnd(int totalPages) {
+ VoyeurEvent &e = _events[_eventCount];
+ e._dead = totalPages;
+ if (_eventCount < (TOTAL_EVENTS - 1))
+ ++_eventCount;
+}
+
+void SVoy::addComputerEventStart() {
+ VoyeurEvent &e = _events[_eventCount];
+ e._hour = _vm->_gameHour;
+ e._minute = _vm->_gameMinute;
+ e._isAM = _isAM;
+ e._type = EVTYPE_COMPUTER;
+ e._audioVideoId = _vm->_playStampGroupId;
+ e._computerOn = _computerTextId;
+}
+
+void SVoy::addComputerEventEnd(int v) {
+ VoyeurEvent &e = _events[_eventCount];
+ e._computerOff = v;
+ if (_eventCount < (TOTAL_EVENTS - 1))
+ ++_eventCount;
+}
+
+void SVoy::reviewAnEvidEvent(int eventIndex) {
+ VoyeurEvent &e = _events[eventIndex];
+ _vm->_playStampGroupId = e._audioVideoId;
+ _boltGroupId2 = e._computerOn;
+ int frameOff = e._computerOff;
+
+ if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) {
+ _vm->_graphicsManager->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource;
+ _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource;
+ _vm->_graphicsManager->_vPort->setupViewPort(_vm->_graphicsManager->_backgroundPage);
+ _vm->_graphicsManager->_backColors->startFade();
+
+ _vm->doEvidDisplay(frameOff, e._dead);
+ _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
+ _vm->_playStampGroupId = -1;
+
+ if (_boltGroupId2 != -1) {
+ _vm->_bVoy->freeBoltGroup(_boltGroupId2);
+ _boltGroupId2 = -1;
+ }
+ }
+}
+
+void SVoy::reviewComputerEvent(int eventIndex) {
+ VoyeurEvent &e = _events[eventIndex];
+ _vm->_playStampGroupId = e._audioVideoId;
+ _computerTextId = e._computerOn;
+
+ if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) {
+ _vm->_graphicsManager->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource;
+ _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource;
+ _vm->_graphicsManager->_vPort->setupViewPort(_vm->_graphicsManager->_backgroundPage);
+ _vm->_graphicsManager->_backColors->startFade();
+ _vm->flipPageAndWaitForFade();
+
+ _vm->getComputerBrush();
+ _vm->flipPageAndWait();
+ _vm->doComputerText(e._computerOff);
+
+ _vm->_bVoy->freeBoltGroup(0x4900);
+ _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
+ _vm->_playStampGroupId = -1;
+ }
+}
+
+bool SVoy::checkForKey() {
+ StateResource *state = _vm->_controlPtr->_state;
+ state->_victimEvidenceIndex = 0;
+ if (_vm->_voy->_victimMurdered)
+ return false;
+
+ for (int eventIdx = 0; eventIdx < _eventCount; ++eventIdx) {
+ VoyeurEvent &e = _events[eventIdx];
+
+ switch (e._type) {
+ case EVTYPE_VIDEO:
+ switch (state->_victimIndex) {
+ case 1:
+ if (e._audioVideoId == 33 && e._computerOn < 2 && e._computerOff >= 38)
+ state->_victimEvidenceIndex = 1;
+ break;
+
+ case 2:
+ if (e._audioVideoId == 47 && e._computerOn < 2 && e._computerOff >= 9)
+ state->_victimEvidenceIndex = 2;
+ break;
+
+ case 3:
+ if (e._audioVideoId == 46 && e._computerOn < 2 && e._computerOff > 2)
+ state->_victimEvidenceIndex = 3;
+ break;
+
+ case 4:
+ if (e._audioVideoId == 40 && e._computerOn < 2 && e._computerOff > 6)
+ state->_victimEvidenceIndex = 4;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case EVTYPE_AUDIO:
+ switch (state->_victimIndex) {
+ case 1:
+ if (e._audioVideoId == 8 && e._computerOn < 2 && e._computerOff > 26)
+ state->_victimEvidenceIndex = 1;
+ break;
+
+ case 3:
+ if (e._audioVideoId == 20 && e._computerOn < 2 && e._computerOff > 28)
+ state->_victimEvidenceIndex = 3;
+ if (e._audioVideoId == 35 && e._computerOn < 2 && e._computerOff > 18)
+ state->_victimEvidenceIndex = 3;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case EVTYPE_EVID:
+ switch (state->_victimIndex) {
+ case 4:
+ if (e._audioVideoId == 0x2400 && e._computerOn == 0x4f00 && e._computerOff == 17)
+ state->_victimEvidenceIndex = 4;
+
+ default:
+ break;
+ }
+ break;
+
+ case EVTYPE_COMPUTER:
+ switch (state->_victimIndex) {
+ case 2:
+ if (e._computerOn == 13 && e._computerOff > 76)
+ state->_victimEvidenceIndex = 2;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (state->_victimEvidenceIndex == state->_victimIndex)
+ return true;
+ }
+
+ return false;
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h
new file mode 100644
index 0000000000..98c884d0c1
--- /dev/null
+++ b/engines/voyeur/data.h
@@ -0,0 +1,232 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_DATA_H
+#define VOYEUR_DATA_H
+
+#include "common/scummsys.h"
+#include "common/serializer.h"
+#include "voyeur/files.h"
+
+namespace Voyeur {
+
+#define TOTAL_EVENTS 1000
+
+enum VoyeurEventType {
+ EVTYPE_NONE = 0,
+ EVTYPE_VIDEO = 1,
+ EVTYPE_AUDIO = 2,
+ EVTYPE_EVID = 3,
+ EVTYPE_COMPUTER = 4
+};
+
+enum EventFlag { EVTFLAG_TIME_DISABLED = 1, EVTFLAG_2 = 2, EVTFLAG_8 = 8, EVTFLAG_RECORDING = 0x10,
+ EVTFLAG_40 = 0x40, EVTFLAG_VICTIM_PRESET = 0x80, EVTFLAG_100 = 0x100 };
+
+struct VoyeurEvent {
+ int _hour;
+ int _minute;
+ bool _isAM;
+ VoyeurEventType _type;
+ int _audioVideoId;
+ int _computerOn;
+ int _computerOff;
+ int _dead;
+
+ void synchronize(Common::Serializer &s);
+};
+
+class VoyeurEngne;
+
+/**
+ * Encapsulates a list of the time expired ranges that hotspots in the mansion
+ * view are enabled for in a given time period.
+ */
+template<int SLOTS>
+class HotspotTimes {
+public:
+ int _min[SLOTS][20]; // Min time expired
+ int _max[SLOTS][20]; // Max time expired
+
+ HotspotTimes() {
+ reset();
+ }
+
+ /**
+ * Resets the data to an initial state
+ */
+ void reset() {
+ for (int hotspotIdx = 0; hotspotIdx < 20; ++hotspotIdx) {
+ for (int slotIdx = 0; slotIdx < SLOTS; ++slotIdx) {
+ _min[slotIdx][hotspotIdx] = 9999;
+ _max[slotIdx][hotspotIdx] = 0;
+ }
+ }
+ }
+
+ /**
+ * Synchronise the data
+ */
+ void synchronize(Common::Serializer &s) {
+ for (int slotIndex = 0; slotIndex < SLOTS; ++slotIndex) {
+ for (int hotspotIndex = 0; hotspotIndex < 20; ++hotspotIndex) {
+ s.syncAsSint16LE(_min[slotIndex][hotspotIndex]);
+ s.syncAsSint16LE(_max[slotIndex][hotspotIndex]);
+ }
+ }
+ }
+
+ /**
+ * Returns true if the given value is in the range specified by the
+ * min and max at the given hotspot and slot indexes
+ */
+ bool isInRange(int slotIndex, int hotspotIndex, int v) const {
+ return _min[slotIndex][hotspotIndex] <= v &&
+ v < _max[slotIndex][hotspotIndex];
+ }
+};
+
+class SVoy {
+private:
+ VoyeurEngine *_vm;
+
+public:
+ bool _abortInterface;
+ bool _isAM;
+ bool _phoneCallsReceived[5];
+ bool _roomHotspotsEnabled[20];
+ bool _victimMurdered;
+
+ int _aptLoadMode;
+ int _audioVisualStartTime;
+ int _audioVisualDuration;
+ int _boltGroupId2;
+ int _computerTextId;
+ int _computerTimeMin;
+ int _computerTimeMax;
+ int _eventCount;
+ int _eventFlags;
+ int _fadingAmount1;
+ int _fadingAmount2;
+ int _fadingStep1;
+ int _fadingStep2;
+ int _fadingType;
+ int _incriminatedVictimNumber;
+ int _murderThreshold;
+ int _musicStartTime;
+ int _playStampMode;
+ int _switchBGNum;
+ int _totalPhoneCalls;
+ int _transitionId;
+ int _victimNumber;
+ int _videoEventId;
+ int _vocSecondsOffset;
+ int _RTANum;
+ int _RTVLimit;
+ int _RTVNum;
+
+ HotspotTimes<3> _audioHotspotTimes;
+ HotspotTimes<3> _evidenceHotspotTimes;
+ HotspotTimes<8> _videoHotspotTimes;
+
+ Common::Rect _computerScreenRect;
+ RectResource *_viewBounds;
+ PictureResource *_evPicPtrs[6];
+ CMapResource *_evCmPtrs[6];
+ VoyeurEvent _events[TOTAL_EVENTS];
+
+ SVoy(VoyeurEngine *vm);
+
+ /**
+ * Synchronize the data
+ */
+ void synchronize(Common::Serializer &s);
+
+ /**
+ * Add an event to the list of game events that have occurred
+ */
+ void addEvent(int hour, int minute, VoyeurEventType type, int audioVideoId,
+ int on, int off, int dead);
+
+ /**
+ * Adds the start of a video event happening
+ */
+ void addVideoEventStart();
+
+ /**
+ * Adds the finish of a video event happening
+ */
+ void addVideoEventEnd();
+
+ /**
+ * Adds the start of an audio event happening
+ */
+ void addAudioEventStart();
+
+ /**
+ * Adsd the finish of an audio event happening
+ */
+ void addAudioEventEnd();
+
+ /**
+ * Adds the start of an evidence event happening
+ */
+ void addEvidEventStart(int v);
+
+ /**
+ * Adds the finish of an evidence event happening
+ */
+ void addEvidEventEnd(int totalPages);
+
+ /**
+ * Adds the start of a computer event happening
+ */
+ void addComputerEventStart();
+
+ /**
+ * Adds the finish of a computer event happening
+ */
+ void addComputerEventEnd(int v);
+
+ /**
+ * Review a previously recorded evidence event
+ */
+ void reviewAnEvidEvent(int eventIndex);
+
+ /**
+ * Review a previously recorded computer event
+ */
+ void reviewComputerEvent(int eventIndex);
+
+ /**
+ * Checks for key information in determining what kind of murder
+ * should take place
+ */
+ bool checkForKey();
+
+private:
+ int _policeEvent;
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_DATA_H */
diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp
new file mode 100644
index 0000000000..234300bce5
--- /dev/null
+++ b/engines/voyeur/debugger.cpp
@@ -0,0 +1,175 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/debugger.h"
+#include "voyeur/graphics.h"
+#include "voyeur/voyeur.h"
+#include "voyeur/staticres.h"
+
+namespace Voyeur {
+
+Debugger::Debugger(VoyeurEngine *vm) : GUI::Debugger(), _vm(vm) {
+ // Register methods
+ DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit));
+ DCmd_Register("time", WRAP_METHOD(Debugger, Cmd_Time));
+ DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
+ DCmd_Register("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
+
+ // Set fields
+ _isTimeActive = true;
+ _showMousePosition = false;
+}
+
+static const int TIME_STATES[] = {
+ 0, 31, 0, 43, 59, 0, 67, 75, 85, 93, 0, 0, 111, 121, 0, 0
+};
+
+bool Debugger::Cmd_Time(int argc, const char **argv) {
+ if (argc < 2) {
+ // Get the current day and time of day
+ Common::String dtString = _vm->getDayName();
+ Common::String timeString = _vm->getTimeOfDay();
+ if (!timeString.empty())
+ dtString += " " + timeString;
+
+ DebugPrintf("Time period = %d, date/time is: %s, time is %s\n",
+ _vm->_voy->_transitionId, dtString.c_str(), _isTimeActive ? "on" : "off");
+ DebugPrintf("Format: %s [on | off | 1..17 | val <amount>]\n\n", argv[0]);
+ } else {
+ if (!strcmp(argv[1], "on")) {
+ _isTimeActive = true;
+ DebugPrintf("Time is now on\n\n");
+ } else if (!strcmp(argv[1], "off")) {
+ _isTimeActive = false;
+ DebugPrintf("Time is now off\n\n");
+ } else if (!strcmp(argv[1], "val")) {
+ if (argc < 3) {
+ DebugPrintf("Time expired is currently %d.\n", _vm->_voy->_RTVNum);
+ } else {
+ _vm->_voy->_RTVNum = atoi(argv[2]);
+ DebugPrintf("Time expired is now %d.\n", _vm->_voy->_RTVNum);
+ }
+ } else {
+ int timeId = atoi(argv[1]);
+ if (timeId >= 1 && timeId < 17) {
+ int stateId = TIME_STATES[timeId - 1];
+ if (!stateId) {
+ DebugPrintf("Given time period is not used in-game\n");
+ } else {
+ DebugPrintf("Changing to time period: %d\n", timeId);
+ if (_vm->_mainThread->goToState(-1, stateId))
+ _vm->_mainThread->parsePlayCommands();
+
+ return false;
+ }
+ } else {
+ DebugPrintf("Unknown parameter\n\n");
+ }
+ }
+ }
+
+ return true;
+}
+
+bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
+ if (_vm->_voy->_computerTextId >= 0) {
+ DebugPrintf("Hotspot Computer Screen %d - %d,%d->%d,%d\n",
+ _vm->_voy->_computerTextId,
+ _vm->_voy->_computerScreenRect.left,
+ _vm->_voy->_computerScreenRect.top,
+ _vm->_voy->_computerScreenRect.right,
+ _vm->_voy->_computerScreenRect.bottom);
+ }
+
+#if 0
+ // Room hotspots
+ BoltEntry &boltEntry = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 4);
+ if (boltEntry._rectResource) {
+ Common::Array<RectEntry> &hotspots = boltEntry._rectResource->_entries;
+ for (uint hotspotIdx = 0; hotspotIdx < hotspots.size(); ++hotspotIdx) {
+ Common::String pos = Common::String::format("(%d,%d->%d,%d)",
+ hotspots[hotspotIdx].left, hotspots[hotspotIdx].top,
+ hotspots[hotspotIdx].right, hotspots[hotspotIdx].bottom);
+ int arrIndex = hotspots[hotspotIdx]._arrIndex;
+ if (_vm->_voy->_roomHotspotsEnabled[arrIndex - 1]) {
+ DebugPrintf("Hotspot Room %d - %s - Enabled\n", arrIndex, pos);
+ } else {
+ DebugPrintf("Hotspot Room - %s - Disabled\n", pos);
+ }
+ }
+ }
+#endif
+
+ // Outside view hotspots
+ BoltEntry &boltEntry = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1);
+ if (boltEntry._rectResource) {
+ Common::Array<RectEntry> &hotspots = boltEntry._rectResource->_entries;
+
+ for (uint hotspotIdx = 0; hotspotIdx < hotspots.size(); ++hotspotIdx) {
+ Common::String pos = Common::String::format("(%d,%d->%d,%d)",
+ hotspots[hotspotIdx].left, hotspots[hotspotIdx].top,
+ hotspots[hotspotIdx].right, hotspots[hotspotIdx].bottom);
+
+ for (int arrIndex = 0; arrIndex < 3; ++arrIndex) {
+ if (_vm->_voy->_audioHotspotTimes._min[arrIndex][hotspotIdx] != 9999) {
+ DebugPrintf("Hotspot %d %s Audio slot %d, time: %d to %d\n",
+ hotspotIdx, pos.c_str(), arrIndex,
+ _vm->_voy->_audioHotspotTimes._min[arrIndex][hotspotIdx],
+ _vm->_voy->_audioHotspotTimes._max[arrIndex][hotspotIdx]);
+ }
+
+ if (_vm->_voy->_evidenceHotspotTimes._min[arrIndex][hotspotIdx] != 9999) {
+ DebugPrintf("Hotspot %d %s Evidence slot %d, time: %d to %d\n",
+ hotspotIdx, pos.c_str(), arrIndex,
+ _vm->_voy->_evidenceHotspotTimes._min[arrIndex][hotspotIdx],
+ _vm->_voy->_evidenceHotspotTimes._max[arrIndex][hotspotIdx]);
+ }
+ }
+
+ for (int arrIndex = 0; arrIndex < 8; ++arrIndex) {
+ if (_vm->_voy->_videoHotspotTimes._min[arrIndex][hotspotIdx] != 9999) {
+ DebugPrintf("Hotspot %d %s Video slot %d, time: %d to %d\n",
+ hotspotIdx, pos.c_str(), arrIndex,
+ _vm->_voy->_videoHotspotTimes._min[arrIndex][hotspotIdx],
+ _vm->_voy->_videoHotspotTimes._max[arrIndex][hotspotIdx]);
+ }
+ }
+ }
+ }
+
+ DebugPrintf("\nEnd of list\n");
+ return true;
+}
+
+bool Debugger::Cmd_Mouse(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("mouse [ on | off ]\n");
+ } else {
+ _showMousePosition = !strcmp(argv[1], "on");
+ DebugPrintf("Mouse position is now %s\n", _showMousePosition ? "on" : "off");
+ }
+
+ return true;
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/debugger.h b/engines/voyeur/debugger.h
new file mode 100644
index 0000000000..12d62c51a1
--- /dev/null
+++ b/engines/voyeur/debugger.h
@@ -0,0 +1,70 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_DEBUGGER_H
+#define VOYEUR_DEBUGGER_H
+
+#include "common/scummsys.h"
+#include "gui/debugger.h"
+
+namespace Voyeur {
+
+class VoyeurEngine;
+
+class Debugger : public GUI::Debugger {
+private:
+ VoyeurEngine *_vm;
+public:
+ /**
+ * Specifies whether time should pass, and the video camera's batteries go down
+ * @default true
+ */
+ bool _isTimeActive;
+
+ /*
+ * Specifies whether to show the current mouse position on the screen
+ */
+ bool _showMousePosition;
+protected:
+ /**
+ * Turn time on or off, set the current time period, or the camera delay
+ * within the current time period.
+ */
+ bool Cmd_Time(int argc, const char **argv);
+
+ /**
+ * List the active hotspots during the current time period
+ */
+ bool Cmd_Hotspots(int argc, const char **argv);
+
+ /**
+ * Toggle showing the mouse on the screen
+ */
+ bool Cmd_Mouse(int argc, const char **argv);
+public:
+ Debugger(VoyeurEngine *vm);
+ virtual ~Debugger() {}
+};
+
+} // End of namespace Voyeur
+
+#endif
diff --git a/engines/voyeur/detection.cpp b/engines/voyeur/detection.cpp
new file mode 100644
index 0000000000..3503eb11ef
--- /dev/null
+++ b/engines/voyeur/detection.cpp
@@ -0,0 +1,181 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/voyeur.h"
+
+#include "base/plugins.h"
+#include "common/savefile.h"
+#include "common/str-array.h"
+#include "common/memstream.h"
+#include "engines/advancedDetector.h"
+#include "common/system.h"
+#include "graphics/colormasks.h"
+#include "graphics/surface.h"
+
+#define MAX_SAVES 99
+
+namespace Voyeur {
+
+struct VoyeurGameDescription {
+ ADGameDescription desc;
+};
+
+uint32 VoyeurEngine::getFeatures() const {
+ return _gameDescription->desc.flags;
+}
+
+Common::Language VoyeurEngine::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
+Common::Platform VoyeurEngine::getPlatform() const {
+ return _gameDescription->desc.platform;
+}
+
+bool VoyeurEngine::getIsDemo() const {
+ return _gameDescription->desc.flags & ADGF_DEMO;
+}
+
+} // End of namespace Voyeur
+
+static const PlainGameDescriptor voyeurGames[] = {
+ {"voyeur", "Voyeur"},
+ {0, 0}
+};
+
+#include "voyeur/detection_tables.h"
+
+class VoyeurMetaEngine : public AdvancedMetaEngine {
+public:
+ VoyeurMetaEngine() : AdvancedMetaEngine(Voyeur::gameDescriptions, sizeof(Voyeur::VoyeurGameDescription), voyeurGames) {
+ _maxScanDepth = 3;
+ }
+
+ virtual const char *getName() const {
+ return "Voyeur Engine";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "Voyeur (c) Philips P.O.V. Entertainment Group";
+ }
+
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual void removeSaveState(const char *target, int slot) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+};
+
+bool VoyeurMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail);
+}
+
+bool Voyeur::VoyeurEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsRTL) ||
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime);
+}
+
+bool VoyeurMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ const Voyeur::VoyeurGameDescription *gd = (const Voyeur::VoyeurGameDescription *)desc;
+ if (gd) {
+ *engine = new Voyeur::VoyeurEngine(syst, gd);
+ }
+ return gd != 0;
+}
+
+SaveStateList VoyeurMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::StringArray filenames;
+ Common::String saveDesc;
+ Common::String pattern = Common::String::format("%s.0??", target);
+
+ filenames = saveFileMan->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end()); // Sort to get the files in numerical order
+
+ SaveStateList saveList;
+ Voyeur::VoyeurSavegameHeader header;
+
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
+ const char *ext = strrchr(file->c_str(), '.');
+ int slot = ext ? atoi(ext + 1) : -1;
+
+ if (slot >= 0 && slot <= MAX_SAVES) {
+ Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
+
+ if (in) {
+ if (header.read(in)) {
+ saveList.push_back(SaveStateDescriptor(slot, header._saveName));
+ header._thumbnail->free();
+ }
+ delete in;
+ }
+ }
+ }
+
+ return saveList;
+}
+
+int VoyeurMetaEngine::getMaximumSaveSlot() const {
+ return MAX_SAVES;
+}
+
+void VoyeurMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String filename = Common::String::format("%s.%03d", target, slot);
+ g_system->getSavefileManager()->removeSavefile(filename);
+}
+
+SaveStateDescriptor VoyeurMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
+ Common::String filename = Common::String::format("%s.%03d", target, slot);
+ Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
+
+ if (f) {
+ Voyeur::VoyeurSavegameHeader header;
+ header.read(f);
+ delete f;
+
+ // Create the return descriptor
+ SaveStateDescriptor desc(slot, header._saveName);
+ desc.setThumbnail(header._thumbnail);
+ desc.setSaveDate(header._saveYear, header._saveMonth, header._saveDay);
+ desc.setSaveTime(header._saveHour, header._saveMinutes);
+ desc.setPlayTime(header._totalFrames * GAME_FRAME_TIME);
+
+ return desc;
+ }
+
+ return SaveStateDescriptor();
+}
+
+
+#if PLUGIN_ENABLED_DYNAMIC(VOYEUR)
+ REGISTER_PLUGIN_DYNAMIC(VOYEUR, PLUGIN_TYPE_ENGINE, VoyeurMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(VOYEUR, PLUGIN_TYPE_ENGINE, VoyeurMetaEngine);
+#endif
diff --git a/engines/avalanche/pingo.h b/engines/voyeur/detection_tables.h
index 6eecaf6453..da566ff63d 100644
--- a/engines/avalanche/pingo.h
+++ b/engines/voyeur/detection_tables.h
@@ -8,49 +8,35 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-/*
- * This code is based on the original source code of Lord Avalot d'Argent version 1.3.
- * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
- */
-
-/* PINGO Full-screen sub-parts of the game. */
-
-#ifndef AVALANCHE_PINGO_H
-#define AVALANCHE_PINGO_H
-
-#include "common/str.h"
-
-namespace Avalanche {
-class AvalancheEngine;
-
-class Pingo {
-public:
- Pingo(AvalancheEngine *vm);
-
- void bossKey();
- void copy02();
- void copy03();
- void copyPage(byte frp, byte top);
- void winningPic();
-
-private:
- AvalancheEngine *_vm;
-
- void dPlot(int16 x, int16 y, Common::String z);
+namespace Voyeur {
+
+static const VoyeurGameDescription gameDescriptions[] = {
+ {
+ // Voyeur DOS English
+ {
+ "voyeur",
+ 0,
+ AD_ENTRY1s("a1100100.rl2", "b44630677618d034970ca0a13c1c1237", 336361),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ { AD_TABLE_END_MARKER }
};
-} // End of namespace Avalanche.
-
-#endif // AVALANCHE_PINGO_H
+} // End of namespace Voyeur
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
new file mode 100644
index 0000000000..9a3c6d00ff
--- /dev/null
+++ b/engines/voyeur/events.cpp
@@ -0,0 +1,613 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/events.h"
+#include "voyeur/voyeur.h"
+#include "voyeur/staticres.h"
+#include "common/events.h"
+#include "graphics/cursorman.h"
+#include "graphics/font.h"
+#include "graphics/fontman.h"
+#include "graphics/palette.h"
+
+namespace Voyeur {
+
+IntNode::IntNode() {
+ _intFunc = NULL;
+ _curTime = 0;
+ _timeReset = 0;
+ _flags = 0;
+}
+
+IntNode::IntNode(uint16 curTime, uint16 timeReset, uint16 flags) {
+ _intFunc = NULL;
+ _curTime = curTime;
+ _timeReset = timeReset;
+ _flags = flags;
+}
+
+/*------------------------------------------------------------------------*/
+
+IntData::IntData() {
+ _flipWait = false;
+ _hasPalette = false;
+ _flashTimer = 0;
+ _flashStep = 0;
+ _skipFading = false;
+ _palStartIndex = 0;
+ _palEndIndex = 0;
+ _palette = NULL;
+}
+
+/*------------------------------------------------------------------------*/
+
+EventsManager::EventsManager(VoyeurEngine *vm) : _intPtr(_gameData),
+ _fadeIntNode(0, 0, 3), _cycleIntNode(0, 0, 3), _vm(vm) {
+ _cycleStatus = 0;
+ _fadeStatus = 0;
+ _priorFrameTime = g_system->getMillis();
+ _gameCounter = 0;
+ _counterFlag = false;
+ _recordBlinkCounter = 0;
+ _cursorBlinked = false;
+
+ Common::fill(&_cycleTime[0], &_cycleTime[4], 0);
+ Common::fill(&_cycleNext[0], &_cycleNext[4], (byte *)nullptr);
+ _cyclePtr = NULL;
+
+ _leftClick = _rightClick = false;
+ _mouseClicked = _newMouseClicked = false;
+ _newLeftClick = _newRightClick = false;;
+
+ _videoDead = 0;
+
+ _fadeFirstCol = _fadeLastCol = 0;
+ _fadeCount = 1;
+
+ for (int i = 0; i < 4; i++)
+ _cycleNext[i] = nullptr;
+}
+
+void EventsManager::startMainClockInt() {
+ _mainIntNode._intFunc = &EventsManager::mainVoyeurIntFunc;
+ _mainIntNode._flags = 0;
+ _mainIntNode._curTime = 0;
+ _mainIntNode._timeReset = 60;
+}
+
+void EventsManager::mainVoyeurIntFunc() {
+ if (!(_vm->_voy->_eventFlags & EVTFLAG_TIME_DISABLED)) {
+ ++_vm->_voy->_switchBGNum;
+
+ if (_vm->_debugger->_isTimeActive) {
+ // Increase camera discharge
+ ++_vm->_voy->_RTVNum;
+
+ // If the murder threshold has been set, and is passed, then flag the victim
+ // as murdered, which prevents sending the tape from succeeding
+ if (_vm->_voy->_RTVNum >= _vm->_voy->_murderThreshold)
+ _vm->_voy->_victimMurdered = true;
+ }
+ }
+}
+
+void EventsManager::sWaitFlip() {
+ Common::Array<ViewPortResource *> &viewPorts = _vm->_graphicsManager->_viewPortListPtr->_entries;
+ for (uint idx = 0; idx < viewPorts.size(); ++idx) {
+ ViewPortResource &viewPort = *viewPorts[idx];
+
+ if (_vm->_graphicsManager->_saveBack && (viewPort._flags & DISPFLAG_40)) {
+ Common::Rect *clipPtr = _vm->_graphicsManager->_clipPtr;
+ _vm->_graphicsManager->_clipPtr = &viewPort._clipRect;
+
+ if (viewPort._restoreFn)
+ (_vm->_graphicsManager->*viewPort._restoreFn)(&viewPort);
+
+ _vm->_graphicsManager->_clipPtr = clipPtr;
+ viewPort._rectListCount[viewPort._pageIndex] = 0;
+ viewPort._rectListPtr[viewPort._pageIndex]->clear();
+ viewPort._flags &= ~DISPFLAG_40;
+ }
+ }
+
+ while (_gameData._flipWait && !_vm->shouldQuit()) {
+ pollEvents();
+ g_system->delayMillis(10);
+ }
+}
+
+void EventsManager::checkForNextFrameCounter() {
+ // Check for next game frame
+ uint32 milli = g_system->getMillis();
+ if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) {
+ _counterFlag = !_counterFlag;
+ if (_counterFlag)
+ ++_gameCounter;
+ _priorFrameTime = milli;
+
+ // Run the timer-based updates
+ voyeurTimer();
+
+ if ((_gameCounter % GAME_FRAME_RATE) == 0)
+ mainVoyeurIntFunc();
+
+ // Give time to the debugger
+ _vm->_debugger->onFrame();
+
+ // If mouse position display is on, display the position
+ if (_vm->_debugger->_showMousePosition)
+ showMousePosition();
+
+ // Display the frame
+ g_system->copyRectToScreen((byte *)_vm->_graphicsManager->_screenSurface.getPixels(),
+ SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ g_system->updateScreen();
+
+ // Signal the ScummVM debugger
+ _vm->_debugger->onFrame();
+ }
+}
+
+void EventsManager::showMousePosition() {
+ const Graphics::Font &font(*FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont));
+ Common::String mousePos = Common::String::format("(%d,%d)", _mousePos.x, _mousePos.y);
+ if (_vm->_voyeurArea == AREA_INTERFACE) {
+ Common::Point pt = _mousePos + _vm->_mansionViewPos - Common::Point(40, 27);
+ if (pt.x < 0) pt.x = 0;
+ if (pt.y < 0) pt.y = 0;
+
+ mousePos += Common::String::format(" - (%d,%d)", pt.x, pt.y);
+ }
+
+ _vm->_graphicsManager->_screenSurface.fillRect(
+ Common::Rect(0, 0, 110, font.getFontHeight()), 0);
+ font.drawString(&_vm->_graphicsManager->_screenSurface, mousePos,
+ 0, 0, 110, 63);
+}
+
+void EventsManager::voyeurTimer() {
+ _gameData._flashTimer += _gameData._flashStep;
+
+ if (_gameData._flipWait) {
+ _gameData._flipWait = false;
+ _gameData._skipFading = false;
+ }
+
+ videoTimer();
+
+ // Iterate through the list of registered nodes
+ Common::List<IntNode *>::iterator i;
+ for (i = _intNodes.begin(); i != _intNodes.end(); ++i) {
+ IntNode &node = **i;
+
+ if (node._flags & 1)
+ continue;
+ if (!(node._flags & 2)) {
+ if (--node._curTime != 0)
+ continue;
+
+ node._curTime = node._timeReset;
+ }
+
+ (this->*node._intFunc)();
+ }
+
+}
+
+void EventsManager::videoTimer() {
+ if (_gameData._hasPalette) {
+ _gameData._hasPalette = false;
+
+ g_system->getPaletteManager()->setPalette(_gameData._palette +
+ _gameData._palStartIndex * 3, _gameData._palStartIndex,
+ _gameData._palEndIndex - _gameData._palStartIndex + 1);
+ }
+}
+
+void EventsManager::delay(int cycles) {
+ uint32 totalMilli = cycles * 1000 / GAME_FRAME_RATE;
+ uint32 delayEnd = g_system->getMillis() + totalMilli;
+
+ while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd) {
+ g_system->delayMillis(10);
+
+ pollEvents();
+ }
+}
+
+void EventsManager::delayClick(int cycles) {
+ uint32 totalMilli = cycles * 1000 / GAME_FRAME_RATE;
+ uint32 delayEnd = g_system->getMillis() + totalMilli;
+
+ do {
+ g_system->delayMillis(10);
+ getMouseInfo();
+ } while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd
+ && !_vm->_eventsManager->_mouseClicked);
+}
+
+void EventsManager::pollEvents() {
+ checkForNextFrameCounter();
+
+ Common::Event event;
+ while (g_system->getEventManager()->pollEvent(event)) {
+ // Handle keypress
+ switch (event.type) {
+ case Common::EVENT_QUIT:
+ case Common::EVENT_RTL:
+ case Common::EVENT_KEYUP:
+ return;
+
+ case Common::EVENT_KEYDOWN:
+ // Check for debugger
+ if (event.kbd.keycode == Common::KEYCODE_d && (event.kbd.flags & Common::KBD_CTRL)) {
+ // Attach to the debugger
+ _vm->_debugger->attach();
+ _vm->_debugger->onFrame();
+ }
+ return;
+ case Common::EVENT_LBUTTONDOWN:
+ _newLeftClick = true;
+ _newMouseClicked = true;
+ return;
+ case Common::EVENT_RBUTTONDOWN:
+ _newRightClick = true;
+ _newMouseClicked = true;
+ return;
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
+ _newMouseClicked = false;
+ _newLeftClick = false;
+ _newRightClick = false;
+ return;
+ case Common::EVENT_MOUSEMOVE:
+ _mousePos = event.mouse;
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void EventsManager::startFade(CMapResource *cMap) {
+ _fadeIntNode._flags |= 1;
+ if (_cycleStatus & 1)
+ _cycleIntNode._flags |= 1;
+
+ _fadeFirstCol = cMap->_start;
+ _fadeLastCol = cMap->_end;
+ _fadeCount = cMap->_steps + 1;
+
+ if (cMap->_steps > 0) {
+ _fadeStatus = cMap->_fadeStatus | 1;
+ byte *vgaP = &_vm->_graphicsManager->_VGAColors[_fadeFirstCol * 3];
+ int mapIndex = 0;
+
+ for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) {
+ ViewPortPalEntry &palEntry = _vm->_graphicsManager->_viewPortListPtr->_palette[idx];
+ palEntry._rEntry = vgaP[0] << 8;
+ int rDiff = (cMap->_entries[mapIndex * 3] << 8) - palEntry._rEntry;
+ palEntry._rChange = rDiff / cMap->_steps;
+
+ palEntry._gEntry = vgaP[1] << 8;
+ int gDiff = (cMap->_entries[mapIndex * 3 + 1] << 8) - palEntry._gEntry;
+ palEntry._gChange = gDiff / cMap->_steps;
+
+ palEntry._bEntry = vgaP[2] << 8;
+ int bDiff = (cMap->_entries[mapIndex * 3 + 2] << 8) - palEntry._bEntry;
+ palEntry._bChange = bDiff / cMap->_steps;
+
+ palEntry._palIndex = idx;
+ if (!(cMap->_fadeStatus & 1))
+ ++mapIndex;
+ }
+
+ if (cMap->_fadeStatus & 2)
+ _intPtr._skipFading = true;
+ _fadeIntNode._flags &= ~1;
+ } else {
+ byte *vgaP = &_vm->_graphicsManager->_VGAColors[_fadeFirstCol * 3];
+ int mapIndex = 0;
+
+ for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) {
+ Common::copy(&cMap->_entries[mapIndex], &cMap->_entries[mapIndex + 3], vgaP);
+
+ if (!(cMap->_fadeStatus & 1))
+ mapIndex += 3;
+ }
+
+ if (_intPtr._palStartIndex > _fadeFirstCol)
+ _intPtr._palStartIndex = _fadeFirstCol;
+ if (_intPtr._palEndIndex < _fadeLastCol)
+ _intPtr._palEndIndex = _fadeLastCol;
+
+ _intPtr._hasPalette = true;
+ }
+
+ if (_cycleStatus & 1)
+ _cycleIntNode._flags &= ~1;
+}
+
+void EventsManager::addIntNode(IntNode *node) {
+ _intNodes.push_back(node);
+}
+
+void EventsManager::addFadeInt() {
+ IntNode &node = _fade2IntNode;
+ node._intFunc = &EventsManager::fadeIntFunc;
+ node._flags = 0;
+ node._curTime = 0;
+ node._timeReset = 1;
+
+ addIntNode(&node);
+}
+
+void EventsManager::vDoFadeInt() {
+ if (_intPtr._skipFading)
+ return;
+ if (--_fadeCount == 0) {
+ _fadeIntNode._flags |= 1;
+ _fadeStatus &= ~1;
+ return;
+ }
+
+ for (int i = _fadeFirstCol; i <= _fadeLastCol; ++i) {
+ ViewPortPalEntry &palEntry = _vm->_graphicsManager->_viewPortListPtr->_palette[i];
+ byte *vgaP = &_vm->_graphicsManager->_VGAColors[palEntry._palIndex * 3];
+
+ palEntry._rEntry += palEntry._rChange;
+ palEntry._gEntry += palEntry._gChange;
+ palEntry._bEntry += palEntry._bChange;
+
+ vgaP[0] = palEntry._rEntry >> 8;
+ vgaP[1] = palEntry._gEntry >> 8;
+ vgaP[2] = palEntry._bEntry >> 8;
+ }
+
+ if (_intPtr._palStartIndex > _fadeFirstCol)
+ _intPtr._palStartIndex = _fadeFirstCol;
+ if (_intPtr._palEndIndex < _fadeLastCol)
+ _intPtr._palEndIndex = _fadeLastCol;
+
+ _intPtr._hasPalette = true;
+}
+
+void EventsManager::vDoCycleInt() {
+ for (int idx = 3; idx >= 0; --idx) {
+ if (_cyclePtr->_type[idx] && --_cycleTime[idx] <= 0) {
+ byte *pSrc = _cycleNext[idx];
+ byte *pPal = _vm->_graphicsManager->_VGAColors;
+
+ if (_cyclePtr->_type[idx] != 1) {
+ // New palette data being specified - loop to set entries
+ do {
+ int palIndex = READ_LE_UINT16(pSrc);
+ pPal[palIndex * 3] = pSrc[3];
+ pPal[palIndex * 3 + 1] = pSrc[4];
+ pPal[palIndex * 3 + 1] = pSrc[5];
+ pSrc += 6;
+
+ if ((int16)READ_LE_UINT16(pSrc) >= 0) {
+ // Resetting back to start of cycle data
+ pSrc = _cycleNext[idx];
+ break;
+ }
+ } while (*(pSrc + 2) == 0);
+
+ _cycleNext[idx] = pSrc;
+ _cycleTime[idx] = pSrc[2];
+ } else {
+ // Palette rotation to be done
+ _cycleTime[idx] = pSrc[4];
+
+ if (pSrc[5] == 1) {
+ // Move palette entry to end of range
+ int start = READ_LE_UINT16(pSrc);
+ int end = READ_LE_UINT16(&pSrc[2]);
+ assert(start < 0x100 && end < 0x100);
+
+ // Store the RGB of the first entry to be moved
+ byte r = pPal[start * 3];
+ byte g = pPal[start * 3 + 1];
+ byte b = pPal[start * 3 + 2];
+
+ Common::copy(&pPal[start * 3 + 3], &pPal[end * 3 + 3], &pPal[start * 3]);
+
+ // Place the original saved entry at the end of the range
+ pPal[end * 3] = r;
+ pPal[end * 3 + 1] = g;
+ pPal[end * 3 + 2] = b;
+
+ if (_fadeStatus & 1) {
+ //dx = start, di = end
+ warning("TODO: Adjustment of ViewPortListResource");
+ }
+ } else {
+ // Move palette entry to start of range
+ int start = READ_LE_UINT16(pSrc);
+ int end = READ_LE_UINT16(&pSrc[2]);
+ assert(start < 0x100 && end < 0x100);
+
+ // Store the RGB of the entry to be moved
+ byte r = pPal[end * 3];
+ byte g = pPal[end * 3 + 1];
+ byte b = pPal[end * 3 + 2];
+
+ // Move the remainder of the range forwards one entry
+ Common::copy_backward(&pPal[start * 3], &pPal[end * 3], &pPal[end * 3 + 3]);
+
+ // Place the original saved entry at the end of the range
+ pPal[start * 3] = r;
+ pPal[start * 3 + 1] = g;
+ pPal[start * 3 + 2] = b;
+
+ if (_fadeStatus & 1) {
+ //dx = start, di = end
+ warning("TODO: Adjustment of ViewPortListResource");
+ }
+ }
+ }
+
+ _intPtr._hasPalette = true;
+ }
+ }
+}
+
+
+void EventsManager::fadeIntFunc() {
+ switch (_vm->_voy->_fadingType) {
+ case 1:
+ if (_vm->_voy->_fadingAmount1 < 63)
+ _vm->_voy->_fadingAmount1 += _vm->_voy->_fadingStep1;
+ if (_vm->_voy->_fadingAmount2 < 63)
+ _vm->_voy->_fadingAmount2 += _vm->_voy->_fadingStep2;
+ if (_vm->_voy->_fadingAmount1 > 63)
+ _vm->_voy->_fadingAmount1 = 63;
+ if (_vm->_voy->_fadingAmount2 > 63)
+ _vm->_voy->_fadingAmount2 = 63;
+ if ((_vm->_voy->_fadingAmount1 == 63) && (_vm->_voy->_fadingAmount2 == 63))
+ _vm->_voy->_fadingType = 0;
+ break;
+ case 2:
+ if (_vm->_voy->_fadingAmount1 > 0)
+ _vm->_voy->_fadingAmount1 -= _vm->_voy->_fadingStep1;
+ if (_vm->_voy->_fadingAmount2 > 0)
+ _vm->_voy->_fadingAmount2 -= _vm->_voy->_fadingStep2;
+ if (_vm->_voy->_fadingAmount1 < 0)
+ _vm->_voy->_fadingAmount1 = 0;
+ if (_vm->_voy->_fadingAmount2 < 0)
+ _vm->_voy->_fadingAmount2 = 0;
+ if ((_vm->_voy->_fadingAmount1 == 0) && (_vm->_voy->_fadingAmount2 == 0))
+ _vm->_voy->_fadingType = 0;
+ break;
+ default:
+ break;
+ }
+}
+
+void EventsManager::deleteIntNode(IntNode *node) {
+ _intNodes.remove(node);
+}
+
+void EventsManager::vInitColor() {
+ _fadeIntNode._intFunc = &EventsManager::vDoFadeInt;
+ _cycleIntNode._intFunc = &EventsManager::vDoCycleInt;
+
+ addIntNode(&_fadeIntNode);
+ addIntNode(&_cycleIntNode);
+}
+
+void EventsManager::setCursor(PictureResource *pic) {
+ PictureResource cursor;
+ cursor._bounds = pic->_bounds;
+ cursor._flags = DISPFLAG_CURSOR;
+
+ _vm->_graphicsManager->sDrawPic(pic, &cursor, Common::Point());
+}
+
+void EventsManager::setCursor(byte *cursorData, int width, int height, int keyColor) {
+ CursorMan.replaceCursor(cursorData, width, height, width / 2, height / 2, keyColor);
+}
+
+void EventsManager::setCursorColor(int idx, int mode) {
+ switch (mode) {
+ case 0:
+ _vm->_graphicsManager->setColor(idx, 90, 90, 232);
+ break;
+ case 1:
+ _vm->_graphicsManager->setColor(idx, 232, 90, 90);
+ break;
+ case 2:
+ _vm->_graphicsManager->setColor(idx, 90, 232, 90);
+ break;
+ case 3:
+ _vm->_graphicsManager->setColor(idx, 90, 232, 232);
+ break;
+ default:
+ break;
+ }
+}
+
+void EventsManager::showCursor() {
+ CursorMan.showMouse(true);
+}
+
+void EventsManager::hideCursor() {
+ CursorMan.showMouse(false);
+}
+
+void EventsManager::getMouseInfo() {
+ pollEvents();
+
+ if (_vm->_voy->_eventFlags & EVTFLAG_RECORDING) {
+ if ((_gameCounter - _recordBlinkCounter) > 8) {
+ _recordBlinkCounter = _gameCounter;
+
+ if (_cursorBlinked) {
+ _cursorBlinked = false;
+ _vm->_graphicsManager->setOneColor(128, 220, 20, 20);
+ _vm->_graphicsManager->setColor(128, 220, 20, 20);
+ } else {
+ _cursorBlinked = true;
+ _vm->_graphicsManager->setOneColor(128, 220, 220, 220);
+ _vm->_graphicsManager->setColor(128, 220, 220, 220);
+ }
+ }
+ }
+
+ _mouseClicked = _newMouseClicked;
+ _leftClick = _newLeftClick;
+ _rightClick = _newRightClick;
+
+ _newMouseClicked = false;
+ _newLeftClick = false;
+ _newRightClick = false;
+}
+
+void EventsManager::startCursorBlink() {
+ if (_vm->_voy->_eventFlags & EVTFLAG_RECORDING) {
+ _vm->_graphicsManager->setOneColor(128, 55, 5, 5);
+ _vm->_graphicsManager->setColor(128, 220, 20, 20);
+ _intPtr._hasPalette = true;
+
+ _vm->_graphicsManager->drawDot();
+ //copySection();
+ }
+}
+
+void EventsManager::incrementTime(int amt) {
+ for (int i = 0; i < amt; ++i)
+ mainVoyeurIntFunc();
+}
+
+void EventsManager::stopEvidDim() {
+ deleteIntNode(&_evIntNode);
+}
+
+Common::String EventsManager::getEvidString(int eventIndex) {
+ assert(eventIndex <= _vm->_voy->_eventCount);
+ VoyeurEvent &e = _vm->_voy->_events[eventIndex];
+ return Common::String::format("%03d %.2d:%.2d %s %s", eventIndex + 1,
+ e._hour, e._minute, e._isAM ? AM : PM, EVENT_TYPE_STRINGS[e._type - 1]);
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h
new file mode 100644
index 0000000000..5e0bfe6404
--- /dev/null
+++ b/engines/voyeur/events.h
@@ -0,0 +1,145 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_EVENTS_H
+#define VOYEUR_EVENTS_H
+
+#include "common/scummsys.h"
+#include "common/list.h"
+#include "graphics/surface.h"
+#include "voyeur/files.h"
+
+namespace Voyeur {
+
+class VoyeurEngine;
+class EventsManager;
+class CMapResource;
+
+#define GAME_FRAME_RATE 50
+#define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE)
+
+typedef void (EventsManager::*EventMethodPtr)();
+
+class IntNode {
+public:
+ EventMethodPtr _intFunc;
+ uint16 _curTime;
+ uint16 _timeReset;
+ uint32 _flags;
+
+ IntNode();
+ IntNode(uint16 curTime, uint16 timeReset, uint16 flags);
+};
+
+class IntData {
+public:
+ bool _flipWait;
+ int _flashTimer;
+ int _flashStep;
+ bool _hasPalette;
+ bool _skipFading;
+ int _palStartIndex;
+ int _palEndIndex;
+ byte *_palette;
+
+ IntData();
+};
+
+class EventsManager {
+private:
+ VoyeurEngine *_vm;
+ bool _counterFlag;
+ bool _cursorBlinked;
+ uint32 _gameCounter;
+ uint32 _priorFrameTime;
+ uint32 _recordBlinkCounter; // Original field was called _joe :)
+ Common::List<IntNode *> _intNodes;
+ Common::Point _mousePos;
+
+ void mainVoyeurIntFunc();
+ void checkForNextFrameCounter();
+ void voyeurTimer();
+ void videoTimer();
+ void vDoFadeInt();
+ void vDoCycleInt();
+ void fadeIntFunc();
+ void addIntNode(IntNode *node);
+ void deleteIntNode(IntNode *node);
+
+ /**
+ * Debugger support method to show the mouse position
+ */
+ void showMousePosition();
+public:
+ IntData _gameData;
+ IntData &_intPtr;
+ IntNode _fadeIntNode;
+ IntNode _fade2IntNode;
+ IntNode _cycleIntNode;
+ IntNode _evIntNode;
+ IntNode _mainIntNode;
+ int _cycleStatus;
+ int _fadeFirstCol, _fadeLastCol;
+ int _fadeCount;
+ int _fadeStatus;
+
+ bool _leftClick, _rightClick;
+ bool _mouseClicked, _newMouseClicked;
+ bool _newLeftClick, _newRightClick;
+
+ int _videoDead;
+ int _cycleTime[4];
+ byte *_cycleNext[4];
+ VInitCycleResource *_cyclePtr;
+
+ EventsManager(VoyeurEngine *vm);
+
+ void setMousePos(const Common::Point &p) { _mousePos = p; }
+ void startMainClockInt();
+ void sWaitFlip();
+ void vInitColor();
+
+ void delay(int cycles);
+ void delayClick(int cycles);
+ void pollEvents();
+ void startFade(CMapResource *cMap);
+ void addFadeInt();
+
+ void setCursor(PictureResource *pic);
+ void setCursor(byte *cursorData, int width, int height, int keyColor);
+ void setCursorColor(int idx, int mode);
+ void showCursor();
+ void hideCursor();
+ Common::Point getMousePos() { return _mousePos; }
+ uint32 getGameCounter() const { return _gameCounter; }
+ void getMouseInfo();
+ void startCursorBlink();
+ void incrementTime(int amt);
+
+ void stopEvidDim();
+
+ Common::String getEvidString(int eventIndex);
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_EVENTS_H */
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
new file mode 100644
index 0000000000..7369d9280e
--- /dev/null
+++ b/engines/voyeur/files.cpp
@@ -0,0 +1,1621 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/files.h"
+#include "voyeur/graphics.h"
+#include "voyeur/voyeur.h"
+#include "voyeur/staticres.h"
+
+namespace Voyeur {
+
+#define BOLT_GROUP_SIZE 16
+
+BoltFilesState::BoltFilesState(VoyeurEngine *vm) : _vm(vm) {
+ _curLibPtr = NULL;
+ _curGroupPtr = NULL;
+ _curMemberPtr = NULL;
+ _bufferEnd = 0;
+ _bufferBegin = 0;
+ _bytesLeft = 0;
+ _bufSize = 0;
+ _bufStart = NULL;
+ _bufPos = NULL;
+ _historyIndex = 0;
+ _runLength = 0;
+ _decompState = false;
+ _runType = 0;
+ _runValue = 0;
+ _runOffset = 0;
+ Common::fill(&_historyBuffer[0], &_historyBuffer[0x200], 0);
+ _curFd = NULL;
+ _boltPageFrame = NULL;
+}
+
+#define NEXT_BYTE if (--_bytesLeft < 0) nextBlock()
+
+byte *BoltFilesState::decompress(byte *buf, int size, int mode) {
+ if (!buf) {
+ buf = new byte[size];
+ Common::fill(buf, buf + size, 0);
+ }
+ byte *bufP = buf;
+
+ if (mode & 8) {
+ _decompState = true;
+ _runType = 0;
+ _runLength = size;
+ }
+
+ while (size > 0) {
+ if (!_decompState) {
+ NEXT_BYTE;
+ byte nextByte = *_bufPos++;
+
+ switch (nextByte & 0xC0) {
+ case 0:
+ _runType = 0;
+ _runLength = 30 - (nextByte & 0x1f) + 1;
+ break;
+ case 0x40:
+ _runType = 1;
+ _runLength = 35 - (nextByte & 0x1f);
+ NEXT_BYTE;
+ _runOffset = *_bufPos++ + ((nextByte & 0x20) << 3);
+ break;
+ case 0x80:
+ _runType = 1;
+ _runLength = (nextByte & 0x20) ? ((32 - (nextByte & 0x1f)) << 2) + 2 :
+ (32 - (nextByte & 0x1f)) << 2;
+ NEXT_BYTE;
+ _runOffset = *_bufPos++ << 1;
+ break;
+ default:
+ _runType = 2;
+
+ if (nextByte & 0x20) {
+ _runLength = 0;
+ } else {
+ NEXT_BYTE;
+ _runLength = ((32 - (nextByte & 0x1f)) + (*_bufPos++ << 5)) << 2;
+ NEXT_BYTE;
+ _bufPos++;
+ NEXT_BYTE;
+ _runValue = *_bufPos++;
+ }
+ break;
+ }
+
+ _runOffset = _historyIndex - _runOffset;
+ }
+
+ int runOffset = _runOffset & 0x1ff;
+ int len;
+ if (_runLength <= size) {
+ len = _runLength;
+ _decompState = false;
+ } else {
+ _decompState = true;
+ len = size;
+ _runLength -= size;
+ if (_runType == 1)
+ _runOffset += len;
+ }
+
+ // Reduce the remaining size
+ size -= len;
+
+ // Handle the run lengths
+ switch (_runType) {
+ case 0:
+ while (len-- > 0) {
+ NEXT_BYTE;
+ byte v = *_bufPos++;
+ _historyBuffer[_historyIndex] = v;
+ *bufP++ = v;
+ _historyIndex = (_historyIndex + 1) & 0x1ff;
+ }
+ break;
+ case 1:
+ while (len-- > 0) {
+ _historyBuffer[_historyIndex] = _historyBuffer[runOffset];
+ *bufP++ = _historyBuffer[runOffset];
+ _historyIndex = (_historyIndex + 1) & 0x1ff;
+ runOffset = (runOffset + 1) & 0x1ff;
+ }
+ break;
+ default:
+ while (len-- > 0) {
+ _historyBuffer[_historyIndex] = _runValue;
+ *bufP++ = _runValue;
+ _historyIndex = (_historyIndex + 1) & 0x1ff;
+ }
+ break;
+ }
+ }
+
+ return buf;
+}
+
+#undef NEXT_BYTE
+
+void BoltFilesState::nextBlock() {
+ if (&_curLibPtr->_file != _curFd || _curFd->pos() != _bufferEnd)
+ _curLibPtr->_file.seek(_bufferEnd);
+
+ _curFd = &_curLibPtr->_file;
+ _bufferBegin = _bufferEnd;
+ int bytesRead = _curFd->read(_bufStart, _bufSize);
+
+ _bufferEnd = _curFd->pos();
+ _bytesLeft = bytesRead - 1;
+ _bufPos = _bufStart;
+}
+
+/*------------------------------------------------------------------------*/
+
+FilesManager::FilesManager(VoyeurEngine *vm) {
+ _curLibPtr = nullptr;
+ _boltFilesState = new BoltFilesState(vm);
+}
+
+FilesManager::~FilesManager() {
+ delete _boltFilesState;
+}
+
+bool FilesManager::openBoltLib(const Common::String &filename, BoltFile *&boltFile) {
+ if (boltFile != NULL) {
+ _boltFilesState->_curLibPtr = boltFile;
+ return true;
+ }
+
+ // Create the bolt file interface object and load the index
+ if (filename == "bvoy.blt")
+ boltFile = _boltFilesState->_curLibPtr = new BVoyBoltFile(*_boltFilesState);
+ else if (filename == "stampblt.blt")
+ boltFile = _boltFilesState->_curLibPtr = new StampBoltFile(*_boltFilesState);
+ else
+ error("Unknown bolt file specified");
+
+ return true;
+}
+
+byte *FilesManager::fload(const Common::String &filename, int *size) {
+ Common::File f;
+ int filesize;
+ byte *data = NULL;
+
+ if (f.open(filename)) {
+ // Read in the file
+ filesize = f.size();
+ data = new byte[filesize];
+ f.read(data, filesize);
+ } else {
+ filesize = 0;
+ }
+
+ if (size)
+ *size = filesize;
+ return data;
+}
+
+/*------------------------------------------------------------------------*/
+
+BoltFile::BoltFile(const Common::String &filename, BoltFilesState &state): _state(state) {
+ if (!_file.open(filename))
+ error("Could not open %s", filename.c_str());
+
+ // Read in the file header
+ byte header[16];
+ _file.read(&header[0], 16);
+
+ if (strncmp((const char *)&header[0], "BOLT", 4) != 0)
+ error("Tried to load non-bolt file");
+
+ int totalGroups = header[11] ? header[11] : 0x100;
+ for (int i = 0; i < totalGroups; ++i)
+ _groups.push_back(BoltGroup(&_file));
+}
+
+BoltFile::~BoltFile() {
+ _file.close();
+ if (_state._curFd == &_file)
+ _state._curFd = NULL;
+ if (_state._curLibPtr == this)
+ _state._curLibPtr = NULL;
+}
+
+BoltGroup *BoltFile::getBoltGroup(uint16 id) {
+ _state._curLibPtr = this;
+ _state._curGroupPtr = &_groups[(id >> 8) & 0xff];
+
+ if (!_state._curGroupPtr->_loaded) {
+ // Load the group index
+ _state._curGroupPtr->load(id & 0xff00);
+ }
+
+ // Pre-process the resources
+ id &= 0xff00;
+ for (int idx = 0; idx < _state._curGroupPtr->_count; ++idx, ++id) {
+ byte *member = getBoltMember(id);
+ assert(member);
+ }
+
+ resolveAll();
+
+ return _state._curGroupPtr;
+}
+
+void BoltFile::freeBoltGroup(uint16 id) {
+ _state._curLibPtr = this;
+ _state._curGroupPtr = &_groups[(id >> 8) & 0xff];
+
+ // Unload the group
+ _state._curGroupPtr->unload();
+}
+
+void BoltFile::freeBoltMember(uint32 id) {
+ // No implementation in ScummVM
+}
+
+BoltEntry &BoltFile::getBoltEntryFromLong(uint32 id) {
+ BoltGroup &group = _groups[id >> 24];
+ assert(group._loaded);
+
+ BoltEntry &entry = group._entries[(id >> 16) & 0xff];
+ assert(!entry.hasResource() || (id & 0xffff) == 0);
+
+ return entry;
+}
+
+BoltEntry &BoltFile::boltEntry(uint16 id) {
+ BoltGroup &group = _groups[id >> 8];
+ assert(group._loaded);
+
+ BoltEntry &entry = group._entries[id & 0xff];
+ assert(entry.hasResource());
+
+ return entry;
+}
+
+PictureResource *BoltFile::getPictureResource(uint32 id) {
+ if ((int32)id == -1)
+ return NULL;
+
+ if (id & 0xffff)
+ id <<= 16;
+ return getBoltEntryFromLong(id)._picResource;
+}
+
+CMapResource *BoltFile::getCMapResource(uint32 id) {
+ if ((int32)id == -1)
+ return NULL;
+
+ if (id & 0xffff)
+ id <<= 16;
+
+ return getBoltEntryFromLong(id)._cMapResource;
+}
+
+byte *BoltFile::memberAddr(uint32 id) {
+ BoltGroup &group = _groups[id >> 8];
+ if (!group._loaded)
+ return NULL;
+
+ // If an entry already has a processed representation, we shouldn't
+ // still be accessing the raw data
+ BoltEntry &entry = group._entries[id & 0xff];
+ assert(!entry.hasResource());
+
+ return entry._data;
+}
+
+byte *BoltFile::memberAddrOffset(uint32 id) {
+ BoltGroup &group = _groups[id >> 24];
+ if (!group._loaded)
+ return NULL;
+
+ // If an entry already has a processed representation, we shouldn't
+ // still be accessing the raw data
+ BoltEntry &entry = group._entries[(id >> 16) & 0xff];
+ assert(!entry.hasResource());
+
+ return entry._data + (id & 0xffff);
+}
+
+/**
+ * Resolves an Id to an offset within a loaded resource
+ */
+void BoltFile::resolveIt(uint32 id, byte **p) {
+ if ((int32)id == -1) {
+ *p = NULL;
+ } else {
+ byte *ptr = memberAddrOffset(id);
+ if (ptr) {
+ *p = ptr;
+ } else {
+ *p = NULL;
+ assert(_state._resolves.size() < 1000);
+ _state._resolves.push_back(ResolveEntry(id, p));
+ }
+ }
+}
+
+void BoltFile::resolveFunction(uint32 id, GraphicMethodPtr *fn) {
+ if ((int32)id == -1)
+ *fn = NULL;
+ else
+ error("Function fnTermGro array not supported");
+}
+
+/**
+ * Resolve any data references to within resources that weren't
+ * previously loaded, but are now
+ */
+void BoltFile::resolveAll() {
+ for (uint idx = 0; idx < _state._resolves.size(); ++idx)
+ *_state._resolves[idx]._p = memberAddrOffset(_state._resolves[idx]._id);
+
+ _state._resolves.clear();
+}
+
+byte *BoltFile::getBoltMember(uint32 id) {
+ _state._curLibPtr = this;
+
+ // Get the group, and load it's entry list if not already loaded
+ _state._curGroupPtr = &_groups[(id >> 8) & 0xff];
+ if (!_state._curGroupPtr->_loaded)
+ _state._curGroupPtr->load(id & 0xff00);
+
+ // Get the entry
+ _state._curMemberPtr = &_state._curGroupPtr->_entries[id & 0xff];
+
+ // Return the data for the entry if it's already been loaded
+ if (_state._curMemberPtr->_data)
+ return _state._curMemberPtr->_data;
+
+ if (_state._curGroupPtr->_processed) {
+ error("Processed resources are not supported");
+ } else {
+ _state._bufStart = _state._decompressBuf;
+ _state._bufSize = DECOMPRESS_SIZE;
+
+ if ((_state._curFd != &_file) || (_state._curMemberPtr->_fileOffset < _state._bufferBegin)
+ || (_state._curMemberPtr->_fileOffset >= _state._bufferEnd)) {
+ _state._bytesLeft = 0;
+ _state._bufPos = _state._bufStart;
+ _state._bufferBegin = -1;
+ _state._bufferEnd = _state._curMemberPtr->_fileOffset;
+ } else {
+ _state._bufPos = _state._curMemberPtr->_fileOffset - _state._bufferBegin + _state._bufStart;
+ _state._bytesLeft = _state._bufSize - (_state._bufPos - _state._bufStart);
+ }
+ }
+
+ _state._decompState = false;
+ _state._historyIndex = 0;
+
+ // Initialize the resource
+ assert(_state._curMemberPtr->_initMethod < 25);
+ initResource(_state._curMemberPtr->_initMethod);
+
+ return _state._curMemberPtr->_data;
+}
+
+void BoltFile::initDefault() {
+ _state._curMemberPtr->_data = _state.decompress(NULL, _state._curMemberPtr->_size,
+ _state._curMemberPtr->_mode);
+}
+
+/*------------------------------------------------------------------------*/
+
+BVoyBoltFile::BVoyBoltFile(BoltFilesState &state): BoltFile("bvoy.blt", state) {
+}
+
+void BVoyBoltFile::initResource(int resType) {
+ switch (resType) {
+ case 2:
+ // Also used for point list, and ending credits credit data
+ sInitRect();
+ break;
+ case 8:
+ sInitPic();
+ break;
+ case 10:
+ vInitCMap();
+ break;
+ case 11:
+ vInitCycl();
+ break;
+ case 15:
+ initViewPort();
+ break;
+ case 16:
+ initViewPortList();
+ break;
+ case 17:
+ initFont();
+ break;
+ case 18:
+ initFontInfo();
+ break;
+ case 19:
+ initSoundMap();
+ break;
+ default:
+ initDefault();
+ break;
+ }
+}
+
+void BVoyBoltFile::initViewPort() {
+ initDefault();
+
+ ViewPortResource *viewPort;
+ byte *src = _state._curMemberPtr->_data;
+ _state._curMemberPtr->_viewPortResource = viewPort = new ViewPortResource(_state, src);
+
+ // This is done post-constructor, since viewports can be self referential, so
+ // we need the _viewPortResource field to have been set before resolving the pointer
+ viewPort->_parent = getBoltEntryFromLong(READ_LE_UINT32(src + 2))._viewPortResource;
+}
+
+void BVoyBoltFile::initViewPortList() {
+ initDefault();
+
+ ViewPortListResource *res;
+ _state._curMemberPtr->_viewPortListResource = res = new ViewPortListResource(
+ _state, _state._curMemberPtr->_data);
+
+ _state._vm->_graphicsManager->_viewPortListPtr = res;
+ _state._vm->_graphicsManager->_vPort = res->_entries[0];
+}
+
+void BVoyBoltFile::initFontInfo() {
+ initDefault();
+ _state._curMemberPtr->_fontInfoResource = new FontInfoResource(
+ _state, _state._curMemberPtr->_data);
+}
+
+void BVoyBoltFile::initFont() {
+ initDefault();
+ _state._curMemberPtr->_fontResource = new FontResource(_state, _state._curMemberPtr->_data);
+}
+
+void BVoyBoltFile::initSoundMap() {
+ initDefault();
+}
+
+void BVoyBoltFile::sInitRect() {
+ _state._curMemberPtr->_data = _state.decompress(NULL, _state._curMemberPtr->_size,
+ _state._curMemberPtr->_mode);
+
+ // Check whether the resource Id is in the list of extended rects
+ bool isExtendedRects = false;
+ for (int i = 0; i < 49 && !isExtendedRects; ++i)
+ isExtendedRects = RESOLVE_TABLE[i] == (_state._curMemberPtr->_id & 0xff00);
+
+ int rectSize = isExtendedRects ? 12 : 8;
+ if ((_state._curMemberPtr->_size % rectSize) == 0 || (_state._curMemberPtr->_size % rectSize) == 2)
+ _state._curMemberPtr->_rectResource = new RectResource(_state._curMemberPtr->_data,
+ _state._curMemberPtr->_size, isExtendedRects);
+}
+
+void BVoyBoltFile::sInitPic() {
+ // Read in the header data
+ _state._curMemberPtr->_data = _state.decompress(NULL, 24, _state._curMemberPtr->_mode);
+ _state._curMemberPtr->_picResource = new PictureResource(_state,
+ _state._curMemberPtr->_data);
+}
+
+void BVoyBoltFile::vInitCMap() {
+ initDefault();
+ _state._curMemberPtr->_cMapResource = new CMapResource(
+ _state, _state._curMemberPtr->_data);
+}
+
+void BVoyBoltFile::vInitCycl() {
+ initDefault();
+ _state._curMemberPtr->_vInitCycleResource = new VInitCycleResource(
+ _state, _state._curMemberPtr->_data);
+ _state._curMemberPtr->_vInitCycleResource->vStopCycle();
+}
+
+/*------------------------------------------------------------------------*/
+
+StampBoltFile::StampBoltFile(BoltFilesState &state): BoltFile("stampblt.blt", state) {
+}
+
+void StampBoltFile::initResource(int resType) {
+ switch (resType) {
+ case 0:
+ initThread();
+ break;
+ case 4:
+ initState();
+ break;
+ case 6:
+ initPtr();
+ break;
+ case 24:
+ initControl();
+ break;
+ default:
+ initDefault();
+ break;
+ }
+}
+
+void StampBoltFile::initThread() {
+ initDefault();
+
+ _state._curMemberPtr->_threadResource = new ThreadResource(_state,
+ _state._curMemberPtr->_data);
+}
+
+void StampBoltFile::initPtr() {
+ initDefault();
+
+ _state._curMemberPtr->_ptrResource = new PtrResource(_state,
+ _state._curMemberPtr->_data);
+}
+
+ void initControlData();
+
+
+void StampBoltFile::initControl() {
+ initDefault();
+
+ ControlResource *res;
+ _state._curMemberPtr->_controlResource = res = new ControlResource(_state,
+ _state._curMemberPtr->_data);
+
+ _state._vm->_controlGroupPtr = _state._curGroupPtr;
+ _state._vm->_controlPtr = res;
+}
+
+void StampBoltFile::initState() {
+ initDefault();
+
+ assert(_state._curMemberPtr->_size == 16);
+ _state._curMemberPtr->_stateResource = new StateResource(_state,
+ _state._curMemberPtr->_data);
+}
+
+/*------------------------------------------------------------------------*/
+
+BoltGroup::BoltGroup(Common::SeekableReadStream *f): _file(f) {
+ byte buffer[BOLT_GROUP_SIZE];
+
+ _loaded = false;
+
+ _file->read(&buffer[0], BOLT_GROUP_SIZE);
+ _processed = buffer[0] != 0;
+ _count = buffer[3] ? buffer[3] : 256;
+ _fileOffset = READ_LE_UINT32(&buffer[8]);
+}
+
+BoltGroup::~BoltGroup() {
+}
+
+void BoltGroup::load(uint16 groupId) {
+ _file->seek(_fileOffset);
+
+ // Read the entries
+ for (int i = 0; i < _count; ++i)
+ _entries.push_back(BoltEntry(_file, groupId + i));
+
+ _loaded = true;
+}
+
+void BoltGroup::unload() {
+ if (!_loaded)
+ return;
+
+ _entries.clear();
+ _loaded = false;
+}
+
+/*------------------------------------------------------------------------*/
+
+BoltEntry::BoltEntry(Common::SeekableReadStream *f, uint16 id): _file(f), _id(id) {
+ _data = nullptr;
+ _rectResource = nullptr;
+ _picResource = nullptr;
+ _viewPortResource = nullptr;
+ _viewPortListResource = nullptr;
+ _fontResource = nullptr;
+ _fontInfoResource = nullptr;
+ _cMapResource = nullptr;
+ _vInitCycleResource = nullptr;
+
+ _ptrResource = nullptr;
+ _stateResource = nullptr;
+ _controlResource = nullptr;
+ _vInitCycleResource = nullptr;
+ _threadResource = nullptr;
+
+ byte buffer[16];
+ _file->read(&buffer[0], 16);
+ _mode = buffer[0];
+ _initMethod = buffer[3];
+ _size = READ_LE_UINT32(&buffer[4]) & 0xffffff;
+ _fileOffset = READ_LE_UINT32(&buffer[8]);
+}
+
+BoltEntry::~BoltEntry() {
+ delete[] _data;
+ delete _rectResource;
+ delete _picResource;
+ delete _viewPortResource;
+ delete _viewPortListResource;
+ delete _fontResource;
+ delete _fontInfoResource;
+ delete _cMapResource;
+
+ delete _ptrResource;
+ delete _controlResource;
+ delete _stateResource;
+ delete _vInitCycleResource;
+ delete _threadResource;
+}
+
+void BoltEntry::load() {
+ // Currently, all entry loading and decompression is done in BoltFile::memberAddr.
+}
+
+/**
+ * Returns true if the given bolt entry has an attached resource
+ */
+bool BoltEntry::hasResource() const {
+ return _rectResource || _picResource || _viewPortResource || _viewPortListResource
+ || _fontResource || _fontInfoResource || _cMapResource || _vInitCycleResource
+ || _ptrResource || _controlResource || _stateResource || _threadResource;
+}
+
+/*------------------------------------------------------------------------*/
+
+RectEntry::RectEntry(int x1, int y1, int x2, int y2, int arrIndex, int count):
+ Common::Rect(x1, y1, x2, y2), _arrIndex(arrIndex), _count(count) {
+}
+
+/*------------------------------------------------------------------------*/
+
+RectResource::RectResource(const byte *src, int size, bool isExtendedRects) {
+ int count;
+ int rectSize = isExtendedRects ? 12 : 8;
+ if ((size % rectSize) == 2) {
+ count = READ_LE_UINT16(src);
+ src += 2;
+ } else {
+ count = size / rectSize;
+ }
+
+ for (int i = 0; i < count; ++i, src += 8) {
+ int arrIndex = 0, rectCount = 0;
+ if (isExtendedRects) {
+ arrIndex = READ_LE_UINT16(src);
+ rectCount = READ_LE_UINT16(src + 2);
+ src += 4;
+ }
+
+ int x1 = READ_LE_UINT16(src);
+ int y1 = READ_LE_UINT16(src + 2);
+ int x2 = READ_LE_UINT16(src + 4);
+ int y2 = READ_LE_UINT16(src + 6);
+
+ _entries.push_back(RectEntry(x1, y1, x2, y2, arrIndex, rectCount));
+ }
+
+ left = _entries[0].left;
+ top = _entries[0].top;
+ right = _entries[0].right;
+ bottom = _entries[0].bottom;
+}
+
+RectResource::RectResource(int x1, int y1, int x2, int y2) {
+ left = x1;
+ top = y1;
+ right = x2;
+ bottom = y2;
+}
+
+/*------------------------------------------------------------------------*/
+
+DisplayResource::DisplayResource() {
+ _vm = NULL;
+ _flags = DISPFLAG_NONE;
+}
+
+DisplayResource::DisplayResource(VoyeurEngine *vm) {
+ _vm = vm;
+ _flags = DISPFLAG_NONE;
+}
+
+void DisplayResource::sFillBox(int width, int height) {
+ assert(_vm);
+ bool saveBack = _vm->_graphicsManager->_saveBack;
+ _vm->_graphicsManager->_saveBack = false;
+
+ PictureResource pr;
+ pr._flags = DISPFLAG_1;
+ pr._select = 0xff;
+ pr._pick = 0;
+ pr._onOff = _vm->_graphicsManager->_drawPtr->_penColor;
+ pr._bounds = Common::Rect(0, 0, width, height);
+
+ _vm->_graphicsManager->sDrawPic(&pr, this, _vm->_graphicsManager->_drawPtr->_pos);
+ _vm->_graphicsManager->_saveBack = saveBack;
+}
+
+bool DisplayResource::clipRect(Common::Rect &rect) {
+ Common::Rect clippingRect;
+ if (_vm->_graphicsManager->_clipPtr) {
+ clippingRect = *_vm->_graphicsManager->_clipPtr;
+ } else if (_flags & DISPFLAG_VIEWPORT) {
+ clippingRect = ((ViewPortResource *)this)->_clipRect;
+ } else {
+ clippingRect = ((PictureResource *)this)->_bounds;
+ }
+
+ Common::Rect r = rect;
+ if (r.left < clippingRect.left) {
+ if (r.right <= clippingRect.left)
+ return false;
+ r.setWidth(r.right - clippingRect.left);
+ }
+ if (r.right >= clippingRect.right) {
+ if (r.left >= clippingRect.left)
+ return false;
+ r.setWidth(clippingRect.right - r.left);
+ }
+
+ if (r.top < clippingRect.top) {
+ if (r.bottom <= clippingRect.top)
+ return false;
+ r.setHeight(r.bottom - clippingRect.top);
+ }
+ if (r.bottom >= clippingRect.bottom) {
+ if (r.top >= clippingRect.top)
+ return false;
+ r.setWidth(clippingRect.bottom - r.top);
+ }
+
+ rect = r;
+ return true;
+}
+
+int DisplayResource::drawText(const Common::String &msg) {
+ GraphicsManager &gfxManager = *_vm->_graphicsManager;
+ assert(gfxManager._fontPtr);
+ assert(gfxManager._fontPtr->_curFont);
+ FontInfoResource &fontInfo = *gfxManager._fontPtr;
+ PictureResource &fontChar = *_vm->_graphicsManager->_fontChar;
+ FontResource &fontData = *fontInfo._curFont;
+ int xShadows[9] = { 0, 1, 1, 1, 0, -1, -1, -1, 0 };
+ int yShadows[9] = { 0, 1, 0, -1, -1, -1, 0, 1, 1 };
+
+ Common::Rect *clipPtr = gfxManager._clipPtr;
+ if (!(fontInfo._picFlags & DISPFLAG_1))
+ gfxManager._clipPtr = NULL;
+
+ int minChar = fontData._minChar;
+ int padding = fontData._padding;
+ int fontHeight = fontData._fontHeight;
+ int totalChars = fontData._maxChar - fontData._minChar;
+ int msgWidth = 0;
+ int xp = 0, yp = 0;
+
+ Common::Point pos = Common::Point(fontInfo._pos.x, fontInfo._pos.y + fontData._topPadding);
+
+ fontChar._flags = fontInfo._picFlags | DISPFLAG_2;
+ fontChar._select = fontInfo._picSelect;
+ fontChar._bounds.setHeight(fontHeight);
+
+ ViewPortResource *viewPort = !(_flags & DISPFLAG_VIEWPORT) ? NULL :
+ (ViewPortResource *)this;
+
+ if ((fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify ||
+ (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT))) {
+ msgWidth = viewPort->textWidth(msg);
+ yp = pos.y;
+ xp = pos.x;
+
+ switch (fontInfo._justify) {
+ case 1:
+ xp = pos.x + (fontInfo._justifyWidth / 2) - (msgWidth / 2);
+ break;
+ case 2:
+ xp = pos.x + fontInfo._justifyWidth - msgWidth;
+ break;
+ default:
+ break;
+ }
+
+ if (!(fontInfo._fontFlags & (DISPFLAG_1 | DISPFLAG_2))) {
+ viewPort->_fontRect.left = xp;
+ viewPort->_fontRect.top = yp;
+ viewPort->_fontRect.setWidth(msgWidth);
+ viewPort->_fontRect.setHeight(fontHeight);
+ } else {
+ viewPort->_fontRect.left = pos.x;
+ viewPort->_fontRect.top = pos.y;
+ viewPort->_fontRect.setWidth(fontInfo._justifyWidth);
+ viewPort->_fontRect.setHeight(fontInfo._justifyHeight);
+ }
+
+ pos.x = xp;
+ pos.y = yp;
+
+ if (fontInfo._fontFlags & DISPFLAG_4) {
+ if (fontInfo._shadow.x <= 0) {
+ viewPort->_fontRect.left += fontInfo._shadow.x;
+ viewPort->_fontRect.right -= fontInfo._shadow.x * 2;
+ } else {
+ viewPort->_fontRect.right += fontInfo._shadow.x;
+ }
+
+ if (fontInfo._shadow.y <= 0) {
+ viewPort->_fontRect.top += fontInfo._shadow.y;
+ viewPort->_fontRect.bottom -= fontInfo._shadow.y * 2;
+ } else {
+ viewPort->_fontRect.bottom += fontInfo._shadow.y;
+ }
+ } else if (fontInfo._fontFlags & 8) {
+ if (fontInfo._shadow.x <= 0) {
+ viewPort->_fontRect.left += fontInfo._shadow.x;
+ viewPort->_fontRect.right -= fontInfo._shadow.x * 3;
+ } else {
+ viewPort->_fontRect.right += fontInfo._shadow.x * 3;
+ viewPort->_fontRect.left -= fontInfo._shadow.x;
+ }
+
+ if (fontInfo._shadow.y <= 0) {
+ viewPort->_fontRect.top += fontInfo._shadow.y;
+ viewPort->_fontRect.bottom -= fontInfo._shadow.y * 3;
+ } else {
+ viewPort->_fontRect.bottom += fontInfo._shadow.y * 3;
+ viewPort->_fontRect.top -= fontInfo._shadow.y;
+ }
+ }
+ }
+
+ if (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT)) {
+ viewPort->addSaveRect(viewPort->_pageIndex, viewPort->_fontRect);
+ }
+
+ if (fontInfo._fontFlags & DISPFLAG_1) {
+ gfxManager._drawPtr->_pos = Common::Point(viewPort->_fontRect.left, viewPort->_fontRect.top);
+ gfxManager._drawPtr->_penColor = fontInfo._backColor;
+ sFillBox(viewPort->_fontRect.width(), viewPort->_fontRect.height());
+ }
+
+ bool saveBack = gfxManager._saveBack;
+ gfxManager._saveBack = false;
+
+ int count = 0;
+ if (fontInfo._fontFlags & DISPFLAG_4)
+ count = 1;
+ else if (fontInfo._fontFlags & DISPFLAG_8)
+ count = 8;
+
+ for (int i = count; i >= 0; --i) {
+ xp = pos.x;
+ yp = pos.y;
+
+ switch (xShadows[i]) {
+ case -1:
+ xp -= fontInfo._shadow.x;
+ break;
+ case 1:
+ xp += fontInfo._shadow.x;
+ break;
+ default:
+ break;
+ }
+
+ switch (yShadows[i]) {
+ case -1:
+ yp -= fontInfo._shadow.y;
+ break;
+ case 1:
+ yp += fontInfo._shadow.y;
+ break;
+ default:
+ break;
+ }
+
+ if (i != 0) {
+ fontChar._pick = 0;
+ fontChar._onOff = fontInfo._shadowColor;
+ } else if (fontData._fontDepth == 1 || (fontInfo._fontFlags & DISPFLAG_10)) {
+ fontChar._pick = 0;
+ fontChar._onOff = fontInfo._foreColor;
+ } else {
+ fontChar._pick = fontInfo._picPick;
+ fontChar._onOff = fontInfo._picOnOff;
+ }
+
+ // Loop to draw each character in turn
+ msgWidth = -padding;
+ const char *msgP = msg.c_str();
+ char ch;
+
+ while ((ch = *msgP++) != '\0') {
+ int charValue = (int)ch - minChar;
+ if (charValue < 0 || charValue >= totalChars || fontData._charWidth[charValue] == 0)
+ charValue = fontData._maxChar - minChar;
+
+ int charWidth = fontData._charWidth[charValue];
+ fontChar._bounds.setWidth(charWidth);
+
+ uint16 offset = READ_LE_UINT16(fontData._charOffsets + charValue * 2);
+ fontChar._imgData = fontData._charImages + offset * 2;
+
+ gfxManager.sDrawPic(&fontChar, this, Common::Point(xp, yp));
+
+ fontChar._imgData = NULL;
+ xp += charWidth + padding;
+ msgWidth += charWidth + padding;
+ }
+ }
+
+ msgWidth = MAX(msgWidth, 0);
+ if (fontInfo._justify == ALIGN_LEFT)
+ fontInfo._pos.x = xp;
+
+ gfxManager._saveBack = saveBack;
+ gfxManager._clipPtr = clipPtr;
+
+ return msgWidth;
+}
+
+int DisplayResource::textWidth(const Common::String &msg) {
+ if (msg.size() == 0)
+ return 0;
+
+ const char *msgP = msg.c_str();
+ FontResource &fontData = *_vm->_graphicsManager->_fontPtr->_curFont;
+ int minChar = fontData._minChar;
+ int maxChar = fontData._maxChar;
+ int padding = fontData._padding;
+ int totalWidth = -padding;
+ char ch;
+
+ // Loop through the characters
+ while ((ch = *msgP++) != '\0') {
+ int charValue = (int)ch;
+ if (charValue < minChar || charValue > maxChar)
+ charValue = maxChar;
+
+ if (!fontData._charWidth[charValue - minChar])
+ charValue = maxChar;
+
+ totalWidth += fontData._charWidth[charValue - minChar] + padding;
+ }
+
+ if (totalWidth < 0)
+ totalWidth = 0;
+ return totalWidth;
+}
+
+/*------------------------------------------------------------------------*/
+
+PictureResource::PictureResource(BoltFilesState &state, const byte *src):
+ DisplayResource(state._vm) {
+ _flags = READ_LE_UINT16(src);
+ _select = src[2];
+ _pick = src[3];
+ _onOff = src[4];
+ // depth is in src[5], unused.
+
+ int xs = READ_LE_UINT16(&src[6]);
+ int ys = READ_LE_UINT16(&src[8]);
+ _bounds = Common::Rect(xs, ys, xs + READ_LE_UINT16(&src[10]),
+ ys + READ_LE_UINT16(&src[12]));
+ _maskData = READ_LE_UINT32(&src[14]);
+ _planeSize = READ_LE_UINT16(&src[22]);
+
+ _keyColor = 0;
+ _imgData = NULL;
+ _freeImgData = DisposeAfterUse::YES;
+
+ int nbytes = _bounds.width() * _bounds.height();
+ if (_flags & PICFLAG_20) {
+ if (_flags & (PICFLAG_VFLIP | PICFLAG_HFLIP)) {
+ // Get the raw data for the picture from another resource
+ uint32 id = READ_LE_UINT32(&src[18]);
+ const byte *srcData = state._curLibPtr->boltEntry(id)._data;
+ _imgData = new byte[nbytes];
+
+ // Flip the image data either horizontally or vertically
+ if (_flags & PICFLAG_HFLIP)
+ flipHorizontal(srcData);
+ else
+ flipVertical(srcData);
+ } else {
+ uint32 id = READ_LE_UINT32(&src[18]) >> 16;
+ byte *imgData = state._curLibPtr->boltEntry(id)._picResource->_imgData;
+ _freeImgData = DisposeAfterUse::NO;
+
+ // TODO: Double check code below. Despite different coding in the
+ // original, both looked like they do the same formula
+ if (_flags & PICFLAG_PIC_OFFSET) {
+ _imgData = imgData + (READ_LE_UINT32(&src[18]) & 0xffff);
+ } else {
+ _imgData = imgData + (READ_LE_UINT32(&src[18]) & 0xffff);
+ }
+ }
+ } else if (_flags & PICFLAG_PIC_OFFSET) {
+ int mode = 0;
+ if (_bounds.width() == 320)
+ mode = 147;
+ else {
+ if (_bounds.width() == 640) {
+ if (_bounds.height() == 400)
+ mode = 220;
+ else
+ mode = 221;
+ } else if (_bounds.width() == 800)
+ mode = 222;
+ else if (_bounds.width() == 1024)
+ mode = 226;
+ }
+
+ if (mode != state._vm->_graphicsManager->_SVGAMode) {
+ state._vm->_graphicsManager->_SVGAMode = mode;
+ state._vm->_graphicsManager->clearPalette();
+ }
+
+ int screenOffset = READ_LE_UINT32(&src[18]) & 0xffff;
+ assert(screenOffset == 0);
+
+ if (_flags & PICFLAG_CLEAR_SCREEN) {
+ // Clear screen picture. That's right. This game actually has a picture
+ // resource flag to clear the screen! Bizarre.
+ Graphics::Surface &s = state._vm->_graphicsManager->_screenSurface;
+ s.fillRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0);
+ } else {
+ // Direct screen loading picture. In this case, the raw data of the resource
+ // is directly decompressed into the screen surface. Again, bizarre.
+ byte *pDest = (byte *)state._vm->_graphicsManager->_screenSurface.getPixels();
+ state.decompress(pDest, SCREEN_WIDTH * SCREEN_HEIGHT, state._curMemberPtr->_mode);
+ }
+ } else {
+ if (_flags & PICFLAG_CLEAR_SCREEN00) {
+ if (!(_flags & PICFLAG_CLEAR_SCREEN))
+ nbytes = state._curMemberPtr->_size - 24;
+
+ int mask = (nbytes + 0x3FFF) >> 14;
+ _imgData = NULL;
+
+ if (state._boltPageFrame != NULL) {
+ _maskData = mask;
+ state.decompress(state._boltPageFrame, nbytes, state._curMemberPtr->_mode);
+ return;
+ }
+ }
+
+ if (_flags & PICFLAG_CLEAR_SCREEN) {
+ _imgData = new byte[nbytes];
+ Common::fill(_imgData, _imgData + nbytes, 0);
+ } else {
+ _imgData = state.decompress(NULL, nbytes, state._curMemberPtr->_mode);
+ }
+ }
+}
+
+PictureResource::PictureResource(Graphics::Surface *surface) {
+ _flags = DISPFLAG_NONE;
+ _select = 0;
+ _pick = 0;
+ _onOff = 0;
+ _maskData = 0;
+ _planeSize = 0;
+ _keyColor = 0;
+
+ _bounds = Common::Rect(0, 0, surface->w, surface->h);
+ _imgData = (byte *)surface->getPixels();
+ _freeImgData = DisposeAfterUse::NO;
+}
+
+PictureResource::PictureResource() {
+ _flags = DISPFLAG_NONE;
+ _select = 0;
+ _pick = 0;
+ _onOff = 0;
+ _maskData = 0;
+ _planeSize = 0;
+ _keyColor = 0;
+
+ _imgData = NULL;
+ _freeImgData = DisposeAfterUse::NO;
+}
+
+PictureResource::PictureResource(int flags, int select, int pick, int onOff,
+ const Common::Rect &bounds, int maskData, byte *imgData, int planeSize) {
+ _flags = flags;
+ _select = select;
+ _pick = pick;
+ _onOff = onOff;
+ _bounds = bounds;
+ _maskData = maskData;
+ _imgData = imgData;
+ _planeSize = planeSize;
+ _freeImgData = DisposeAfterUse::NO;
+ _keyColor = 0;
+}
+
+PictureResource::~PictureResource() {
+ if (_freeImgData == DisposeAfterUse::YES)
+ delete[] _imgData;
+}
+
+void PictureResource::flipHorizontal(const byte *data) {
+ const byte *srcP = data + 18;
+ byte *destP = _imgData + _bounds.width() - 1;
+
+ for (int y = 0; y < _bounds.height(); ++y) {
+ for (int x = 0; x < _bounds.width(); ++x, ++srcP, --destP)
+ *destP = *srcP;
+
+ srcP += _bounds.width();
+ destP += _bounds.width();
+ }
+}
+
+void PictureResource::flipVertical(const byte *data) {
+ const byte *srcP = data + 18;
+ byte *destP = _imgData + _bounds.width() * (_bounds.height() - 1);
+
+ for (int y = 0; y < _bounds.height(); ++y) {
+ Common::copy(srcP, srcP + _bounds.width(), destP);
+ srcP += _bounds.width();
+ destP -= _bounds.width();
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
+ _state(state), DisplayResource(state._vm) {
+ _flags = READ_LE_UINT16(src);
+ _parent = NULL;
+ _pageCount = READ_LE_UINT16(src + 6);
+ _pageIndex = READ_LE_UINT16(src + 8);
+ _lastPage = READ_LE_UINT16(src + 10);
+
+ int xs = READ_LE_UINT16(src + 12);
+ int ys = READ_LE_UINT16(src + 14);
+ _bounds = Common::Rect(xs, ys, xs + READ_LE_UINT16(src + 16),
+ ys + READ_LE_UINT16(src + 18));
+
+ _currentPic = state._curLibPtr->getPictureResource(READ_LE_UINT32(src + 0x20));
+ _activePage = state._curLibPtr->getPictureResource(READ_LE_UINT32(src + 0x24));
+ _pages[0] = state._curLibPtr->getPictureResource(READ_LE_UINT32(src + 0x28));
+ _pages[1] = state._curLibPtr->getPictureResource(READ_LE_UINT32(src + 0x2C));
+
+ byte *dummy;
+ state._curLibPtr->resolveIt(READ_LE_UINT32(src + 0x30), &dummy);
+
+ // Get the rect list
+ for (int listIndex = 0; listIndex < 3; ++listIndex) {
+ _rectListCount[listIndex] = (int16)READ_LE_UINT16(src + 0x40 + 2 * listIndex);
+ int id = (int)READ_LE_UINT32(src + 0x34 + listIndex * 4);
+
+ if (id == -1) {
+ _rectListPtr[listIndex] = NULL;
+ } else {
+ _rectListPtr[listIndex] = new Common::Array<Common::Rect>();
+
+ if (_rectListCount[listIndex] > 0) {
+ int16 *rectList = (int16 *)state._curLibPtr->memberAddrOffset(id);
+ for (int i = 0; i < _rectListCount[listIndex]; ++i) {
+ xs = FROM_LE_16(rectList[0]);
+ ys = FROM_LE_16(rectList[1]);
+ _rectListPtr[i]->push_back(Common::Rect(xs, ys, xs + FROM_LE_16(rectList[2]),
+ ys + FROM_LE_16(rectList[3])));
+ }
+ }
+ }
+ }
+
+ xs = READ_LE_UINT16(src + 0x46);
+ ys = READ_LE_UINT16(src + 0x48);
+ _clipRect = Common::Rect(xs, ys, xs + READ_LE_UINT16(src + 0x4A),
+ ys + READ_LE_UINT16(src + 0x4C));
+
+ state._curLibPtr->resolveIt(READ_LE_UINT32(src + 0x7A), &dummy);
+ state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x7E), (GraphicMethodPtr *)&_fn1);
+ state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x82), (GraphicMethodPtr *)&_setupFn);
+ state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x86), (GraphicMethodPtr *)&_addFn);
+ state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x8A), (GraphicMethodPtr *)&_restoreFn);
+
+ if (!_restoreFn && _addFn)
+ _addFn = &GraphicsManager::addRectNoSaveBack;
+}
+
+ViewPortResource::~ViewPortResource() {
+ for (int i = 0; i < 3; ++i)
+ delete _rectListPtr[i];
+}
+
+void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clippingRect,
+ ViewPortSetupPtr setupFn, ViewPortAddPtr addFn, ViewPortRestorePtr restoreFn) {
+ PictureResource *pic = _currentPic;
+ Common::Rect r = _bounds;
+ r.translate(pic->_bounds.left, pic->_bounds.top);
+ int xDiff, yDiff;
+
+ if (page) {
+ // Clip based on the passed picture resource
+ xDiff = page->_bounds.left - r.left;
+ yDiff = page->_bounds.top - r.top;
+
+ if (xDiff > 0) {
+ int width = r.width();
+ r.left = page->_bounds.left;
+ r.setWidth(xDiff <= width ? width - xDiff : 0);
+ }
+ if (yDiff > 0) {
+ int height = r.height();
+ r.top = page->_bounds.top;
+ r.setHeight(yDiff <= height ? height - yDiff : 0);
+ }
+
+ xDiff = r.right - page->_bounds.right;
+ yDiff = r.bottom - page->_bounds.bottom;
+
+ if (xDiff > 0)
+ r.setWidth(xDiff <= r.width() ? r.width() - xDiff : 0);
+ if (yDiff > 0)
+ r.setHeight(yDiff <= r.height() ? r.height() - yDiff : 0);
+ }
+
+ if (clippingRect) {
+ // Clip based on the passed clip rectangles
+ xDiff = clippingRect->left - r.left;
+ yDiff = clippingRect->top - r.top;
+
+ if (xDiff > 0) {
+ int width = r.width();
+ r.left = clippingRect->left;
+ r.setWidth(xDiff <= width ? width - xDiff : 0);
+ }
+ if (yDiff > 0) {
+ int height = r.height();
+ r.top = clippingRect->top;
+ r.setHeight(yDiff <= height ? height - yDiff : 0);
+ }
+
+ xDiff = r.right - clippingRect->right;
+ yDiff = r.bottom - clippingRect->bottom;
+
+ if (xDiff > 0)
+ r.setWidth(xDiff <= r.width() ? r.width() - xDiff : 0);
+ if (yDiff > 0)
+ r.setHeight(yDiff <= r.height() ? r.height() - yDiff : 0);
+ }
+
+ _activePage = page;
+ _clipRect = r;
+ _setupFn = setupFn;
+ _addFn = addFn;
+ _restoreFn = restoreFn;
+
+ if (setupFn)
+ (_state._vm->_graphicsManager->*setupFn)(this);
+}
+
+void ViewPortResource::setupViewPort() {
+ setupViewPort(_state._vm->_graphicsManager->_backgroundPage, NULL,
+ &GraphicsManager::setupMCGASaveRect, &GraphicsManager::addRectOptSaveRect,
+ &GraphicsManager::restoreMCGASaveRect);
+}
+
+void ViewPortResource::setupViewPort(PictureResource *pic, Common::Rect *clippingRect) {
+ setupViewPort(pic, clippingRect,
+ &GraphicsManager::setupMCGASaveRect, &GraphicsManager::addRectOptSaveRect,
+ &GraphicsManager::restoreMCGASaveRect);
+}
+
+void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) {
+ Common::Rect rect = r;
+
+ if (clipRect(rect)) {
+ if (_addFn) {
+ (_state._vm->_graphicsManager->*_addFn)(this, pageIndex, rect);
+ } else if (_rectListCount[pageIndex] != -1) {
+ _rectListPtr[pageIndex]->push_back(rect);
+ }
+ }
+}
+
+void ViewPortResource::fillPic(byte onOff) {
+ _state._vm->_graphicsManager->fillPic(this, onOff);
+}
+
+void ViewPortResource::drawIfaceTime() {
+ // Hour display
+ _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
+ (_state._vm->_gameHour / 10) == 0 ? 10 : _state._vm->_gameHour / 10,
+ Common::Point(161, 25));
+ _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
+ _state._vm->_gameHour % 10, Common::Point(172, 25));
+
+ // Minute display
+ _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
+ _state._vm->_gameMinute / 10, Common::Point(190, 25));
+ _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort,
+ _state._vm->_gameMinute % 10, Common::Point(201, 25));
+
+ // AM/PM indicator
+ PictureResource *pic = _state._vm->_bVoy->boltEntry(_state._vm->_voy->_isAM ? 272 : 273)._picResource;
+ _state._vm->_graphicsManager->sDrawPic(pic, _state._vm->_graphicsManager->_vPort,
+ Common::Point(215, 27));
+}
+
+void ViewPortResource::drawPicPerm(PictureResource *pic, const Common::Point &pt) {
+ Common::Rect bounds = pic->_bounds;
+ bounds.translate(pt.x, pt.y);
+
+ bool saveBack = _state._vm->_graphicsManager->_saveBack;
+ _state._vm->_graphicsManager->_saveBack = false;
+ _state._vm->_graphicsManager->sDrawPic(pic, this, pt);
+ clipRect(bounds);
+
+ for (int pageIndex = 0; pageIndex < _pageCount; ++pageIndex) {
+ if (_pageIndex != pageIndex) {
+ addSaveRect(pageIndex, bounds);
+ }
+ }
+
+ _state._vm->_graphicsManager->_saveBack = saveBack;
+}
+/*------------------------------------------------------------------------*/
+
+ViewPortListResource::ViewPortListResource(BoltFilesState &state, const byte *src) {
+ uint count = READ_LE_UINT16(src);
+ _palIndex = READ_LE_UINT16(src + 2);
+
+ // Load palette map
+ byte *palData = state._curLibPtr->memberAddr(READ_LE_UINT32(src + 4));
+ for (uint i = 0; i < 256; ++i, palData += 16)
+ _palette.push_back(ViewPortPalEntry(palData));
+
+ // Load view port pointer list
+ const uint32 *idP = (const uint32 *)&src[8];
+ for (uint i = 0; i < count; ++i, ++idP) {
+ uint32 id = READ_LE_UINT32(idP);
+ BoltEntry &entry = state._curLibPtr->getBoltEntryFromLong(id);
+
+ assert(entry._viewPortResource);
+ _entries.push_back(entry._viewPortResource);
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+ViewPortPalEntry::ViewPortPalEntry(const byte *src) {
+ const uint16 *v = (const uint16 *)src;
+ _rEntry = READ_LE_UINT16(v++);
+ _gEntry = READ_LE_UINT16(v++);
+ _bEntry = READ_LE_UINT16(v++);
+ _rChange = READ_LE_UINT16(v++);
+ _gChange = READ_LE_UINT16(v++);
+ _bChange = READ_LE_UINT16(v++);
+ _palIndex = READ_LE_UINT16(v++);
+}
+
+
+/*------------------------------------------------------------------------*/
+
+FontResource::FontResource(BoltFilesState &state, byte *src) {
+ _minChar = src[0];
+ _maxChar = src[1];
+ _fontDepth = src[2];
+ _padding = src[3];
+ _fontHeight = src[5];
+ _topPadding = (int8)src[6];
+
+ int totalChars = _maxChar - _minChar + 1;
+ _charWidth = new int[totalChars];
+ for (int i = 0; i < totalChars; ++i)
+ _charWidth[i] = READ_LE_UINT16(src + 8 + 2 * i);
+
+ _charOffsets = src + 8 + totalChars * 2;
+ _charImages = _charOffsets + totalChars * 2;
+}
+
+FontResource::~FontResource() {
+ delete[] _charWidth;
+}
+
+/*------------------------------------------------------------------------*/
+
+FontInfoResource::FontInfoResource(BoltFilesState &state, const byte *src) {
+ _curFont = NULL;
+ _picFlags = src[4];
+ _picSelect = src[5];
+ _picPick = src[6];
+ _picOnOff = src[7];
+ _fontFlags = src[8];
+ _justify = (FontJustify)src[9];
+ _fontSaveBack = READ_LE_UINT16(src + 10);
+ _pos.x = (int16)READ_LE_UINT16(src + 12);
+ _pos.y = (int16)READ_LE_UINT16(src + 14);
+ _justifyWidth = READ_LE_UINT16(src + 16);
+ _justifyHeight = READ_LE_UINT16(src + 18);
+ _shadow.x = READ_LE_UINT16(src + 20);
+ _shadow.y = READ_LE_UINT16(src + 22);
+ _foreColor = READ_LE_UINT16(src + 24);
+ _backColor = READ_LE_UINT16(src + 26);
+ _shadowColor = READ_LE_UINT16(src + 28);
+}
+
+FontInfoResource::FontInfoResource() {
+ _curFont = NULL;
+ _picFlags = DISPFLAG_1 | DISPFLAG_2;
+ _picSelect = 0xff;
+ _picPick = 0xff;
+ _picOnOff = 0;
+ _fontFlags = DISPFLAG_NONE;
+ _justify = ALIGN_LEFT;
+ _fontSaveBack = 0;
+ _justifyWidth = 1;
+ _justifyHeight = 1;
+ _shadow = Common::Point(1, 1);
+ _foreColor = 1;
+ _backColor = 0;
+ _shadowColor = 0;
+}
+
+FontInfoResource::FontInfoResource(byte picFlags, byte picSelect, byte picPick, byte picOnOff,
+ byte fontFlags, FontJustify justify, int fontSaveBack, const Common::Point &pos,
+ int justifyWidth, int justifyHeight, const Common::Point &shadow, int foreColor,
+ int backColor, int shadowColor) {
+ _curFont = NULL;
+ _picFlags = picFlags;
+ _picSelect = picSelect;
+ _picPick = picPick;
+ _picOnOff = picOnOff;
+ _fontFlags = fontFlags;
+ _justify = justify;
+ _fontSaveBack = fontSaveBack;
+ _pos = pos;
+ _justifyWidth = justifyWidth;
+ _justifyHeight = justifyHeight;
+ _shadow = shadow;
+ _foreColor = foreColor;
+ _backColor = backColor;
+ _shadowColor = shadowColor;
+}
+
+/*------------------------------------------------------------------------*/
+
+CMapResource::CMapResource(BoltFilesState &state, const byte *src): _vm(state._vm) {
+ _steps = src[0];
+ _fadeStatus = src[1];
+ _start = READ_LE_UINT16(src + 2);
+ _end = READ_LE_UINT16(src + 4);
+
+ int count = _end - _start + 1;
+ _entries = new byte[count * 3];
+ Common::copy(src + 6, src + 6 + 3 * count, _entries);
+
+ int palIndex = state._vm->_graphicsManager->_viewPortListPtr->_palIndex;
+ if (_end > palIndex)
+ _end = palIndex;
+ if (_start > palIndex)
+ _start = palIndex;
+}
+
+CMapResource::~CMapResource() {
+ delete[] _entries;
+}
+
+void CMapResource::startFade() {
+ _vm->_eventsManager->startFade(this);
+}
+
+/*------------------------------------------------------------------------*/
+
+VInitCycleResource::VInitCycleResource(BoltFilesState &state, const byte *src):
+ _state(state) {
+ // Set up arrays
+ for (int i = 0; i < 4; ++i) {
+ _type[i] = READ_LE_UINT16(src + i * 2);
+ state._curLibPtr->resolveIt(READ_LE_UINT32(src + 8 + i * 4), &_ptr[i]);
+ }
+}
+
+void VInitCycleResource::vStartCycle() {
+ EventsManager &evt = *_state._vm->_eventsManager;
+ evt._cycleIntNode._flags |= 1;
+ evt._cyclePtr = this;
+
+ for (int i = 0; i < 4; ++i) {
+ evt._cycleNext[i] = _ptr[i];
+ evt._cycleTime[i] = 0;
+ }
+
+ evt._cycleStatus = 1;
+ evt._cycleIntNode._flags &= ~1;
+}
+
+void VInitCycleResource::vStopCycle() {
+ EventsManager &evt = *_state._vm->_eventsManager;
+ evt._cycleIntNode._flags |= 1;
+ evt._cycleStatus &= ~1;
+}
+
+/*------------------------------------------------------------------------*/
+
+PtrResource::PtrResource(BoltFilesState &state, const byte *src) {
+ // Load pointer list
+ const uint32 *idP = (const uint32 *)&src[0];
+ int size = state._curMemberPtr->_size;
+
+ for (int i = 0; i < size / 4; ++i, ++idP) {
+ uint32 id = READ_LE_UINT32(idP);
+ BoltEntry &entry = state._curLibPtr->getBoltEntryFromLong(id);
+
+ _entries.push_back(&entry);
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+ControlResource::ControlResource(BoltFilesState &state, const byte *src) {
+ // Get Id for the state data. Since it refers to a following entry in the same
+ // group, for simplicity we set the _state back in the main playStamp method
+ _stateId = READ_LE_UINT32(&src[0x32]);
+ _state = nullptr;
+
+ for (int i = 0; i < 8; ++i)
+ _memberIds[i] = READ_LE_UINT16(src + i * 2);
+
+ // Load pointer list
+ const uint32 *idP = (const uint32 *)&src[0x10];
+ int count = READ_LE_UINT16(&src[0x36]);
+
+ Common::fill(&_entries[0], &_entries[8], (byte *)nullptr);
+ for (int i = 0; i < count; ++i, ++idP) {
+ uint32 id = READ_LE_UINT32(idP);
+ state._curLibPtr->resolveIt(id, &_entries[i]);
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+StateResource::StateResource(BoltFilesState &state, const byte *src):
+ _victimIndex(_vals[1]), _victimEvidenceIndex(_vals[2]),
+ _victimMurderIndex(_vals[3]) {
+ for (int i = 0; i < 4; ++i)
+ _vals[i] = READ_LE_UINT32(src + i * 4);
+}
+
+void StateResource::synchronize(Common::Serializer &s) {
+ for (int i = 0; i < 4; ++i)
+ s.syncAsSint32LE(_vals[i]);
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
new file mode 100644
index 0000000000..49c0b2c8a4
--- /dev/null
+++ b/engines/voyeur/files.h
@@ -0,0 +1,619 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_FILES_H
+#define VOYEUR_FILES_H
+
+#include "common/scummsys.h"
+#include "common/file.h"
+#include "common/rect.h"
+#include "common/str.h"
+#include "voyeur/graphics.h"
+
+namespace Voyeur {
+
+class VoyeurEngine;
+class BoltFile;
+class BoltGroup;
+class BoltEntry;
+class RectResource;
+class PictureResource;
+class ViewPortResource;
+class ViewPortListResource;
+class FontResource;
+class CMapResource;
+class VInitCycleResource;
+class PtrResource;
+class ControlResource;
+class StateResource;
+class ThreadResource;
+
+#define DECOMPRESS_SIZE 0x7000
+
+class ResolveEntry {
+public:
+ uint32 _id;
+ byte **_p;
+
+ ResolveEntry(uint32 id, byte **p) { _id = id; _p = p; }
+};
+
+class BoltFilesState {
+public:
+ VoyeurEngine *_vm;
+ BoltFile *_curLibPtr;
+ BoltGroup *_curGroupPtr;
+ BoltEntry *_curMemberPtr;
+ int _bufferEnd;
+ int _bufferBegin;
+ int _bytesLeft;
+ int _bufSize;
+ byte *_bufStart;
+ byte *_bufPos;
+ byte _decompressBuf[DECOMPRESS_SIZE];
+ int _historyIndex;
+ byte _historyBuffer[0x200];
+ int _runLength;
+ bool _decompState;
+ int _runType;
+ int _runValue;
+ int _runOffset;
+ Common::File *_curFd;
+ Common::Array<ResolveEntry> _resolves;
+
+ byte *_boltPageFrame;
+public:
+ BoltFilesState(VoyeurEngine *vm);
+
+ byte *decompress(byte *buf, int size, int mode);
+ void nextBlock();
+};
+
+class BoltFile {
+private:
+ Common::Array<BoltGroup> _groups;
+protected:
+ BoltFilesState &_state;
+
+ virtual void initResource(int resType) = 0;
+ void initDefault();
+private:
+ void resolveAll();
+ byte *getBoltMember(uint32 id);
+
+public:
+ Common::File _file;
+
+ BoltFile(const Common::String &filename, BoltFilesState &state);
+ virtual ~BoltFile();
+
+ BoltGroup *getBoltGroup(uint16 id);
+ void freeBoltGroup(uint16 id);
+ void freeBoltMember(uint32 id);
+ byte *memberAddr(uint32 id);
+ byte *memberAddrOffset(uint32 id);
+ void resolveIt(uint32 id, byte **p);
+ void resolveFunction(uint32 id, GraphicMethodPtr *fn);
+
+ BoltEntry &boltEntry(uint16 id);
+ BoltEntry &getBoltEntryFromLong(uint32 id);
+ PictureResource *getPictureResource(uint32 id);
+ CMapResource *getCMapResource(uint32 id);
+};
+
+class BVoyBoltFile: public BoltFile {
+private:
+ // initType method table
+ void sInitRect();
+ void sInitPic();
+ void vInitCMap();
+ void vInitCycl();
+ void initViewPort();
+ void initViewPortList();
+ void initFontInfo();
+ void initFont();
+ void initSoundMap();
+protected:
+ virtual void initResource(int resType);
+public:
+ BVoyBoltFile(BoltFilesState &state);
+};
+
+class StampBoltFile: public BoltFile {
+private:
+ void initThread();
+ void initState();
+ void initPtr();
+ void initControl();
+protected:
+ virtual void initResource(int resType);
+public:
+ StampBoltFile(BoltFilesState &state);
+};
+
+class BoltGroup {
+private:
+ Common::SeekableReadStream *_file;
+public:
+ bool _loaded;
+ bool _processed;
+ int _count;
+ int _fileOffset;
+ Common::Array<BoltEntry> _entries;
+public:
+ BoltGroup(Common::SeekableReadStream *f);
+ virtual ~BoltGroup();
+
+ void load(uint16 groupId);
+ void unload();
+};
+
+
+class BoltEntry {
+private:
+ Common::SeekableReadStream *_file;
+public:
+ uint16 _id;
+ byte _mode;
+ byte _initMethod;
+ int _fileOffset;
+ int _size;
+ byte *_data;
+
+ // bvoy.blt resource types
+ RectResource *_rectResource;
+ PictureResource *_picResource;
+ ViewPortResource *_viewPortResource;
+ ViewPortListResource *_viewPortListResource;
+ FontResource *_fontResource;
+ FontInfoResource *_fontInfoResource;
+ CMapResource *_cMapResource;
+ VInitCycleResource *_vInitCycleResource;
+
+ // stampblt.blt resource types
+ PtrResource *_ptrResource;
+ ControlResource *_controlResource;
+ StateResource *_stateResource;
+ ThreadResource *_threadResource;
+public:
+ BoltEntry(Common::SeekableReadStream *f, uint16 id);
+ virtual ~BoltEntry();
+
+ void load();
+ bool hasResource() const;
+};
+
+class FilesManager {
+public:
+ BoltFilesState *_boltFilesState;
+ BoltFile *_curLibPtr;
+public:
+ FilesManager(VoyeurEngine *vm);
+ ~FilesManager();
+
+ bool openBoltLib(const Common::String &filename, BoltFile *&boltFile);
+ byte *fload(const Common::String &filename, int *size);
+};
+
+class RectEntry: public Common::Rect {
+public:
+ int _arrIndex;
+ int _count;
+
+ RectEntry(int x1, int y1, int x2, int y2, int arrIndex, int count);
+};
+
+class RectResource: public Common::Rect {
+public:
+ Common::Array<RectEntry> _entries;
+public:
+ RectResource(const byte *src, int size, bool isExtendedRects);
+ RectResource(int xp, int yp, int width, int height);
+ virtual ~RectResource() {}
+};
+
+/* bvoy.blt resource types */
+
+enum PictureFlag {
+ PICFLAG_2 = 2, PICFLAG_PIC_OFFSET = 8, PICFLAG_CLEAR_SCREEN = 0x10,
+ PICFLAG_20 = 0x20, PICFLAG_HFLIP = 0x40, PICFLAG_VFLIP = 0x80, PICFLAG_100 = 0x100,
+ PICFLAG_CLEAR_SCREEN00 = 0x1000
+};
+
+enum DisplayFlag {
+ DISPFLAG_1 = 1, DISPFLAG_2 = 2, DISPFLAG_4 = 4, DISPFLAG_8 = 8,
+ DISPFLAG_10 = 0x10, DISPFLAG_20 = 0x20, DISPFLAG_40 = 0x40, DISPFLAG_80 = 0x80,
+ DISPFLAG_100 = 0x100, DISPFLAG_200 = 0x200, DISPFLAG_400 = 0x400,
+ DISPFLAG_800 = 0x800, DISPFLAG_1000 = 0x1000, DISPFLAG_2000 = 0x2000,
+ DISPFLAG_4000 = 0x4000, DISPFLAG_VIEWPORT = 0x8000, DISPFLAG_CURSOR = 0x10000,
+ DISPFLAG_NONE = 0};
+
+class DisplayResource {
+private:
+ VoyeurEngine *_vm;
+public:
+ uint32 _flags;
+public:
+ DisplayResource();
+ DisplayResource(VoyeurEngine *vm);
+
+ /**
+ * Fill a box of the given size at the current _drawPtr location
+ */
+ void sFillBox(int width, int height);
+
+ /**
+ * Draw text at the current pen position
+ */
+ int drawText(const Common::String &msg);
+
+ /**
+ * Return the width of a given text in the current font
+ */
+ int textWidth(const Common::String &msg);
+
+ /**
+ * Clip the given rectangle by the currently viewable area
+ */
+ bool clipRect(Common::Rect &rect);
+};
+
+class PictureResource: public DisplayResource {
+private:
+ /**
+ * Flip the image data horizontally
+ */
+ void flipHorizontal(const byte *data);
+
+ /**
+ * Flip the image data vertically
+ */
+ void flipVertical(const byte *data);
+public:
+ byte _select;
+ byte _pick;
+ byte _onOff;
+ Common::Rect _bounds;
+ uint32 _maskData;
+ uint _planeSize;
+ byte _keyColor;
+
+ /**
+ * Image data for the picture
+ */
+ byte *_imgData;
+
+ /**
+ * Flag to indicate whether to free the image data
+ */
+ DisposeAfterUse::Flag _freeImgData;
+public:
+ PictureResource(BoltFilesState &state, const byte *src);
+ PictureResource(int flags, int select, int pick, int onOff,
+ const Common::Rect &bounds, int maskData, byte *imgData, int planeSize);
+ PictureResource(Graphics::Surface *surface);
+ PictureResource();
+ virtual ~PictureResource();
+};
+
+typedef void (ViewPortResource::*ViewPortMethodPtr)();
+
+class ViewPortResource: public DisplayResource {
+private:
+ BoltFilesState &_state;
+private:
+ void setupViewPort(PictureResource *page, Common::Rect *clippingRect, ViewPortSetupPtr setupFn,
+ ViewPortAddPtr addFn, ViewPortRestorePtr restoreFn);
+public:
+ ViewPortResource *_parent;
+ int _pageCount;
+ int _pageIndex;
+ int _lastPage;
+ Common::Rect _bounds;
+ PictureResource *_currentPic;
+ PictureResource *_activePage;
+ PictureResource *_pages[2];
+
+ // Rect lists and counts. Note that _rectListCount values of '-1' seem to have
+ // special significance, which is why I'm not making them redundant in favor
+ // of the arrays' .size() method
+ Common::Array<Common::Rect> *_rectListPtr[3];
+ int _rectListCount[3];
+
+ Common::Rect _clipRect;
+ GraphicMethodPtr _fn1;
+ ViewPortSetupPtr _setupFn;
+ ViewPortAddPtr _addFn;
+ ViewPortRestorePtr _restoreFn;
+ Common::Rect _fontRect;
+public:
+ ViewPortResource(BoltFilesState &state, const byte *src);
+ virtual ~ViewPortResource();
+
+ void setupViewPort();
+ void setupViewPort(PictureResource *pic, Common::Rect *clippingRect = NULL);
+ void addSaveRect(int pageIndex, const Common::Rect &r);
+ void fillPic(byte onOff);
+ void drawIfaceTime();
+ void drawPicPerm(PictureResource *pic, const Common::Point &pt);
+};
+
+class ViewPortPalEntry {
+public:
+ uint16 _rEntry, _gEntry, _bEntry;
+ uint16 _rChange, _gChange, _bChange;
+ uint16 _palIndex;
+public:
+ ViewPortPalEntry(const byte *src);
+};
+
+class ViewPortListResource {
+public:
+ Common::Array<ViewPortPalEntry> _palette;
+ Common::Array<ViewPortResource *> _entries;
+ int _palIndex;
+
+ ViewPortListResource(BoltFilesState &state, const byte *src);
+ virtual ~ViewPortListResource() {}
+};
+
+class FontResource {
+public:
+ int _minChar, _maxChar;
+ int _fontDepth;
+ int _padding;
+ int _fontHeight;
+ int _topPadding;
+ int *_charWidth;
+ byte *_charOffsets;
+ byte *_charImages;
+
+ FontResource(BoltFilesState &state, byte *src);
+ virtual ~FontResource();
+};
+
+enum FontJustify { ALIGN_LEFT = 0, ALIGN_CENTER = 1, ALIGN_RIGHT = 2 };
+
+class FontInfoResource {
+public:
+ FontResource *_curFont;
+ byte _picFlags;
+ byte _picSelect;
+ byte _picPick;
+ byte _picOnOff;
+ byte _fontFlags;
+ FontJustify _justify;
+ int _fontSaveBack;
+ Common::Point _pos;
+ int _justifyWidth;
+ int _justifyHeight;
+ Common::Point _shadow;
+ int _foreColor;
+ int _backColor;
+ int _shadowColor;
+public:
+ FontInfoResource(BoltFilesState &state, const byte *src);
+ FontInfoResource();
+ FontInfoResource(byte picFlags, byte picSelect, byte picPick, byte picOnOff, byte fontFlags,
+ FontJustify justify, int fontSaveBack, const Common::Point &pos, int justifyWidth,
+ int justifyHeight, const Common::Point &shadow, int foreColor, int backColor,
+ int shadowColor);
+};
+
+class CMapResource {
+private:
+ VoyeurEngine *_vm;
+public:
+ int _steps;
+ int _fadeStatus;
+ int _start;
+ int _end;
+ byte *_entries;
+public:
+ CMapResource(BoltFilesState &state, const byte *src);
+ virtual ~CMapResource();
+
+ void startFade();
+};
+
+class VInitCycleResource {
+private:
+ BoltFilesState &_state;
+public:
+ int _type[4];
+ byte *_ptr[4];
+public:
+ VInitCycleResource(BoltFilesState &state, const byte *src);
+ virtual ~VInitCycleResource() {}
+
+ void vStartCycle();
+ void vStopCycle();
+};
+
+/* stampblt.blt resources */
+
+class PtrResource {
+public:
+ Common::Array<BoltEntry *> _entries;
+
+ PtrResource(BoltFilesState &state, const byte *src);
+ virtual ~PtrResource() {}
+};
+
+class ControlResource {
+public:
+ int _memberIds[8];
+ byte *_entries[8];
+ int _stateId;
+ StateResource *_state;
+
+ ControlResource(BoltFilesState &state, const byte *src);
+ virtual ~ControlResource() {}
+};
+
+/**
+ * Stores data about the intended victim
+ */
+class StateResource {
+public:
+ int _vals[4];
+ int &_victimIndex;
+ int &_victimEvidenceIndex;
+ int &_victimMurderIndex;
+
+ StateResource(BoltFilesState &state, const byte *src);
+ virtual ~StateResource() {}
+
+ /**
+ * Synchronizes the game data
+ */
+ void synchronize(Common::Serializer &s);
+};
+
+class ThreadResource {
+public:
+ static int _useCount[8];
+ static void initUseCount();
+ static void unloadAllStacks(VoyeurEngine *vm);
+
+ static void init();
+private:
+ VoyeurEngine *_vm;
+ Common::Point _aptPos;
+private:
+ bool getStateInfo();
+ byte *getDataOffset();
+ void getButtonsText();
+ void getButtonsFlags();
+ void performOpenCard();
+ const byte *getRecordOffset(const byte *p);
+ const byte *getNextRecord(const byte *p);
+ const byte *getSTAMPCard(int cardId);
+ int getStateFromID(uint32 id);
+ uint32 getSID(int sid);
+ void cardAction(const byte *p);
+ void doSTAMPCardAction();
+ bool goToStateID(int stackId, int id);
+ const byte *cardPerform(const byte *card);
+ bool cardPerform2(const byte *p, int cardCmdId);
+ void savePrevious();
+ void setButtonFlag(int idx, byte bits);
+ void clearButtonFlag(int idx, byte bits);
+
+ /**
+ * Frees the apartment screen data
+ */
+ void freeTheApt();
+
+ /**
+ * Does any necessary animation at the start or end of showing the apartment.
+ */
+ void doAptAnim(int mode);
+
+ /**
+ * Updates the mansion scroll position if ncessary, and returns true if it
+ * has been changed.
+ */
+ bool checkMansionScroll();
+public:
+ int _stateId;
+ int _stackId;
+ int _savedStateId;
+ int _savedStackId;
+ int _newStateId;
+ int _newStackId;
+ int _stateFlags;
+ int _stateCount;
+ int _parseCount;
+ uint32 _nextStateId;
+ byte *_threadInfoPtr;
+ byte _buttonFlags[64];
+ byte _buttonIds[64];
+ byte *_ctlPtr;
+ byte *_playCommandsPtr;
+
+ /**
+ * Loads the specified stack
+ */
+ bool loadAStack(int stackId);
+
+ /**
+ * Unloads the specified stack
+ */
+ void unloadAStack(int stackId);
+
+ /**
+ * Initializes data for the thread based on the current state
+ */
+ bool doState();
+
+public:
+ ThreadResource(BoltFilesState &state, const byte *src);
+ virtual ~ThreadResource() {}
+
+ /**
+ * Initialize the thread
+ */
+ void initThreadStruct(int idx, int id);
+
+ /**
+ * Go to a new state and/or stack
+ */
+ bool goToState(int stackId, int stateId);
+
+ bool chooseSTAMPButton(int buttonId);
+
+ /**
+ * Parses the script commands from the currently active stack
+ */
+ void parsePlayCommands();
+
+ /**
+ * Do the camera view looking at the mansion
+ */
+ int doInterface();
+
+ /**
+ * Do the display of a room that has one or more evidence hotspots
+ * available for display
+ */
+ void doRoom();
+
+ /**
+ * Shows the apartment screen
+ */
+ int doApt();
+
+ /**
+ * Loads data needed for displaying the initial apartment screen
+ */
+ void loadTheApt();
+
+ /**
+ * Synchronizes the game data
+ */
+ void synchronize(Common::Serializer &s);
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_FILES_H */
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
new file mode 100644
index 0000000000..700944f7ef
--- /dev/null
+++ b/engines/voyeur/files_threads.cpp
@@ -0,0 +1,1731 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/files.h"
+#include "voyeur/graphics.h"
+#include "voyeur/voyeur.h"
+#include "voyeur/staticres.h"
+
+namespace Voyeur {
+
+int ThreadResource::_useCount[8];
+
+void ThreadResource::init() {
+ Common::fill(&_useCount[0], &_useCount[8], 0);
+}
+
+ThreadResource::ThreadResource(BoltFilesState &state, const byte *src):_vm(state._vm) {
+ _stateId = READ_LE_UINT16(&src[0]);
+ _stackId = READ_LE_UINT16(&src[0]);
+ _savedStateId = READ_LE_UINT16(&src[0]);
+ _savedStackId = READ_LE_UINT16(&src[0]);
+ _ctlPtr = nullptr;
+ _aptPos = Common::Point(-1, -1);
+
+ _newStateId = -1;
+ _newStackId = -1;
+ _stateFlags = 0;
+ _stateCount = 0;
+ _parseCount = 0;
+ _nextStateId = 0;
+ _threadInfoPtr = nullptr;
+ _playCommandsPtr = nullptr;
+}
+
+void ThreadResource::initThreadStruct(int idx, int id) {
+ _stackId = -1;
+ if (loadAStack(idx)) {
+ _savedStateId = _savedStackId = -1;
+ _stateId = id;
+ _newStateId = -1;
+ _newStackId = -1;
+
+ doState();
+ }
+}
+
+bool ThreadResource::loadAStack(int stackId) {
+ if (_vm->_stampFlags & 1) {
+ if (stackId < 0)
+ error("loadAStack() - Invalid stackId %d", stackId);
+
+ unloadAStack(_stackId);
+ if (!_useCount[stackId]) {
+ BoltEntry &boltEntry = _vm->_stampLibPtr->boltEntry(_vm->_controlPtr->_memberIds[stackId]);
+ if (!boltEntry._data)
+ return false;
+
+ _vm->_controlPtr->_entries[stackId] = boltEntry._data;
+ }
+
+ ++_useCount[stackId];
+ }
+
+ _ctlPtr = _vm->_controlPtr->_entries[stackId];
+ _stackId = stackId;
+ return true;
+}
+
+void ThreadResource::unloadAStack(int stackId) {
+ if (stackId < 0)
+ return;
+
+ if ((_vm->_stampFlags & 1) && _useCount[stackId]) {
+ if (--_useCount[stackId] == 0) {
+ _vm->_stampLibPtr->freeBoltMember(_vm->_controlPtr->_memberIds[stackId]);
+ }
+ }
+}
+
+bool ThreadResource::doState() {
+ if (!getStateInfo())
+ return false;
+
+ getButtonsFlags();
+
+ _vm->_glGoState = -1;
+ _vm->_glGoStack = -1;
+
+ performOpenCard();
+ if (_stateFlags & 1) {
+ return chooseSTAMPButton(_vm->getRandomNumber(_stateCount - 1));
+ } else {
+ return true;
+ }
+}
+
+bool ThreadResource::getStateInfo() {
+ int id = READ_LE_UINT16(_ctlPtr);
+
+ if (id <= _stateId) {
+ return false;
+ } else {
+ uint32 fld = READ_LE_UINT32(_ctlPtr + 2);
+ fld += _stateId << 3;
+ _nextStateId = READ_LE_UINT32(_ctlPtr + fld + 4);
+
+ fld = READ_LE_UINT32(_ctlPtr + fld);
+ byte *baseP = _ctlPtr + fld;
+ _stateCount = READ_LE_UINT16(baseP);
+ _stateFlags = READ_LE_UINT16(baseP + 2);
+ _parseCount = READ_LE_UINT16(baseP + 4);
+
+ _playCommandsPtr = getDataOffset();
+ _playCommandsPtr += (READ_LE_UINT32(baseP + 6) / 2) << 1;
+
+ _threadInfoPtr = baseP + 10;
+
+ getButtonsText();
+ return true;
+ }
+}
+
+byte *ThreadResource::getDataOffset() {
+ uint32 offset = READ_LE_UINT32(_ctlPtr + 10);
+ return _ctlPtr + offset;
+}
+
+void ThreadResource::getButtonsText() {
+ int idx = 0;
+
+ for (const byte *p = _threadInfoPtr; *p != 0x49; p = getNextRecord(p)) {
+ if (*p == 0xC0) {
+ ++p;
+ if (*p++ & 0x80) {
+ assert(idx < 63);
+ p += 4;
+ }
+
+ ++idx;
+ }
+ }
+}
+
+void ThreadResource::getButtonsFlags() {
+ int idx = 0;
+
+ for (const byte *p = _threadInfoPtr; *p != 0x49; p = getNextRecord(p)) {
+ if (*p == 0xC0) {
+ if (*++p & 0x20)
+ _stateFlags |= 2;
+
+ _buttonFlags[idx] = *p++;
+ _buttonIds[idx] = *p++;
+
+ if (_buttonFlags[idx] & 0x80)
+ p += 4;
+
+ ++idx;
+ }
+ }
+}
+
+void ThreadResource::unloadAllStacks(VoyeurEngine *vm) {
+ if (vm->_stampFlags & 1) {
+ for (int i = 0; i < 8; ++i) {
+ if (_useCount[i])
+ vm->_stampLibPtr->freeBoltMember(vm->_controlPtr->_memberIds[i]);
+ }
+ }
+}
+
+void ThreadResource::performOpenCard() {
+ for (const byte *p = _threadInfoPtr; *p != 0x49; p = getNextRecord(p)) {
+ if (*p == 0x47) {
+ cardAction(p + 1);
+ return;
+ }
+ }
+}
+
+void ThreadResource::initUseCount() {
+ Common::fill(&_useCount[0], &_useCount[8], 0);
+}
+
+const byte *ThreadResource::getRecordOffset(const byte *p) {
+ uint32 recSize = READ_LE_UINT32(p) + READ_LE_UINT32(_ctlPtr + 6);
+ return _ctlPtr + recSize;
+}
+
+const byte *ThreadResource::getNextRecord(const byte *p) {
+ byte v = *p++;
+
+ switch (v) {
+ case 2:
+ case 4:
+ case 6:
+ case 8:
+ case 10:
+ return p + 8;
+ case 1:
+ case 3:
+ case 5:
+ case 7:
+ case 9:
+ case 11:
+ case 21:
+ case 22:
+ case 25:
+ case 26:
+ return p + 5;
+ case 17:
+ case 23:
+ case 24:
+ case 27:
+ case 28:
+ return p + 2;
+ case 19:
+ case 41:
+ return p + 6;
+ case 18:
+ case 51:
+ case 52:
+ return p + 1;
+ case 74:
+ return p + 4;
+ case 192:
+ if (*p & 0x80)
+ p += 4;
+ return p + 2;
+ default:
+ return p;
+ }
+}
+
+const byte *ThreadResource::getSTAMPCard(int cardId) {
+ const byte *p;
+ int count = 0;
+
+ for (p = _threadInfoPtr; count <= cardId && *p != 0x49; p = getNextRecord(p)) {
+ if (*p == 0xC0)
+ ++count;
+ }
+
+ return p;
+}
+
+int ThreadResource::getStateFromID(uint32 id) {
+ int count = READ_LE_UINT16(_ctlPtr);
+
+ for (int i = 0; i < count; ++i) {
+ uint32 sid = getSID(i);
+ if (sid == id)
+ return i;
+ }
+
+ return -1;
+}
+
+uint32 ThreadResource::getSID(int sid) {
+ uint32 offset = READ_LE_UINT32(_ctlPtr + 2) + (sid << 3) + 4;
+ return READ_LE_UINT32(_ctlPtr + offset);
+}
+
+void ThreadResource::doSTAMPCardAction() {
+ for (const byte *p = _threadInfoPtr; *p != 0x49; p = getNextRecord(p)) {
+ if (*p == 0x48) {
+ cardAction(p + 1);
+ return;
+ }
+ }
+}
+
+void ThreadResource::cardAction(const byte *card) {
+ _vm->_glGoState = -1;
+ _vm->_glGoStack = -1;
+
+ // Loop to perform card commands
+ while (!_vm->shouldQuit() && *card < 70 && _vm->_glGoState == -1) {
+ card = cardPerform(card);
+ }
+}
+
+bool ThreadResource::chooseSTAMPButton(int buttonId) {
+ for (int idx = 0; idx < _stateCount; ++idx) {
+ if (_buttonIds[idx] == buttonId) {
+ const byte *card = getSTAMPCard(idx);
+ cardAction(card);
+
+ bool flag = true;
+ while (!_vm->shouldQuit() && _vm->_glGoStack != -1 && flag) {
+ doSTAMPCardAction();
+ flag = goToStateID(_vm->_glGoStack, _vm->_glGoState);
+ }
+
+ while (!_vm->shouldQuit() && _vm->_glGoState != -1 && flag) {
+ doSTAMPCardAction();
+ flag = goToState(-1, _vm->_glGoState);
+ }
+
+ return flag;
+ }
+ }
+
+ return false;
+}
+
+void ThreadResource::parsePlayCommands() {
+ _vm->_voy->_playStampMode = -1;
+ _vm->_voy->_audioVisualStartTime = 0;
+ _vm->_voy->_audioVisualDuration = 0;
+ _vm->_voy->_boltGroupId2 = -1;
+ _vm->_voy->_computerTextId = -1;
+ _vm->_voy->_eventFlags &= ~EVTFLAG_8;
+ _vm->_eventsManager->_videoDead = -1;
+
+ // Reset hotspot data
+ _vm->_voy->_videoHotspotTimes.reset();
+ _vm->_voy->_audioHotspotTimes.reset();
+ _vm->_voy->_evidenceHotspotTimes.reset();
+ Common::fill(&_vm->_voy->_roomHotspotsEnabled[0], &_vm->_voy->_roomHotspotsEnabled[20], false);
+ byte *dataP = _playCommandsPtr;
+ int v2, v3;
+ PictureResource *pic;
+ CMapResource *pal;
+
+ for (int parseIndex = 0; parseIndex < _parseCount; ++parseIndex) {
+ uint16 id = READ_LE_UINT16(dataP);
+ debugC(DEBUG_BASIC, kDebugScripts, "parsePlayCommands (%d of %d) - cmd #%d",
+ parseIndex + 1, _parseCount, id);
+ dataP += 2;
+
+ switch (id) {
+ case 1:
+ _vm->_currentVocId = READ_LE_UINT16(dataP);
+ dataP += 2;
+ break;
+
+ case 2:
+ // Play an audio event
+ v2 = READ_LE_UINT16(dataP);
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ _vm->_audioVideoId = READ_LE_UINT16(dataP + 2) - 1;
+ _vm->_voy->_audioVisualStartTime = READ_LE_UINT16(dataP + 4);
+ _vm->_voy->_audioVisualDuration = READ_LE_UINT16(dataP + 6);
+
+ if (_vm->_voy->_RTVNum < _vm->_voy->_audioVisualStartTime ||
+ (_vm->_voy->_audioVisualStartTime + _vm->_voy->_audioVisualDuration) < _vm->_voy->_RTVNum) {
+ _vm->_audioVideoId = -1;
+ } else {
+ _vm->_voy->_vocSecondsOffset = _vm->_voy->_RTVNum - _vm->_voy->_audioVisualStartTime;
+ _vm->_voy->addAudioEventStart();
+
+ // Play the audio
+ assert(_vm->_audioVideoId < 38);
+ _vm->playAudio(_vm->_audioVideoId);
+
+ _vm->_voy->addAudioEventEnd();
+ _vm->_eventsManager->incrementTime(1);
+ _vm->_eventsManager->incrementTime(1);
+ _vm->_audioVideoId = -1;
+ parseIndex = 999;
+ }
+ }
+
+ dataP += 8;
+ break;
+
+ case 3:
+ // Play a video event
+ v2 = READ_LE_UINT16(dataP);
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ _vm->_audioVideoId = READ_LE_UINT16(dataP + 2) - 1;
+ _vm->_voy->_audioVisualStartTime = READ_LE_UINT16(dataP + 4);
+ _vm->_voy->_audioVisualDuration = READ_LE_UINT16(dataP + 6);
+
+ if (_vm->_voy->_RTVNum < _vm->_voy->_audioVisualStartTime ||
+ (_vm->_voy->_audioVisualStartTime + _vm->_voy->_audioVisualDuration) < _vm->_voy->_RTVNum) {
+ _vm->_audioVideoId = -1;
+ } else {
+ _vm->_voy->_vocSecondsOffset = _vm->_voy->_RTVNum - _vm->_voy->_audioVisualStartTime;
+ _vm->_voy->addVideoEventStart();
+ _vm->_voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+ _vm->_voy->_eventFlags |= EVTFLAG_RECORDING;
+ _vm->playAVideo(_vm->_audioVideoId);
+
+ _vm->_voy->_eventFlags &= ~EVTFLAG_RECORDING;
+ _vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ _vm->_voy->addVideoEventEnd();
+ _vm->_eventsManager->incrementTime(1);
+
+ _vm->_audioVideoId = -1;
+ _vm->_playStampGroupId = -1;
+
+ if (_vm->_eventsManager->_videoDead != -1) {
+ _vm->_bVoy->freeBoltGroup(0xE00);
+ _vm->_eventsManager->_videoDead = -1;
+ _vm->flipPageAndWait();
+ }
+
+ _vm->_eventsManager->_videoDead = -1;
+ if (_stateCount == 2 && _vm->_eventsManager->_mouseClicked == 0) {
+ _vm->_voy->_playStampMode = 132;
+ parseIndex = 999;
+ } else {
+ _vm->_voy->_playStampMode = 129;
+ }
+ }
+ }
+
+ dataP += 8;
+ break;
+
+ case 4:
+ case 22:
+ // Case 22: Endgame news reports
+ _vm->_audioVideoId = READ_LE_UINT16(dataP) - 1;
+ dataP += 2;
+
+ if (id == 22) {
+ int resolveIndex = READ_LE_UINT16(dataP);
+ dataP += 2;
+ _vm->_playStampGroupId = _vm->_resolvePtr[resolveIndex];
+ }
+
+ _vm->_voy->_vocSecondsOffset = 0;
+ _vm->_voy->_audioVisualStartTime = _vm->_voy->_RTVNum;
+ _vm->_voy->_eventFlags &= ~(EVTFLAG_TIME_DISABLED | EVTFLAG_RECORDING);
+ _vm->playAVideo(_vm->_audioVideoId);
+ _vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+
+ if (id != 22) {
+ _vm->_audioVideoId = -1;
+ parseIndex = 999;
+ } else {
+ int count = _vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)->_entries.size() / 2;
+ _vm->_soundManager->stopVOCPlay();
+ _vm->_eventsManager->getMouseInfo();
+
+ for (int i = 0; i < count; ++i) {
+ pic = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + i * 2)._picResource;
+ pal = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + i * 2 + 1)._cMapResource;
+
+ _vm->_graphicsManager->_vPort->setupViewPort(pic);
+ pal->startFade();
+
+ _vm->flipPageAndWaitForFade();
+
+ if (i > 0) {
+ _vm->_bVoy->freeBoltMember(_vm->_playStampGroupId + i * 2);
+ _vm->_bVoy->freeBoltMember(_vm->_playStampGroupId + i * 2 + 1);
+ }
+
+ Common::String file = Common::String::format("news%d.voc", i + 1);
+ _vm->_soundManager->startVOCPlay(file);
+
+ while (!_vm->shouldQuit() && !_vm->_eventsManager->_mouseClicked &&
+ _vm->_soundManager->getVOCStatus()) {
+ _vm->_eventsManager->delayClick(1);
+ _vm->_eventsManager->getMouseInfo();
+ }
+
+ _vm->_soundManager->stopVOCPlay();
+
+ if (i == (count - 1))
+ _vm->_eventsManager->delayClick(480);
+
+ if (_vm->shouldQuit() || _vm->_eventsManager->_mouseClicked)
+ break;
+ }
+
+ _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
+ _vm->_playStampGroupId = -1;
+ _vm->_audioVideoId = -1;
+ parseIndex = 999;
+ }
+ break;
+
+ case 5:
+ // Check whether transition to a given time period is allowed, and
+ // if so, load the time information for the new time period
+ v2 = READ_LE_UINT16(dataP);
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ _vm->_voy->_playStampMode = 5;
+ int count = READ_LE_UINT16(dataP + 2);
+ _vm->_voy->_RTVLimit = READ_LE_UINT16(dataP + 4);
+
+ if (_vm->_voy->_transitionId != count) {
+ if (_vm->_voy->_transitionId > 1)
+ _vm->_voy->_eventFlags &= ~EVTFLAG_100;
+
+ _vm->_voy->_transitionId = count;
+ _vm->_gameMinute = LEVEL_M[count - 1];
+ _vm->_gameHour = LEVEL_H[count - 1];
+ //_vm->_v2A0A2 = 0;
+ _vm->_voy->_RTVNum = 0;
+ _vm->_voy->_RTANum = 255;
+ }
+
+ _vm->_voy->_isAM = (_vm->_voy->_transitionId == 6);
+ }
+
+ dataP += 6;
+ break;
+
+ case 6:
+ _vm->_voy->_playStampMode = 6;
+ v2 = READ_LE_UINT16(dataP);
+ _vm->_playStampGroupId = _vm->_resolvePtr[v2];
+ dataP += 2;
+ break;
+
+ case 7:
+ // Load the video event scene hotspot times data
+ v2 = READ_LE_UINT16(dataP);
+ v3 = READ_LE_UINT16(dataP + 2) - 1;
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ int idx = 0;
+ while (_vm->_voy->_videoHotspotTimes._min[idx][v3] != 9999)
+ ++idx;
+
+ v2 = READ_LE_UINT16(dataP + 4);
+ _vm->_voy->_videoHotspotTimes._min[idx][v3] = v2;
+ _vm->_voy->_videoHotspotTimes._max[idx][v3] = v2 + READ_LE_UINT16(dataP + 6) - 2;
+ }
+
+ dataP += 8;
+ break;
+
+ case 8:
+ // Load the audio event scene hotspot times data
+ v2 = READ_LE_UINT16(dataP);
+ v3 = READ_LE_UINT16(dataP + 2) - 1;
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ int idx = 0;
+ while (_vm->_voy->_audioHotspotTimes._min[idx][v3] != 9999)
+ ++idx;
+
+ v2 = READ_LE_UINT16(dataP + 4);
+ _vm->_voy->_audioHotspotTimes._min[idx][v3] = v2;
+ _vm->_voy->_audioHotspotTimes._max[idx][v3] = v2 + READ_LE_UINT16(dataP + 6) - 2;
+ }
+
+ dataP += 8;
+ break;
+
+ case 9:
+ // Load up evidence event scene hotspot times data
+ v2 = READ_LE_UINT16(dataP);
+ v3 = READ_LE_UINT16(dataP + 2) - 1;
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ int idx = 0;
+ while (_vm->_voy->_evidenceHotspotTimes._min[idx][v3] != 9999)
+ ++idx;
+
+ v2 = READ_LE_UINT16(dataP + 4);
+ _vm->_voy->_evidenceHotspotTimes._min[idx][v3] = v2;
+ _vm->_voy->_evidenceHotspotTimes._max[idx][v3] = v2 + READ_LE_UINT16(dataP + 6) - 2;
+ }
+
+ dataP += 8;
+ break;
+
+ case 10:
+ // Pick the person who is to die, during startup
+ if (_vm->_iForceDeath == -1) {
+ // No specific person has been preset to be killed, so pick one randomly.
+ // The loop below was used because the victim was persisted from the previous
+ // play-through, so it ensured that a different victim is picked.
+ int randomVal;
+ do {
+ randomVal = _vm->getRandomNumber(3) + 1;
+ } while (randomVal == _vm->_voy->_victimNumber);
+
+ _vm->_voy->_victimNumber = randomVal;
+ _vm->_controlPtr->_state->_victimIndex = randomVal;
+ } else {
+ // Player has seen something that locks in the character to die
+ _vm->_voy->_victimNumber = _vm->_iForceDeath;
+ _vm->_controlPtr->_state->_victimIndex = _vm->_iForceDeath;
+ }
+
+ _vm->saveLastInplay();
+ break;
+
+ case 11:
+ _vm->_voy->_eventFlags |= EVTFLAG_2;
+ break;
+
+ case 12:
+ v2 = READ_LE_UINT16(dataP);
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ _vm->_voy->_boltGroupId2 = _vm->_resolvePtr[READ_LE_UINT16(dataP + 2)];
+ _vm->_voy->_roomHotspotsEnabled[READ_LE_UINT16(dataP + 4) - 1] = true;
+ }
+
+ dataP += 6;
+ break;
+
+ case 13:
+ v2 = READ_LE_UINT16(dataP);
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) {
+ _vm->_voy->_computerTextId = READ_LE_UINT16(dataP + 2) - 1;
+ _vm->_voy->_computerTimeMin = READ_LE_UINT16(dataP + 4);
+ _vm->_voy->_computerTimeMax = READ_LE_UINT16(dataP + 6);
+
+ _vm->_voy->_computerScreenRect.left = COMPUTER_SCREEN_TABLE[_vm->_voy->_computerTextId * 4];
+ _vm->_voy->_computerScreenRect.top = COMPUTER_SCREEN_TABLE[_vm->_voy->_computerTextId * 4 + 1];
+ _vm->_voy->_computerScreenRect.right = COMPUTER_SCREEN_TABLE[_vm->_voy->_computerTextId * 4 + 2];
+ _vm->_voy->_computerScreenRect.bottom = COMPUTER_SCREEN_TABLE[_vm->_voy->_computerTextId * 4 + 3];
+ }
+
+ dataP += 8;
+ break;
+
+ case 14:
+ _vm->_playStampGroupId = 2048;
+ _vm->_voy->_playStampMode = 130;
+ break;
+
+ case 15:
+ _vm->showEndingNews();
+ break;
+
+ case 16:
+ _vm->_voy->_playStampMode = 16;
+ break;
+
+ case 17:
+ _vm->_voy->_playStampMode = 17;
+ break;
+
+ case 18:
+ // Called during the murder (Sunday 10:30PM) time period, to specify the
+ // time expired point at which the murder takes place
+ v2 = READ_LE_UINT16(dataP);
+ v3 = READ_LE_UINT16(dataP + 2);
+
+ if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2)
+ _vm->_voy->_murderThreshold = v3;
+
+ dataP += 4;
+ break;
+
+ case 19:
+ _vm->_voy->_aptLoadMode = 140;
+ loadTheApt();
+ _vm->_voy->_aptLoadMode = 141;
+ freeTheApt();
+ break;
+
+ case 20:
+ _vm->_voy->_aptLoadMode = -1;
+ loadTheApt();
+ _vm->_voy->_aptLoadMode = 141;
+ freeTheApt();
+ break;
+
+ case 21:
+ _vm->_voy->_aptLoadMode = -1;
+ loadTheApt();
+ _vm->_voy->_aptLoadMode = 140;
+ freeTheApt();
+ break;
+
+ case 23:
+ _vm->_voy->_transitionId = 17;
+ _vm->_voy->_aptLoadMode = -1;
+ loadTheApt();
+ _vm->_voy->_aptLoadMode = 144;
+ freeTheApt();
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+const byte *ThreadResource::cardPerform(const byte *card) {
+ uint16 id = *card++;
+ int subId = 5;
+ uint32 v2;
+ byte bVal;
+ uint32 idx1, idx2;
+ debugC(DEBUG_BASIC, kDebugScripts, "cardPerform - %d", id);
+
+ switch (id) {
+ case 1:
+ v2 = READ_LE_UINT32(card);
+ card += 4;
+ _vm->_controlPtr->_state->_vals[*card++] = v2;
+ break;
+
+ case 2:
+ v2 = _vm->_controlPtr->_state->_vals[*card++];
+ _vm->_controlPtr->_state->_vals[*card++] = v2;
+ break;
+
+ case 3:
+ v2 = READ_LE_UINT32(card);
+ card += 4;
+ _vm->_controlPtr->_state->_vals[*card++] = v2;
+ break;
+
+ case 4:
+ v2 = _vm->_controlPtr->_state->_vals[*card++];
+ _vm->_controlPtr->_state->_vals[*card++] = v2;
+ break;
+
+ case 5: {
+ v2 = READ_LE_UINT32(card);
+ card += 4;
+ int &v = _vm->_controlPtr->_state->_vals[*card++];
+ v -= v2;
+ break;
+ }
+
+ case 6: {
+ idx1 = *card++;
+ idx2 = *card++;
+
+ v2 = _vm->_controlPtr->_state->_vals[idx1];
+ int &v = _vm->_controlPtr->_state->_vals[idx2];
+ v -= v2;
+ break;
+ }
+
+ case 7: {
+ int v3 = *card++;
+ v2 = READ_LE_UINT32(card);
+ card += 4;
+ int &v = _vm->_controlPtr->_state->_vals[v3];
+ v *= v2;
+ break;
+ }
+
+ case 8: {
+ idx1 = *card++;
+ idx2 = *card++;
+
+ int &v1 = _vm->_controlPtr->_state->_vals[idx1];
+ v2 = _vm->_controlPtr->_state->_vals[idx2];
+ v1 *= v2;
+ break;
+ }
+
+ case 9: {
+ idx1 = *card++;
+ v2 = READ_LE_UINT32(card);
+ card += 4;
+
+ int &v = _vm->_controlPtr->_state->_vals[idx1];
+ v /= v2;
+ break;
+ }
+
+ case 10: {
+ idx1 = *card++;
+ idx2 = *card++;
+
+ int &v1 = _vm->_controlPtr->_state->_vals[idx1];
+ v2 = _vm->_controlPtr->_state->_vals[idx2];
+ v1 /= v2;
+ break;
+ }
+
+ case 11:
+ v2 = READ_LE_UINT32(card);
+ card += 4;
+ v2 = _vm->getRandomNumber(v2 - 1) + 1;
+ _vm->_controlPtr->_state->_vals[*card++] = v2;
+ break;
+
+ case 17:
+ _vm->_glGoState = READ_LE_UINT16(card);
+ card += 2;
+ _vm->_glGoStack = -1;
+ break;
+
+ case 18:
+ v2 = _vm->_controlPtr->_state->_vals[*card++];
+ _vm->_glGoState = getStateFromID(v2);
+ break;
+
+ case 19:
+ _vm->_glGoState = READ_LE_UINT32(card);
+ card += 4;
+ _vm->_glGoStack = READ_LE_UINT16(card);
+ card += 2;
+ break;
+
+ case 23:
+ case 24:
+ case 27:
+ case 28:
+ subId -= 3;
+ // Deliberate fall-through
+
+ case 21:
+ case 22:
+ case 25:
+ case 26:
+ bVal = card[subId];
+ if (bVal == 61) {
+ if (cardPerform2(card, id)) {
+ card += subId;
+ while (*card != 30 && *card != 29)
+ card = cardPerform(card);
+
+ if (*card == 29) {
+ int count = 1;
+ while (count > 0) {
+ card = getNextRecord(card);
+ if (*card == 30)
+ --count;
+ if (*card >= 21 && *card <= 28)
+ ++count;
+ }
+ }
+ } else {
+ card += subId;
+ int count = 1;
+ while (count > 0) {
+ card = getNextRecord(card);
+ if (*card == 29 || *card == 30)
+ --count;
+ if (*card < 21 || *card > 28)
+ continue;
+
+ const byte *nextP = getNextRecord(card + 2);
+ if (*nextP == 61)
+ ++count;
+ }
+ }
+
+ ++card;
+ } else {
+ if (cardPerform2(card, id)) {
+ card += subId;
+ card = cardPerform(card);
+ while (*card++ != 61) ;
+ } else {
+ card += subId;
+ while (*card != 61 && *card != 29)
+ ++card;
+ }
+ }
+ break;
+
+ case 41:
+ bVal = *card++;
+ assert(bVal < 8);
+ card += 6;
+ break;
+
+ case 45:
+ _newStateId = _nextStateId;
+ _newStackId = _stackId;
+ break;
+
+ case 46:
+ _vm->_glGoState = _newStateId;
+ _vm->_glGoStack = _newStackId;
+ _newStateId = -1;
+ _newStackId = -1;
+ break;
+
+ case 51:
+ setButtonFlag(READ_LE_UINT16(card), 64);
+ break;
+
+ case 52:
+ clearButtonFlag(READ_LE_UINT16(card), 64);
+ break;
+
+ default:
+ break;
+ }
+
+ return card;
+}
+
+bool ThreadResource::cardPerform2(const byte *pSrc, int cardCmdId) {
+ int vLong, vLong2;
+
+ switch (cardCmdId) {
+ case 21:
+ vLong = (int32)READ_LE_UINT32(pSrc + 1);
+ return _vm->_controlPtr->_state->_vals[*pSrc] == vLong;
+
+ case 22:
+ vLong = (int32)READ_LE_UINT32(pSrc + 1);
+ return _vm->_controlPtr->_state->_vals[*pSrc] != vLong;
+
+ case 23:
+ vLong = _vm->_controlPtr->_state->_vals[*pSrc];
+ vLong2 = _vm->_controlPtr->_state->_vals[*(pSrc + 1)];
+ return vLong == vLong2;
+
+ case 24:
+ vLong = _vm->_controlPtr->_state->_vals[*pSrc];
+ vLong2 = _vm->_controlPtr->_state->_vals[*(pSrc + 1)];
+ return vLong != vLong2;
+
+ case 25:
+ vLong = _vm->_controlPtr->_state->_vals[*pSrc];
+ vLong2 = (int32)READ_LE_UINT32(pSrc + 1);
+ return vLong < vLong2;
+
+ case 26:
+ vLong = _vm->_controlPtr->_state->_vals[*pSrc];
+ vLong2 = (int32)READ_LE_UINT32(pSrc + 1);
+ return vLong > vLong2;
+
+ case 27:
+ vLong = _vm->_controlPtr->_state->_vals[*pSrc];
+ vLong2 = _vm->_controlPtr->_state->_vals[*(pSrc + 1)];
+ return vLong < vLong2;
+
+ case 28:
+ vLong = _vm->_controlPtr->_state->_vals[*pSrc];
+ vLong2 = _vm->_controlPtr->_state->_vals[*(pSrc + 1)];
+ return vLong > vLong2;
+
+ default:
+ return false;
+ }
+}
+
+int ThreadResource::doApt() {
+ loadTheApt();
+
+ _vm->_currentVocId = 151;
+ _vm->_voy->_viewBounds = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._rectResource;
+ Common::Array<RectEntry> &hotspots = _vm->_bVoy->boltEntry(
+ _vm->_playStampGroupId + 1)._rectResource->_entries;
+ _vm->_eventsManager->getMouseInfo();
+
+ // Very first time apartment is shown, start the phone message
+ if (_aptPos.x == -1) {
+ _aptPos.x = hotspots[2].left;
+ _aptPos.y = hotspots[2].top;
+ _vm->_currentVocId = 153;
+ }
+
+ if (_vm->_voy->_playStampMode == 16) {
+ hotspots[0].left = 999;
+ hotspots[3].left = 999;
+ _aptPos.x = hotspots[4].left + 28;
+ _aptPos.y = hotspots[4].top + 28;
+ }
+
+ _vm->_eventsManager->setMousePos(Common::Point(_aptPos.x, _aptPos.y));
+ _vm->_soundManager->startVOCPlay(_vm->_soundManager->getVOCFileName(_vm->_currentVocId));
+ _vm->_currentVocId = 151;
+
+ _vm->_graphicsManager->setColor(129, 82, 82, 82);
+ _vm->_graphicsManager->setColor(130, 112, 112, 112);
+ _vm->_graphicsManager->setColor(131, 215, 215, 215);
+ _vm->_graphicsManager->setColor(132, 235, 235, 235);
+
+ _vm->_eventsManager->_intPtr._hasPalette = true;
+
+ // Set up the cursors
+ PictureResource *unselectedCursor = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 2)._picResource;
+ PictureResource *selectedCursor = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 3)._picResource;
+ unselectedCursor->_keyColor = 0xff;
+ selectedCursor->_keyColor = 0xff;
+ _vm->_eventsManager->setCursor(unselectedCursor);
+ _vm->_eventsManager->showCursor();
+
+ // Main loop to allow users to move the cursor and select hotspots
+ int hotspotId;
+ int prevHotspotId = -1;
+ Common::Point pt;
+ PictureResource *pic;
+ Common::Rect gmmHotspot(75, 125, 130, 140);
+
+ do {
+ _vm->_voyeurArea = AREA_APARTMENT;
+
+ if (_vm->_loadGameSlot != -1) {
+ // Load a savegame
+ _vm->loadGame(_vm->_loadGameSlot);
+ _vm->_loadGameSlot = -1;
+ }
+
+ _vm->_eventsManager->getMouseInfo();
+ if (!_vm->_soundManager->getVOCStatus()) {
+ // Previous sound ended, so start up a new one
+ _vm->_currentVocId = 151 - _vm->getRandomNumber(4);
+ _vm->_soundManager->startVOCPlay(_vm->_soundManager->getVOCFileName(_vm->_currentVocId));
+ }
+
+ // Loop through the hotspot list
+ hotspotId = -1;
+ pt = _vm->_eventsManager->getMousePos() + Common::Point(16, 16);
+ for (int idx = 0; idx < (int)hotspots.size(); ++idx) {
+ if (hotspots[idx].contains(pt)) {
+ // Cursor is within hotspot area
+
+ // Don't allow the camera to be highlighted on Monday morning.
+ if (idx == 0 && _vm->_voy->_transitionId == 17)
+ continue;
+
+ // Set the highlighted hotspot Id
+ hotspotId = idx;
+
+ if (hotspotId != prevHotspotId) {
+ // Check for whether to replace hotspot Id for "Watch TV" for
+ // "Review the Tape" if player has already watched the TV
+ if ((_vm->_voy->_eventFlags & EVTFLAG_100) && (hotspotId == 2))
+ hotspotId = 5;
+
+ // Draw the text description for the highlighted hotspot
+ pic = _vm->_bVoy->boltEntry(_vm->_playStampGroupId +
+ hotspotId + 6)._picResource;
+ _vm->_graphicsManager->sDrawPic(pic, _vm->_graphicsManager->_vPort,
+ Common::Point(106, 200));
+ }
+
+ break;
+ }
+ }
+
+ // Check for presence in ScummVM GMM
+ if (gmmHotspot.contains(pt))
+ hotspotId = 42;
+
+ // Update the cursor to either standard or highlighted eye cursor
+ _vm->_eventsManager->setCursor((hotspotId == -1) ? unselectedCursor : selectedCursor);
+ _vm->flipPageAndWait();
+
+ if (hotspotId == 42 && _vm->_eventsManager->_leftClick) {
+ // Show the ScummVM GMM
+ _vm->_eventsManager->getMouseInfo();
+ _vm->openMainMenuDialog();
+ }
+
+ } while (!_vm->shouldQuit() && (!_vm->_eventsManager->_leftClick || hotspotId == -1));
+
+ _vm->_eventsManager->hideCursor();
+ pt = _vm->_eventsManager->getMousePos();
+ _aptPos.x = pt.x;
+ _aptPos.y = pt.y;
+
+ switch (hotspotId) {
+ case 0:
+ _vm->_voy->_aptLoadMode = 140;
+ break;
+ case 1:
+ _vm->_voy->_aptLoadMode = 143;
+ break;
+ case 2:
+ _vm->_voy->_aptLoadMode = 142;
+ case 5:
+ _vm->_voy->_aptLoadMode = 141;
+ break;
+ default:
+ _vm->_voy->_aptLoadMode = -1;
+ break;
+ }
+
+ freeTheApt();
+
+ if (_vm->_voy->_transitionId == 1 && hotspotId == 0)
+ _vm->checkTransition();
+
+ if (!hotspotId)
+ _vm->makeViewFinder();
+
+ return hotspotId;
+}
+
+void ThreadResource::doRoom() {
+ VoyeurEngine &vm = *_vm;
+ SVoy voy = *vm._voy;
+
+ vm.makeViewFinderP();
+ voy._fadingType = 0;
+
+ if (!vm._bVoy->getBoltGroup(vm._playStampGroupId))
+ return;
+
+ vm._graphicsManager->_backColors = vm._bVoy->boltEntry(vm._playStampGroupId + 1)._cMapResource;
+ vm._graphicsManager->_backgroundPage = vm._bVoy->boltEntry(vm._playStampGroupId)._picResource;
+ vm._graphicsManager->_vPort->setupViewPort(vm._graphicsManager->_backgroundPage);
+ vm._graphicsManager->_backColors->startFade();
+
+ voy._fadingStep1 = 2;
+ voy._fadingStep2 = 0;
+ voy._fadingType = 1;
+
+ Common::Array<RectEntry> &hotspots = vm._bVoy->boltEntry(vm._playStampGroupId + 4)._rectResource->_entries;
+ int hotspotId = -1;
+
+ PictureResource *crosshairsCursor = vm._bVoy->boltEntry(vm._playStampGroupId + 2)._picResource;
+ PictureResource *magnifierCursor = vm._bVoy->boltEntry(vm._playStampGroupId + 3)._picResource;
+ vm._eventsManager->showCursor();
+
+ RectResource viewBounds(48, 38, 336, 202);
+ voy._viewBounds = &viewBounds;
+
+ vm._eventsManager->getMouseInfo();
+ vm._eventsManager->setMousePos(Common::Point(192, 120));
+ voy._fadingType = 0;
+ vm._currentVocId = 146;
+ voy._musicStartTime = voy._RTVNum;
+
+ voy._vocSecondsOffset = 0;
+ vm._soundManager->startVOCPlay(vm._currentVocId);
+ voy._eventFlags &= ~EVTFLAG_TIME_DISABLED;
+
+ bool breakFlag = false;
+ while (!vm.shouldQuit() && !breakFlag) {
+ _vm->_voyeurArea = AREA_ROOM;
+ vm._graphicsManager->setColor(128, 0, 255, 0);
+ vm._eventsManager->_intPtr._hasPalette = true;
+
+ do {
+ if (vm._currentVocId != -1 && !vm._soundManager->getVOCStatus()) {
+ voy._musicStartTime = voy._RTVNum;
+ voy._vocSecondsOffset = 0;
+ vm._soundManager->startVOCPlay(vm._currentVocId);
+ }
+
+ vm._eventsManager->getMouseInfo();
+ Common::Point pt = vm._eventsManager->getMousePos();
+ pt += Common::Point(30, 15);
+
+ hotspotId = -1;
+
+ if (voy._computerTextId != -1 && voy._computerScreenRect.contains(pt))
+ hotspotId = 999;
+
+ for (uint idx = 0; idx < hotspots.size(); ++idx) {
+ if (hotspots[idx].contains(pt)) {
+ int arrIndex = hotspots[idx]._arrIndex;
+ if (voy._roomHotspotsEnabled[arrIndex - 1]) {
+ hotspotId = idx;
+ break;
+ }
+ }
+ }
+
+ if (hotspotId == -1) {
+ vm._eventsManager->setCursorColor(128, 0);
+ vm._eventsManager->setCursor(crosshairsCursor);
+ } else if (hotspotId != 999 || voy._RTVNum < voy._computerTimeMin ||
+ (voy._computerTimeMax - 2) < voy._RTVNum) {
+ vm._eventsManager->setCursorColor(128, 1);
+ vm._eventsManager->setCursor(magnifierCursor);
+ } else {
+ vm._eventsManager->setCursorColor(128, 2);
+ vm._eventsManager->setCursor(magnifierCursor);
+ }
+
+ vm._eventsManager->_intPtr._hasPalette = true;
+ vm._graphicsManager->flipPage();
+ vm._eventsManager->sWaitFlip();
+ } while (!vm.shouldQuit() && !vm._eventsManager->_mouseClicked);
+
+ if (!vm._eventsManager->_leftClick || hotspotId == -1) {
+ if (vm._eventsManager->_rightClick)
+ breakFlag = true;
+
+ Common::Point pt = vm._eventsManager->getMousePos();
+ vm._eventsManager->getMouseInfo();
+ vm._eventsManager->setMousePos(pt);
+ } else {
+ voy._eventFlags |= EVTFLAG_RECORDING;
+ vm._eventsManager->hideCursor();
+ vm._eventsManager->startCursorBlink();
+
+ if (hotspotId == 999) {
+ _vm->flipPageAndWait();
+
+ if (vm._currentVocId != -1) {
+ voy._vocSecondsOffset = voy._RTVNum - voy._musicStartTime;
+ vm._soundManager->stopVOCPlay();
+ }
+
+ vm.getComputerBrush();
+ _vm->flipPageAndWait();
+
+ vm._voy->addComputerEventStart();
+
+ vm._eventsManager->_mouseClicked = false;
+ vm._eventsManager->startCursorBlink();
+
+ int totalChars = vm.doComputerText(9999);
+ if (totalChars)
+ vm._voy->addComputerEventEnd(totalChars);
+
+ vm._bVoy->freeBoltGroup(0x4900);
+ } else {
+ vm.doEvidDisplay(hotspotId, 999);
+ }
+
+ voy._eventFlags &= ~EVTFLAG_RECORDING;
+ if (!vm._eventsManager->_mouseClicked)
+ vm._eventsManager->delayClick(18000);
+
+ // WORKAROUND: Skipped code from the original, that freed the group,
+ // reloaded it, and reloaded the cursors
+
+ vm._graphicsManager->_backColors = vm._bVoy->boltEntry(
+ vm._playStampGroupId + 1)._cMapResource;
+ vm._graphicsManager->_backgroundPage = vm._bVoy->boltEntry(
+ vm._playStampGroupId)._picResource;
+
+ vm._graphicsManager->_vPort->setupViewPort();
+ vm._graphicsManager->_backColors->startFade();
+ _vm->flipPageAndWait();
+
+ while (!vm.shouldQuit() && (vm._eventsManager->_fadeStatus & 1))
+ vm._eventsManager->delay(1);
+ vm._eventsManager->hideCursor();
+
+ while (!vm.shouldQuit() && voy._fadingAmount2 > 0) {
+ if (voy._fadingAmount1 < 63) {
+ voy._fadingAmount1 += 4;
+ if (voy._fadingAmount1 > 63)
+ voy._fadingAmount1 = 63;
+ }
+
+ if (voy._fadingAmount2 > 0) {
+ voy._fadingAmount2 -= 8;
+ if (voy._fadingAmount2 < 0)
+ voy._fadingAmount2 = 0;
+ }
+
+ vm._eventsManager->delay(1);
+ }
+
+ _vm->flipPageAndWait();
+
+ vm._graphicsManager->fadeUpICF1();
+ voy._eventFlags &= EVTFLAG_RECORDING;
+ vm._eventsManager->showCursor();
+ }
+ }
+
+ voy._eventFlags = EVTFLAG_TIME_DISABLED;
+ vm._eventsManager->incrementTime(1);
+ voy._viewBounds = nullptr;
+ voy._fadingType = 0;
+ vm.makeViewFinderP();
+
+ if (voy._boltGroupId2 != -1) {
+ vm._bVoy->freeBoltGroup(voy._boltGroupId2);
+ voy._boltGroupId2 = -1;
+ }
+
+ if (vm._playStampGroupId != -1) {
+ vm._bVoy->freeBoltGroup(vm._playStampGroupId);
+ vm._playStampGroupId = -1;
+ }
+
+ if (vm._currentVocId != -1) {
+ vm._soundManager->stopVOCPlay();
+ vm._currentVocId = -1;
+ }
+
+ vm._eventsManager->hideCursor();
+ chooseSTAMPButton(0);
+}
+
+int ThreadResource::doInterface() {
+ PictureResource *pic;
+ Common::Point pt;
+
+ _vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ if (_vm->_voy->_abortInterface) {
+ _vm->_voy->_abortInterface = false;
+ return -2;
+ }
+
+ _vm->_voy->_eventFlags &= ~EVTFLAG_100;
+ _vm->_playStampGroupId = -1;
+ _vm->_eventsManager->_intPtr._flashStep = 1;
+ _vm->_eventsManager->_intPtr._flashTimer = 0;
+
+ if (_vm->_voy->_RTVNum >= _vm->_voy->_RTVLimit || _vm->_voy->_RTVNum < 0)
+ _vm->_voy->_RTVNum = _vm->_voy->_RTVLimit - 1;
+
+ if (_vm->_voy->_transitionId < 15 && _vm->_debugger->_isTimeActive
+ && (_vm->_voy->_RTVLimit - 3) < _vm->_voy->_RTVNum) {
+ _vm->_voy->_RTVNum = _vm->_voy->_RTVLimit;
+ _vm->makeViewFinder();
+
+ _vm->initIFace();
+ _vm->_eventsManager->hideCursor();
+ _vm->_voy->_RTVNum = _vm->_voy->_RTVLimit - 4;
+ _vm->_voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+
+ while (!_vm->shouldQuit() && _vm->_voy->_RTVNum < _vm->_voy->_RTVLimit) {
+ _vm->flashTimeBar();
+ _vm->_eventsManager->delayClick(1);
+ }
+
+ _vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ chooseSTAMPButton(20);
+ parsePlayCommands();
+
+ _vm->_eventsManager->showCursor();
+ }
+
+ _vm->checkTransition();
+ _vm->makeViewFinder();
+ _vm->_eventsManager->getMouseInfo();
+ _vm->initIFace();
+
+ Common::Array<RectEntry> *hotspots = &_vm->_bVoy->boltEntry(
+ _vm->_playStampGroupId + 1)._rectResource->_entries;
+ _vm->_currentVocId = 151 - _vm->getRandomNumber(5);
+ _vm->_voy->_vocSecondsOffset = _vm->getRandomNumber(29);
+
+ Common::String fname = _vm->_soundManager->getVOCFileName(_vm->_currentVocId);
+ _vm->_soundManager->startVOCPlay(fname);
+ _vm->_eventsManager->getMouseInfo();
+
+ _vm->_graphicsManager->setColor(240, 220, 220, 220);
+ _vm->_eventsManager->_intPtr._hasPalette = true;
+ _vm->_voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+
+ // Set the cusor
+ PictureResource *crosshairsCursor = _vm->_bVoy->boltEntry(0x112)._picResource;
+ PictureResource *eyeCursor = _vm->_bVoy->boltEntry(0x113)._picResource;
+ PictureResource *listenCursor = _vm->_bVoy->boltEntry(0x114)._picResource;
+ PictureResource *mangifyCursor = _vm->_bVoy->boltEntry(0x115)._picResource;
+
+ _vm->_eventsManager->setCursor(crosshairsCursor);
+
+ // Main loop
+ int regionIndex = 0;
+ Common::Rect mansionViewBounds(MANSION_VIEW_X, MANSION_VIEW_Y,
+ MANSION_VIEW_X + MANSION_VIEW_WIDTH, MANSION_VIEW_Y + MANSION_VIEW_HEIGHT);
+
+ do {
+ _vm->_voyeurArea = AREA_INTERFACE;
+ _vm->doTimeBar();
+ _vm->_eventsManager->getMouseInfo();
+
+ if (checkMansionScroll())
+ _vm->doScroll(_vm->_mansionViewPos);
+
+ _vm->checkPhoneCall();
+ if (!_vm->_soundManager->getVOCStatus()) {
+ _vm->_currentVocId = 151 - _vm->getRandomNumber(5);
+ _vm->_soundManager->startVOCPlay(_vm->_soundManager->getVOCFileName(_vm->_currentVocId));
+ }
+
+ // Calculate the mouse position within the entire mansion
+ pt = _vm->_eventsManager->getMousePos();
+ if (!mansionViewBounds.contains(pt))
+ pt = Common::Point(-1, -1);
+ else
+ pt = _vm->_mansionViewPos +
+ Common::Point(pt.x - MANSION_VIEW_X, pt.y - MANSION_VIEW_Y);
+ regionIndex = -1;
+
+ for (int hotspotIdx = 0; hotspotIdx < (int)hotspots->size(); ++hotspotIdx) {
+ if ((*hotspots)[hotspotIdx].contains(pt)) {
+ // Rect check done
+ for (int arrIndex = 0; arrIndex < 3; ++arrIndex) {
+ if (_vm->_voy->_audioHotspotTimes.isInRange(arrIndex, hotspotIdx, _vm->_voy->_RTVNum)) {
+ // Set the ear cursor for an audio event
+ _vm->_eventsManager->setCursor(listenCursor);
+ regionIndex = hotspotIdx;
+ }
+
+ if (_vm->_voy->_evidenceHotspotTimes.isInRange(arrIndex, hotspotIdx, _vm->_voy->_RTVNum)) {
+ // Set the magnifier cursor for an evidence event
+ _vm->_eventsManager->setCursor(mangifyCursor);
+ regionIndex = hotspotIdx;
+ }
+ }
+
+ for (int arrIndex = 0; arrIndex < 8; ++arrIndex) {
+ if (_vm->_voy->_videoHotspotTimes.isInRange(arrIndex, hotspotIdx, _vm->_voy->_RTVNum)) {
+ // Set the eye cursor for a video event
+ _vm->_eventsManager->setCursor(eyeCursor);
+ regionIndex = hotspotIdx;
+ }
+ }
+ }
+ }
+
+ if (regionIndex == -1) {
+ // Reset back to the crosshairs cursor
+ _vm->_eventsManager->setCursor(crosshairsCursor);
+ }
+
+ // Regularly update the time display
+ if (_vm->_voy->_RTANum & 2) {
+ _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
+ _vm->_gameMinute / 10, Common::Point(190, 25));
+ _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
+ _vm->_gameMinute % 10, Common::Point(201, 25));
+
+ if (_vm->_voy->_RTANum & 4) {
+ int v = _vm->_gameHour / 10;
+ _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
+ v == 0 ? 10 : v, Common::Point(161, 25));
+ _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort,
+ _vm->_gameHour % 10, Common::Point(172, 25));
+
+ pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource;
+ _vm->_graphicsManager->sDrawPic(pic, _vm->_graphicsManager->_vPort,
+ Common::Point(215, 27));
+ }
+ }
+
+ _vm->_voy->_RTANum = 0;
+ _vm->flipPageAndWait();
+
+ pt = _vm->_eventsManager->getMousePos();
+ if ((_vm->_voy->_RTVNum >= _vm->_voy->_RTVLimit) || ((_vm->_voy->_eventFlags & 0x80) &&
+ _vm->_eventsManager->_rightClick && (pt.x == 0))) {
+ // Time to transition to the next time period
+ _vm->_eventsManager->getMouseInfo();
+
+ if (_vm->_voy->_transitionId == 15) {
+ regionIndex = 20;
+ _vm->_voy->_transitionId = 17;
+ _vm->_soundManager->stopVOCPlay();
+ _vm->checkTransition();
+ _vm->_eventsManager->_leftClick = true;
+ } else {
+ _vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+
+ chooseSTAMPButton(20);
+ parsePlayCommands();
+ _vm->checkTransition();
+ _vm->makeViewFinder();
+
+ _vm->initIFace();
+
+ hotspots = &_vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._rectResource->_entries;
+ _vm->_eventsManager->getMouseInfo();
+
+ _vm->_voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+ _vm->_eventsManager->_intPtr._flashStep = 1;
+ _vm->_eventsManager->_intPtr._flashTimer = 0;
+ }
+ }
+ } while (!_vm->_eventsManager->_rightClick && !_vm->shouldQuit() &&
+ (!_vm->_eventsManager->_leftClick || regionIndex == -1));
+
+ _vm->_eventsManager->hideCursor();
+ _vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
+ if (_vm->_currentVocId != -1)
+ _vm->_soundManager->stopVOCPlay();
+
+ return !_vm->_eventsManager->_rightClick ? regionIndex : -2;
+}
+
+bool ThreadResource::checkMansionScroll() {
+ Common::Point pt = _vm->_eventsManager->getMousePos() -
+ Common::Point(MANSION_VIEW_X, MANSION_VIEW_Y);
+ Common::Point &viewPos = _vm->_mansionViewPos;
+ bool result = false;
+
+ // Scroll mansion view if close to any of the mansion edges
+ if (pt.x >= 0 && pt.x < MANSION_SCROLL_AREA_X && viewPos.x > 0) {
+ viewPos.x = MAX(viewPos.x - MANSION_SCROLL_INC_X, 0);
+ result = true;
+ }
+ if (pt.x >= (MANSION_VIEW_WIDTH - MANSION_SCROLL_AREA_X) &&
+ pt.x < MANSION_VIEW_WIDTH && viewPos.x < MANSION_MAX_X) {
+ viewPos.x = MIN(viewPos.x + MANSION_SCROLL_INC_X, MANSION_MAX_X);
+ result = true;
+ }
+ if (pt.y >= 0 && pt.y < MANSION_SCROLL_AREA_Y && viewPos.y > 0) {
+ viewPos.y = MAX(viewPos.y - MANSION_SCROLL_INC_Y, 0);
+ result = true;
+ }
+ if (pt.y >= (MANSION_VIEW_HEIGHT - MANSION_SCROLL_AREA_Y) &&
+ pt.y < MANSION_VIEW_HEIGHT && viewPos.y < MANSION_MAX_Y) {
+ viewPos.y = MIN(viewPos.y + MANSION_SCROLL_INC_Y, MANSION_MAX_Y);
+ result = true;
+ }
+
+ // Return whether mansion view area has changed
+ return result;
+}
+
+bool ThreadResource::goToStateID(int stackId, int id) {
+ debugC(DEBUG_BASIC, kDebugScripts, "goToStateID - %d, %d", stackId, id);
+
+ // Save current stack
+ savePrevious();
+
+ if (_stackId == stackId || stackId == -1 || loadAStack(stackId)) {
+ // Now in the correct state
+ _stateId = getStateFromID(id);
+
+ if (_stateId != -1) {
+ return doState();
+ } else {
+ _stateId = _savedStateId;
+ _stackId = _savedStackId;
+ }
+ }
+
+ return false;
+}
+
+bool ThreadResource::goToState(int stackId, int stateId) {
+ debugC(DEBUG_BASIC, kDebugScripts, "goToState - %d, %d", stackId, stateId);
+
+ savePrevious();
+ if (stackId == -1 || loadAStack(stackId)) {
+ if (stateId != -1)
+ _stateId = stateId;
+
+ return doState();
+ } else {
+ return false;
+ }
+}
+
+void ThreadResource::savePrevious() {
+ if (_savedStateId != _stateId || _stackId != _savedStackId) {
+ _savedStateId = _stateId;
+ _savedStackId = _stackId;
+ }
+}
+
+void ThreadResource::setButtonFlag(int idx, byte bits) {
+ _buttonFlags[idx] |= bits;
+}
+
+void ThreadResource::clearButtonFlag(int idx, byte bits) {
+ _buttonFlags[idx] &= ~bits;
+}
+
+void ThreadResource::loadTheApt() {
+ switch (_vm->_voy->_transitionId) {
+ case 1:
+ case 2:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 17:
+ _vm->_playStampGroupId = 0x5700;
+ break;
+ case 3:
+ _vm->_playStampGroupId = 0x5800;
+ break;
+ case 4:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ _vm->_playStampGroupId = 0x5900;
+ break;
+ default:
+ break;
+ }
+
+ if (_vm->_voy->_aptLoadMode == 143)
+ _vm->_voy->_aptLoadMode = -1;
+
+ if (_vm->_voy->_aptLoadMode != -1) {
+ doAptAnim(1);
+ _vm->_bVoy->getBoltGroup(_vm->_playStampGroupId);
+ _vm->_voy->_aptLoadMode = -1;
+ _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(
+ _vm->_playStampGroupId + 5)._picResource;
+ _vm->_graphicsManager->_vPort->setupViewPort(
+ _vm->_graphicsManager->_backgroundPage);
+ } else {
+ _vm->_bVoy->getBoltGroup(_vm->_playStampGroupId);
+ _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(
+ _vm->_playStampGroupId + 5)._picResource;
+ _vm->_graphicsManager->_vPort->setupViewPort(
+ _vm->_graphicsManager->_backgroundPage);
+ }
+
+ CMapResource *pal = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 4)._cMapResource;
+ pal->_steps = 1;
+ pal->startFade();
+ _vm->flipPageAndWaitForFade();
+}
+
+void ThreadResource::freeTheApt() {
+ _vm->_graphicsManager->fadeDownICF1(5);
+ _vm->flipPageAndWaitForFade();
+
+ _vm->_graphicsManager->fadeUpICF1();
+
+ if (_vm->_currentVocId != -1) {
+ _vm->_soundManager->stopVOCPlay();
+ _vm->_currentVocId = -1;
+ }
+
+ if (_vm->_voy->_aptLoadMode == -1) {
+ _vm->_graphicsManager->fadeDownICF(6);
+ } else {
+ doAptAnim(2);
+ }
+
+ if (_vm->_voy->_aptLoadMode == 140) {
+ _vm->_graphicsManager->screenReset();
+ _vm->_graphicsManager->resetPalette();
+ }
+
+ _vm->_graphicsManager->_vPort->setupViewPort(nullptr);
+ _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
+ _vm->_playStampGroupId = -1;
+ _vm->_voy->_viewBounds = nullptr;
+}
+
+void ThreadResource::doAptAnim(int mode) {
+ _vm->_bVoy->freeBoltGroup(0x100);
+
+ // Figure out the resource to use
+ int id = 0;
+ switch (_vm->_voy->_aptLoadMode) {
+ case 140:
+ id = 0x5A00;
+ break;
+ case 141:
+ id = 0x6000;
+ break;
+ case 142:
+ id = 0x6600;
+ break;
+ case 143:
+ id = 0x6C00;
+ break;
+ case 144:
+ id = 0x6F00;
+ break;
+ default:
+ break;
+ }
+
+ int id2 = (id == 0x6C00 || id == 0x6F00) ? 1 : 2;
+ switch (_vm->_voy->_transitionId) {
+ case 3:
+ id += id2 << 8;
+ break;
+ case 4:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ id += id2 << 9;
+ break;
+ default:
+ break;
+ }
+
+ if (mode == 1)
+ id += 0x100;
+
+ // Do the display
+ if (_vm->_bVoy->getBoltGroup(id)) {
+ CMapResource *pal = _vm->_bVoy->boltEntry(id)._cMapResource;
+ pal->_steps = 1;
+
+ for (int idx = 0; (idx < 6) && !_vm->shouldQuit(); ++idx) {
+ PictureResource *pic = _vm->_bVoy->boltEntry(id + idx + 1)._picResource;
+ _vm->_graphicsManager->_vPort->setupViewPort(pic);
+ pal->startFade();
+
+ _vm->flipPageAndWait();
+ _vm->_eventsManager->delayClick(5);
+ }
+
+ _vm->_bVoy->freeBoltGroup(id);
+ }
+
+ _vm->_bVoy->getBoltGroup(0x100);
+}
+
+void ThreadResource::synchronize(Common::Serializer &s) {
+ s.syncAsSint16LE(_aptPos.x);
+ s.syncAsSint16LE(_aptPos.y);
+
+ int stateId = _stateId;
+ int stackId = _stackId;
+ s.syncAsSint16LE(stateId);
+ s.syncAsSint16LE(stackId);
+
+ if (s.isLoading() && (stateId != _stateId || stackId != _stackId))
+ goToState(stackId, stateId);
+
+ s.syncAsSint16LE(_savedStateId);
+ s.syncAsSint16LE(_savedStackId);
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
new file mode 100644
index 0000000000..f756b9cc85
--- /dev/null
+++ b/engines/voyeur/graphics.cpp
@@ -0,0 +1,1054 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/graphics.h"
+#include "voyeur/voyeur.h"
+#include "voyeur/staticres.h"
+#include "engines/util.h"
+#include "graphics/palette.h"
+#include "graphics/surface.h"
+
+namespace Voyeur {
+
+/*------------------------------------------------------------------------*/
+
+DrawInfo::DrawInfo(int penColor, const Common::Point &pos) {
+ _penColor = penColor;
+ _pos = pos;
+}
+
+/*------------------------------------------------------------------------*/
+
+GraphicsManager::GraphicsManager(VoyeurEngine *vm) : _defaultDrawInfo(1, Common::Point()), _drawPtr(&_defaultDrawInfo), _vm(vm) {
+ _SVGAMode = 0;
+ _planeSelect = 0;
+ _saveBack = true;
+ _clipPtr = NULL;
+ _viewPortListPtr = NULL;
+ _backgroundPage = NULL;
+ _vPort = NULL;
+ _fontPtr = NULL;
+ Common::fill(&_VGAColors[0], &_VGAColors[PALETTE_SIZE], 0);
+ _fontChar = new PictureResource(DISPFLAG_NONE, 0xff, 0xff, 0, Common::Rect(), 0, NULL, 0);
+ _backColors = nullptr;
+}
+
+void GraphicsManager::sInitGraphics() {
+ initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT, false);
+ _screenSurface.create(SCREEN_WIDTH, SCREEN_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
+ clearPalette();
+}
+
+GraphicsManager::~GraphicsManager() {
+ _screenSurface.free();
+ delete _fontChar;
+}
+
+void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) {
+ if (viewPort->_activePage) {
+ viewPort->_activePage->_flags |= DISPFLAG_1;
+ Common::Rect *clipRect = _clipPtr;
+ _clipPtr = &viewPort->_clipRect;
+
+ sDrawPic(viewPort->_activePage, viewPort->_currentPic, Common::Point());
+
+ _clipPtr = clipRect;
+ }
+
+ viewPort->_rectListCount[1] = -1;
+}
+
+void GraphicsManager::addRectOptSaveRect(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) {
+ if (viewPort->_rectListCount[idx] == -1)
+ return;
+
+ // TODO: Lots of code in original, which I suspect may be overlapping rect merging
+ viewPort->_rectListPtr[idx]->push_back(bounds);
+ ++viewPort->_rectListCount[idx];
+}
+
+void GraphicsManager::restoreMCGASaveRect(ViewPortResource *viewPort) {
+ if (viewPort->_rectListCount[0] != -1) {
+ for (int i = 0; i < viewPort->_rectListCount[0]; ++i) {
+ addRectOptSaveRect(viewPort, 1, (*viewPort->_rectListPtr[0])[i]);
+ }
+ } else {
+ viewPort->_rectListCount[1] = -1;
+ }
+
+ restoreBack(*viewPort->_rectListPtr[1], viewPort->_rectListCount[1], viewPort->_pages[0],
+ viewPort->_pages[1]);
+
+ int count = viewPort->_rectListCount[0];
+ restoreBack(*viewPort->_rectListPtr[0], viewPort->_rectListCount[0],
+ viewPort->_activePage, viewPort->_currentPic);
+
+ SWAP(viewPort->_rectListPtr[0], viewPort->_rectListPtr[1]);
+ viewPort->_rectListCount[1] = count;
+}
+
+void GraphicsManager::addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) {
+ // Stubbed/dummy method in the original.
+}
+
+void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay,
+ const Common::Point &initialOffset) {
+ int width1, width2;
+ int widthDiff, widthDiff2;
+ int height1;
+ int srcOffset;
+ int screenOffset;
+ int srcFlags, destFlags;
+ ViewPortResource *destViewPort = NULL;
+ Common::Rect newBounds;
+ Common::Rect backBounds;
+ int tmpWidth = 0;
+ int tmpHeight = 0;
+ bool isClipped = false;
+ byte pixel = 0;
+ int runLength;
+
+ byte *srcImgData, *destImgData;
+ byte *srcP, *destP;
+ byte byteVal, byteVal2;
+
+ PictureResource *srcPic;
+ PictureResource *destPic;
+
+ // Get the picture parameters, or deference viewport pointers to get their pictures
+ if (srcDisplay->_flags & DISPFLAG_VIEWPORT) {
+ // A viewport was passed, not a picture
+ srcPic = ((ViewPortResource *)srcDisplay)->_currentPic;
+ } else {
+ srcPic = (PictureResource *)srcDisplay;
+ }
+
+ if (destDisplay->_flags & DISPFLAG_VIEWPORT) {
+ // A viewport was passed, not a picture
+ destViewPort = (ViewPortResource *)destDisplay;
+ destPic = destViewPort->_currentPic;
+ } else {
+ destPic = (PictureResource *)destDisplay;
+ }
+
+ Common::Point offset = Common::Point(initialOffset.x + srcPic->_bounds.left - destPic->_bounds.left,
+ initialOffset.y + srcPic->_bounds.top - destPic->_bounds.top);
+ width1 = width2 = srcPic->_bounds.width();
+ height1 = srcPic->_bounds.height();
+ srcOffset = 0;
+ srcFlags = srcPic->_flags;
+ destFlags = destPic->_flags;
+ byte *cursorData = NULL;
+
+ if (srcFlags & 1) {
+ if (_clipPtr) {
+ int xs = _clipPtr->left - destPic->_bounds.left;
+ int ys = _clipPtr->top - destPic->_bounds.top;
+ newBounds = Common::Rect(xs, ys, xs + _clipPtr->width(), ys + _clipPtr->height());
+ } else if (destViewPort) {
+ int xs = destViewPort->_clipRect.left - destPic->_bounds.left;
+ int ys = destViewPort->_clipRect.top - destPic->_bounds.top;
+ newBounds = Common::Rect(xs, ys, xs + destViewPort->_clipRect.width(),
+ ys + destViewPort->_clipRect.height());
+ } else {
+ newBounds = Common::Rect(0, 0, destPic->_bounds.width(), destPic->_bounds.height());
+ }
+
+ tmpHeight = offset.y - newBounds.top;
+ if (tmpHeight < 0) {
+ srcOffset -= tmpHeight * width2;
+ height1 += tmpHeight;
+ offset.y = newBounds.top;
+
+ if (height1 <= 0)
+ return;
+
+ isClipped = true;
+ }
+
+ int yMin = newBounds.bottom - (offset.y + height1);
+ if (yMin < 0) {
+ height1 += yMin;
+ if (height1 <= 0)
+ return;
+ }
+
+ tmpWidth = offset.x - newBounds.left;
+ if (tmpWidth < 0) {
+ srcOffset -= tmpWidth;
+ width2 += tmpWidth;
+ offset.x = newBounds.left;
+
+ if (width2 <= 0)
+ return;
+
+ isClipped = true;
+ }
+
+ int xMin = newBounds.right - (offset.x + width2);
+ if (xMin < 0) {
+ width2 += xMin;
+ if (width2 <= 0)
+ return;
+
+ isClipped = true;
+ }
+ }
+
+ screenOffset = offset.y * destPic->_bounds.width() + offset.x;
+ widthDiff = width1 - width2;
+ widthDiff2 = destPic->_bounds.width() - width2;
+
+ if (destViewPort) {
+ if (!_saveBack || (srcPic->_flags & DISPFLAG_800)) {
+ backBounds.left = destPic->_bounds.left + offset.x;
+ backBounds.top = destPic->_bounds.top + offset.y;
+ backBounds.setWidth(width2);
+ backBounds.setHeight(height1);
+ addRectOptSaveRect(destViewPort, 1, backBounds);
+
+ } else if (!destViewPort->_addFn) {
+ if (destViewPort->_rectListCount[destViewPort->_pageIndex] < -1) {
+ Common::Rect r;
+ r.left = destPic->_bounds.left + offset.x;
+ r.top = destPic->_bounds.top + offset.y;
+ r.setWidth(width2);
+ r.setHeight(height1);
+
+ (*destViewPort->_rectListPtr[destViewPort->_pageIndex]).push_back(r);
+ ++destViewPort->_rectListCount[destViewPort->_pageIndex];
+ }
+ } else {
+ int xs = offset.x + destPic->_bounds.left;
+ int ys = offset.y + destPic->_bounds.top;
+ backBounds = Common::Rect(xs, ys, xs + width2, ys + height1);
+
+ (this->*destViewPort->_addFn)(destViewPort, destViewPort->_bounds.top, backBounds);
+ }
+ }
+
+ if (srcFlags & DISPFLAG_1000) {
+ int imageDataShift = 0;
+ srcImgData = srcPic->_imgData + (imageDataShift << 14);
+ for (uint idx = 0; idx < srcPic->_maskData; ++idx) {
+ if (imageDataShift < 4)
+ ++imageDataShift;
+ }
+
+ destImgData = destPic->_imgData + (imageDataShift << 14);
+ for (uint idx = 0; idx < srcPic->_maskData; ++idx) {
+ if (imageDataShift < 4)
+ ++imageDataShift;
+ }
+ } else {
+ srcImgData = srcPic->_imgData;
+ destImgData = destPic->_imgData;
+ }
+
+ if (srcPic->_select != 0xff)
+ return;
+
+ if (destFlags & DISPFLAG_CURSOR) {
+ cursorData = new byte[width2 * height1];
+ Common::fill(cursorData, cursorData + width2 * height1, 0);
+ destImgData = cursorData;
+ }
+
+ if (srcPic->_pick == 0xff) {
+ if (srcFlags & DISPFLAG_8) {
+ error("TODO: sDrawPic variation");
+ } else {
+ // loc_258B8
+ srcP = srcImgData + srcOffset;
+
+ if (destFlags & DISPFLAG_8) {
+ // loc_258D8
+ destP = destImgData + screenOffset;
+
+ if (srcFlags & DISPFLAG_2) {
+ // loc_25652
+ srcP = srcImgData + srcOffset;
+
+ if (destFlags & DISPFLAG_8) {
+ // loc_2566F
+ if (srcFlags & DISPFLAG_2) {
+ // loc_256FA
+ srcP = (byte *)_screenSurface.getPixels() + srcOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) {
+ pixel = *srcP;
+ if (pixel)
+ *destP = pixel;
+ }
+
+ srcP += widthDiff;
+ destP += widthDiff2;
+ }
+ } else {
+ // loc_25706
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::copy(srcP, srcP + width2, destP);
+ srcP += width2 + widthDiff;
+ destP += width2 + widthDiff2;
+ }
+ }
+ } else {
+ // loc_25773
+ destP = destImgData + screenOffset;
+
+ if (srcFlags & DISPFLAG_2) {
+ // loc_25793
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::copy(srcP, srcP + width2, destP);
+ srcP += width2 + widthDiff;
+ destP += width2 + widthDiff2;
+ }
+ } else {
+ // loc_25829
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::copy(srcP, srcP + width2, destP);
+ srcP += width2 + widthDiff;
+ destP += width2 + widthDiff2;
+ }
+ }
+ }
+ } else {
+ // loc_25D40
+ if (srcFlags & DISPFLAG_100) {
+ // loc_25D4A
+ error("TODO: sDrawPic variation");
+ } else {
+ // loc_2606D
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::copy(srcP, srcP + width2, destP);
+ destP += width2 + widthDiff2;
+ srcP += width2 + widthDiff;
+ }
+ }
+ }
+ } else {
+ // loc_2615E
+ destP = destImgData + screenOffset;
+
+ if (srcFlags & DISPFLAG_2) {
+ // loc_2617e
+ if (srcFlags & DISPFLAG_100) {
+ // loc_26188
+ srcP = srcImgData;
+ if (isClipped) {
+ // loc_26199
+ tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0;
+ int xMax = tmpWidth + width2;
+ tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0;
+
+ width2 = srcPic->_bounds.width();
+ height1 = tmpHeight + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ runLength = 0;
+
+ for (int xp = 0; xp < width2; ++xp, --runLength) {
+ if (runLength <= 0) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7f;
+ runLength = *srcP++;
+ if (!runLength)
+ runLength = width2;
+ }
+ }
+
+ if (yp >= tmpHeight && xp >= tmpWidth && xp < xMax) {
+ if (pixel > 0)
+ *destP = pixel;
+ ++destP;
+ }
+ }
+
+ if (yp >= tmpHeight)
+ destP += widthDiff2;
+ }
+ } else {
+ // loc_262BE
+ byteVal = 0;
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp) {
+ byteVal2 = 0;
+ if (!byteVal2) {
+ byteVal = *++srcP;
+ if (byteVal & 0x80) {
+ byteVal &= 0x7f;
+ byteVal2 = *srcP++;
+
+ if (!byteVal2)
+ byteVal2 = width2;
+ }
+ }
+
+ if (byteVal > 0)
+ *destP = byteVal;
+
+ ++destP;
+ --byteVal2;
+ }
+
+ destP += widthDiff2;
+ }
+ }
+ } else {
+ // loc_2637F
+ // Copy with transparency
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) {
+ if (*srcP != 0)
+ *destP = *srcP;
+ }
+
+ destP += widthDiff2;
+ srcP += widthDiff;
+ }
+ }
+ } else {
+ if (srcFlags & 0x100) {
+ // Simple run-length encoded image
+ srcP = srcImgData;
+
+ if (isClipped) {
+ // loc_26424
+ tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0;
+ int xMax = tmpWidth + width2;
+ tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0;
+ width2 = srcPic->_bounds.width();
+ height1 = tmpHeight + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ runLength = 0;
+ for (int xp = 0; xp < width2; ++xp, --runLength) {
+ if (runLength <= 0) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ runLength = *srcP++;
+
+ if (!runLength)
+ runLength = width2;
+ }
+ }
+
+ if (yp >= tmpHeight && xp >= tmpWidth && xp < xMax) {
+ *destP++ = pixel;
+ }
+ }
+
+ if (yp >= tmpHeight)
+ destP += widthDiff2;
+ }
+ } else {
+ // loc_26543
+ for (int yp = 0; yp < height1; ++yp) {
+ int runLen = 0;
+ for (int xp = 0; xp < width2; ++xp, --runLen) {
+ if (runLen <= 0) {
+ // Start of run length, so get pixel and repeat length
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7f;
+ runLen = *srcP++;
+ if (runLen == 0)
+ runLen = width2;
+ }
+ }
+
+ // Copy pixel to output
+ *destP++ = pixel;
+ }
+
+ destP += widthDiff2;
+ }
+ }
+ } else {
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::copy(srcP, srcP + width2, destP);
+ destP += width2 + widthDiff2;
+ srcP += width2 + widthDiff;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ // loc_26666
+ if (srcPic->_pick == 0) {
+ // loc_2727A
+ byte onOff = srcPic->_onOff;
+
+ if (srcFlags & DISPFLAG_2) {
+ if (!(srcFlags & DISPFLAG_8)) {
+ srcP = srcImgData + srcOffset;
+
+ if (destFlags & DISPFLAG_8) {
+ // loc_272C3
+ error("TODO: sDrawPic variation");
+ } else {
+ destP = destImgData + screenOffset;
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++destP) {
+ if ((int8)*srcP++ < 0)
+ *destP = onOff;
+ }
+
+ destP += widthDiff2;
+ srcP += widthDiff;
+ }
+ }
+ }
+ } else {
+ // loc_27477
+ if (destFlags & DISPFLAG_8) {
+ // loc_27481
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::fill(destP, destP + width2, onOff);
+ destP += width2 + widthDiff2;
+ }
+ } else {
+ // loc_2753C
+ destP = destImgData + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ Common::fill(destP, destP + width2, onOff);
+ destP += width2 + widthDiff2;
+ }
+ }
+ }
+
+ } else {
+ // loc_26673
+ byte pick = srcPic->_pick;
+ byte onOff = srcPic->_onOff;
+
+ if (!(srcFlags & PICFLAG_PIC_OFFSET)) {
+ srcP = srcImgData += srcOffset;
+ pixel = 0;
+
+ if (destFlags & PICFLAG_PIC_OFFSET) {
+ destP = destImgData + screenOffset;
+ if (srcFlags & PICFLAG_2) {
+ if (srcFlags & PICFLAG_100) {
+ if (isClipped) {
+ // loc_266E3
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+ tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0;
+ int xMax = tmpWidth + width2;
+ tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0;
+ pick = 0x7F;
+ width2 = srcPic->_bounds.width();
+ height1 = tmpHeight + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ int runLen = 0;
+ for (int xp = 0; xp < width2; ++xp, --runLen) {
+ if (runLen <= 0) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ runLen = *srcP++;
+ if (!runLen)
+ runLen = width2;
+ }
+ }
+
+ if (yp >= tmpHeight && xp >= tmpWidth && xp < xMax) {
+ if (pixel) {
+ *destP = (pixel & pick) ^ onOff;
+ }
+ ++destP;
+ }
+ }
+ if (yp >= tmpHeight)
+ destP += widthDiff2;
+ }
+ } else {
+ // loc_26815
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xi = 0; xi < width2; ++xi, ++destP) {
+ byteVal2 = 0;
+ for (int xp = 0; xp < width2; ++xp, ++destP, --byteVal2) {
+ if (!byteVal2) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ byteVal2 = *srcP++;
+ if (!byteVal2) {
+ byteVal2 = width2;
+ }
+ }
+ }
+
+ if (pixel)
+ *destP = (pixel & pick) ^ onOff;
+ }
+ }
+
+ destP += widthDiff2;
+ }
+ }
+ } else {
+ // Direct screen write
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) {
+ if (*srcP)
+ *destP = (*srcP & pick) ^ onOff;
+ }
+ destP += widthDiff2;
+ srcP += widthDiff;
+ }
+ }
+ } else if (srcFlags & PICFLAG_100) {
+ srcP = srcImgData;
+ if (isClipped) {
+ // loc_269FD
+ tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0;
+ int xMax = tmpWidth + width2;
+ tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0;
+ width2 = srcPic->_bounds.width();
+ height1 = tmpHeight + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ runLength = 0;
+ for (int xp = 0; xp < width2; ++xp, --runLength) {
+ if (runLength <= 0) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ runLength = *srcP++;
+
+ if (!runLength)
+ runLength = width2;
+ }
+ }
+
+ if (yp >= tmpHeight && xp >= tmpWidth && xp < xMax) {
+ *destP++ = (pixel & 0x80) ^ onOff;
+ }
+ }
+ }
+ } else {
+ // loc_26BD5
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ byteVal2 = 0;
+
+ for (int xp = 0; xp < width2; ++xp, ++destP) {
+ if (!byteVal2) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ byteVal2 = *srcP++;
+ if (!byteVal2)
+ byteVal2 = width2;
+ }
+ }
+
+ *destP = (pixel & pick) ^ onOff;
+ }
+
+ destP += widthDiff2;
+ }
+ }
+ } else {
+ // loc_26C9A
+ destP = (byte *)_screenSurface.getPixels() + screenOffset;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) {
+ *destP = (*srcP & pick) ^ onOff;
+ }
+ destP += widthDiff2;
+ srcP += widthDiff;
+ }
+ }
+ } else {
+ // loc_26D2F
+ destP = destImgData + screenOffset;
+
+ if (srcFlags & PICFLAG_2) {
+ // loc_26D4F
+ if (srcFlags & PICFLAG_100) {
+ srcP = srcImgData;
+
+ if (isClipped) {
+ // loc_26D6A
+ tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0;
+ int xMax = tmpWidth + width2;
+ tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0;
+ width2 = srcPic->_bounds.width();
+ height1 = tmpHeight + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ runLength = 0;
+
+ for (int xp = 0; xp < width2; ++xp, --runLength) {
+ if (runLength <= 0) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ runLength = *srcP++;
+ if (!runLength)
+ runLength = width2;
+ }
+ }
+
+ if (yp >= tmpHeight && xp >= tmpWidth && xp < xMax) {
+ if (pixel)
+ *destP = (pixel & pick) ^ onOff;
+
+ ++destP;
+ }
+ }
+
+ if (yp >= tmpHeight)
+ destP += widthDiff2;
+ }
+ } else {
+ // loc_26E95
+ for (int yp = 0; yp < height1; ++yp) {
+ byteVal2 = 0;
+ for (int xp = 0; xp < width2; ++xp, ++destP, --byteVal2) {
+ if (!byteVal2) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ byteVal2 = *srcP++;
+ if (!byteVal2)
+ byteVal2 = width2;
+ }
+ }
+
+ if (pixel)
+ *destP = (pixel & pick) ^ onOff;
+ }
+
+ destP += widthDiff2;
+ }
+ }
+ } else {
+ // loc_26F5D
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) {
+ if (*srcP)
+ *destP = (*srcP & pick) ^ onOff;
+ }
+ destP += widthDiff2;
+ srcP += widthDiff;
+ }
+ }
+ } else {
+ // loc_26FEF
+ if (srcFlags & PICFLAG_100) {
+ // loc_26FF9
+ for (int yp = 0; yp < height1; ++yp) {
+ for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) {
+ *destP = (*srcP & pick) ^ onOff;
+ }
+ destP += widthDiff2;
+ srcP += widthDiff;
+ }
+ } else {
+ // loc_271F0
+ srcP = srcImgData;
+
+ if (isClipped) {
+ // loc_2700A
+ tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0;
+ int xMax = tmpWidth + width2;
+ tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0;
+ width2 = srcPic->_bounds.width();
+ height1 = tmpHeight + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ runLength = 0;
+
+ for (int xp = 0; xp < width2; ++xp, --runLength) {
+ if (runLength <= 0) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ runLength = *srcP++;
+ if (!runLength)
+ runLength = width2;
+ }
+ }
+
+ if (yp >= tmpHeight && xp >= tmpWidth && xp < xMax) {
+ *destP++ = (pixel & pick) ^ onOff;
+ }
+ }
+
+ if (yp >= tmpHeight)
+ destP += widthDiff2;
+ }
+ } else {
+ // loc_2712F
+ for (int yp = 0; yp < height1; ++yp) {
+ byteVal2 = 0;
+ for (int xp = 0; xp < width2; ++xp, ++destP, --byteVal2) {
+ if (!byteVal2) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel &= 0x7F;
+ byteVal2 = *srcP++;
+ if (!byteVal2)
+ byteVal2 = width2;
+ }
+ }
+
+ *destP = (*srcP & pick) ^ onOff;
+ }
+ destP += widthDiff2;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (cursorData) {
+ _vm->_eventsManager->setCursor(cursorData, width2, height1, srcPic->_keyColor);
+ delete[] cursorData;
+ }
+}
+
+void GraphicsManager::drawANumber(DisplayResource *display, int num, const Common::Point &pt) {
+ PictureResource *pic = _vm->_bVoy->boltEntry(num + 261)._picResource;
+ sDrawPic(pic, display, pt);
+}
+
+void GraphicsManager::fillPic(DisplayResource *display, byte onOff) {
+ PictureResource *pic;
+ if (display->_flags & DISPFLAG_VIEWPORT) {
+ pic = ((ViewPortResource *)display)->_currentPic;
+ } else {
+ pic = (PictureResource *)display;
+ }
+
+ PictureResource picResource;
+ picResource._flags = DISPFLAG_NONE;
+ picResource._select = 0xff;
+ picResource._pick = 0;
+ picResource._onOff = onOff;
+ picResource._bounds = pic->_bounds;
+
+ sDrawPic(&picResource, display, Common::Point());
+}
+
+/**
+ * Queues the given picture for display
+ */
+void GraphicsManager::sDisplayPic(PictureResource *pic) {
+ _vm->_eventsManager->_intPtr._flipWait = true;
+}
+
+void GraphicsManager::flipPage() {
+ Common::Array<ViewPortResource *> &viewPorts = _viewPortListPtr->_entries;
+ bool flipFlag = false;
+
+ for (uint idx = 0; idx < viewPorts.size(); ++idx) {
+ if (viewPorts[idx]->_flags & DISPFLAG_20) {
+ if ((viewPorts[idx]->_flags & (DISPFLAG_8 || DISPFLAG_1))
+ == (DISPFLAG_8 || DISPFLAG_1)) {
+ if (_planeSelect == idx)
+ sDisplayPic(viewPorts[idx]->_currentPic);
+ flipFlag = true;
+ }
+ }
+
+ if (flipFlag) {
+ ViewPortResource &viewPort = *viewPorts[idx];
+
+ viewPort._lastPage = viewPort._pageIndex;
+ ++viewPort._pageIndex;
+
+ if (viewPort._pageIndex >= viewPort._pageCount)
+ viewPort._pageIndex = 0;
+
+ assert(viewPort._pageIndex < 2);
+ viewPort._currentPic = viewPort._pages[viewPort._pageIndex];
+ viewPort._flags = (viewPort._flags & ~DISPFLAG_8) | DISPFLAG_40;
+ }
+ }
+}
+
+void GraphicsManager::restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount,
+ PictureResource *srcPic, PictureResource *destPic) {
+ // WORKAROUND: Since _backgroundPage can point to a resource freed at the end of display methods,
+ // I'm now explicitly resetting it to null in screenReset(), so at this point it can be null
+ if (!srcPic)
+ return;
+
+ bool saveBack = _saveBack;
+ _saveBack = false;
+
+ if (rectListCount == -1) {
+ sDrawPic(srcPic, destPic, Common::Point());
+ } else {
+ for (int i = rectListCount - 1; i >= 0; --i) {
+ _clipPtr = &rectList[i];
+ sDrawPic(srcPic, destPic, Common::Point());
+ }
+ }
+
+ _saveBack = saveBack;
+}
+
+void GraphicsManager::clearPalette() {
+ byte palette[768];
+ Common::fill(&palette[0], &palette[768], 0);
+ g_system->getPaletteManager()->setPalette(&palette[0], 0, 256);
+}
+
+void GraphicsManager::setPalette(const byte *palette, int start, int count) {
+ g_system->getPaletteManager()->setPalette(palette, start, count);
+ _vm->_eventsManager->_gameData._hasPalette = false;
+}
+
+void GraphicsManager::setPalette128(const byte *palette, int start, int count) {
+ byte rgb[3];
+ g_system->getPaletteManager()->grabPalette(&rgb[0], 128, 1);
+ g_system->getPaletteManager()->setPalette(palette, start, count);
+ g_system->getPaletteManager()->setPalette(&rgb[0], 128, 1);
+}
+
+
+void GraphicsManager::resetPalette() {
+ for (int i = 0; i < 256; ++i)
+ setColor(i, 0, 0, 0);
+
+ _vm->_eventsManager->_intPtr._hasPalette = true;
+}
+
+void GraphicsManager::setColor(int idx, byte r, byte g, byte b) {
+ byte *vgaP = &_VGAColors[idx * 3];
+ vgaP[0] = r;
+ vgaP[1] = g;
+ vgaP[2] = b;
+
+ _vm->_eventsManager->_intPtr._palStartIndex = MIN(_vm->_eventsManager->_intPtr._palStartIndex, idx);
+ _vm->_eventsManager->_intPtr._palEndIndex = MAX(_vm->_eventsManager->_intPtr._palEndIndex, idx);
+}
+
+void GraphicsManager::setOneColor(int idx, byte r, byte g, byte b) {
+ byte palEntry[3];
+ palEntry[0] = r;
+ palEntry[1] = g;
+ palEntry[2] = b;
+ g_system->getPaletteManager()->setPalette(&palEntry[0], idx, 1);
+}
+
+void GraphicsManager::setColors(int start, int count, const byte *pal) {
+ for (int i = 0; i < count; ++i) {
+ if ((i + start) != 128) {
+ const byte *rgb = pal + i * 3;
+ setColor(i + start, rgb[0], rgb[1], rgb[2]);
+ }
+ }
+
+ _vm->_eventsManager->_intPtr._hasPalette = true;
+}
+
+void GraphicsManager::screenReset() {
+ resetPalette();
+
+ _backgroundPage = NULL;
+ _vPort->setupViewPort(NULL);
+ fillPic(_vPort, 0);
+
+ _vm->flipPageAndWait();
+}
+
+void GraphicsManager::fadeDownICF1(int steps) {
+ if (steps > 0) {
+ int stepAmount = _vm->_voy->_fadingAmount2 / steps;
+
+ for (int idx = 0; idx < steps; ++idx) {
+ _vm->_voy->_fadingAmount2 -= stepAmount;
+ _vm->_eventsManager->delay(1);
+ }
+ }
+
+ _vm->_voy->_fadingAmount2 = 0;
+}
+
+void GraphicsManager::fadeUpICF1(int steps) {
+ if (steps > 0) {
+ int stepAmount = (63 - _vm->_voy->_fadingAmount2) / steps;
+
+ for (int idx = 0; idx < steps; ++idx) {
+ _vm->_voy->_fadingAmount2 += stepAmount;
+ _vm->_eventsManager->delay(1);
+ }
+ }
+
+ _vm->_voy->_fadingAmount2 = 63;
+}
+
+void GraphicsManager::fadeDownICF(int steps) {
+ if (steps > 0) {
+ _vm->_eventsManager->hideCursor();
+ int stepAmount1 = _vm->_voy->_fadingAmount1 / steps;
+ int stepAmount2 = _vm->_voy->_fadingAmount2 / steps;
+
+ for (int idx = 0; idx < steps; ++idx) {
+ _vm->_voy->_fadingAmount1 -= stepAmount1;
+ _vm->_voy->_fadingAmount2 -= stepAmount2;
+ _vm->_eventsManager->delay(1);
+ }
+ }
+
+ _vm->_voy->_fadingAmount1 = 0;
+ _vm->_voy->_fadingAmount2 = 0;
+}
+
+void GraphicsManager::drawDot() {
+ for (int y = 0; y < 9; ++y) {
+ byte *pDest = (byte *)_screenSurface.getPixels() + DOT_LINE_START[y] + DOT_LINE_OFFSET[y];
+ Common::fill(pDest, pDest + DOT_LINE_LENGTH[y], 0x80);
+ }
+}
+
+void GraphicsManager::synchronize(Common::Serializer &s) {
+ s.syncBytes(&_VGAColors[0], PALETTE_SIZE);
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/graphics.h b/engines/voyeur/graphics.h
new file mode 100644
index 0000000000..221d31061d
--- /dev/null
+++ b/engines/voyeur/graphics.h
@@ -0,0 +1,119 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_GRAPHICS_H
+#define VOYEUR_GRAPHICS_H
+
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "common/rect.h"
+#include "common/serializer.h"
+#include "graphics/surface.h"
+
+namespace Voyeur {
+
+#define SCREEN_WIDTH 320
+#define SCREEN_HEIGHT 200
+#define PALETTE_COUNT 256
+#define PALETTE_SIZE (256 * 3)
+
+class VoyeurEngine;
+class GraphicsManager;
+class DisplayResource;
+class PictureResource;
+class ViewPortResource;
+class ViewPortListResource;
+class FontResource;
+class FontInfoResource;
+class CMapResource;
+
+class DrawInfo {
+public:
+ int _penColor;
+ Common::Point _pos;
+public:
+ DrawInfo(int penColor, const Common::Point &pos);
+};
+
+typedef void (GraphicsManager::*GraphicMethodPtr)();
+typedef void (GraphicsManager::*ViewPortSetupPtr)(ViewPortResource *);
+typedef void (GraphicsManager::*ViewPortAddPtr)(ViewPortResource *, int idx, const Common::Rect &bounds);
+typedef void (GraphicsManager::*ViewPortRestorePtr)(ViewPortResource *);
+
+class GraphicsManager {
+public:
+ VoyeurEngine *_vm;
+ byte _VGAColors[PALETTE_SIZE];
+ PictureResource *_backgroundPage;
+ int _SVGAMode;
+ ViewPortListResource *_viewPortListPtr;
+ ViewPortResource *_vPort;
+ bool _saveBack;
+ Common::Rect *_clipPtr;
+ uint _planeSelect;
+ Graphics::Surface _screenSurface;
+ CMapResource *_backColors;
+ FontInfoResource *_fontPtr;
+ PictureResource *_fontChar;
+ DrawInfo *_drawPtr;
+ DrawInfo _defaultDrawInfo;
+private:
+ void restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount,
+ PictureResource *srcPic, PictureResource *destPic);
+public:
+ GraphicsManager(VoyeurEngine *vm);
+ ~GraphicsManager();
+
+ void sInitGraphics();
+
+ void setupMCGASaveRect(ViewPortResource *viewPort);
+ void addRectOptSaveRect(ViewPortResource *viewPort, int idx, const Common::Rect &bounds);
+ void restoreMCGASaveRect(ViewPortResource *viewPort);
+ void addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds);
+
+ void sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &initialOffset);
+ void fillPic(DisplayResource *display, byte onOff);
+ void sDisplayPic(PictureResource *pic);
+ void drawANumber(DisplayResource *display, int num, const Common::Point &pt);
+ void flipPage();
+ void clearPalette();
+ void setPalette(const byte *palette, int start, int count);
+ void setPalette128(const byte *palette, int start, int count);
+ void resetPalette();
+ void setColor(int idx, byte r, byte g, byte b);
+ void setOneColor(int idx, byte r, byte g, byte b);
+ void setColors(int start, int count, const byte *pal);
+ void screenReset();
+ void fadeDownICF1(int steps);
+ void fadeUpICF1(int steps = 0);
+ void fadeDownICF(int steps);
+ void drawDot();
+
+ /**
+ * Synchronizes the game data
+ */
+ void synchronize(Common::Serializer &s);
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_GRAPHICS_H */
diff --git a/engines/voyeur/module.mk b/engines/voyeur/module.mk
new file mode 100644
index 0000000000..aab254cf36
--- /dev/null
+++ b/engines/voyeur/module.mk
@@ -0,0 +1,23 @@
+MODULE := engines/voyeur
+
+MODULE_OBJS := \
+ animation.o \
+ data.o \
+ debugger.o \
+ detection.o \
+ events.o \
+ files.o \
+ files_threads.o \
+ graphics.o \
+ sound.o \
+ staticres.o \
+ voyeur.o \
+ voyeur_game.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_VOYEUR), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp
new file mode 100644
index 0000000000..26145bd743
--- /dev/null
+++ b/engines/voyeur/sound.cpp
@@ -0,0 +1,85 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "audio/audiostream.h"
+#include "audio/decoders/raw.h"
+#include "common/memstream.h"
+#include "voyeur/sound.h"
+#include "voyeur/staticres.h"
+
+namespace Voyeur {
+
+ SoundManager::SoundManager(Audio::Mixer *mixer) {
+ _mixer = mixer;
+ _vocOffset = 0;
+}
+
+void SoundManager::playVOCMap(byte *voc, int vocSize) {
+ Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(voc, vocSize, DisposeAfterUse::NO);
+ Audio::AudioStream *audioStream = Audio::makeVOCStream(dataStream, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream);
+}
+
+void SoundManager::abortVOCMap() {
+ _mixer->stopHandle(_soundHandle);
+}
+
+void SoundManager::stopVOCPlay() {
+ _mixer->stopHandle(_soundHandle);
+ _vocOffset = 0;
+}
+
+void SoundManager::setVOCOffset(int offset) {
+ _vocOffset = offset;
+}
+
+Common::String SoundManager::getVOCFileName(int idx) {
+ return Common::String::format("%s.voc", SZ_FILENAMES[idx]);
+}
+
+void SoundManager::startVOCPlay(const Common::String &filename) {
+ Common::File f;
+ if (!f.open(filename))
+ error("Could not find voc file - %s", filename.c_str());
+
+ Audio::SeekableAudioStream *audioStream = Audio::makeVOCStream(f.readStream(f.size()),
+ Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream);
+ audioStream->seek(Audio::Timestamp(_vocOffset * 1000, 11025));
+}
+
+void SoundManager::startVOCPlay(int soundId) {
+ startVOCPlay(getVOCFileName(soundId));
+}
+
+int SoundManager::getVOCStatus() {
+ return _mixer->isSoundHandleActive(_soundHandle);
+}
+
+uint32 SoundManager::getVOCFrame() {
+ Audio::Timestamp timestamp = _mixer->getElapsedTime(_soundHandle);
+ return timestamp.secs();
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/sound.h b/engines/voyeur/sound.h
new file mode 100644
index 0000000000..af1d0b1b46
--- /dev/null
+++ b/engines/voyeur/sound.h
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_SOUND_H
+#define VOYEUR_SOUND_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+#include "audio/mixer.h"
+#include "audio/decoders/voc.h"
+#include "voyeur/files.h"
+
+namespace Voyeur {
+
+class SoundManager {
+private:
+ Audio::Mixer *_mixer;
+ Audio::SoundHandle _soundHandle;
+ int _vocOffset;
+public:
+ SoundManager(Audio::Mixer *mixer);
+
+ void playVOCMap(byte *voc, int vocSize);
+ void stopVOCPlay();
+ void abortVOCMap();
+ void setVOCOffset(int offset);
+ Common::String getVOCFileName(int idx);
+ void startVOCPlay(const Common::String &filename);
+ void startVOCPlay(int soundId);
+ int getVOCStatus();
+ uint32 getVOCFrame();
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_SOUND_H */
diff --git a/engines/voyeur/staticres.cpp b/engines/voyeur/staticres.cpp
new file mode 100644
index 0000000000..7016793ddc
--- /dev/null
+++ b/engines/voyeur/staticres.cpp
@@ -0,0 +1,142 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/staticres.h"
+
+namespace Voyeur {
+
+const int COMPUTER_DEFAULTS[] = {
+ 18, 1, 0, 1, 33, 0, 998, -1, 18, 2, 0, 1, 41, 0,
+ 998, -1, 18, 3, 0, 1, 47, 0, 998, -1, 18, 4, 0,
+ 1, 53, 0, 998, -1, 18, 5, 0, 1, 46, 0, 998, -1,
+ 18, 6, 0, 1, 50, 0, 998, -1, 18, 7, 0, 1, 40, 0,
+ 998, -1, 18, 8, 0, 1, 43, 0, 998, -1, 19, 1, 0,
+ 2, 28, 0, 998, -1
+};
+
+const int RESOLVE_TABLE[] = {
+ 0x2A00, 0x4A00, 0x1000, 0x4B00, 0x2C00, 0x4F00, 0x1400, 0x5000,
+ 0x1700, 0x5100, 0x1800, 0x5200, 0x3300, 0x5400, 0x3700, 0x5500,
+ 0x1A00, 0x1C00, 0x1E00, 0x1F00, 0x2100, 0x2200, 0x2400, 0x2700,
+ 0x2B00, 0x1100, 0x4C00, 0x1200, 0x4D00, 0x1300, 0x4E00, 0x2E00,
+ 0x1900, 0x3200, 0x3400, 0x3800, 0x2800, 0x3E00, 0x4100, 0x2900,
+ 0x4400, 0x4600, 0x5300, 0x3900, 0x7600, 0x7200, 0x7300, 0x7400,
+ 0x7500
+};
+
+const int LEVEL_H[] = {
+ 4, 7, 7, 8, 9, 10, 2, 2, 4, 8, 8, 9, 9, 10, 10, 11, 11
+};
+
+const int LEVEL_M[] = {
+ 0, 0, 30, 0, 30, 0, 0, 0, 30, 0, 30, 0, 45, 0, 30, 0, 30
+};
+
+const int BLIND_TABLE[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 9, 10, 11, 1, 11, 5, 12,
+ 13, 16, 15, 16, 17, 18, 5, 6, 18, 17, 13, 13, 14, 14,
+ 5, 12, 6, 6, 13, 14, 13
+};
+
+const int COMPUTER_SCREEN_TABLE[] = {
+ 269, 128, 307, 163,
+ 269, 128, 307, 163,
+ 68, 79, 98, 102,
+ 68, 79, 98, 102,
+ 68, 79, 98, 102,
+ 68, 79, 98, 102,
+ 248, 138, 291, 163,
+ 83, 132, 143, 156,
+ 248, 138, 291, 163,
+ 83, 132, 143, 156,
+ 83, 132, 143, 156,
+ 248, 138, 291, 163,
+ 68, 79, 98, 102,
+ 68, 79, 98, 102
+};
+
+const char *const SZ_FILENAMES[] = {
+ "A2110100", nullptr, "A2300100", nullptr, "B1220100", nullptr, "C1220100", nullptr,
+ "C1290100", nullptr, "D1220100", nullptr, "D1270100", nullptr, "E1210100", nullptr,
+ "E1260100", nullptr, "E1280100", nullptr, "E1325100", nullptr, "F1200100", nullptr,
+ "G1250100", nullptr, "G1260100", nullptr, "H1200100", nullptr, "H1230100", nullptr,
+ "H1310100", nullptr, "I1300100", nullptr, "J1220100", nullptr, "J1230100", nullptr,
+ "J1320100", nullptr, "K1260100", nullptr, "K1280100", nullptr, "K1325100", nullptr,
+ "L1210100", nullptr, "L1280100", nullptr, "L1290100", nullptr, "L1300100", nullptr,
+ "L1310100", nullptr, "M1260100", nullptr, "M1310100", nullptr, "N1210100", nullptr,
+ "N1225100", nullptr, "N1275510", nullptr, "N1280510", nullptr, "N1325100", nullptr,
+ "O1230100", nullptr, "O1260100", nullptr, "O1260520", nullptr, "O1280100", nullptr,
+ "O1325540", nullptr, "P1276710", nullptr, "P1280540", nullptr, "P1280740", nullptr,
+ "P1290510", nullptr, "P1325100", nullptr, "P1325300", nullptr, "P1325520", nullptr,
+ "Q1230100", nullptr, "Q1240530", nullptr, "Q1240730", nullptr, "Q1260100", nullptr,
+ "Q1260520", nullptr, "Q1260720", nullptr, "Q1325100", nullptr, "R1280540", nullptr,
+ "Z1110510", nullptr, "Z1110520", nullptr, "Z1110530", nullptr, "Z1110540", nullptr,
+ "Z1110545", nullptr, "Z2320100", nullptr, "Z2905300", nullptr, "Z3110100", nullptr,
+ "Z3115510", nullptr, "Z3115520", nullptr, "Z3115530", nullptr, "Z3115540", nullptr,
+ "Z4915100", nullptr, "Z4915200", nullptr, "Z4915300",
+ nullptr, nullptr, nullptr, nullptr, nullptr,
+ "MMARG", "MZACK", "MREED", "MJESSI", "MCHLOE", "MCAMERA", "MENDCRED",
+ "NEWCALL2", "PHONE1", "PHONE2", "PHONE3", "PHONE6", "PHONE8",
+ "B1300100", "C1250100", "C1320100", "D1320100", "E1210200", "E1260200",
+ "E1280200", "E1310100", "G1230100", "G1300100", "I1210100", "I1270100",
+ "I1280100", "J1250100", "J1280100", "K1260200", "K1270100", "K1325200",
+ "L1240100", "M1200100", "M1230100", "M1290100", "N1250100", "N1260100",
+ "N1280100", "O1250510", "O1290510", "O1320510", "O1320710", "P1240100",
+ "P1240530", "P1260100", "P1270100", "P1280100", "P1280530", "P1320530",
+ "Q1240100", "E1325100"
+};
+
+const char *const SATURDAY = "Saturday";
+const char *const SUNDAY = "Sunday";
+const char *const MONDAY = "Monday Morning";
+const char *const AM = "am";
+const char *const PM = "pm";
+
+const char *const START_OF_MESSAGE = "*** Start of Message ***";
+const char *const END_OF_MESSAGE = "*** End of Message ***";
+
+const char *const EVENT_TYPE_STRINGS[4] = { "Video", "Audio", "Evidence", "Computer" };
+
+int DOT_LINE_START[9] = {
+ 0xE880, 0xE9C0, 0xEB00, 0xEC40, 0xED80, 0xEEC0, 0xF000, 0xF140, 0xF280
+};
+int DOT_LINE_OFFSET[9] = {
+ 144, 143, 142, 141, 141, 141, 142, 143, 144
+};
+int DOT_LINE_LENGTH[9] = {
+ 5, 7, 9, 11, 11, 11, 9, 7, 5
+};
+
+const char *const PIRACY_MESSAGE[] = {
+ "It is illegal to make",
+ "unauthorized copies of",
+ "this software. Duplication",
+ "of this software for any",
+ "reason including sale,",
+ "loan, rental, or gift is a",
+ "crime. Penalties include",
+ "fines of up to $50,000",
+ "and jail terms up to",
+ "5 years."
+};
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/staticres.h b/engines/voyeur/staticres.h
new file mode 100644
index 0000000000..ea3a8003ac
--- /dev/null
+++ b/engines/voyeur/staticres.h
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_STATICRES_H
+#define VOYEUR_STATICRES_H
+
+#include "common/scummsys.h"
+
+namespace Voyeur {
+
+extern const int COMPUTER_DEFAULTS[];
+
+extern const int RESOLVE_TABLE[];
+
+extern const int LEVEL_H[];
+
+extern const int LEVEL_M[];
+
+extern const int BLIND_TABLE[];
+
+extern const int COMPUTER_SCREEN_TABLE[];
+
+extern const char *const SZ_FILENAMES[];
+
+extern const char *const SATURDAY;
+extern const char *const SUNDAY;
+extern const char *const MONDAY;
+extern const char *const AM;
+extern const char *const PM;
+
+extern const char *const START_OF_MESSAGE;
+extern const char *const END_OF_MESSAGE;
+
+extern const char *const EVENT_TYPE_STRINGS[4];
+
+extern int DOT_LINE_START[9];
+extern int DOT_LINE_OFFSET[9];
+extern int DOT_LINE_LENGTH[9];
+
+extern const char *const PIRACY_MESSAGE[];
+
+} // End of namespace Voyeur
+
+#endif
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
new file mode 100644
index 0000000000..9843930bd3
--- /dev/null
+++ b/engines/voyeur/voyeur.cpp
@@ -0,0 +1,921 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/voyeur.h"
+#include "voyeur/animation.h"
+#include "voyeur/graphics.h"
+#include "voyeur/staticres.h"
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "common/debug-channels.h"
+#include "graphics/palette.h"
+#include "graphics/scaler.h"
+#include "graphics/thumbnail.h"
+
+namespace Voyeur {
+
+VoyeurEngine *g_vm;
+
+VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) : Engine(syst),
+ _gameDescription(gameDesc), _randomSource("Voyeur"),
+ _defaultFontInfo(3, 0xff, 0xff, 0, 0, ALIGN_LEFT, 0, Common::Point(), 1, 1,
+ Common::Point(1, 1), 1, 0, 0) {
+ _debugger = nullptr;
+ _eventsManager = nullptr;
+ _filesManager = nullptr;
+ _graphicsManager = nullptr;
+ _soundManager = nullptr;
+ _voy = nullptr;
+ _bVoy = NULL;
+
+ _iForceDeath = ConfMan.getInt("boot_param");
+ if (_iForceDeath < 1 || _iForceDeath > 4)
+ _iForceDeath = -1;
+
+ _controlPtr = NULL;
+ _stampFlags = 0;
+ _playStampGroupId = _currentVocId = 0;
+ _audioVideoId = -1;
+ _checkTransitionId = -1;
+ _gameHour = 0;
+ _gameMinute = 0;
+ _flashTimeVal = 0;
+ _flashTimeFlag = false;
+ _timeBarVal = -1;
+ _checkPhoneVal = 0;
+ _voyeurArea = AREA_NONE;
+ _loadGameSlot = -1;
+
+ DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts");
+
+ _debugger = new Debugger(this);
+ _eventsManager = new EventsManager(this);
+ _filesManager = new FilesManager(this);
+ _graphicsManager = new GraphicsManager(this);
+ _soundManager = new SoundManager(_mixer);
+ _voy = new SVoy(this);
+
+ _stampLibPtr = nullptr;
+ _controlGroupPtr = nullptr;
+ _stampData = nullptr;
+ _stackGroupPtr = nullptr;
+ _glGoState = -1;
+ _glGoStack = -1;
+ _resolvePtr = nullptr;
+ _mainThread = nullptr;
+}
+
+VoyeurEngine::~VoyeurEngine() {
+ delete _bVoy;
+ delete _voy;
+ delete _soundManager;
+ delete _graphicsManager;
+ delete _filesManager;
+ delete _eventsManager;
+ delete _debugger;
+}
+
+Common::Error VoyeurEngine::run() {
+ ESP_Init();
+ globalInitBolt();
+
+ if (doHeadTitle()) {
+ // The original allows the victim to be explicitly specified via the command line.
+ // This is possible in ScummVM by using a boot parameter.
+ if (_iForceDeath >= 1 && _iForceDeath <= 4)
+ _voy->_eventFlags |= EVTFLAG_VICTIM_PRESET;
+
+
+ playStamp();
+ if (!shouldQuit())
+ doTailTitle();
+ }
+
+ return Common::kNoError;
+}
+
+
+int VoyeurEngine::getRandomNumber(int maxNumber) {
+ return _randomSource.getRandomNumber(maxNumber);
+}
+
+void VoyeurEngine::ESP_Init() {
+ ThreadResource::init();
+
+ if (ConfMan.hasKey("save_slot"))
+ _loadGameSlot = ConfMan.getInt("save_slot");
+}
+
+void VoyeurEngine::globalInitBolt() {
+ initBolt();
+
+ _filesManager->openBoltLib("bvoy.blt", _bVoy);
+ _bVoy->getBoltGroup(0x000);
+ _bVoy->getBoltGroup(0x100);
+
+ _graphicsManager->_fontPtr = &_defaultFontInfo;
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource;
+ assert(_graphicsManager->_fontPtr->_curFont);
+
+ // Setup default flags
+ _voy->_viewBounds = nullptr;
+
+ _eventsManager->addFadeInt();
+}
+
+void VoyeurEngine::initBolt() {
+ vInitInterrupts();
+ _graphicsManager->sInitGraphics();
+ _eventsManager->vInitColor();
+ initInput();
+}
+
+void VoyeurEngine::vInitInterrupts() {
+ _eventsManager->_intPtr._palette = &_graphicsManager->_VGAColors[0];
+}
+
+void VoyeurEngine::initInput() {
+}
+
+bool VoyeurEngine::doHeadTitle() {
+// char dest[144];
+
+ _eventsManager->startMainClockInt();
+
+ if (_loadGameSlot == -1) {
+ // Show starting screen
+ if (_bVoy->getBoltGroup(0x500)) {
+ showConversionScreen();
+ _bVoy->freeBoltGroup(0x500);
+
+ if (shouldQuit())
+ return false;
+ }
+
+ if (ConfMan.getBool("copy_protection")) {
+ // Display lock screen
+ bool result = doLock();
+ if (!result || shouldQuit())
+ return false;
+ }
+
+ // Show the title screen
+ _eventsManager->getMouseInfo();
+ showTitleScreen();
+ if (shouldQuit())
+ return false;
+
+ // Opening
+ _eventsManager->getMouseInfo();
+ doOpening();
+ if (shouldQuit())
+ return false;
+
+ _eventsManager->getMouseInfo();
+ doTransitionCard("Saturday Afternoon", "Player's Apartment");
+ _eventsManager->delayClick(90);
+
+ if (_voy->_eventFlags & EVTFLAG_VICTIM_PRESET) {
+ // Preset victim turned on, so add a default set of incriminating videos
+ _voy->addEvent(18, 1, EVTYPE_VIDEO, 33, 0, 998, -1);
+ _voy->addEvent(18, 2, EVTYPE_VIDEO, 41, 0, 998, -1);
+ _voy->addEvent(18, 3, EVTYPE_VIDEO, 47, 0, 998, -1);
+ _voy->addEvent(18, 4, EVTYPE_VIDEO, 53, 0, 998, -1);
+ _voy->addEvent(18, 5, EVTYPE_VIDEO, 46, 0, 998, -1);
+ _voy->addEvent(18, 6, EVTYPE_VIDEO, 50, 0, 998, -1);
+ _voy->addEvent(18, 7, EVTYPE_VIDEO, 40, 0, 998, -1);
+ _voy->addEvent(18, 8, EVTYPE_VIDEO, 43, 0, 998, -1);
+ _voy->addEvent(19, 1, EVTYPE_AUDIO, 20, 0, 998, -1);
+ }
+ }
+
+ _voy->_aptLoadMode = 140;
+ return true;
+}
+
+void VoyeurEngine::showConversionScreen() {
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x502)._picResource;
+ _graphicsManager->_vPort->setupViewPort();
+ flipPageAndWait();
+
+ // Immediate palette load to show the initial screen
+ CMapResource *cMap = _bVoy->getCMapResource(0x503);
+ assert(cMap);
+ cMap->_steps = 0;
+ cMap->startFade();
+
+ // Wait briefly
+ _eventsManager->delayClick(150);
+ if (shouldQuit())
+ return;
+
+ // Fade out the screen
+ cMap = _bVoy->getCMapResource(0x504);
+ cMap->_steps = 30;
+ cMap->startFade();
+ if (shouldQuit())
+ return;
+
+ flipPageAndWaitForFade();
+
+ _graphicsManager->screenReset();
+}
+
+bool VoyeurEngine::doLock() {
+ bool result = true;
+ int buttonVocSize, wrongVocSize;
+ byte *buttonVoc = _filesManager->fload("button.voc", &buttonVocSize);
+ byte *wrongVoc = _filesManager->fload("wrong.voc", &wrongVocSize);
+
+ if (_bVoy->getBoltGroup(0x700)) {
+ Common::String password = "3333";
+
+ _graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x700);
+ _graphicsManager->_backColors = _bVoy->getCMapResource(0x701);
+ PictureResource *cursorPic = _bVoy->getPictureResource(0x702);
+ _voy->_viewBounds = _bVoy->boltEntry(0x704)._rectResource;
+ Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(0x705)._rectResource->_entries;
+
+ assert(cursorPic);
+ _graphicsManager->_vPort->setupViewPort();
+
+ _graphicsManager->_backColors->startFade();
+ _graphicsManager->_vPort->_parent->_flags |= DISPFLAG_8;
+ _graphicsManager->flipPage();
+ _eventsManager->sWaitFlip();
+
+ while (!shouldQuit() && (_eventsManager->_fadeStatus & 1))
+ _eventsManager->delay(1);
+
+ _eventsManager->setCursorColor(127, 0);
+ _graphicsManager->setColor(1, 64, 64, 64);
+ _graphicsManager->setColor(2, 96, 96, 96);
+ _graphicsManager->setColor(3, 160, 160, 160);
+ _graphicsManager->setColor(4, 224, 224, 224);
+
+ // Set up the cursor
+ _eventsManager->setCursor(cursorPic);
+ _eventsManager->showCursor();
+
+ _eventsManager->_intPtr._hasPalette = true;
+
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x708)._fontResource;
+ _graphicsManager->_fontPtr->_fontSaveBack = 0;
+ _graphicsManager->_fontPtr->_fontFlags = DISPFLAG_NONE;
+
+ Common::String dateString = "ScummVM";
+ Common::String displayString = Common::String::format("Last Play %s", dateString.c_str());
+
+ bool firstLoop = true;
+ bool breakFlag = false;
+ while (!breakFlag && !shouldQuit()) {
+ _graphicsManager->_vPort->setupViewPort();
+ flipPageAndWait();
+
+ // Display the last play time
+ _graphicsManager->_fontPtr->_pos = Common::Point(0, 97);
+ _graphicsManager->_fontPtr->_justify = ALIGN_CENTER;
+ _graphicsManager->_fontPtr->_justifyWidth = 384;
+ _graphicsManager->_fontPtr->_justifyHeight = 97;
+
+ _graphicsManager->_vPort->drawText(displayString);
+ flipPageAndWait();
+
+ if (firstLoop) {
+ firstLoop = false;
+ displayString = "";
+ }
+
+ // Loop for getting key presses
+ int key;
+ do {
+ do {
+ // Scan through the list of key rects to check if a keypad key is highlighted
+ key = -1;
+ Common::Point mousePos = _eventsManager->getMousePos() + Common::Point(20, 10);
+
+ int keyCount = hotspots.size();
+ for (int keyIndex = 0; keyIndex < keyCount; ++keyIndex) {
+ if (hotspots[keyIndex].contains(mousePos)) {
+ key = keyIndex;
+ break;
+ }
+ }
+
+ _eventsManager->setCursorColor(127, (key == -1) ? 0 : 1);
+ _eventsManager->_intPtr._hasPalette = true;
+
+ _eventsManager->delay(1);
+ _eventsManager->getMouseInfo();
+ } while (!shouldQuit() && !_eventsManager->_mouseClicked);
+ _eventsManager->_mouseClicked = false;
+ } while (!shouldQuit() && key == -1);
+
+ _soundManager->abortVOCMap();
+ _soundManager->playVOCMap(buttonVoc, buttonVocSize);
+
+ while (_soundManager->getVOCStatus()) {
+ if (shouldQuit())
+ break;
+ _eventsManager->delay(1);
+ }
+
+ // Process the key
+ if (key < 10) {
+ // Numeric key
+ if (displayString.size() < 10) {
+ displayString += '0' + key;
+ continue;
+ }
+ } else if (key == 10) {
+ // Accept key
+ if ((password.empty() && displayString.empty()) || (password == displayString)) {
+ breakFlag = true;
+ result = true;
+ break;
+ }
+ } else if (key == 11) {
+ // New code
+ if ((password.empty() && displayString.empty()) || (password != displayString)) {
+ _graphicsManager->_vPort->setupViewPort();
+ password = displayString;
+ displayString = "";
+ continue;
+ }
+ } else if (key == 12) {
+ // Exit keyword
+ breakFlag = true;
+ result = false;
+ break;
+ } else {
+ continue;
+ }
+
+ _soundManager->playVOCMap(wrongVoc, wrongVocSize);
+ }
+
+ _graphicsManager->fillPic(_graphicsManager->_vPort, 0);
+ flipPageAndWait();
+ _graphicsManager->resetPalette();
+
+ _voy->_viewBounds = nullptr;
+ _bVoy->freeBoltGroup(0x700);
+ }
+
+ _eventsManager->hideCursor();
+
+ delete[] buttonVoc;
+ delete[] wrongVoc;
+
+ return result;
+}
+
+void VoyeurEngine::showTitleScreen() {
+ if (!_bVoy->getBoltGroup(0x500))
+ return;
+
+ _graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500);
+
+ _graphicsManager->_vPort->setupViewPort();
+ flipPageAndWait();
+
+ // Immediate palette load to show the initial screen
+ CMapResource *cMap = _bVoy->getCMapResource(0x501);
+ assert(cMap);
+ cMap->_steps = 60;
+ cMap->startFade();
+
+ // Wait briefly
+ _eventsManager->delayClick(200);
+ if (shouldQuit()) {
+ _bVoy->freeBoltGroup(0x500);
+ return;
+ }
+
+ // Fade out the screen
+ cMap = _bVoy->getCMapResource(0x504);
+ cMap->_steps = 30;
+ cMap->startFade();
+
+ flipPageAndWaitForFade();
+ if (shouldQuit()) {
+ _bVoy->freeBoltGroup(0x500);
+ return;
+ }
+
+ _graphicsManager->screenReset();
+ _eventsManager->delayClick(200);
+
+ // Voyeur title
+ playRL2Video("a1100100.rl2");
+ _graphicsManager->screenReset();
+
+ _bVoy->freeBoltGroup(0x500);
+}
+
+void VoyeurEngine::doOpening() {
+ _graphicsManager->screenReset();
+
+ if (!_bVoy->getBoltGroup(0x200))
+ return;
+
+ byte *frameTable = _bVoy->memberAddr(0x215);
+ byte *xyTable = _bVoy->memberAddr(0x216);
+// byte *whTable = _bVoy->memberAddr(0x217);
+ int frameIndex = 0;
+ bool creditShow = true;
+ PictureResource *textPic = nullptr;
+ Common::Point textPos;
+
+ _voy->_vocSecondsOffset = 0;
+ _voy->_RTVNum = 0;
+ _voy->_audioVisualStartTime = _voy->_RTVNum;
+ _voy->_eventFlags |= EVTFLAG_RECORDING;
+ _gameHour = 4;
+ _gameMinute = 0;
+ _audioVideoId = 1;
+ _eventsManager->_videoDead = -1;
+ _voy->addVideoEventStart();
+
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+
+ for (int i = 0; i < 256; ++i)
+ _graphicsManager->setColor(i, 8, 8, 8);
+
+ _eventsManager->_intPtr._hasPalette = true;
+ _graphicsManager->_vPort->setupViewPort();
+ flipPageAndWait();
+
+ RL2Decoder decoder;
+ decoder.loadRL2File("a2300100.rl2", false);
+ decoder.start();
+
+ while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager->_mouseClicked) {
+ if (decoder.hasDirtyPalette()) {
+ const byte *palette = decoder.getPalette();
+ _graphicsManager->setPalette(palette, 0, 256);
+ }
+
+ if (decoder.needsUpdate()) {
+ const Graphics::Surface *frame = decoder.decodeNextFrame();
+
+ Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200,
+ (byte *)_graphicsManager->_screenSurface.getPixels());
+
+ if (decoder.getCurFrame() >= (int32)READ_LE_UINT32(frameTable + frameIndex * 4)) {
+ if (creditShow) {
+ // Show a credit
+ textPic = _bVoy->boltEntry(frameIndex / 2 + 0x202)._picResource;
+ textPos = Common::Point(READ_LE_UINT16(xyTable + frameIndex * 2),
+ READ_LE_UINT16(xyTable + (frameIndex + 1) * 2));
+
+ creditShow = false;
+ } else {
+ textPic = nullptr;
+
+ creditShow = true;
+ }
+
+ ++frameIndex;
+ }
+
+ if (textPic) {
+ _graphicsManager->sDrawPic(textPic, _graphicsManager->_vPort, textPos);
+ flipPageAndWait();
+ }
+ }
+
+ _eventsManager->getMouseInfo();
+ g_system->delayMillis(10);
+ }
+
+ if ((_voy->_RTVNum - _voy->_audioVisualStartTime) < 2)
+ _eventsManager->delay(60);
+
+ _voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ _voy->addVideoEventEnd();
+ _voy->_eventFlags &= ~EVTFLAG_RECORDING;
+
+ _bVoy->freeBoltGroup(0x200);
+}
+
+void VoyeurEngine::playRL2Video(const Common::String &filename) {
+ RL2Decoder decoder;
+ decoder.loadRL2File(filename, false);
+ decoder.start();
+
+ while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager->_mouseClicked) {
+ if (decoder.hasDirtyPalette()) {
+ const byte *palette = decoder.getPalette();
+ _graphicsManager->setPalette(palette, 0, 256);
+ }
+
+ if (decoder.needsUpdate()) {
+ const Graphics::Surface *frame = decoder.decodeNextFrame();
+
+ Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200,
+ (byte *)_graphicsManager->_screenSurface.getPixels());
+ }
+
+ _eventsManager->getMouseInfo();
+ g_system->delayMillis(10);
+ }
+}
+
+void VoyeurEngine::playAVideo(int videoId) {
+ playAVideoDuration(videoId, 9999);
+}
+
+void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
+ int totalFrames = duration * 10;
+
+ if (videoId == -1)
+ return;
+
+ PictureResource *pic = NULL;
+ if (videoId == 42) {
+ _eventsManager->_videoDead = 0;
+ pic = _bVoy->boltEntry(0xE00 + _eventsManager->_videoDead)._picResource;
+ }
+
+ RL2Decoder decoder;
+ decoder.loadVideo(videoId);
+
+ decoder.seek(Audio::Timestamp(_voy->_vocSecondsOffset * 1000));
+ decoder.start();
+ int endFrame = decoder.getCurFrame() + totalFrames;
+
+ _eventsManager->getMouseInfo();
+ _eventsManager->startCursorBlink();
+
+ while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager->_mouseClicked &&
+ (decoder.getCurFrame() < endFrame)) {
+ if (decoder.needsUpdate()) {
+ const Graphics::Surface *frame = decoder.decodeNextFrame();
+
+ Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200,
+ (byte *)_graphicsManager->_screenSurface.getPixels());
+ if (_voy->_eventFlags & EVTFLAG_RECORDING)
+ _graphicsManager->drawDot();
+ }
+
+ if (decoder.hasDirtyPalette()) {
+ const byte *palette = decoder.getPalette();
+ _graphicsManager->setPalette(palette, 0, decoder.getPaletteCount());
+ _graphicsManager->setOneColor(128, 220, 20, 20);
+ }
+
+ _eventsManager->getMouseInfo();
+ g_system->delayMillis(10);
+ }
+
+ // RL2 finished
+ _graphicsManager->screenReset();
+ _voy->_eventFlags &= ~EVTFLAG_RECORDING;
+
+ if (_voy->_eventFlags & EVTFLAG_8) {
+ assert(pic);
+ byte *imgData = _graphicsManager->_vPort->_currentPic->_imgData;
+ _graphicsManager->_vPort->_currentPic->_imgData = pic->_imgData;
+ pic->_imgData = imgData;
+ _voy->_eventFlags &= ~EVTFLAG_8;
+ }
+}
+
+void VoyeurEngine::playAudio(int audioId) {
+ _bVoy->getBoltGroup(0x7F00);
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x7F00 +
+ BLIND_TABLE[audioId] * 2)._picResource;
+ _graphicsManager->_backColors = _bVoy->boltEntry(0x7F01 +
+ BLIND_TABLE[audioId] * 2)._cMapResource;
+
+ _graphicsManager->_vPort->setupViewPort();
+ _graphicsManager->_backColors->startFade();
+ flipPageAndWaitForFade();
+
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+ _soundManager->setVOCOffset(_voy->_vocSecondsOffset);
+ Common::String filename = _soundManager->getVOCFileName(
+ audioId + 159);
+ _soundManager->startVOCPlay(filename);
+ _voy->_eventFlags |= EVTFLAG_RECORDING;
+ _eventsManager->startCursorBlink();
+
+ while (!shouldQuit() && !_eventsManager->_mouseClicked &&
+ _soundManager->getVOCStatus())
+ _eventsManager->delayClick(1);
+
+ _voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ _soundManager->stopVOCPlay();
+
+ _bVoy->freeBoltGroup(0x7F00);
+ _graphicsManager->_vPort->setupViewPort(NULL);
+
+ _voy->_eventFlags &= ~EVTFLAG_RECORDING;
+ _voy->_playStampMode = 129;
+}
+
+void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::String &location) {
+ _graphicsManager->setColor(128, 16, 16, 16);
+ _graphicsManager->setColor(224, 220, 220, 220);
+ _eventsManager->_intPtr._hasPalette = true;
+
+ _graphicsManager->_vPort->setupViewPort(NULL);
+ _graphicsManager->_vPort->fillPic(0x80);
+ _graphicsManager->flipPage();
+ _eventsManager->sWaitFlip();
+
+ flipPageAndWait();
+ _graphicsManager->_vPort->fillPic(0x80);
+
+ FontInfoResource &fi = *_graphicsManager->_fontPtr;
+ fi._curFont = _bVoy->boltEntry(257)._fontResource;
+ fi._foreColor = 224;
+ fi._fontSaveBack = 0;
+ fi._pos = Common::Point(0, 116);
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 120;
+
+ _graphicsManager->_vPort->drawText(time);
+
+ if (!location.empty()) {
+ fi._pos = Common::Point(0, 138);
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 140;
+
+ _graphicsManager->_vPort->drawText(location);
+ }
+
+ flipPageAndWait();
+}
+
+void VoyeurEngine::saveLastInplay() {
+ // No implementation in ScummVM version
+}
+
+void VoyeurEngine::flipPageAndWait() {
+ _graphicsManager->_vPort->_flags |= DISPFLAG_8;
+ _graphicsManager->flipPage();
+ _eventsManager->sWaitFlip();
+}
+
+void VoyeurEngine::flipPageAndWaitForFade() {
+ flipPageAndWait();
+
+ while (!shouldQuit() && (_eventsManager->_fadeStatus & 1))
+ _eventsManager->delay(1);
+}
+
+void VoyeurEngine::showEndingNews() {
+ _playStampGroupId = (_voy->_incriminatedVictimNumber - 1) * 256 + 0x7700;
+ _voy->_boltGroupId2 = (_controlPtr->_state->_victimIndex - 1) * 256 + 0x7B00;
+
+ _bVoy->getBoltGroup(_playStampGroupId);
+ _bVoy->getBoltGroup(_voy->_boltGroupId2);
+
+ PictureResource *pic = _bVoy->boltEntry(_playStampGroupId)._picResource;
+ CMapResource *pal = _bVoy->boltEntry(_playStampGroupId + 1)._cMapResource;
+
+ _graphicsManager->_vPort->setupViewPort(pic);
+ pal->startFade();
+ flipPageAndWaitForFade();
+
+ _eventsManager->getMouseInfo();
+
+ for (int idx = 1; idx < 4; ++idx) {
+ if (idx == 3) {
+ pic = _bVoy->boltEntry(_voy->_boltGroupId2)._picResource;
+ pal = _bVoy->boltEntry(_voy->_boltGroupId2 + 1)._cMapResource;
+ } else {
+ pic = _bVoy->boltEntry(_playStampGroupId + idx * 2)._picResource;
+ pal = _bVoy->boltEntry(_playStampGroupId + idx * 2 + 1)._cMapResource;
+ }
+
+ _graphicsManager->_vPort->setupViewPort(pic);
+ pal->startFade();
+ flipPageAndWaitForFade();
+
+ _bVoy->freeBoltMember(_playStampGroupId + (idx - 1) * 2);
+ _bVoy->freeBoltMember(_playStampGroupId + (idx - 1) * 2 + 1);
+
+ Common::String fname = Common::String::format("news%d.voc", idx);
+ _soundManager->startVOCPlay(fname);
+
+ _eventsManager->getMouseInfo();
+ while (!shouldQuit() && !_eventsManager->_mouseClicked &&
+ _soundManager->getVOCStatus()) {
+ _eventsManager->delay(1);
+ _eventsManager->getMouseInfo();
+ }
+
+ _soundManager->stopVOCPlay();
+ if (idx == 3)
+ _eventsManager->delay(3);
+
+ if (shouldQuit() || _eventsManager->_mouseClicked)
+ break;
+ }
+
+ _bVoy->freeBoltGroup(_playStampGroupId);
+ _bVoy->freeBoltGroup(_voy->_boltGroupId2);
+ _playStampGroupId = -1;
+ _voy->_boltGroupId2 = -1;
+}
+
+/*------------------------------------------------------------------------*/
+
+Common::String VoyeurEngine::generateSaveName(int slot) {
+ return Common::String::format("%s.%03d", _targetName.c_str(), slot);
+}
+
+/**
+ * Returns true if it is currently okay to restore a game
+ */
+bool VoyeurEngine::canLoadGameStateCurrently() {
+ return _voyeurArea == AREA_APARTMENT;
+}
+
+/**
+ * Returns true if it is currently okay to save the game
+ */
+bool VoyeurEngine::canSaveGameStateCurrently() {
+ return _voyeurArea == AREA_APARTMENT;
+}
+
+/**
+ * Load the savegame at the specified slot index
+ */
+Common::Error VoyeurEngine::loadGameState(int slot) {
+ _loadGameSlot = slot;
+ return Common::kNoError;
+}
+
+void VoyeurEngine::loadGame(int slot) {
+ // Open up the save file
+ Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(generateSaveName(slot));
+ if (!saveFile)
+ return;
+
+ Common::Serializer serializer(saveFile, NULL);
+
+ // Store the current time index before the game is loaded
+ _checkTransitionId = _voy->_transitionId;
+
+ // Stop any playing sound
+ _soundManager->stopVOCPlay();
+
+ // Read in the savegame header
+ VoyeurSavegameHeader header;
+ if (!header.read(saveFile))
+ return;
+ if (header._thumbnail)
+ header._thumbnail->free();
+ delete header._thumbnail;
+
+ synchronize(serializer);
+
+ delete saveFile;
+
+ // Show a transition card if the time index has changed
+ checkTransition();
+
+ // Load the apartment
+ _mainThread->loadTheApt();
+}
+
+/**
+ * Save the game to the given slot index, and with the given name
+ */
+Common::Error VoyeurEngine::saveGameState(int slot, const Common::String &desc) {
+ // Open the save file for writing
+ Common::OutSaveFile *saveFile = g_system->getSavefileManager()->openForSaving(generateSaveName(slot));
+ if (!saveFile)
+ return Common::kCreatingFileFailed;
+
+ // Write out the header
+ VoyeurSavegameHeader header;
+ header.write(saveFile, this, desc);
+
+ // Set up a serializer
+ Common::Serializer serializer(NULL, saveFile);
+
+ // Synchronise the data
+ synchronize(serializer);
+
+ saveFile->finalize();
+ delete saveFile;
+
+ return Common::kNoError;
+}
+
+void VoyeurEngine::synchronize(Common::Serializer &s) {
+ s.syncAsSint16LE(_glGoState);
+ s.syncAsSint16LE(_glGoStack);
+ s.syncAsSint16LE(_stampFlags);
+ s.syncAsSint16LE(_playStampGroupId);
+ s.syncAsSint16LE(_currentVocId);
+ s.syncAsSint16LE(_audioVideoId);
+
+ s.syncAsSint16LE(_iForceDeath);
+ s.syncAsSint16LE(_gameHour);
+ s.syncAsSint16LE(_gameMinute);
+ s.syncAsSint16LE(_flashTimeVal);
+ s.syncAsSint16LE(_flashTimeFlag);
+ s.syncAsSint16LE(_timeBarVal);
+ s.syncAsSint16LE(_checkPhoneVal);
+
+ // Sub-systems
+ _voy->synchronize(s);
+ _graphicsManager->synchronize(s);
+ _mainThread->synchronize(s);
+ _controlPtr->_state->synchronize(s);
+}
+
+/*------------------------------------------------------------------------*/
+
+bool VoyeurSavegameHeader::read(Common::InSaveFile *f) {
+ _thumbnail = NULL;
+
+ uint32 signature = f->readUint32BE();
+ if (signature != MKTAG('V', 'O', 'Y', 'R')) {
+ warning("Invalid savegame");
+ return false;
+ }
+
+ _version = f->readByte();
+ if (_version > VOYEUR_SAVEGAME_VERSION)
+ return false;
+
+ char c;
+ _saveName = "";
+ while ((c = f->readByte()) != 0)
+ _saveName += c;
+
+ // Get the thumbnail
+ _thumbnail = Graphics::loadThumbnail(*f);
+ if (!_thumbnail)
+ return false;
+
+ // Read in the save datet/ime
+ _saveYear = f->readSint16LE();
+ _saveMonth = f->readSint16LE();
+ _saveDay = f->readSint16LE();
+ _saveHour = f->readSint16LE();
+ _saveMinutes = f->readSint16LE();
+ _totalFrames = f->readUint32LE();
+
+ return true;
+}
+
+void VoyeurSavegameHeader::write(Common::OutSaveFile *f, VoyeurEngine *vm, const Common::String &saveName) {
+ // Write ident string
+ f->writeUint32BE(MKTAG('V', 'O', 'Y', 'R'));
+
+ // Write out savegame version
+ f->writeByte(VOYEUR_SAVEGAME_VERSION);
+
+ // Write out savegame name
+ f->write(saveName.c_str(), saveName.size());
+ f->writeByte(0);
+
+ // Create a thumbnail and save it
+ Graphics::Surface *thumb = new Graphics::Surface();
+ ::createThumbnail(thumb, (byte *)vm->_graphicsManager->_screenSurface.getPixels(),
+ SCREEN_WIDTH, SCREEN_HEIGHT, vm->_graphicsManager->_VGAColors);
+ Graphics::saveThumbnail(*f, *thumb);
+ thumb->free();
+ delete thumb;
+
+ // Write the save datet/ime
+ TimeDate td;
+ g_system->getTimeAndDate(td);
+ f->writeSint16LE(td.tm_year + 1900);
+ f->writeSint16LE(td.tm_mon + 1);
+ f->writeSint16LE(td.tm_mday);
+ f->writeSint16LE(td.tm_hour);
+ f->writeSint16LE(td.tm_min);
+ f->writeUint32LE(vm->_eventsManager->getGameCounter());
+}
+
+} // End of namespace Voyeur
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
new file mode 100644
index 0000000000..a35473ba93
--- /dev/null
+++ b/engines/voyeur/voyeur.h
@@ -0,0 +1,320 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef VOYEUR_VOYEUR_H
+#define VOYEUR_VOYEUR_H
+
+#include "voyeur/debugger.h"
+#include "voyeur/data.h"
+#include "voyeur/events.h"
+#include "voyeur/files.h"
+#include "voyeur/graphics.h"
+#include "voyeur/sound.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/error.h"
+#include "common/random.h"
+#include "common/savefile.h"
+#include "common/serializer.h"
+#include "common/util.h"
+#include "engines/engine.h"
+#include "graphics/surface.h"
+
+/**
+ * This is the namespace of the Voyeur engine.
+ *
+ * Status of this engine: Complete
+ *
+ * Games using this engine:
+ * - Voyeur (Dos)
+ */
+namespace Voyeur {
+
+#define DEBUG_BASIC 1
+#define DEBUG_INTERMEDIATE 2
+#define DEBUG_DETAILED 3
+
+// Constants used for doInterface display of the mansion
+#define MANSION_MAX_X 784
+#define MANSION_MAX_Y 150
+#define MANSION_VIEW_X 40
+#define MANSION_VIEW_Y 27
+#define MANSION_VIEW_WIDTH 240
+#define MANSION_VIEW_HEIGHT 148
+#define MANSION_SCROLL_AREA_X 20
+#define MANSION_SCROLL_AREA_Y 20
+#define MANSION_SCROLL_INC_X 4
+#define MANSION_SCROLL_INC_Y 4
+
+enum VoyeurDebugChannels {
+ kDebugScripts = 1 << 0
+};
+
+enum VoyeurArea { AREA_NONE, AREA_APARTMENT, AREA_INTERFACE, AREA_ROOM, AREA_EVIDENCE };
+
+struct VoyeurGameDescription;
+
+class VoyeurEngine : public Engine {
+private:
+ const VoyeurGameDescription *_gameDescription;
+ Common::RandomSource _randomSource;
+ FontInfoResource _defaultFontInfo;
+
+ void ESP_Init();
+ void globalInitBolt();
+ void initBolt();
+ void vInitInterrupts();
+ void initInput();
+
+ bool doHeadTitle();
+ void showConversionScreen();
+ bool doLock();
+ void showTitleScreen();
+ void doOpening();
+
+ void playStamp();
+ void initStamp();
+ void closeStamp();
+
+ /**
+ * Shows the game ending title animation
+ */
+ void doTailTitle();
+
+ /**
+ * Shows the game ending credits
+ */
+ void doClosingCredits();
+
+ /**
+ * Shows the final anti-piracy message before exiting the game
+ */
+ void doPiracy();
+
+ /**
+ * Review previous tape recordings on the TV
+ */
+ void reviewTape();
+
+ /**
+ * Shows the TV gossip animation
+ */
+ void doGossip();
+
+ /**
+ * Shows the animation of the VCR tape during the 'Call the Police' sequence
+ */
+ void doTapePlaying();
+
+ /**
+ * Does a check as to whether a murder has been witnessed
+ */
+ bool checkForMurder();
+
+ /**
+ * Does a check for whether incriminating evidence has been revealed
+ */
+ bool checkForIncriminate();
+
+ /**
+ * Plays a video event previously witnessed
+ */
+ void playAVideoEvent(int eventIndex);
+
+ /**
+ * Shows the user a screen to select one of four characters to send the
+ * video tape to
+ */
+ int getChooseButton();
+
+ /**
+ * Synchronizes the game data
+ */
+ void synchronize(Common::Serializer &s);
+protected:
+ // Engine APIs
+ virtual Common::Error run();
+ virtual bool hasFeature(EngineFeature f) const;
+public:
+ BoltFile *_bVoy;
+ Debugger *_debugger;
+ EventsManager *_eventsManager;
+ FilesManager *_filesManager;
+ GraphicsManager *_graphicsManager;
+ SoundManager *_soundManager;
+ SVoy *_voy;
+
+ BoltFile *_stampLibPtr;
+ BoltGroup *_controlGroupPtr;
+ ControlResource *_controlPtr;
+ byte *_stampData;
+ BoltGroup *_stackGroupPtr;
+ int _glGoState;
+ int _glGoStack;
+ int _stampFlags;
+ int _playStampGroupId;
+ int _currentVocId;
+
+ int _audioVideoId;
+ const int *_resolvePtr;
+ int _iForceDeath;
+ int _checkTransitionId;
+ int _gameHour;
+ int _gameMinute;
+ int _flashTimeVal;
+ bool _flashTimeFlag;
+ int _timeBarVal;
+ int _checkPhoneVal;
+ Common::Point _mansionViewPos;
+ ThreadResource *_mainThread;
+ VoyeurArea _voyeurArea;
+ int _loadGameSlot;
+public:
+ VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc);
+ virtual ~VoyeurEngine();
+ void GUIError(const Common::String &msg);
+
+ uint32 getFeatures() const;
+ Common::Language getLanguage() const;
+ Common::Platform getPlatform() const;
+ uint16 getVersion() const;
+ bool getIsDemo() const;
+
+ int getRandomNumber(int maxNumber);
+ Common::String generateSaveName(int slotNumber);
+ virtual bool canLoadGameStateCurrently();
+ virtual bool canSaveGameStateCurrently();
+ virtual Common::Error loadGameState(int slot);
+ virtual Common::Error saveGameState(int slot, const Common::String &desc);
+ void loadGame(int slot);
+
+ void playRL2Video(const Common::String &filename);
+ void doTransitionCard(const Common::String &time, const Common::String &location);
+
+ /**
+ * Play a given video
+ */
+ void playAVideo(int videoId);
+
+ /**
+ * Play a given video for a given amount of time. This is particularly used
+ * for later tape playback, where it will only play back as much of the video
+ * as the user originally watched (since they can break out of watching a video).
+ */
+ void playAVideoDuration(int videoId, int duration);
+
+ /**
+ * Play an audio sequence
+ */
+ void playAudio(int audioId);
+
+ /**
+ * Saves the last time the game was played
+ */
+ void saveLastInplay();
+ void makeViewFinder();
+ void makeViewFinderP();
+ void initIFace();
+ void checkTransition();
+ int doComputerText(int maxLen);
+ void getComputerBrush();
+
+ /**
+ * Displays the time/charge remaining on the video camera screen
+ */
+ void doTimeBar();
+
+ /**
+ * If necessary, flashes the time remaining bar on the video camera screen
+ */
+ void flashTimeBar();
+
+ /**
+ * Handle scrolling of the mansion view in the camera sights
+ */
+ void doScroll(const Common::Point &pt);
+
+ /**
+ * Check for phone call
+ */
+ void checkPhoneCall();
+
+ /**
+ * Display evidence sequence from within a room
+ * Suspension of disbelief needed to believe that recording from a distance,
+ * you could still flip through the often pages of evidence for a single hotspot.
+ */
+ void doEvidDisplay(int evidId, int eventId);
+
+ /**
+ * Flips the active page and waits until it's drawn
+ */
+ void flipPageAndWait();
+
+ /**
+ * Flips the active page and waits until it's drawn and faded in
+ */
+ void flipPageAndWaitForFade();
+
+ /**
+ * Returns the string for the current in-game day of the week
+ */
+ Common::String getDayName();
+
+ /**
+ * Returns the string for the current in-game time of day
+ */
+ Common::String getTimeOfDay();
+
+ /**
+ * Show the ending sequence of the arrest
+ */
+ void showEndingNews();
+};
+
+#define VOYEUR_SAVEGAME_VERSION 1
+
+/**
+ * Header for Voyeur savegame files
+ */
+struct VoyeurSavegameHeader {
+ uint8 _version;
+ Common::String _saveName;
+ Graphics::Surface *_thumbnail;
+ int _saveYear, _saveMonth, _saveDay;
+ int _saveHour, _saveMinutes;
+ int _totalFrames;
+
+ /**
+ * Read in the header from the specified file
+ */
+ bool read(Common::InSaveFile *f);
+
+ /**
+ * Write out header information to the specified file
+ */
+ void write(Common::OutSaveFile *f, VoyeurEngine *vm, const Common::String &saveName);
+};
+
+} // End of namespace Voyeur
+
+#endif /* VOYEUR_VOYEUR_H */
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
new file mode 100644
index 0000000000..a6564c32ba
--- /dev/null
+++ b/engines/voyeur/voyeur_game.cpp
@@ -0,0 +1,1423 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "voyeur/voyeur.h"
+#include "voyeur/staticres.h"
+#include "voyeur/animation.h"
+
+namespace Voyeur {
+
+void VoyeurEngine::playStamp() {
+ _stampLibPtr = NULL;
+ _filesManager->openBoltLib("stampblt.blt", _stampLibPtr);
+
+ _stampLibPtr->getBoltGroup(0);
+ _controlPtr->_state = _stampLibPtr->boltEntry(_controlPtr->_stateId >> 16)._stateResource;
+ assert(_controlPtr->_state);
+
+ _resolvePtr = &RESOLVE_TABLE[0];
+ initStamp();
+
+ PtrResource *threadsList = _stampLibPtr->boltEntry(3)._ptrResource;
+ _mainThread = threadsList->_entries[0]->_threadResource;
+ _mainThread->initThreadStruct(0, 0);
+
+ _voy->_isAM = false;
+ _gameHour = 9;
+ _gameMinute = 0;
+ _voy->_abortInterface = true;
+
+ int buttonId;
+ bool breakFlag = false;
+ while (!breakFlag && !shouldQuit()) {
+ _voyeurArea = AREA_NONE;
+ _eventsManager->getMouseInfo();
+ _playStampGroupId = _currentVocId = -1;
+ _audioVideoId = -1;
+
+ _mainThread->parsePlayCommands();
+
+ bool flag = breakFlag = (_voy->_eventFlags & EVTFLAG_2) != 0;
+
+ switch (_voy->_playStampMode) {
+ case 5:
+ buttonId = _mainThread->doInterface();
+
+ if (buttonId == -2) {
+ switch (_mainThread->doApt()) {
+ case 0:
+ _voy->_aptLoadMode = 140;
+ break;
+ case 1:
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+ _voy->_abortInterface = true;
+ _mainThread->chooseSTAMPButton(22);
+ _voy->_aptLoadMode = 143;
+ break;
+ case 2:
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+ reviewTape();
+ _voy->_abortInterface = true;
+ _voy->_aptLoadMode = 142;
+ break;
+ case 3:
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+ _mainThread->chooseSTAMPButton(21);
+ break;
+ case 4:
+ breakFlag = true;
+ break;
+ case 5:
+ doGossip();
+ _voy->_abortInterface = true;
+ _voy->_aptLoadMode = 141;
+ _voy->_eventFlags &= ~EVTFLAG_100;
+ break;
+ default:
+ break;
+ }
+ } else {
+ _mainThread->chooseSTAMPButton(buttonId);
+ }
+
+ flag = true;
+ break;
+
+ case 6:
+ _mainThread->doRoom();
+ flag = true;
+ break;
+
+ case 16:
+ _voy->_transitionId = 17;
+ buttonId = _mainThread->doApt();
+
+ switch (buttonId) {
+ case 1:
+ _mainThread->chooseSTAMPButton(22);
+ flag = true;
+ break;
+ case 2:
+ reviewTape();
+ _voy->_abortInterface = true;
+ break;
+ case 4:
+ flag = true;
+ breakFlag = true;
+ break;
+ default:
+ break;
+ }
+ break;
+
+ case 17:
+ // Called the police, showing the tape
+ doTapePlaying();
+ if (!checkForMurder() && _voy->_transitionId <= 15)
+ checkForIncriminate();
+
+ if (_voy->_videoEventId != -1) {
+ // Show the found video that is of interest to the police
+ playAVideoEvent(_voy->_videoEventId);
+ _voy->_eventFlags &= ~EVTFLAG_RECORDING;
+ }
+
+ // Handle response
+ _mainThread->chooseSTAMPButton(0);
+ flag = true;
+ break;
+
+ case 130: {
+ // user selected to send the tape
+ if (_bVoy->getBoltGroup(_playStampGroupId)) {
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(_playStampGroupId)._picResource;
+ _graphicsManager->_backColors = _bVoy->boltEntry(_playStampGroupId + 1)._cMapResource;
+
+ buttonId = getChooseButton();
+ if (_eventsManager->_rightClick)
+ // Aborted out of selecting a recipient
+ buttonId = 4;
+
+ _bVoy->freeBoltGroup(_playStampGroupId);
+ _graphicsManager->screenReset();
+ _playStampGroupId = -1;
+ flag = true;
+
+ if (buttonId != 4) {
+ _voy->_playStampMode = 131;
+ _voy->checkForKey();
+ _mainThread->chooseSTAMPButton(buttonId);
+ } else {
+ _mainThread->chooseSTAMPButton(buttonId);
+ _voy->_abortInterface = true;
+ }
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ do {
+ if (flag) {
+ if (_currentVocId != -1) {
+ _soundManager->stopVOCPlay();
+ _currentVocId = -1;
+ }
+
+ _audioVideoId = -1;
+
+ if (_voy->_boltGroupId2 != -1) {
+ _bVoy->freeBoltGroup(_voy->_boltGroupId2);
+ _voy->_boltGroupId2 = -1;
+ }
+
+ if (_playStampGroupId != -1) {
+ _bVoy->freeBoltGroup(_playStampGroupId);
+ _playStampGroupId = -1;
+ }
+
+ // Break out of loop
+ flag = false;
+
+ } else if (_mainThread->_stateFlags & 2) {
+ _eventsManager->getMouseInfo();
+ _mainThread->chooseSTAMPButton(0);
+ flag = true;
+ } else {
+ _mainThread->chooseSTAMPButton(0);
+ flag = true;
+ }
+ } while (flag);
+ }
+
+ _voy->_viewBounds = nullptr;
+ closeStamp();
+ _stampLibPtr->freeBoltGroup(0);
+ delete _stampLibPtr;
+}
+
+void VoyeurEngine::initStamp() {
+ _stampFlags &= ~1;
+ _stackGroupPtr = _controlGroupPtr;
+
+ if (!_controlPtr->_entries[0])
+ error("No control entries");
+
+ ThreadResource::initUseCount();
+}
+
+void VoyeurEngine::closeStamp() {
+ ThreadResource::unloadAllStacks(this);
+}
+
+void VoyeurEngine::doTailTitle() {
+ _graphicsManager->_vPort->setupViewPort(NULL);
+ _graphicsManager->screenReset();
+
+ if (_bVoy->getBoltGroup(0x600)) {
+ RL2Decoder decoder;
+ decoder.loadRL2File("a1100200.rl2", false);
+ decoder.start();
+ decoder.play(this);
+
+ if (!shouldQuit() && !_eventsManager->_mouseClicked) {
+ doClosingCredits();
+
+ if (!shouldQuit() && !_eventsManager->_mouseClicked) {
+ _graphicsManager->screenReset();
+
+ PictureResource *pic = _bVoy->boltEntry(0x602)._picResource;
+ CMapResource *pal = _bVoy->boltEntry(0x603)._cMapResource;
+
+ _graphicsManager->_vPort->setupViewPort(pic);
+ pal->startFade();
+ flipPageAndWaitForFade();
+ _eventsManager->delayClick(300);
+
+ pic = _bVoy->boltEntry(0x604)._picResource;
+ pal = _bVoy->boltEntry(0x605)._cMapResource;
+
+ _graphicsManager->_vPort->setupViewPort(pic);
+ pal->startFade();
+ flipPageAndWaitForFade();
+ _eventsManager->delayClick(120);
+
+ _soundManager->stopVOCPlay();
+ }
+ }
+
+ _bVoy->freeBoltGroup(0x600);
+ }
+
+ if (!shouldQuit()) {
+ _bVoy->getBoltGroup(0x100);
+ doPiracy();
+ }
+}
+
+void VoyeurEngine::doClosingCredits() {
+ if (!_bVoy->getBoltGroup(0x400))
+ return;
+
+ const char *msg = (const char *)_bVoy->memberAddr(0x404);
+ const byte *creditList = (const byte *)_bVoy->memberAddr(0x405);
+
+ _graphicsManager->_vPort->setupViewPort(NULL);
+ _graphicsManager->setColor(1, 180, 180, 180);
+ _graphicsManager->setColor(2, 200, 200, 200);
+ _eventsManager->_intPtr._hasPalette = true;
+
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x402)._fontResource;
+ _graphicsManager->_fontPtr->_foreColor = 2;
+ _graphicsManager->_fontPtr->_backColor = 2;
+ _graphicsManager->_fontPtr->_fontSaveBack = false;
+ _graphicsManager->_fontPtr->_fontFlags = DISPFLAG_NONE;
+
+ _soundManager->startVOCPlay(152);
+ FontInfoResource &fi = *_graphicsManager->_fontPtr;
+
+ for (int idx = 0; idx < 78; ++idx) {
+ const byte *entry = creditList + idx * 6;
+ int flags = READ_LE_UINT16(entry + 4);
+
+ if (flags & 0x10)
+ _graphicsManager->_vPort->fillPic(0);
+
+ if (flags & 1) {
+ fi._foreColor = 1;
+ fi._curFont = _bVoy->boltEntry(0x402)._fontResource;
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 240;
+ fi._pos = Common::Point(0, READ_LE_UINT16(entry));
+
+ _graphicsManager->_vPort->drawText(msg);
+ msg += strlen(msg) + 1;
+ }
+
+ if (flags & 0x40) {
+ fi._foreColor = 2;
+ fi._curFont = _bVoy->boltEntry(0x400)._fontResource;
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 240;
+ fi._pos = Common::Point(0, READ_LE_UINT16(entry));
+
+ _graphicsManager->_vPort->drawText(msg);
+ msg += strlen(msg) + 1;
+ }
+
+ if (flags & 2) {
+ fi._foreColor = 1;
+ fi._curFont = _bVoy->boltEntry(0x400)._fontResource;
+ fi._justify = ALIGN_LEFT;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 240;
+ fi._pos = Common::Point(38, READ_LE_UINT16(entry));
+
+ _graphicsManager->_vPort->drawText(msg);
+ msg += strlen(msg) + 1;
+
+ fi._foreColor = 2;
+ fi._justify = ALIGN_LEFT;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 240;
+ fi._pos = Common::Point(198, READ_LE_UINT16(entry));
+
+ _graphicsManager->_vPort->drawText(msg);
+ msg += strlen(msg) + 1;
+ }
+
+ if (flags & 4) {
+ fi._foreColor = 1;
+ fi._curFont = _bVoy->boltEntry(0x402)._fontResource;
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 240;
+ fi._pos = Common::Point(0, READ_LE_UINT16(entry));
+
+ _graphicsManager->_vPort->drawText(msg);
+ msg += strlen(msg) + 1;
+
+ fi._foreColor = 2;
+ fi._curFont = _bVoy->boltEntry(0x400)._fontResource;
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 240;
+ fi._pos = Common::Point(0, READ_LE_UINT16(entry) + 13);
+
+ _graphicsManager->_vPort->drawText(msg);
+ msg += strlen(msg) + 1;
+ }
+
+ if (flags & 0x20) {
+ flipPageAndWait();
+ _eventsManager->delayClick(READ_LE_UINT16(entry + 2) * 60);
+ }
+
+ if (shouldQuit() || _eventsManager->_mouseClicked)
+ break;
+ }
+
+ _soundManager->stopVOCPlay();
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource;
+ _bVoy->freeBoltGroup(0x400);
+}
+
+void VoyeurEngine::doPiracy() {
+ _graphicsManager->screenReset();
+ _graphicsManager->setColor(1, 0, 0, 0);
+ _graphicsManager->setColor(2, 255, 255, 255);
+ _eventsManager->_intPtr._hasPalette = true;
+ _graphicsManager->_vPort->setupViewPort(NULL);
+ _graphicsManager->_vPort->fillPic(1);
+
+ FontInfoResource &fi = *_graphicsManager->_fontPtr;
+ fi._curFont = _bVoy->boltEntry(0x101)._fontResource;
+ fi._foreColor = 2;
+ fi._backColor = 2;
+ fi._fontSaveBack = false;
+ fi._fontFlags = DISPFLAG_NONE;
+ fi._justify = ALIGN_CENTER;
+ fi._justifyWidth = 384;
+ fi._justifyHeight = 230;
+
+ // Loop through the piracy message array to draw each line
+ int yp, idx;
+ for (idx = 0, yp = 33; idx < 10; ++idx) {
+ fi._pos = Common::Point(0, yp);
+ _graphicsManager->_vPort->drawText(PIRACY_MESSAGE[idx]);
+
+ yp += fi._curFont->_fontHeight + 4;
+ }
+
+ flipPageAndWait();
+ _eventsManager->getMouseInfo();
+ _eventsManager->delayClick(720);
+}
+
+void VoyeurEngine::reviewTape() {
+ int eventStart = 0;
+ int newX = -1;
+ int newY = -1;
+ int eventLine = 7;
+ Common::Rect tempRect(58, 30, 58 + 223, 30 + 124);
+ Common::Point pt;
+ int foundIndex;
+
+ _bVoy->getBoltGroup(0x900);
+ PictureResource *cursor = _bVoy->boltEntry(0x903)._picResource;
+
+ if ((_voy->_eventCount - 8) != 0)
+ eventStart = MAX(_voy->_eventCount - 8, 0);
+
+ if ((eventStart + _voy->_eventCount) <= 7)
+ eventLine = eventStart + _voy->_eventCount - 1;
+
+ bool breakFlag = false;
+ while (!shouldQuit() && !breakFlag) {
+ _voy->_viewBounds = _bVoy->boltEntry(0x907)._rectResource;
+ Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(0x906)._rectResource->_entries;
+
+ _graphicsManager->_backColors = _bVoy->boltEntry(0x902)._cMapResource;
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x901)._picResource;
+ _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
+ _graphicsManager->_backColors->startFade();
+
+ flipPageAndWaitForFade();
+
+ _graphicsManager->setColor(1, 32, 32, 32);
+ _graphicsManager->setColor(2, 96, 96, 96);
+ _graphicsManager->setColor(3, 160, 160, 160);
+ _graphicsManager->setColor(4, 224, 224, 224);
+ _graphicsManager->setColor(9, 24, 64, 24);
+ _graphicsManager->setColor(10, 64, 132, 64);
+ _graphicsManager->setColor(11, 100, 192, 100);
+ _graphicsManager->setColor(12, 120, 248, 120);
+ _eventsManager->setCursorColor(128, 1);
+
+ _eventsManager->_intPtr._hasPalette = true;
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x909)._fontResource;
+ _graphicsManager->_fontPtr->_fontSaveBack = false;
+ _graphicsManager->_fontPtr->_fontFlags = DISPFLAG_NONE;
+
+ _eventsManager->getMouseInfo();
+ if (newX == -1) {
+ _eventsManager->setMousePos(Common::Point(hotspots[1].left + 12, hotspots[1].top + 6));
+ } else {
+ _eventsManager->setMousePos(Common::Point(newX, newY));
+ }
+
+ _currentVocId = 151;
+ _voy->_vocSecondsOffset = 0;
+ bool needRedraw = true;
+ do {
+ if (_currentVocId != -1 && !_soundManager->getVOCStatus()) {
+ _voy->_musicStartTime = _voy->_RTVNum;
+ _soundManager->startVOCPlay(_currentVocId);
+ }
+
+ if (needRedraw) {
+ needRedraw = false;
+ flipPageAndWait();
+
+ _graphicsManager->_drawPtr->_penColor = 0;
+ _graphicsManager->_drawPtr->_pos = Common::Point(tempRect.left, tempRect.top);
+ _graphicsManager->_backgroundPage->sFillBox(tempRect.width(), tempRect.height());
+
+ int yp = 45;
+ int eventNum = eventStart;
+ for (int lineNum = 0; lineNum < 8 && eventNum < _voy->_eventCount; ++lineNum, ++eventNum) {
+ _graphicsManager->_fontPtr->_picFlags = DISPFLAG_NONE;
+ _graphicsManager->_fontPtr->_picSelect = 0xff;
+ _graphicsManager->_fontPtr->_picPick = 7;
+ _graphicsManager->_fontPtr->_picOnOff = (lineNum == eventLine) ? 8 : 0;
+ _graphicsManager->_fontPtr->_pos = Common::Point(68, yp);
+ _graphicsManager->_fontPtr->_justify = ALIGN_LEFT;
+ _graphicsManager->_fontPtr->_justifyWidth = 0;
+ _graphicsManager->_fontPtr->_justifyHeight = 0;
+
+ Common::String msg = _eventsManager->getEvidString(eventNum);
+ _graphicsManager->_backgroundPage->drawText(msg);
+
+ yp += 15;
+ }
+
+ _graphicsManager->_vPort->addSaveRect(
+ _graphicsManager->_vPort->_lastPage, tempRect);
+ flipPageAndWait();
+
+ _graphicsManager->_vPort->addSaveRect(
+ _graphicsManager->_vPort->_lastPage, tempRect);
+ }
+
+ _graphicsManager->sDrawPic(cursor, _graphicsManager->_vPort,
+ _eventsManager->getMousePos());
+ flipPageAndWait();
+
+ _eventsManager->getMouseInfo();
+ foundIndex = -1;
+
+ Common::Point tempPos = _eventsManager->getMousePos() + Common::Point(14, 7);
+ for (uint idx = 0; idx < hotspots.size(); ++idx) {
+ if (hotspots[idx].contains(tempPos)) {
+ // Found hotspot area
+ foundIndex = idx;
+ break;
+ }
+ }
+
+ pt = _eventsManager->getMousePos();
+ if (tempPos.x >= 68 && tempPos.x <= 277 && tempPos.y >= 31 && tempPos.y <= 154) {
+ tempPos.y -= 2;
+ foundIndex = (tempPos.y - 31) / 15;
+ if ((tempPos.y - 31) % 15 >= 12 || (eventStart + foundIndex) >= _voy->_eventCount) {
+ _eventsManager->setCursorColor(128, 0);
+ foundIndex = 999;
+ } else if (!_eventsManager->_leftClick) {
+ _eventsManager->setCursorColor(128, 2);
+ foundIndex = -1;
+ } else {
+ _eventsManager->setCursorColor(128, 2);
+ eventLine = foundIndex;
+
+ flipPageAndWait();
+
+ _graphicsManager->_drawPtr->_penColor = 0;
+ _graphicsManager->_drawPtr->_pos = Common::Point(tempRect.left, tempRect.top);
+ _graphicsManager->_backgroundPage->sFillBox(tempRect.width(), tempRect.height());
+
+ int yp = 45;
+ int eventNum = eventStart;
+ for (int idx = 0; idx < 8 && eventNum < _voy->_eventCount; ++idx, ++eventNum) {
+ _graphicsManager->_fontPtr->_picFlags = DISPFLAG_NONE;
+ _graphicsManager->_fontPtr->_picSelect = 0xff;
+ _graphicsManager->_fontPtr->_picPick = 7;
+ _graphicsManager->_fontPtr->_picOnOff = (idx == eventLine) ? 8 : 0;
+ _graphicsManager->_fontPtr->_pos = Common::Point(68, yp);
+ _graphicsManager->_fontPtr->_justify = ALIGN_LEFT;
+ _graphicsManager->_fontPtr->_justifyWidth = 0;
+ _graphicsManager->_fontPtr->_justifyHeight = 0;
+
+ Common::String msg = _eventsManager->getEvidString(eventNum);
+ _graphicsManager->_backgroundPage->drawText(msg);
+
+ yp += 15;
+ }
+
+ _graphicsManager->_vPort->addSaveRect(
+ _graphicsManager->_vPort->_lastPage, tempRect);
+ flipPageAndWait();
+
+ _graphicsManager->_vPort->addSaveRect(
+ _graphicsManager->_vPort->_lastPage, tempRect);
+ flipPageAndWait();
+
+ _eventsManager->getMouseInfo();
+ foundIndex = -1;
+ }
+ } else if ((_voy->_eventFlags & EVTFLAG_40) && _voy->_viewBounds->left == pt.x &&
+ _voy->_viewBounds->bottom == pt.y) {
+ foundIndex = 999;
+ } else if ((_voy->_eventFlags & EVTFLAG_40) && _voy->_viewBounds->left == pt.x &&
+ _voy->_viewBounds->top == pt.y) {
+ foundIndex = 998;
+ } else {
+ _eventsManager->setCursorColor(128, (foundIndex == -1) ? 0 : 1);
+ }
+
+ _eventsManager->_intPtr._hasPalette = true;
+
+ if (_eventsManager->_mouseClicked) {
+ switch (foundIndex) {
+ case 2:
+ if (eventStart > 0) {
+ --eventStart;
+ needRedraw = true;
+ }
+ foundIndex = -1;
+ break;
+
+ case 3:
+ if (eventStart > 0) {
+ eventStart -= 8;
+ if (eventStart < 0)
+ eventStart = 0;
+ needRedraw = true;
+ }
+ foundIndex = -1;
+ break;
+
+ case 4:
+ if ((_voy->_eventCount - 8) > eventStart) {
+ ++eventStart;
+ needRedraw = true;
+ }
+ foundIndex = -1;
+ break;
+
+ case 5:
+ if (_voy->_eventCount >= 8 && (_voy->_eventCount - 8) != eventStart) {
+ eventStart += 8;
+ if ((_voy->_eventCount - 8) < eventStart)
+ eventStart = _voy->_eventCount - 8;
+ needRedraw = true;
+ }
+ foundIndex = -1;
+ break;
+
+ default:
+ break;
+ }
+
+ while (eventLine > 0 && (eventLine + eventStart) >= _voy->_eventCount)
+ --eventLine;
+ }
+
+ pt = _eventsManager->getMousePos();
+ if (_eventsManager->_mouseClicked && _voy->_viewBounds->left == pt.x &&
+ (_voy->_eventFlags & EVTFLAG_40) && _eventsManager->_rightClick) {
+ _controlPtr->_state->_victimIndex = (pt.y / 60) + 1;
+ foundIndex = -1;
+ _eventsManager->_rightClick = 0;
+ }
+
+ if (_eventsManager->_rightClick)
+ foundIndex = 0;
+
+ } while (!shouldQuit() && (!_eventsManager->_mouseClicked || foundIndex == -1));
+
+ newY = _eventsManager->getMousePos().y;
+ _voy->_fadingType = 0;
+ _voy->_viewBounds = nullptr;
+ _graphicsManager->_vPort->setupViewPort(NULL);
+
+ if (_currentVocId != -1) {
+ _voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime;
+ _soundManager->stopVOCPlay();
+ }
+
+ // Break out if the exit button was pressed
+ if (!foundIndex)
+ break;
+
+ int eventIndex = eventStart + eventLine;
+ VoyeurEvent &e = _voy->_events[eventIndex];
+ switch (e._type) {
+ case EVTYPE_VIDEO:
+ playAVideoEvent(eventIndex);
+ break;
+
+ case EVTYPE_AUDIO: {
+ _audioVideoId = e._audioVideoId;
+ _voy->_vocSecondsOffset = e._computerOn;
+
+ _bVoy->getBoltGroup(0x7F00);
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x7F00 +
+ BLIND_TABLE[_audioVideoId])._picResource;
+ _graphicsManager->_backColors = _bVoy->boltEntry(0x7F01 +
+ BLIND_TABLE[_audioVideoId])._cMapResource;
+
+ _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
+ _graphicsManager->_backColors->startFade();
+ flipPageAndWaitForFade();
+
+ _eventsManager->_intPtr._flashStep = 1;
+ _eventsManager->_intPtr._flashTimer = 0;
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+
+ // Play suond for the given duration
+ _soundManager->setVOCOffset(_voy->_vocSecondsOffset);
+ _soundManager->startVOCPlay(_audioVideoId + 159);
+ uint32 secondsDuration = e._computerOff;
+
+ _eventsManager->getMouseInfo();
+ while (!_eventsManager->_mouseClicked && _soundManager->getVOCStatus() &&
+ _soundManager->getVOCFrame() < secondsDuration) {
+ _eventsManager->getMouseInfo();
+ _eventsManager->delay(10);
+ }
+
+ _voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ _soundManager->stopVOCPlay();
+ _bVoy->freeBoltGroup(0x7F00);
+ break;
+ }
+
+ case EVTYPE_EVID:
+ _voy->reviewAnEvidEvent(eventIndex);
+
+ _voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime;
+ _soundManager->stopVOCPlay();
+ _bVoy->getBoltGroup(0x900);
+ break;
+
+ case EVTYPE_COMPUTER:
+ _voy->reviewComputerEvent(eventIndex);
+
+ _voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime;
+ _soundManager->stopVOCPlay();
+ _bVoy->getBoltGroup(0x900);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource;
+
+ _graphicsManager->_vPort->fillPic(0);
+ flipPageAndWait();
+ _bVoy->freeBoltGroup(0x900);
+}
+
+void VoyeurEngine::doGossip() {
+ _graphicsManager->resetPalette();
+ _graphicsManager->screenReset();
+
+ if (!_bVoy->getBoltGroup(0x300))
+ return;
+
+ // Load the gossip animation
+ RL2Decoder decoder;
+ decoder.loadRL2File("a2050100.rl2", false);
+ decoder.start();
+
+ // Get the resource data for the first gossip video
+ PictureResource *bgPic = _bVoy->boltEntry(0x300)._picResource;
+ CMapResource *pal = _bVoy->boltEntry(0x301)._cMapResource;
+ pal->startFade();
+
+ // Transfer initial background to video decoder
+ PictureResource videoFrame(decoder.getRL2VideoTrack()->getBackSurface());
+ bgPic->_bounds.moveTo(0, 0);
+ _graphicsManager->sDrawPic(bgPic, &videoFrame, Common::Point(0, 0));
+
+ byte *frameNumsP = _bVoy->memberAddr(0x309);
+ byte *posP = _bVoy->boltEntry(0x30A)._data;
+
+ // Play the initial gossip video
+ decoder.play(this, 0x302, frameNumsP, posP);
+ decoder.close();
+
+ // Reset the palette and clear the screen
+ _graphicsManager->resetPalette();
+ _graphicsManager->screenReset();
+
+ // Play interview video
+ RL2Decoder decoder2;
+ decoder2.loadRL2File("a2110100.rl2", true);
+ decoder2.start();
+
+ _eventsManager->getMouseInfo();
+ decoder2.play(this);
+ decoder2.close();
+
+ _bVoy->freeBoltGroup(0x300);
+ _graphicsManager->screenReset();
+}
+
+void VoyeurEngine::doTapePlaying() {
+ if (!_bVoy->getBoltGroup(0xA00))
+ return;
+
+ _eventsManager->getMouseInfo();
+ _graphicsManager->_backColors = _bVoy->boltEntry(0xA01)._cMapResource;
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(0xA00)._picResource;
+ PictureResource *pic = _bVoy->boltEntry(0xA02)._picResource;
+ VInitCycleResource *cycle = _bVoy->boltEntry(0xA05)._vInitCycleResource;
+
+ _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(57, 30));
+ _graphicsManager->_backColors->startFade();
+ flipPageAndWaitForFade();
+
+ cycle->vStartCycle();
+
+ _soundManager->startVOCPlay("vcr.voc");
+ while (!shouldQuit() && !_eventsManager->_mouseClicked && _soundManager->getVOCStatus()) {
+ _eventsManager->delayClick(2);
+ }
+
+ _soundManager->stopVOCPlay();
+ cycle->vStopCycle();
+ _bVoy->freeBoltGroup(0xA00);
+}
+
+bool VoyeurEngine::checkForMurder() {
+ int oldMurderIndex = _controlPtr->_state->_victimMurderIndex;
+
+ for (int idx = 0; idx < _voy->_eventCount; ++idx) {
+ VoyeurEvent &evt = _voy->_events[idx];
+
+ if (evt._type == EVTYPE_VIDEO) {
+ switch (_controlPtr->_state->_victimIndex) {
+ case 1:
+ if (evt._audioVideoId == 41 && evt._computerOn <= 15 &&
+ (evt._computerOff + evt._computerOn) >= 16) {
+ _controlPtr->_state->_victimMurderIndex = 1;
+ }
+ break;
+
+ case 2:
+ if (evt._audioVideoId == 53 && evt._computerOn <= 19 &&
+ (evt._computerOff + evt._computerOn) >= 21) {
+ _controlPtr->_state->_victimMurderIndex = 2;
+ }
+ break;
+
+ case 3:
+ if (evt._audioVideoId == 50 && evt._computerOn <= 28 &&
+ (evt._computerOff + evt._computerOn) >= 29) {
+ _controlPtr->_state->_victimMurderIndex = 3;
+ }
+ break;
+
+ case 4:
+ if (evt._audioVideoId == 43 && evt._computerOn <= 10 &&
+ (evt._computerOff + evt._computerOn) >= 14) {
+ _controlPtr->_state->_victimMurderIndex = 4;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (_controlPtr->_state->_victimMurderIndex == _controlPtr->_state->_victimIndex) {
+ _voy->_videoEventId = idx;
+ return true;
+ }
+ }
+
+ _controlPtr->_state->_victimMurderIndex = oldMurderIndex;
+ _voy->_videoEventId = -1;
+ return false;
+}
+
+bool VoyeurEngine::checkForIncriminate() {
+ _voy->_incriminatedVictimNumber = 0;
+
+ for (int idx = 0; idx < _voy->_eventCount; ++idx) {
+ VoyeurEvent &evt = _voy->_events[idx];
+
+ if (evt._type == EVTYPE_VIDEO) {
+ if (evt._audioVideoId == 44 && evt._computerOn <= 40 &&
+ (evt._computerOff + evt._computerOn) >= 70) {
+ _voy->_incriminatedVictimNumber = 1;
+ }
+
+ if (evt._audioVideoId == 44 && evt._computerOn <= 79 &&
+ (evt._computerOff + evt._computerOn) >= 129) {
+ _voy->_incriminatedVictimNumber = 1;
+ }
+
+ if (evt._audioVideoId == 20 && evt._computerOn <= 28 &&
+ (evt._computerOff + evt._computerOn) >= 45) {
+ _voy->_incriminatedVictimNumber = 2;
+ }
+
+ if (evt._audioVideoId == 35 && evt._computerOn <= 17 &&
+ (evt._computerOff + evt._computerOn) >= 36) {
+ _voy->_incriminatedVictimNumber = 3;
+ }
+
+ if (evt._audioVideoId == 30 && evt._computerOn <= 80 &&
+ (evt._computerOff + evt._computerOn) >= 139) {
+ _voy->_incriminatedVictimNumber = 4;
+ }
+ }
+
+ if (_voy->_incriminatedVictimNumber) {
+ _controlPtr->_state->_victimMurderIndex = 88;
+ _voy->_videoEventId = idx;
+ return true;
+ }
+ }
+
+ _voy->_videoEventId = -1;
+ return false;
+}
+
+void VoyeurEngine::playAVideoEvent(int eventIndex) {
+ VoyeurEvent &evt = _voy->_events[eventIndex];
+ _audioVideoId = evt._audioVideoId;
+ _voy->_vocSecondsOffset = evt._computerOn;
+ _eventsManager->_videoDead = evt._dead;
+ _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED;
+
+ playAVideoDuration(_audioVideoId, evt._computerOff);
+
+ _voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
+ if (_eventsManager->_videoDead != -1) {
+ _bVoy->freeBoltGroup(0xE00);
+ _eventsManager->_videoDead = -1;
+ flipPageAndWait();
+ _eventsManager->_videoDead = -1;
+ }
+
+ _audioVideoId = -1;
+ if (_eventsManager->_videoDead != -1) {
+ _bVoy->freeBoltGroup(0xE00);
+ _eventsManager->_videoDead = -1;
+ flipPageAndWait();
+ }
+}
+
+int VoyeurEngine::getChooseButton() {
+ int prevIndex = -2;
+ Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(_playStampGroupId
+ + 6)._rectResource->_entries;
+ int selectedIndex = -1;
+
+ _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage);
+ _graphicsManager->_backColors->_steps = 0;
+ _graphicsManager->_backColors->startFade();
+ flipPageAndWait();
+
+ _voy->_viewBounds = _bVoy->boltEntry(_playStampGroupId + 7)._rectResource;
+ PictureResource *cursorPic = _bVoy->boltEntry(_playStampGroupId + 2)._picResource;
+
+ do {
+ do {
+ if (_currentVocId != -1 && !_soundManager->getVOCStatus())
+ _soundManager->startVOCPlay(_currentVocId);
+
+ _eventsManager->getMouseInfo();
+ selectedIndex = -1;
+ Common::Point pt = _eventsManager->getMousePos();
+
+ for (uint idx = 0; idx < hotspots.size(); ++idx) {
+ if (hotspots[idx].contains(pt)) {
+ if (!_voy->_victimMurdered || ((int)idx + 1) != _controlPtr->_state->_victimIndex) {
+ selectedIndex = idx;
+ if (selectedIndex != prevIndex) {
+ PictureResource *btnPic = _bVoy->boltEntry(_playStampGroupId + 8 + idx)._picResource;
+ _graphicsManager->sDrawPic(btnPic, _graphicsManager->_vPort,
+ Common::Point(106, 200));
+
+ cursorPic = _bVoy->boltEntry(_playStampGroupId + 4)._picResource;
+ }
+ }
+ }
+ }
+
+ if (selectedIndex == -1) {
+ cursorPic = _bVoy->boltEntry(_playStampGroupId + 2)._picResource;
+ PictureResource *btnPic = _bVoy->boltEntry(_playStampGroupId + 12)._picResource;
+ _graphicsManager->sDrawPic(btnPic, _graphicsManager->_vPort,
+ Common::Point(106, 200));
+ }
+
+ _graphicsManager->sDrawPic(cursorPic, _graphicsManager->_vPort,
+ Common::Point(pt.x + 13, pt.y - 12));
+
+ flipPageAndWait();
+ } while (!shouldQuit() && !_eventsManager->_mouseClicked);
+ } while (!shouldQuit() && selectedIndex == -1 && !_eventsManager->_rightClick);
+
+ return selectedIndex;
+}
+
+void VoyeurEngine::makeViewFinder() {
+ _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x103)._picResource;
+ _graphicsManager->sDrawPic(_graphicsManager->_backgroundPage,
+ _graphicsManager->_vPort, Common::Point(0, 0));
+ CMapResource *pal = _bVoy->boltEntry(0x104)._cMapResource;
+
+ int palOffset = 0;
+ switch (_voy->_transitionId) {
+ case 1:
+ case 2:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 17:
+ palOffset = 0;
+ break;
+ case 3:
+ palOffset = 1;
+ break;
+ case 4:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ palOffset = 2;
+ break;
+ default:
+ break;
+ }
+
+ _graphicsManager->_vPort->drawIfaceTime();
+ doTimeBar();
+ pal->startFade();
+
+ flipPageAndWaitForFade();
+
+ _graphicsManager->setColor(241, 105, 105, 105);
+ _graphicsManager->setColor(242, 105, 105, 105);
+ _graphicsManager->setColor(243, 105, 105, 105);
+ _graphicsManager->setColor(palOffset + 241, 219, 235, 235);
+
+ _eventsManager->_intPtr._hasPalette = true;
+}
+
+void VoyeurEngine::makeViewFinderP() {
+ _graphicsManager->screenReset();
+}
+
+void VoyeurEngine::initIFace() {
+ int playStamp1 = _playStampGroupId;
+ switch (_voy->_transitionId) {
+ case 0:
+ break;
+ case 1:
+ case 2:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ _playStampGroupId = 0xB00;
+ break;
+ case 3:
+ _playStampGroupId = 0xC00;
+ break;
+ default:
+ _playStampGroupId = 0xD00;
+ break;
+ }
+ if (playStamp1 != -1)
+ _bVoy->freeBoltGroup(playStamp1);
+
+ _bVoy->getBoltGroup(_playStampGroupId);
+ CMapResource *pal = _bVoy->boltEntry(_playStampGroupId + 2)._cMapResource;
+ pal->startFade();
+
+ // Start the mansion off centered
+ _mansionViewPos = Common::Point((MANSION_MAX_X - MANSION_VIEW_WIDTH) / 2,
+ (MANSION_MAX_Y - MANSION_VIEW_HEIGHT) / 2);
+ doScroll(_mansionViewPos);
+
+ _voy->_viewBounds = _bVoy->boltEntry(_playStampGroupId)._rectResource;
+
+ // Show the cursor using ScummVM functionality
+ _eventsManager->showCursor();
+
+ // Note: the original did two loops to preload members here, which is
+ // redundant for ScummVM, since computers are faster these days, and
+ // getting resources as needed will be fast enough.
+}
+
+void VoyeurEngine::doScroll(const Common::Point &pt) {
+ Common::Rect clipRect(72, 47, 72 + 240, 47 + 148);
+ _graphicsManager->_vPort->setupViewPort(NULL, &clipRect);
+
+ int base = 0;
+ switch (_voy->_transitionId) {
+ case 0:
+ break;
+ case 1:
+ case 2:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ base = 0xB00;
+ break;
+ case 3:
+ base = 0xC00;
+ break;
+ default:
+ base = 0xD00;
+ }
+
+ if (base) {
+ PictureResource *pic = _bVoy->boltEntry(base + 3)._picResource;
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 104));
+ pic = _bVoy->boltEntry(base + 4)._picResource;
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 44));
+ pic = _bVoy->boltEntry(base + 5)._picResource;
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 16));
+ pic = _bVoy->boltEntry(base + 6)._picResource;
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 76));
+ pic = _bVoy->boltEntry(base + 7)._picResource;
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 136));
+ }
+
+ _graphicsManager->_vPort->setupViewPort(NULL);
+}
+
+void VoyeurEngine::checkTransition() {
+ Common::String time, day;
+
+ if (_voy->_transitionId != _checkTransitionId) {
+ // Get the day
+ day = getDayName();
+
+ // Only proceed if a valid day string was returned
+ if (!day.empty()) {
+ _graphicsManager->fadeDownICF(6);
+
+ // Get the time of day string
+ time = getTimeOfDay();
+
+ // Show a transition card with the day and time, and wait
+ doTransitionCard(day, time);
+ _eventsManager->delayClick(180);
+ }
+
+ _checkTransitionId = _voy->_transitionId;
+ }
+}
+
+Common::String VoyeurEngine::getDayName() {
+ switch (_voy->_transitionId) {
+ case 0:
+ return "";
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ return SATURDAY;
+ case 17:
+ return MONDAY;
+ default:
+ return SUNDAY;
+ }
+}
+
+Common::String VoyeurEngine::getTimeOfDay() {
+ if (_voy->_transitionId == 17)
+ return "";
+
+ return Common::String::format("%d:%02d%s", _gameHour, _gameMinute, _voy->_isAM ? AM : PM);
+}
+
+int VoyeurEngine::doComputerText(int maxLen) {
+ FontInfoResource &font = *_graphicsManager->_fontPtr;
+ int totalChars = 0;
+
+ font._curFont = _bVoy->boltEntry(0x4910)._fontResource;
+ font._foreColor = 129;
+ font._fontSaveBack = false;
+ font._fontFlags = DISPFLAG_NONE;
+ if (_voy->_vocSecondsOffset > 60)
+ _voy->_vocSecondsOffset = 0;
+
+ if (_voy->_RTVNum > _voy->_computerTimeMax && maxLen == 9999) {
+ if (_currentVocId != -1)
+ _soundManager->startVOCPlay(_currentVocId);
+ font._justify = ALIGN_LEFT;
+ font._justifyWidth = 384;
+ font._justifyHeight = 100;
+ font._pos = Common::Point(128, 100);
+ _graphicsManager->_vPort->drawText(END_OF_MESSAGE);
+ } else if (_voy->_RTVNum < _voy->_computerTimeMin && maxLen == 9999) {
+ if (_currentVocId != -1)
+ _soundManager->startVOCPlay(_currentVocId);
+ font._justify = ALIGN_LEFT;
+ font._justifyWidth = 384;
+ font._justifyHeight = 100;
+ font._pos = Common::Point(120, 100);
+ _graphicsManager->_vPort->drawText(START_OF_MESSAGE);
+ } else {
+ char *msg = (char *)_bVoy->memberAddr(0x4900 + _voy->_computerTextId);
+ font._pos = Common::Point(96, 60);
+
+ bool showEnd = true;
+ int yp = 60;
+ do {
+ if (_currentVocId != -1 && !_soundManager->getVOCStatus()) {
+ if (_voy->_vocSecondsOffset > 60)
+ _voy->_vocSecondsOffset = 0;
+ _soundManager->startVOCPlay(_currentVocId);
+ }
+
+ char c = *msg++;
+ if (c == '\0') {
+ if (showEnd) {
+ _eventsManager->delay(90);
+ _graphicsManager->_drawPtr->_pos = Common::Point(96, 54);
+ _graphicsManager->_drawPtr->_penColor = 254;
+ _graphicsManager->_vPort->sFillBox(196, 124);
+ _graphicsManager->_fontPtr->_justify = ALIGN_LEFT;
+ _graphicsManager->_fontPtr->_justifyWidth = 384;
+ _graphicsManager->_fontPtr->_justifyHeight = 100;
+ _graphicsManager->_fontPtr->_pos = Common::Point(128, 100);
+ _graphicsManager->_vPort->drawText(END_OF_MESSAGE);
+ }
+ break;
+ }
+
+ if (c == '~' || c == '^') {
+ if (c == '^') {
+ yp += 10;
+ } else {
+ _eventsManager->delay(90);
+ _graphicsManager->_drawPtr->_pos = Common::Point(96, 54);
+ _graphicsManager->_drawPtr->_penColor = 255;
+ _graphicsManager->_vPort->sFillBox(196, 124);
+ yp = 60;
+ }
+
+ _graphicsManager->_fontPtr->_pos = Common::Point(96, yp);
+ } else if (c == '_') {
+ showEnd = false;
+ } else {
+ _graphicsManager->_fontPtr->_justify = ALIGN_LEFT;
+ _graphicsManager->_fontPtr->_justifyWidth = 0;
+ _graphicsManager->_fontPtr->_justifyHeight = 0;
+ _graphicsManager->_vPort->drawText(Common::String(c));
+ _eventsManager->delay(4);
+ }
+
+ flipPageAndWait();
+ _eventsManager->getMouseInfo();
+ ++totalChars;
+
+ } while (!shouldQuit() && !_eventsManager->_mouseClicked && totalChars < maxLen);
+
+ _voy->_computerTimeMax = 0;
+ }
+
+ flipPageAndWait();
+
+ _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource;
+ return totalChars;
+}
+
+void VoyeurEngine::getComputerBrush() {
+ if (!_bVoy->getBoltGroup(0x4900))
+ return;
+
+ PictureResource *pic = _bVoy->boltEntry(0x490E)._picResource;
+ int xp = (384 - pic->_bounds.width()) / 2;
+ int yp = (240 - pic->_bounds.height()) / 2 - 4;
+
+ _graphicsManager->_vPort->drawPicPerm(pic, Common::Point(xp, yp));
+
+ CMapResource *pal = _bVoy->boltEntry(0x490F)._cMapResource;
+ pal->startFade();
+}
+
+void VoyeurEngine::doTimeBar() {
+ flashTimeBar();
+
+ if (_voy->_RTVLimit > 0) {
+ if (_voy->_RTVNum > _voy->_RTVLimit || _voy->_RTVNum < 0)
+ _voy->_RTVNum = _voy->_RTVLimit - 1;
+
+ _timeBarVal = _voy->_RTVNum;
+ int height = ((_voy->_RTVLimit - _voy->_RTVNum) * 59) / _voy->_RTVLimit;
+ int fullHeight = MAX(151 - height, 93);
+
+ _graphicsManager->_drawPtr->_penColor = 134;
+ _graphicsManager->_drawPtr->_pos = Common::Point(39, 92);
+
+ _graphicsManager->_vPort->sFillBox(6, fullHeight - 92);
+ if (height > 0) {
+ _graphicsManager->setColor(215, 238, 238, 238);
+ _eventsManager->_intPtr._hasPalette = true;
+
+ _graphicsManager->_drawPtr->_penColor = 215;
+ _graphicsManager->_drawPtr->_pos = Common::Point(39, fullHeight);
+ _graphicsManager->_vPort->sFillBox(6, height);
+ }
+ }
+}
+
+void VoyeurEngine::flashTimeBar() {
+ if (_voy->_RTVNum >= 0 && (_voy->_RTVLimit - _voy->_RTVNum) < 11 &&
+ (_eventsManager->_intPtr._flashTimer >= (_flashTimeVal + 15) ||
+ _eventsManager->_intPtr._flashTimer < _flashTimeVal)) {
+ // Within camera low power range
+ _flashTimeVal = _eventsManager->_intPtr._flashTimer;
+
+ if (_flashTimeFlag)
+ _graphicsManager->setColor(240, 220, 20, 20);
+ else
+ _graphicsManager->setColor(240, 220, 220, 220);
+
+ _eventsManager->_intPtr._hasPalette = true;
+ _flashTimeFlag = !_flashTimeFlag;
+ }
+}
+
+void VoyeurEngine::checkPhoneCall() {
+ if ((_voy->_RTVLimit - _voy->_RTVNum) >= 36 && _voy->_totalPhoneCalls < 5 &&
+ _currentVocId <= 151 && _currentVocId > 146) {
+ if ((_voy->_switchBGNum < _checkPhoneVal || _checkPhoneVal > 180) &&
+ !_soundManager->getVOCStatus()) {
+ int soundIndex;
+ do {
+ soundIndex = getRandomNumber(4);
+ } while (_voy->_phoneCallsReceived[soundIndex]);
+ _currentVocId = 154 + soundIndex;
+
+ _soundManager->stopVOCPlay();
+ _soundManager->startVOCPlay(_currentVocId);
+ _checkPhoneVal = _voy->_switchBGNum;
+ _voy->_phoneCallsReceived[soundIndex] = true;
+ ++_voy->_totalPhoneCalls;
+ }
+ }
+}
+
+void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
+ _eventsManager->getMouseInfo();
+ flipPageAndWait();
+
+ if (_currentVocId != -1) {
+ _voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime;
+ _soundManager->stopVOCPlay();
+ }
+
+ _bVoy->getBoltGroup(_voy->_boltGroupId2);
+ PictureResource *pic = _bVoy->boltEntry(_voy->_boltGroupId2 + evidId * 2)._picResource;
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(
+ (384 - pic->_bounds.width()) / 2, (240 - pic->_bounds.height()) / 2));
+ _bVoy->freeBoltMember(_voy->_boltGroupId2 + evidId * 2);
+
+ CMapResource *pal = _bVoy->boltEntry(_voy->_boltGroupId2 + evidId * 2 + 1)._cMapResource;
+ pal->startFade();
+
+ while (!shouldQuit() && (_eventsManager->_fadeStatus & 1))
+ _eventsManager->delay(1);
+ _bVoy->freeBoltMember(_voy->_boltGroupId2 + evidId * 2 + 1);
+
+ Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(_playStampGroupId + 4)._rectResource->_entries;
+ int count = hotspots[evidId]._count;
+
+ if (count > 0) {
+ for (int idx = 1; idx <= count; ++idx) {
+ _voy->_evPicPtrs[idx - 1] = _bVoy->boltEntry(_voy->_boltGroupId2 +
+ (evidId + idx) * 2)._picResource;
+ _voy->_evCmPtrs[idx - 1] = _bVoy->boltEntry(_voy->_boltGroupId2 +
+ (evidId + idx) * 2 + 1)._cMapResource;
+ }
+ }
+
+ flipPageAndWait();
+ _eventsManager->stopEvidDim();
+
+ if (eventId == 999)
+ _voy->addEvidEventStart(evidId);
+
+ _eventsManager->getMouseInfo();
+
+ int arrIndex = 0;
+ int evidIdx = evidId;
+
+ while (!shouldQuit() && !_eventsManager->_rightClick) {
+ _voyeurArea = AREA_EVIDENCE;
+
+ if (_currentVocId != -1 && !_soundManager->getVOCStatus()) {
+ if (_voy->_vocSecondsOffset > 60)
+ _voy->_vocSecondsOffset = 0;
+
+ _soundManager->startVOCPlay(_currentVocId);
+ }
+
+ _eventsManager->delayClick(600);
+ if (_eventsManager->_rightClick)
+ break;
+ if (count == 0 || evidIdx >= eventId)
+ continue;
+
+ pic = _voy->_evPicPtrs[arrIndex];
+ _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort,
+ Common::Point((384 - pic->_bounds.width()) / 2,
+ (240 - pic->_bounds.height()) / 2));
+ _voy->_evCmPtrs[arrIndex]->startFade();
+ while (!shouldQuit() && (_eventsManager->_fadeStatus & 1))
+ _eventsManager->delay(1);
+
+ flipPageAndWait();
+ _eventsManager->delay(6);
+
+ ++evidIdx;
+ ++arrIndex;
+ --count;
+ }
+
+ if (eventId == 999)
+ _voy->addEvidEventEnd(evidIdx);
+
+ for (int idx = 1; idx <= hotspots[evidId]._count; ++idx) {
+ _bVoy->freeBoltMember(_voy->_boltGroupId2 + (evidId + idx) * 2);
+ _bVoy->freeBoltMember(_voy->_boltGroupId2 + (evidId + idx) * 2 + 1);
+ }
+}
+
+} // End of namespace Voyeur
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp
index 33ad39b411..9d5a35464a 100644
--- a/engines/wintermute/ad/ad_actor.cpp
+++ b/engines/wintermute/ad/ad_actor.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_actor.h b/engines/wintermute/ad/ad_actor.h
index 3225eb44ec..863a055a4b 100644
--- a/engines/wintermute/ad/ad_actor.h
+++ b/engines/wintermute/ad/ad_actor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp
index 098da49750..1bbadeb7f7 100644
--- a/engines/wintermute/ad/ad_entity.cpp
+++ b/engines/wintermute/ad/ad_entity.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_entity.h b/engines/wintermute/ad/ad_entity.h
index c3ed5622e5..7e1525b7c1 100644
--- a/engines/wintermute/ad/ad_entity.h
+++ b/engines/wintermute/ad/ad_entity.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 904b8a541c..3c4383f55e 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_game.h b/engines/wintermute/ad/ad_game.h
index 019f2e6478..ebb37e9a07 100644
--- a/engines/wintermute/ad/ad_game.h
+++ b/engines/wintermute/ad/ad_game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_inventory.cpp b/engines/wintermute/ad/ad_inventory.cpp
index f9352c77c6..e385d233b6 100644
--- a/engines/wintermute/ad/ad_inventory.cpp
+++ b/engines/wintermute/ad/ad_inventory.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_inventory.h b/engines/wintermute/ad/ad_inventory.h
index 9de831b2a0..c2092bce56 100644
--- a/engines/wintermute/ad/ad_inventory.h
+++ b/engines/wintermute/ad/ad_inventory.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_inventory_box.cpp b/engines/wintermute/ad/ad_inventory_box.cpp
index 5d7f053bb5..a2e54a3318 100644
--- a/engines/wintermute/ad/ad_inventory_box.cpp
+++ b/engines/wintermute/ad/ad_inventory_box.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_inventory_box.h b/engines/wintermute/ad/ad_inventory_box.h
index 4d576625b2..4673f2e3f3 100644
--- a/engines/wintermute/ad/ad_inventory_box.h
+++ b/engines/wintermute/ad/ad_inventory_box.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_item.cpp b/engines/wintermute/ad/ad_item.cpp
index 1f19a3eeae..c7eda029cf 100644
--- a/engines/wintermute/ad/ad_item.cpp
+++ b/engines/wintermute/ad/ad_item.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_item.h b/engines/wintermute/ad/ad_item.h
index 935ea5d73d..092a645019 100644
--- a/engines/wintermute/ad/ad_item.h
+++ b/engines/wintermute/ad/ad_item.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_layer.cpp b/engines/wintermute/ad/ad_layer.cpp
index 17dd83a8b7..f6ea339895 100644
--- a/engines/wintermute/ad/ad_layer.cpp
+++ b/engines/wintermute/ad/ad_layer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_layer.h b/engines/wintermute/ad/ad_layer.h
index af7c3a364c..995ef28ee9 100644
--- a/engines/wintermute/ad/ad_layer.h
+++ b/engines/wintermute/ad/ad_layer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_node_state.cpp b/engines/wintermute/ad/ad_node_state.cpp
index dd07f23762..c43604320b 100644
--- a/engines/wintermute/ad/ad_node_state.cpp
+++ b/engines/wintermute/ad/ad_node_state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_node_state.h b/engines/wintermute/ad/ad_node_state.h
index 4b5b46ee60..cf897e9af3 100644
--- a/engines/wintermute/ad/ad_node_state.h
+++ b/engines/wintermute/ad/ad_node_state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_object.cpp b/engines/wintermute/ad/ad_object.cpp
index 3664e0fd8a..a93bd42bd0 100644
--- a/engines/wintermute/ad/ad_object.cpp
+++ b/engines/wintermute/ad/ad_object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_object.h b/engines/wintermute/ad/ad_object.h
index ba984ef8d1..35a734cd83 100644
--- a/engines/wintermute/ad/ad_object.h
+++ b/engines/wintermute/ad/ad_object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_path.cpp b/engines/wintermute/ad/ad_path.cpp
index 156fc80958..4d5c313e52 100644
--- a/engines/wintermute/ad/ad_path.cpp
+++ b/engines/wintermute/ad/ad_path.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_path.h b/engines/wintermute/ad/ad_path.h
index 9de0bcad2c..8dbec5e4f0 100644
--- a/engines/wintermute/ad/ad_path.h
+++ b/engines/wintermute/ad/ad_path.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_path_point.cpp b/engines/wintermute/ad/ad_path_point.cpp
index 5ee9568608..6e20554034 100644
--- a/engines/wintermute/ad/ad_path_point.cpp
+++ b/engines/wintermute/ad/ad_path_point.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_path_point.h b/engines/wintermute/ad/ad_path_point.h
index 5e6b8c61ea..c375946f32 100644
--- a/engines/wintermute/ad/ad_path_point.h
+++ b/engines/wintermute/ad/ad_path_point.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_region.cpp b/engines/wintermute/ad/ad_region.cpp
index 2e8e73a1cf..89ad09fb8f 100644
--- a/engines/wintermute/ad/ad_region.cpp
+++ b/engines/wintermute/ad/ad_region.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_region.h b/engines/wintermute/ad/ad_region.h
index f3674dcbfb..2b5e468901 100644
--- a/engines/wintermute/ad/ad_region.h
+++ b/engines/wintermute/ad/ad_region.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_response.cpp b/engines/wintermute/ad/ad_response.cpp
index e7b4188de6..6ebe70bedb 100644
--- a/engines/wintermute/ad/ad_response.cpp
+++ b/engines/wintermute/ad/ad_response.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_response.h b/engines/wintermute/ad/ad_response.h
index 00ebafbdb0..22aac01ff2 100644
--- a/engines/wintermute/ad/ad_response.h
+++ b/engines/wintermute/ad/ad_response.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp
index f2e986cbdc..83c2ae74c6 100644
--- a/engines/wintermute/ad/ad_response_box.cpp
+++ b/engines/wintermute/ad/ad_response_box.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_response_box.h b/engines/wintermute/ad/ad_response_box.h
index 9469bfda43..c808a7b5db 100644
--- a/engines/wintermute/ad/ad_response_box.h
+++ b/engines/wintermute/ad/ad_response_box.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_response_context.cpp b/engines/wintermute/ad/ad_response_context.cpp
index 44b43a6077..6d7d8d50a4 100644
--- a/engines/wintermute/ad/ad_response_context.cpp
+++ b/engines/wintermute/ad/ad_response_context.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_response_context.h b/engines/wintermute/ad/ad_response_context.h
index bc30b4a1c9..385ec2ded5 100644
--- a/engines/wintermute/ad/ad_response_context.h
+++ b/engines/wintermute/ad/ad_response_context.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_rot_level.cpp b/engines/wintermute/ad/ad_rot_level.cpp
index b5bdc8ebe9..410ba22b53 100644
--- a/engines/wintermute/ad/ad_rot_level.cpp
+++ b/engines/wintermute/ad/ad_rot_level.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_rot_level.h b/engines/wintermute/ad/ad_rot_level.h
index 47c621845a..f60dd0a5a9 100644
--- a/engines/wintermute/ad/ad_rot_level.h
+++ b/engines/wintermute/ad/ad_rot_level.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scale_level.cpp b/engines/wintermute/ad/ad_scale_level.cpp
index aa7f6f89cf..7e2eaa6f4f 100644
--- a/engines/wintermute/ad/ad_scale_level.cpp
+++ b/engines/wintermute/ad/ad_scale_level.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scale_level.h b/engines/wintermute/ad/ad_scale_level.h
index 768e79bbf7..4d6a83561f 100644
--- a/engines/wintermute/ad/ad_scale_level.h
+++ b/engines/wintermute/ad/ad_scale_level.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index ab7ab51f30..02a6aeb801 100644
--- a/engines/wintermute/ad/ad_scene.cpp
+++ b/engines/wintermute/ad/ad_scene.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -2041,6 +2041,10 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollSpeedX") == 0) {
_scrollTimeH = value->getInt();
+ if (_scrollTimeH == 0) {
+ warning("_scrollTimeH can't be 0, resetting to default");
+ _scrollTimeH = 10;
+ }
return STATUS_OK;
}
@@ -2049,6 +2053,10 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollSpeedY") == 0) {
_scrollTimeV = value->getInt();
+ if (_scrollTimeV == 0) {
+ warning("_scrollTimeV can't be 0, resetting to default");
+ _scrollTimeV = 10;
+ }
return STATUS_OK;
}
diff --git a/engines/wintermute/ad/ad_scene.h b/engines/wintermute/ad/ad_scene.h
index 1f35a776b5..1ca52bdda9 100644
--- a/engines/wintermute/ad/ad_scene.h
+++ b/engines/wintermute/ad/ad_scene.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scene_node.cpp b/engines/wintermute/ad/ad_scene_node.cpp
index 5f6207c23a..e5d23d5f2a 100644
--- a/engines/wintermute/ad/ad_scene_node.cpp
+++ b/engines/wintermute/ad/ad_scene_node.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scene_node.h b/engines/wintermute/ad/ad_scene_node.h
index 5bb1606d0e..34b59cd587 100644
--- a/engines/wintermute/ad/ad_scene_node.h
+++ b/engines/wintermute/ad/ad_scene_node.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scene_state.cpp b/engines/wintermute/ad/ad_scene_state.cpp
index a4218751c3..d7c863792d 100644
--- a/engines/wintermute/ad/ad_scene_state.cpp
+++ b/engines/wintermute/ad/ad_scene_state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_scene_state.h b/engines/wintermute/ad/ad_scene_state.h
index 067c737b2e..90e39f3d51 100644
--- a/engines/wintermute/ad/ad_scene_state.h
+++ b/engines/wintermute/ad/ad_scene_state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_sentence.cpp b/engines/wintermute/ad/ad_sentence.cpp
index 21ffac5aaf..86ae06ad06 100644
--- a/engines/wintermute/ad/ad_sentence.cpp
+++ b/engines/wintermute/ad/ad_sentence.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_sentence.h b/engines/wintermute/ad/ad_sentence.h
index c491ad99a2..7d187786d4 100644
--- a/engines/wintermute/ad/ad_sentence.h
+++ b/engines/wintermute/ad/ad_sentence.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_sprite_set.cpp b/engines/wintermute/ad/ad_sprite_set.cpp
index dd920492de..e598913ae6 100644
--- a/engines/wintermute/ad/ad_sprite_set.cpp
+++ b/engines/wintermute/ad/ad_sprite_set.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_sprite_set.h b/engines/wintermute/ad/ad_sprite_set.h
index ece71f7adb..8590970126 100644
--- a/engines/wintermute/ad/ad_sprite_set.h
+++ b/engines/wintermute/ad/ad_sprite_set.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_talk_def.cpp b/engines/wintermute/ad/ad_talk_def.cpp
index 22e3d7b4cc..6194121727 100644
--- a/engines/wintermute/ad/ad_talk_def.cpp
+++ b/engines/wintermute/ad/ad_talk_def.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_talk_def.h b/engines/wintermute/ad/ad_talk_def.h
index 5711906b4b..a19c504955 100644
--- a/engines/wintermute/ad/ad_talk_def.h
+++ b/engines/wintermute/ad/ad_talk_def.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_talk_holder.cpp b/engines/wintermute/ad/ad_talk_holder.cpp
index 6041105b93..116d3edd21 100644
--- a/engines/wintermute/ad/ad_talk_holder.cpp
+++ b/engines/wintermute/ad/ad_talk_holder.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_talk_holder.h b/engines/wintermute/ad/ad_talk_holder.h
index ab48c3aaf4..b5f8f48318 100644
--- a/engines/wintermute/ad/ad_talk_holder.h
+++ b/engines/wintermute/ad/ad_talk_holder.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_talk_node.cpp b/engines/wintermute/ad/ad_talk_node.cpp
index 6c0d2e1f06..f4612122da 100644
--- a/engines/wintermute/ad/ad_talk_node.cpp
+++ b/engines/wintermute/ad/ad_talk_node.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_talk_node.h b/engines/wintermute/ad/ad_talk_node.h
index 7a014b2d9f..e619edf7c2 100644
--- a/engines/wintermute/ad/ad_talk_node.h
+++ b/engines/wintermute/ad/ad_talk_node.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_types.h b/engines/wintermute/ad/ad_types.h
index dc1a54b91d..931e38974c 100644
--- a/engines/wintermute/ad/ad_types.h
+++ b/engines/wintermute/ad/ad_types.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_waypoint_group.cpp b/engines/wintermute/ad/ad_waypoint_group.cpp
index ae6b18e266..25d7f83264 100644
--- a/engines/wintermute/ad/ad_waypoint_group.cpp
+++ b/engines/wintermute/ad/ad_waypoint_group.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ad/ad_waypoint_group.h b/engines/wintermute/ad/ad_waypoint_group.h
index 47fd611be6..32d5e9b764 100644
--- a/engines/wintermute/ad/ad_waypoint_group.h
+++ b/engines/wintermute/ad/ad_waypoint_group.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base.cpp b/engines/wintermute/base/base.cpp
index 6a0666b36e..90a3a62d69 100644
--- a/engines/wintermute/base/base.cpp
+++ b/engines/wintermute/base/base.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base.h b/engines/wintermute/base/base.h
index 8767cc9bdd..e6ed7c51fe 100644
--- a/engines/wintermute/base/base.h
+++ b/engines/wintermute/base/base.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_active_rect.cpp b/engines/wintermute/base/base_active_rect.cpp
index 69cc7b02b6..0c5d16966f 100644
--- a/engines/wintermute/base/base_active_rect.cpp
+++ b/engines/wintermute/base/base_active_rect.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_active_rect.h b/engines/wintermute/base/base_active_rect.h
index a3c0746618..29acc595d1 100644
--- a/engines/wintermute/base/base_active_rect.h
+++ b/engines/wintermute/base/base_active_rect.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_dynamic_buffer.cpp b/engines/wintermute/base/base_dynamic_buffer.cpp
index 5334ae46c4..7187a78769 100644
--- a/engines/wintermute/base/base_dynamic_buffer.cpp
+++ b/engines/wintermute/base/base_dynamic_buffer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_dynamic_buffer.h b/engines/wintermute/base/base_dynamic_buffer.h
index 2804d78895..6662e36dfd 100644
--- a/engines/wintermute/base/base_dynamic_buffer.h
+++ b/engines/wintermute/base/base_dynamic_buffer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp
index acb12bbe5f..7c2e9c8468 100644
--- a/engines/wintermute/base/base_engine.cpp
+++ b/engines/wintermute/base/base_engine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index a5eafd3597..dd82cf9c29 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_fader.cpp b/engines/wintermute/base/base_fader.cpp
index c7dac8be27..f9c4d1cba5 100644
--- a/engines/wintermute/base/base_fader.cpp
+++ b/engines/wintermute/base/base_fader.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_fader.h b/engines/wintermute/base/base_fader.h
index 087b19bc44..f742954c3d 100644
--- a/engines/wintermute/base/base_fader.h
+++ b/engines/wintermute/base/base_fader.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index e39a15f469..1f78303f52 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_file_manager.h b/engines/wintermute/base/base_file_manager.h
index 8c2876f681..653721c8f5 100644
--- a/engines/wintermute/base/base_file_manager.h
+++ b/engines/wintermute/base/base_file_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_frame.cpp b/engines/wintermute/base/base_frame.cpp
index 1455733461..f2c24b8f6a 100644
--- a/engines/wintermute/base/base_frame.cpp
+++ b/engines/wintermute/base/base_frame.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_frame.h b/engines/wintermute/base/base_frame.h
index c4cfc443fa..49a56592bb 100644
--- a/engines/wintermute/base/base_frame.h
+++ b/engines/wintermute/base/base_frame.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 6b7e1cf803..d37a22e2a6 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index 29d312fe97..cdbbff6c93 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_game_music.cpp b/engines/wintermute/base/base_game_music.cpp
index 8894fb843f..fee7c7be2d 100644
--- a/engines/wintermute/base/base_game_music.cpp
+++ b/engines/wintermute/base/base_game_music.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_game_music.h b/engines/wintermute/base/base_game_music.h
index 72c7a171a6..1e786dbb2b 100644
--- a/engines/wintermute/base/base_game_music.h
+++ b/engines/wintermute/base/base_game_music.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_game_settings.cpp b/engines/wintermute/base/base_game_settings.cpp
index 43809b5d1e..3b54384cc7 100644
--- a/engines/wintermute/base/base_game_settings.cpp
+++ b/engines/wintermute/base/base_game_settings.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_game_settings.h b/engines/wintermute/base/base_game_settings.h
index 38a2fd1042..fe0e9907e6 100644
--- a/engines/wintermute/base/base_game_settings.h
+++ b/engines/wintermute/base/base_game_settings.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_keyboard_state.cpp b/engines/wintermute/base/base_keyboard_state.cpp
index 77469e07a5..61087c5836 100644
--- a/engines/wintermute/base/base_keyboard_state.cpp
+++ b/engines/wintermute/base/base_keyboard_state.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_keyboard_state.h b/engines/wintermute/base/base_keyboard_state.h
index 14a57ee7b8..c74bd5b0f7 100644
--- a/engines/wintermute/base/base_keyboard_state.h
+++ b/engines/wintermute/base/base_keyboard_state.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_named_object.cpp b/engines/wintermute/base/base_named_object.cpp
index 3d1df5ab84..5bfc978299 100644
--- a/engines/wintermute/base/base_named_object.cpp
+++ b/engines/wintermute/base/base_named_object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_named_object.h b/engines/wintermute/base/base_named_object.h
index ee4a3bba6a..a337eae82d 100644
--- a/engines/wintermute/base/base_named_object.h
+++ b/engines/wintermute/base/base_named_object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_object.cpp b/engines/wintermute/base/base_object.cpp
index 540c7dd164..708df8def1 100644
--- a/engines/wintermute/base/base_object.cpp
+++ b/engines/wintermute/base/base_object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_object.h b/engines/wintermute/base/base_object.h
index a190b1bcb4..f5036f4ec4 100644
--- a/engines/wintermute/base/base_object.h
+++ b/engines/wintermute/base/base_object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_parser.cpp b/engines/wintermute/base/base_parser.cpp
index ff9c6c81b0..2d80bc5017 100644
--- a/engines/wintermute/base/base_parser.cpp
+++ b/engines/wintermute/base/base_parser.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 4bf48cc016..4e4a54e28c 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index 3d0fc0e925..bea55fb857 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -38,8 +38,8 @@
#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/graphics/transparent_surface.h"
#include "engines/wintermute/wintermute.h"
-#include "graphics/decoders/bmp.h"
#include "graphics/scaler.h"
+#include "image/bmp.h"
#include "common/memstream.h"
#include "common/str.h"
#include "common/system.h"
@@ -170,7 +170,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
if (thumbSize > 0) {
Common::MemoryReadStream thumbStream(thumbData, thumbSize, DisposeAfterUse::NO);
- Graphics::BitmapDecoder bmpDecoder;
+ Image::BitmapDecoder bmpDecoder;
if (bmpDecoder.loadStream(thumbStream)) {
const Graphics::Surface *bmpSurface = bmpDecoder.getSurface();
TransparentSurface *scaleableSurface = new TransparentSurface(*bmpSurface, false);
diff --git a/engines/wintermute/base/base_persistence_manager.h b/engines/wintermute/base/base_persistence_manager.h
index 43259b26ff..373d1580de 100644
--- a/engines/wintermute/base/base_persistence_manager.h
+++ b/engines/wintermute/base/base_persistence_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_point.cpp b/engines/wintermute/base/base_point.cpp
index 84b6a629c7..f810b286fb 100644
--- a/engines/wintermute/base/base_point.cpp
+++ b/engines/wintermute/base/base_point.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_point.h b/engines/wintermute/base/base_point.h
index cf8a5be336..6f5c1ca28f 100644
--- a/engines/wintermute/base/base_point.h
+++ b/engines/wintermute/base/base_point.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_quick_msg.cpp b/engines/wintermute/base/base_quick_msg.cpp
index ac0c107d3b..514f44f788 100644
--- a/engines/wintermute/base/base_quick_msg.cpp
+++ b/engines/wintermute/base/base_quick_msg.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_quick_msg.h b/engines/wintermute/base/base_quick_msg.h
index b706424c18..39eace390c 100644
--- a/engines/wintermute/base/base_quick_msg.h
+++ b/engines/wintermute/base/base_quick_msg.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_region.cpp b/engines/wintermute/base/base_region.cpp
index dc17b18ea2..9a31f5cd66 100644
--- a/engines/wintermute/base/base_region.cpp
+++ b/engines/wintermute/base/base_region.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_region.h b/engines/wintermute/base/base_region.h
index 846dcfc341..fc3389c501 100644
--- a/engines/wintermute/base/base_region.h
+++ b/engines/wintermute/base/base_region.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp
index 5fb0b62713..8383657239 100644
--- a/engines/wintermute/base/base_script_holder.cpp
+++ b/engines/wintermute/base/base_script_holder.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_script_holder.h b/engines/wintermute/base/base_script_holder.h
index b4e22a59ee..9b3bf9ec44 100644
--- a/engines/wintermute/base/base_script_holder.h
+++ b/engines/wintermute/base/base_script_holder.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_scriptable.cpp b/engines/wintermute/base/base_scriptable.cpp
index d2ff627f0a..c65d30d941 100644
--- a/engines/wintermute/base/base_scriptable.cpp
+++ b/engines/wintermute/base/base_scriptable.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_scriptable.h b/engines/wintermute/base/base_scriptable.h
index 08fd32081a..b32668d6c8 100644
--- a/engines/wintermute/base/base_scriptable.h
+++ b/engines/wintermute/base/base_scriptable.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp
index b1fcb42dcc..2e00998037 100644
--- a/engines/wintermute/base/base_sprite.cpp
+++ b/engines/wintermute/base/base_sprite.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_sprite.h b/engines/wintermute/base/base_sprite.h
index 54d595f655..92287995d9 100644
--- a/engines/wintermute/base/base_sprite.h
+++ b/engines/wintermute/base/base_sprite.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_string_table.cpp b/engines/wintermute/base/base_string_table.cpp
index 3d9cc4f8b3..9adbbdf7be 100644
--- a/engines/wintermute/base/base_string_table.cpp
+++ b/engines/wintermute/base/base_string_table.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_string_table.h b/engines/wintermute/base/base_string_table.h
index f8808f5b27..9e915a1ad9 100644
--- a/engines/wintermute/base/base_string_table.h
+++ b/engines/wintermute/base/base_string_table.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index 38eebb067b..3a6e28b1f2 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -235,7 +235,7 @@ const char* BaseSubFrame::getSurfaceFilename() {
//////////////////////////////////////////////////////////////////////
bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, float rotate, TSpriteBlendMode blendMode) {
-
+
rotate = fmod(rotate, 360.0f);
if (rotate < 0) {
rotate += 360.0f;
@@ -271,7 +271,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
TransformStruct transform = TransformStruct(zoomX, zoomY, (uint32)rotate, _hotspotX, _hotspotY, blendMode, alpha, _mirrorX, _mirrorY, 0, 0);
Rect32 newRect = TransformTools::newRect (oldRect, transform, &newHotspot);
newOrigin = origin - newHotspot;
- res = _surface->displayTransform(newOrigin.x, newOrigin.y, oldRect, newRect, transform);
+ res = _surface->displayTransform(newOrigin.x, newOrigin.y, oldRect, newRect, transform);
} else {
if (zoomX == kDefaultZoomX && zoomY == kDefaultZoomY) {
res = _surface->displayTrans(x - _hotspotX, y - _hotspotY, getRect(), alpha, blendMode, _mirrorX, _mirrorY);
diff --git a/engines/wintermute/base/base_sub_frame.h b/engines/wintermute/base/base_sub_frame.h
index 4e164467e2..b2859fa3f3 100644
--- a/engines/wintermute/base/base_sub_frame.h
+++ b/engines/wintermute/base/base_sub_frame.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp
index f1d068674b..a2dedf66a3 100644
--- a/engines/wintermute/base/base_surface_storage.cpp
+++ b/engines/wintermute/base/base_surface_storage.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_surface_storage.h b/engines/wintermute/base/base_surface_storage.h
index c0049d676c..2bec9a0fbb 100644
--- a/engines/wintermute/base/base_surface_storage.h
+++ b/engines/wintermute/base/base_surface_storage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_transition_manager.cpp b/engines/wintermute/base/base_transition_manager.cpp
index eee5f1aae7..198dfe26ba 100644
--- a/engines/wintermute/base/base_transition_manager.cpp
+++ b/engines/wintermute/base/base_transition_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_transition_manager.h b/engines/wintermute/base/base_transition_manager.h
index 82edb9ff88..3cfc0f2028 100644
--- a/engines/wintermute/base/base_transition_manager.h
+++ b/engines/wintermute/base/base_transition_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_viewport.cpp b/engines/wintermute/base/base_viewport.cpp
index a6e8b17927..bf3700a14e 100644
--- a/engines/wintermute/base/base_viewport.cpp
+++ b/engines/wintermute/base/base_viewport.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/base_viewport.h b/engines/wintermute/base/base_viewport.h
index 0225c02c7c..eae756f9c6 100644
--- a/engines/wintermute/base/base_viewport.h
+++ b/engines/wintermute/base/base_viewport.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp
index 808dc9e00d..82a9e24dfb 100644
--- a/engines/wintermute/base/file/base_disk_file.cpp
+++ b/engines/wintermute/base/file/base_disk_file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_disk_file.h b/engines/wintermute/base/file/base_disk_file.h
index 81cc22b86d..f20629f7ec 100644
--- a/engines/wintermute/base/file/base_disk_file.h
+++ b/engines/wintermute/base/file/base_disk_file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_file.cpp b/engines/wintermute/base/file/base_file.cpp
index 42eea69824..2927c908e2 100644
--- a/engines/wintermute/base/file/base_file.cpp
+++ b/engines/wintermute/base/file/base_file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_file.h b/engines/wintermute/base/file/base_file.h
index 9acda7ffce..820b6510fd 100644
--- a/engines/wintermute/base/file/base_file.h
+++ b/engines/wintermute/base/file/base_file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_file_entry.cpp b/engines/wintermute/base/file/base_file_entry.cpp
index 846f56b55c..991d75d03d 100644
--- a/engines/wintermute/base/file/base_file_entry.cpp
+++ b/engines/wintermute/base/file/base_file_entry.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_file_entry.h b/engines/wintermute/base/file/base_file_entry.h
index 9d738c8c11..6bac3789d7 100644
--- a/engines/wintermute/base/file/base_file_entry.h
+++ b/engines/wintermute/base/file/base_file_entry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_package.cpp b/engines/wintermute/base/file/base_package.cpp
index 512279b72c..b1461283e8 100644
--- a/engines/wintermute/base/file/base_package.cpp
+++ b/engines/wintermute/base/file/base_package.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_package.h b/engines/wintermute/base/file/base_package.h
index 18156c4f65..35976eb47b 100644
--- a/engines/wintermute/base/file/base_package.h
+++ b/engines/wintermute/base/file/base_package.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_save_thumb_file.cpp b/engines/wintermute/base/file/base_save_thumb_file.cpp
index bb172ca66a..acd5363e89 100644
--- a/engines/wintermute/base/file/base_save_thumb_file.cpp
+++ b/engines/wintermute/base/file/base_save_thumb_file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/base_save_thumb_file.h b/engines/wintermute/base/file/base_save_thumb_file.h
index faf1af9255..4d9030189d 100644
--- a/engines/wintermute/base/file/base_save_thumb_file.h
+++ b/engines/wintermute/base/file/base_save_thumb_file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/file/dcpackage.h b/engines/wintermute/base/file/dcpackage.h
index a2ec5d28d5..5f21ce94ea 100644
--- a/engines/wintermute/base/file/dcpackage.h
+++ b/engines/wintermute/base/file/dcpackage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font.cpp b/engines/wintermute/base/font/base_font.cpp
index 2a394616d1..0a5f7466df 100644
--- a/engines/wintermute/base/font/base_font.cpp
+++ b/engines/wintermute/base/font/base_font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font.h b/engines/wintermute/base/font/base_font.h
index d75d3f4fb5..5f37d983cb 100644
--- a/engines/wintermute/base/font/base_font.h
+++ b/engines/wintermute/base/font/base_font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp
index 95f9a83a6a..bab2bf3df4 100644
--- a/engines/wintermute/base/font/base_font_bitmap.cpp
+++ b/engines/wintermute/base/font/base_font_bitmap.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font_bitmap.h b/engines/wintermute/base/font/base_font_bitmap.h
index 77620d8b88..c26a6ad1cb 100644
--- a/engines/wintermute/base/font/base_font_bitmap.h
+++ b/engines/wintermute/base/font/base_font_bitmap.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font_storage.cpp b/engines/wintermute/base/font/base_font_storage.cpp
index 8abd368b70..f4f7de44fc 100644
--- a/engines/wintermute/base/font/base_font_storage.cpp
+++ b/engines/wintermute/base/font/base_font_storage.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font_storage.h b/engines/wintermute/base/font/base_font_storage.h
index f4ac490324..e29675aaef 100644
--- a/engines/wintermute/base/font/base_font_storage.h
+++ b/engines/wintermute/base/font/base_font_storage.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index b879e789e3..df9a8648db 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -271,11 +271,7 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
//debugC(kWintermuteDebugFont, "%s %d %d %d %d", text.c_str(), RGBCOLGetR(_layers[0]->_color), RGBCOLGetG(_layers[0]->_color), RGBCOLGetB(_layers[0]->_color), RGBCOLGetA(_layers[0]->_color));
// void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
Graphics::Surface *surface = new Graphics::Surface();
- if (_deletableFont) { // We actually have a TTF
- surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), _gameRef->_renderer->getPixelFormat());
- } else { // We are using a fallback, they can't do 32bpp
- surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0));
- }
+ surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), _gameRef->_renderer->getPixelFormat());
uint32 useColor = 0xffffffff;
Common::Array<WideString>::iterator it;
int heightOffset = 0;
@@ -285,7 +281,6 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
}
BaseSurface *retSurface = _gameRef->_renderer->createSurface();
- Graphics::Surface *convertedSurface = surface->convertTo(_gameRef->_renderer->getPixelFormat());
if (_deletableFont) {
// Reconstruct the alpha channel of the font.
@@ -295,22 +290,20 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
// to its original alpha value.
Graphics::PixelFormat format = _gameRef->_renderer->getPixelFormat();
- uint32 *pixels = (uint32 *)convertedSurface->getPixels();
+ uint32 *pixels = (uint32 *)surface->getPixels();
// This is a Surface we created ourselves, so no empty space between rows.
for (int i = 0; i < surface->w * surface->h; ++i) {
uint8 a, r, g, b;
format.colorToRGB(*pixels, r, g, b);
a = r;
- *pixels++ = format.ARGBToColor(a, r, g, b);
+ *pixels++ = format.ARGBToColor(a, r, g, b);
}
}
- retSurface->putSurface(*convertedSurface, true);
- convertedSurface->free();
+ retSurface->putSurface(*surface, true);
surface->free();
delete surface;
- delete convertedSurface;
return retSurface;
// TODO: _isUnderline, _isBold, _isItalic, _isStriked
}
@@ -614,7 +607,7 @@ bool BaseFontTT::initFont() {
if (themeArchive->hasFile(fallbackFilename)) {
file = nullptr;
file = themeArchive->createReadStreamForMember(fallbackFilename);
- _deletableFont = Graphics::loadTTFFont(*file, 96, _fontHeight); // Use the same dpi as WME (96 vs 72).
+ _deletableFont = Graphics::loadTTFFont(*file, _fontHeight, 96); // Use the same dpi as WME (96 vs 72).
_font = _deletableFont;
}
// We're not using BaseFileManager, so clean up after ourselves:
@@ -632,6 +625,8 @@ bool BaseFontTT::initFont() {
warning("Looking for %s", fontName.c_str());
_font = FontMan.getFontByName(fontName);
}
+#else
+ warning("BaseFontTT::InitFont - FreeType2-support not compiled in, TTF-fonts will not be loaded");
#endif // USE_FREETYPE2
// Fallback4: Just use the Big GUI-font. (REALLY undesireable)
diff --git a/engines/wintermute/base/font/base_font_truetype.h b/engines/wintermute/base/font/base_font_truetype.h
index edb41a155f..c0349eccd4 100644
--- a/engines/wintermute/base/font/base_font_truetype.h
+++ b/engines/wintermute/base/font/base_font_truetype.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp
index d0dbae352e..e676fafdbf 100644
--- a/engines/wintermute/base/gfx/base_image.cpp
+++ b/engines/wintermute/base/gfx/base_image.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -29,11 +29,11 @@
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/graphics/transparent_surface.h"
-#include "graphics/decoders/png.h"
-#include "graphics/decoders/jpeg.h"
-#include "graphics/decoders/bmp.h"
-#include "graphics/decoders/tga.h"
#include "graphics/surface.h"
+#include "image/png.h"
+#include "image/jpeg.h"
+#include "image/bmp.h"
+#include "image/tga.h"
#include "common/textconsole.h"
#include "common/stream.h"
#include "common/system.h"
@@ -62,16 +62,14 @@ BaseImage::~BaseImage() {
bool BaseImage::loadFile(const Common::String &filename) {
_filename = filename;
_filename.toLowercase();
- if (filename.hasPrefix("savegame:")) {
- _decoder = new Graphics::BitmapDecoder();
+ if (filename.hasPrefix("savegame:") || _filename.hasSuffix(".bmp")) {
+ _decoder = new Image::BitmapDecoder();
} else if (_filename.hasSuffix(".png")) {
- _decoder = new Graphics::PNGDecoder();
- } else if (_filename.hasSuffix(".bmp")) {
- _decoder = new Graphics::BitmapDecoder();
+ _decoder = new Image::PNGDecoder();
} else if (_filename.hasSuffix(".tga")) {
- _decoder = new Graphics::TGADecoder();
+ _decoder = new Image::TGADecoder();
} else if (_filename.hasSuffix(".jpg")) {
- _decoder = new Graphics::JPEGDecoder();
+ _decoder = new Image::JPEGDecoder();
} else {
error("BaseImage::loadFile : Unsupported fileformat %s", filename.c_str());
}
diff --git a/engines/wintermute/base/gfx/base_image.h b/engines/wintermute/base/gfx/base_image.h
index 4b04fd1252..56be9fc453 100644
--- a/engines/wintermute/base/gfx/base_image.h
+++ b/engines/wintermute/base/gfx/base_image.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,11 +31,14 @@
#include "graphics/surface.h"
#include "graphics/pixelformat.h"
-#include "graphics/decoders/image_decoder.h"
#include "common/endian.h"
#include "common/str.h"
#include "common/stream.h"
+namespace Image {
+class ImageDecoder;
+}
+
namespace Wintermute {
class BaseSurface;
class BaseFileManager;
@@ -60,7 +63,7 @@ public:
void copyFrom(const Graphics::Surface *surface);
private:
Common::String _filename;
- Graphics::ImageDecoder *_decoder;
+ Image::ImageDecoder *_decoder;
const Graphics::Surface *_surface;
Graphics::Surface *_deletableSurface;
const byte *_palette;
diff --git a/engines/wintermute/base/gfx/base_renderer.cpp b/engines/wintermute/base/gfx/base_renderer.cpp
index 858a7fc6dc..0f33fc2c43 100644
--- a/engines/wintermute/base/gfx/base_renderer.cpp
+++ b/engines/wintermute/base/gfx/base_renderer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/base_renderer.h b/engines/wintermute/base/gfx/base_renderer.h
index b6615bc8fc..42ff2cb9e1 100644
--- a/engines/wintermute/base/gfx/base_renderer.h
+++ b/engines/wintermute/base/gfx/base_renderer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/base_surface.cpp b/engines/wintermute/base/gfx/base_surface.cpp
index 19639c0c33..ec42a63c77 100644
--- a/engines/wintermute/base/gfx/base_surface.cpp
+++ b/engines/wintermute/base/gfx/base_surface.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/base_surface.h b/engines/wintermute/base/gfx/base_surface.h
index a53748e9aa..7bd9bcbaea 100644
--- a/engines/wintermute/base/gfx/base_surface.h
+++ b/engines/wintermute/base/gfx/base_surface.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 35918b8e90..601fcc0ffa 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -268,7 +268,7 @@ Graphics::PixelFormat BaseRenderOSystem::getPixelFormat() const {
return _renderSurface->format;
}
-void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct &transform) {
+void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct &transform) {
if (_disableDirtyRects) {
RenderTicket *ticket = new RenderTicket(owner, surf, srcRect, dstRect, transform);
@@ -376,7 +376,7 @@ void BaseRenderOSystem::addDirtyRect(const Common::Rect &rect) {
void BaseRenderOSystem::drawTickets() {
RenderQueueIterator it = _renderQueue.begin();
// Clean out the old tickets
- // Note: We draw invalid tickets too, otherwise we wouldn't be honouring
+ // Note: We draw invalid tickets too, otherwise we wouldn't be honoring
// the draw request they obviously made BEFORE becoming invalid, either way
// we have a copy of their data, so their invalidness won't affect us.
while (it != _renderQueue.end()) {
@@ -402,7 +402,7 @@ void BaseRenderOSystem::drawTickets() {
it = _renderQueue.begin();
_lastFrameIter = _renderQueue.end();
// A special case: If the screen has one giant OPAQUE rect to be drawn, then we skip filling
- // the background colour. Typical use-case: Fullscreen FMVs.
+ // the background color. Typical use-case: Fullscreen FMVs.
// Caveat: The FPS-counter will invalidate this.
if (it != _lastFrameIter && _renderQueue.front() == _renderQueue.back() && (*it)->_transform._alphaDisable == true) {
// If our single opaque rect fills the dirty rect, we can skip filling.
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index 8996c8b2e8..c9b8a52282 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index c33e8ba54b..983f9c1296 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -32,10 +32,6 @@
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/platform_osystem.h"
-#include "graphics/decoders/png.h"
-#include "graphics/decoders/bmp.h"
-#include "graphics/decoders/jpeg.h"
-#include "graphics/decoders/tga.h"
#include "engines/wintermute/graphics/transparent_surface.h"
#include "engines/wintermute/graphics/transform_tools.h"
#include "graphics/pixelformat.h"
@@ -341,7 +337,7 @@ bool BaseSurfaceOSystem::display(int x, int y, Rect32 rect, TSpriteBlendMode ble
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, blendMode, alpha, mirrorX, mirrorY));
+ return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, blendMode, alpha, mirrorX, mirrorY));
}
//////////////////////////////////////////////////////////////////////////
@@ -441,13 +437,13 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect,
transform._alphaDisable = true;
}
- renderer->drawSurface(this, _surface, &srcRect, &position, transform);
+ renderer->drawSurface(this, _surface, &srcRect, &position, transform);
return STATUS_OK;
}
bool BaseSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
_loaded = true;
- if (surface.format == _surface->format && surface.w == _surface->w && surface.h == _surface->h) {
+ if (surface.format == _surface->format && surface.pitch == _surface->pitch && surface.h == _surface->h) {
const byte *src = (const byte *)surface.getBasePtr(0, 0);
byte *dst = (byte *)_surface->getBasePtr(0, 0);
memcpy(dst, src, surface.pitch * surface.h);
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
index 67f45f66db..4a05b2c66c 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
index 1cd35e3b04..f8579dfd41 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -86,9 +86,9 @@ RenderTicket::~RenderTicket() {
bool RenderTicket::operator==(const RenderTicket &t) const {
if ((t._owner != _owner) ||
- (t._transform != _transform) ||
+ (t._transform != _transform) ||
(t._dstRect != _dstRect) ||
- (t._srcRect != _srcRect)
+ (t._srcRect != _srcRect)
) {
return false;
}
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.h b/engines/wintermute/base/gfx/osystem/render_ticket.h
index e824c09fe7..de95273021 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.h
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -41,17 +41,17 @@ class BaseSurfaceOSystem;
* A render ticket is a collection of the data and draw specifications made
* for a single draw-call in the OSystem-backend for WME. The ticket additionally
* holds the order in which this call was made, so that it can be detected if
- * the same call is done in the following frame. Thus allowing us to potentially
- * skip drawing the same region again, unless anything has changed. Since a surface
- * can have a potentially large amount of draw-calls made to it, at varying rotation,
- * zoom, and crop-levels we also need to hold a copy of the necessary data.
- * (Video-surfaces may even change their data). The promise that is made when a ticket
- * is created is that what the state was of the surface at THAT point, is what will end
+ * the same call is done in the following frame. Thus allowing us to potentially
+ * skip drawing the same region again, unless anything has changed. Since a surface
+ * can have a potentially large amount of draw-calls made to it, at varying rotation,
+ * zoom, and crop-levels we also need to hold a copy of the necessary data.
+ * (Video-surfaces may even change their data). The promise that is made when a ticket
+ * is created is that what the state was of the surface at THAT point, is what will end
* up on screen at flip() time.
*/
class RenderTicket {
public:
- RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, TransformStruct transform);
+ RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, TransformStruct transform);
RenderTicket() : _isValid(true), _wantsDraw(false), _transform(TransformStruct()) {}
~RenderTicket();
const Graphics::Surface *getSurface() const { return _surface; }
@@ -65,8 +65,8 @@ public:
bool _isValid;
bool _wantsDraw;
- TransformStruct _transform;
-
+ TransformStruct _transform;
+
BaseSurfaceOSystem *_owner;
bool operator==(const RenderTicket &a) const;
const Common::Rect *getSrcRect() const { return &_srcRect; }
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index 061352b60f..c64a099cee 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/particles/part_emitter.h b/engines/wintermute/base/particles/part_emitter.h
index 94b4dc8126..3fe24b52a0 100644
--- a/engines/wintermute/base/particles/part_emitter.h
+++ b/engines/wintermute/base/particles/part_emitter.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/particles/part_force.cpp b/engines/wintermute/base/particles/part_force.cpp
index 39d98c182e..c2e0832e72 100644
--- a/engines/wintermute/base/particles/part_force.cpp
+++ b/engines/wintermute/base/particles/part_force.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/particles/part_force.h b/engines/wintermute/base/particles/part_force.h
index cdb1ce40f9..11862d08ed 100644
--- a/engines/wintermute/base/particles/part_force.h
+++ b/engines/wintermute/base/particles/part_force.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/particles/part_particle.cpp b/engines/wintermute/base/particles/part_particle.cpp
index 11470561f0..97c81e49a5 100644
--- a/engines/wintermute/base/particles/part_particle.cpp
+++ b/engines/wintermute/base/particles/part_particle.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/particles/part_particle.h b/engines/wintermute/base/particles/part_particle.h
index 281d87cf72..9019845a82 100644
--- a/engines/wintermute/base/particles/part_particle.h
+++ b/engines/wintermute/base/particles/part_particle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/save_thumb_helper.cpp b/engines/wintermute/base/save_thumb_helper.cpp
index 77514849a6..b1d9330263 100644
--- a/engines/wintermute/base/save_thumb_helper.cpp
+++ b/engines/wintermute/base/save_thumb_helper.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/save_thumb_helper.h b/engines/wintermute/base/save_thumb_helper.h
index 44792e3d75..0d32d3ed9f 100644
--- a/engines/wintermute/base/save_thumb_helper.h
+++ b/engines/wintermute/base/save_thumb_helper.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index 402041cda4..85553a2a53 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/saveload.h b/engines/wintermute/base/saveload.h
index 15d4d86b26..31f5841f41 100644
--- a/engines/wintermute/base/saveload.h
+++ b/engines/wintermute/base/saveload.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/dcscript.h b/engines/wintermute/base/scriptables/dcscript.h
index d6bb3cd176..8047baaa68 100644
--- a/engines/wintermute/base/scriptables/dcscript.h
+++ b/engines/wintermute/base/scriptables/dcscript.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index 5e4ae3ea95..f0b868209d 100644
--- a/engines/wintermute/base/scriptables/script.cpp
+++ b/engines/wintermute/base/scriptables/script.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script.h b/engines/wintermute/base/scriptables/script.h
index 488ff63606..1edeae5b55 100644
--- a/engines/wintermute/base/scriptables/script.h
+++ b/engines/wintermute/base/scriptables/script.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp
index bb819b23e4..cdf55a304c 100644
--- a/engines/wintermute/base/scriptables/script_engine.cpp
+++ b/engines/wintermute/base/scriptables/script_engine.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_engine.h b/engines/wintermute/base/scriptables/script_engine.h
index 622b3c4b94..bdb139e1f8 100644
--- a/engines/wintermute/base/scriptables/script_engine.h
+++ b/engines/wintermute/base/scriptables/script_engine.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_array.cpp b/engines/wintermute/base/scriptables/script_ext_array.cpp
index c4ad045557..7431029cbf 100644
--- a/engines/wintermute/base/scriptables/script_ext_array.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_array.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_array.h b/engines/wintermute/base/scriptables/script_ext_array.h
index e6381a011e..2daa58a241 100644
--- a/engines/wintermute/base/scriptables/script_ext_array.h
+++ b/engines/wintermute/base/scriptables/script_ext_array.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_date.cpp b/engines/wintermute/base/scriptables/script_ext_date.cpp
index 6b9c5ff68a..89cdcde0af 100644
--- a/engines/wintermute/base/scriptables/script_ext_date.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_date.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_date.h b/engines/wintermute/base/scriptables/script_ext_date.h
index 0ccf093a7b..46a23a36fa 100644
--- a/engines/wintermute/base/scriptables/script_ext_date.h
+++ b/engines/wintermute/base/scriptables/script_ext_date.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp
index dcd4f01f7c..36a624367c 100644
--- a/engines/wintermute/base/scriptables/script_ext_file.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_file.h b/engines/wintermute/base/scriptables/script_ext_file.h
index a1298929f2..4994ef9c97 100644
--- a/engines/wintermute/base/scriptables/script_ext_file.h
+++ b/engines/wintermute/base/scriptables/script_ext_file.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_math.cpp b/engines/wintermute/base/scriptables/script_ext_math.cpp
index ec53b983e7..4d770d4c51 100644
--- a/engines/wintermute/base/scriptables/script_ext_math.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_math.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_math.h b/engines/wintermute/base/scriptables/script_ext_math.h
index 1aa274a96f..5354e52f1e 100644
--- a/engines/wintermute/base/scriptables/script_ext_math.h
+++ b/engines/wintermute/base/scriptables/script_ext_math.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
index 39f8b58644..276d1fb211 100644
--- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_mem_buffer.h b/engines/wintermute/base/scriptables/script_ext_mem_buffer.h
index 4aad8b6484..740ff1d23f 100644
--- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.h
+++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_object.cpp b/engines/wintermute/base/scriptables/script_ext_object.cpp
index a72b244f0a..cf1b788ede 100644
--- a/engines/wintermute/base/scriptables/script_ext_object.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_object.h b/engines/wintermute/base/scriptables/script_ext_object.h
index 566111292a..04878be85e 100644
--- a/engines/wintermute/base/scriptables/script_ext_object.h
+++ b/engines/wintermute/base/scriptables/script_ext_object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_ext_string.cpp b/engines/wintermute/base/scriptables/script_ext_string.cpp
index 65bec03bc1..bc0c658c57 100644
--- a/engines/wintermute/base/scriptables/script_ext_string.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_string.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -298,7 +298,9 @@ bool SXString::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
uint32 start = 0;
for(uint32 i = 0; i < str.size() + 1; i++) {
- uint32 ch = str[i];
+ // The [] operator doesn't allow access to the zero code terminator
+ // (bug #6531)
+ uint32 ch = (i == str.size()) ? '\0' : str[i];
if (ch =='\0' || delims.contains(ch)) {
if (i != start) {
parts.push_back(WideString(str.c_str() + start, i - start + 1));
diff --git a/engines/wintermute/base/scriptables/script_ext_string.h b/engines/wintermute/base/scriptables/script_ext_string.h
index 7a95c59b4c..b28f2b24c1 100644
--- a/engines/wintermute/base/scriptables/script_ext_string.h
+++ b/engines/wintermute/base/scriptables/script_ext_string.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_stack.cpp b/engines/wintermute/base/scriptables/script_stack.cpp
index c828b3918e..fe765bfb68 100644
--- a/engines/wintermute/base/scriptables/script_stack.cpp
+++ b/engines/wintermute/base/scriptables/script_stack.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_stack.h b/engines/wintermute/base/scriptables/script_stack.h
index ee04485a51..fe7afae3f9 100644
--- a/engines/wintermute/base/scriptables/script_stack.h
+++ b/engines/wintermute/base/scriptables/script_stack.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_value.cpp b/engines/wintermute/base/scriptables/script_value.cpp
index 52367646a5..4b84574257 100644
--- a/engines/wintermute/base/scriptables/script_value.cpp
+++ b/engines/wintermute/base/scriptables/script_value.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/scriptables/script_value.h b/engines/wintermute/base/scriptables/script_value.h
index 90ad9f182a..6130553645 100644
--- a/engines/wintermute/base/scriptables/script_value.h
+++ b/engines/wintermute/base/scriptables/script_value.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp
index f9cd59e4fb..fa452cc0d6 100644
--- a/engines/wintermute/base/sound/base_sound.cpp
+++ b/engines/wintermute/base/sound/base_sound.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/sound/base_sound.h b/engines/wintermute/base/sound/base_sound.h
index 0a984d240a..ceeb81c1bf 100644
--- a/engines/wintermute/base/sound/base_sound.h
+++ b/engines/wintermute/base/sound/base_sound.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp
index 85ba52e334..7ec68ea752 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.cpp
+++ b/engines/wintermute/base/sound/base_sound_buffer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/sound/base_sound_buffer.h b/engines/wintermute/base/sound/base_sound_buffer.h
index c52b34fb23..94bc8dc6ad 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.h
+++ b/engines/wintermute/base/sound/base_sound_buffer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 68e62f25b0..539dc0dd1d 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/sound/base_sound_manager.h b/engines/wintermute/base/sound/base_sound_manager.h
index 5993a05001..30d943c264 100644
--- a/engines/wintermute/base/sound/base_sound_manager.h
+++ b/engines/wintermute/base/sound/base_sound_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/timer.cpp b/engines/wintermute/base/timer.cpp
index f1f79af760..c2ecc1469a 100644
--- a/engines/wintermute/base/timer.cpp
+++ b/engines/wintermute/base/timer.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/base/timer.h b/engines/wintermute/base/timer.h
index 4099c6c825..768bea4253 100644
--- a/engines/wintermute/base/timer.h
+++ b/engines/wintermute/base/timer.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/coll_templ.h b/engines/wintermute/coll_templ.h
index 307989e58d..74e266168f 100644
--- a/engines/wintermute/coll_templ.h
+++ b/engines/wintermute/coll_templ.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h
index 3db443965e..78503b8c3b 100644
--- a/engines/wintermute/dcgf.h
+++ b/engines/wintermute/dcgf.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/dctypes.h b/engines/wintermute/dctypes.h
index 4371ee4889..33e1cc4018 100644
--- a/engines/wintermute/dctypes.h
+++ b/engines/wintermute/dctypes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/debugger.cpp b/engines/wintermute/debugger.cpp
index 8c8b8255ab..51fd74e300 100644
--- a/engines/wintermute/debugger.cpp
+++ b/engines/wintermute/debugger.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/debugger.h b/engines/wintermute/debugger.h
index 6fbbb084f0..625da0ce41 100644
--- a/engines/wintermute/debugger.h
+++ b/engines/wintermute/debugger.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index f4bd437803..a659c434d0 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -107,11 +107,11 @@ public:
}
}
// Prefix to avoid collisions with actually known games
- name = "wmefan-" + name;
+ name = "wmeunk-" + name;
Common::strlcpy(s_fallbackGameIdBuf, name.c_str(), sizeof(s_fallbackGameIdBuf) - 1);
s_fallbackDesc.gameid = s_fallbackGameIdBuf;
if (caption != name) {
- caption += " (fangame) ";
+ caption += " (unknown version) ";
char *offset = s_fallbackGameIdBuf + name.size() + 1;
uint32 remainingLength = (sizeof(s_fallbackGameIdBuf) - 1) - (name.size() + 1);
Common::strlcpy(offset, caption.c_str(), remainingLength);
@@ -185,7 +185,7 @@ public:
} // End of namespace Wintermute
#if PLUGIN_ENABLED_DYNAMIC(WINTERMUTE)
-REGISTER_PLUGIN_DYNAMIC(WINTERMUTE, PLUGIN_TYPE_ENGINE, Wintermute::WintermuteMetaEngine);
+ REGISTER_PLUGIN_DYNAMIC(WINTERMUTE, PLUGIN_TYPE_ENGINE, Wintermute::WintermuteMetaEngine);
#else
-REGISTER_PLUGIN_STATIC(WINTERMUTE, PLUGIN_TYPE_ENGINE, Wintermute::WintermuteMetaEngine);
+ REGISTER_PLUGIN_STATIC(WINTERMUTE, PLUGIN_TYPE_ENGINE, Wintermute::WintermuteMetaEngine);
#endif
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index e7f2ed90a9..6556d3b34a 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -38,6 +38,7 @@ static const PlainGameDescriptor wintermuteGames[] = {
{"carolreed8", "Carol Reed 8 - Amber's Blood"},
{"carolreed9", "Carol Reed 9 - Cold Case Summer"},
{"chivalry", "Chivalry is Not Dead"},
+ {"corrosion", "Corrosion: Cold Winter Waiting"},
{"deadcity", "Dead City"},
{"dreaming", "Des Reves Elastiques Avec Mille Insectes Nommes Georges"},
{"dirtysplit", "Dirty Split"},
@@ -58,6 +59,8 @@ static const PlainGameDescriptor wintermuteGames[] = {
{"projectdoom", "Project: Doom"},
{"reversion1", "Reversion: The Escape"},
{"reversion2", "Reversion: The Meeting"},
+ {"rhiannon", "Rhiannon: Curse of the four Branches"},
+ {"ritter", "1 1/2 Ritter: Auf der Suche nach der hinreissenden Herzelinde"},
{"rosemary", "Rosemary"},
{"securanote", "Securanote"},
{"shaban", "Shaban"},
@@ -70,6 +73,7 @@ static const PlainGameDescriptor wintermuteGames[] = {
{"twc", "the white chamber"},
{"wintermute", "Wintermute engine game"},
{"wtetris", "Wilma Tetris"},
+ {"zilm", "Zilm: A Game of Reflex"},
{0, 0}
};
@@ -124,6 +128,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Bickadoodle (download from http://aethericgames.com/games/bickadoodle/download-bickadoodle/)
+ {
+ "bickadoodle",
+ "",
+ AD_ENTRY1s("data.dcp", "1584d83577c32add0fce27fae91141a2", 35337728),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Book of Gron Part One
{
"bookofgron",
@@ -237,6 +251,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING,
GUIO0()
},
+ // Corrosion: Cold Winter Waiting
+ {
+ "corrosion",
+ "",
+ AD_ENTRY1s("data.dcp", "ae885b1a8faa0b27f43c0e8f0df02fc9", 525931618),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_TESTING,
+ GUIO0()
+ },
// Dead City (Czech)
{
"deadcity",
@@ -428,7 +452,21 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
- // Ghosts in the Sheet
+ // Ghost in the Sheet
+ {
+ "ghostsheet",
+ "",
+ {
+ {"english.dcp", 0, "e6d0aad2c89996bcabe416105a3d6d3a", 12221017},
+ {"data.dcp", 0, "b2f8b05328e4881e15e98e845b63f451", 168003},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Ghost in the Sheet (Demo)
{
"ghostsheet",
"Demo",
@@ -530,6 +568,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // J.U.L.I.A. (English, Bundle in a box-version)
+ {
+ "julia",
+ "Version 1.2",
+ AD_ENTRY1s("data.dcp", "fe90023ccc22f35185b40b910e0d03a2", 10101373),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// J.U.L.I.A. (English) (Demo)
{
"julia",
@@ -996,6 +1044,56 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Reversion: The Meeting Version 2.0.2412 (Chinese)
+ {
+ "reversion2",
+ "Version 2.0.2412",
+ {
+ {"data.dcp", 0, "f4ffc4df24b7bebad56a24930f33a2bc", 255766600},
+ {"xlanguage_nz.dcp", 0, "17c79af4928e24484bee77a7e807cc2a", 10737127},
+ {"Linux.dcp", 0, "21858bd77dc86b03f701fd47900e2f51", 984535},
+ AD_LISTEND
+ },
+ Common::ZH_CNA,
+ Common::kPlatformLinux,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Meeting Version 2.0.2412 (English)
+ {
+ "reversion2",
+ "Version 2.0.2412",
+ {
+ {"data.dcp", 0, "f4ffc4df24b7bebad56a24930f33a2bc", 255766600},
+ {"xlanguage_en.dcp", 0, "0598bf752ce93b42bcaf1094df537c7b", 8533057},
+ {"Linux.dcp", 0, "21858bd77dc86b03f701fd47900e2f51", 984535},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformLinux,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Rhiannon: Curse of the four Branches
+ {
+ "rhiannon",
+ "",
+ AD_ENTRY1s("data.dcp", "870f348900b735f1cc79c0608ce32b0e", 1046169851),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // 1 1/2 Ritter: Auf der Suche nach der hinreissenden Herzelinde
+ {
+ "ritter",
+ "",
+ AD_ENTRY1s("data.dcp", "5ac416cee605d3a30f4d59687b1cdab2", 364260278),
+ Common::DE_DEU,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Rosemary
{
"rosemary",
@@ -1108,6 +1206,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Zilm: A Game of Reflex 1.0
+ {
+ "Zilm",
+ "1.0",
+ AD_ENTRY1s("data.dcp", "098dffaf03d8adbb4cb5633e4733e63c", 351726),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
AD_TABLE_END_MARKER
};
diff --git a/engines/wintermute/graphics/transform_struct.cpp b/engines/wintermute/graphics/transform_struct.cpp
index 822c06f42f..9483975d94 100644
--- a/engines/wintermute/graphics/transform_struct.cpp
+++ b/engines/wintermute/graphics/transform_struct.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -40,47 +40,47 @@ void TransformStruct::init(Point32 zoom, uint32 angle, Point32 hotspot, bool alp
}
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) {
- init(Point32(zoomX, zoomY),
- angle,
- Point32(hotspotX, hotspotY),
- false,
- blendMode,
- rgbaMod,
- mirrorX, mirrorY,
+ init(Point32(zoomX, zoomY),
+ angle,
+ Point32(hotspotX, hotspotY),
+ false,
+ blendMode,
+ rgbaMod,
+ mirrorX, mirrorY,
Point32(offsetX, offsetY));
}
TransformStruct::TransformStruct(float zoomX, float zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) {
- init(Point32((int32)(zoomX / 100.0 * kDefaultZoomX),
- (int32)(zoomY / 100.0 * kDefaultZoomY)),
- angle,
- Point32(hotspotX, hotspotY),
- false,
- blendMode,
- rgbaMod,
- mirrorX, mirrorY,
+ init(Point32((int32)(zoomX / 100.0 * kDefaultZoomX),
+ (int32)(zoomY / 100.0 * kDefaultZoomY)),
+ angle,
+ Point32(hotspotX, hotspotY),
+ false,
+ blendMode,
+ rgbaMod,
+ mirrorX, mirrorY,
Point32(offsetX, offsetY));
}
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY) {
- init(Point32(zoomX, zoomY),
- kDefaultAngle,
- Point32(kDefaultHotspotX, kDefaultHotspotY),
- false,
- blendMode,
- rgbaMod,
- mirrorX,
- mirrorY,
+ init(Point32(zoomX, zoomY),
+ kDefaultAngle,
+ Point32(kDefaultHotspotX, kDefaultHotspotY),
+ false,
+ blendMode,
+ rgbaMod,
+ mirrorX,
+ mirrorY,
Point32(kDefaultOffsetX, kDefaultOffsetY));
}
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY) {
- init(Point32(zoomX, zoomY),
- angle,
- Point32(hotspotX, hotspotY),
- true,
- BLEND_NORMAL,
- kDefaultRgbaMod,
+ init(Point32(zoomX, zoomY),
+ angle,
+ Point32(hotspotX, hotspotY),
+ true,
+ BLEND_NORMAL,
+ kDefaultRgbaMod,
false, false,
Point32(kDefaultOffsetX, kDefaultOffsetY));
}
@@ -99,13 +99,13 @@ TransformStruct::TransformStruct(int32 numTimesX, int32 numTimesY) {
}
TransformStruct::TransformStruct() {
- init(Point32(kDefaultZoomX, kDefaultZoomY),
- kDefaultAngle,
- Point32(kDefaultHotspotX, kDefaultHotspotY),
- true,
- BLEND_NORMAL,
- kDefaultRgbaMod,
- false, false,
+ init(Point32(kDefaultZoomX, kDefaultZoomY),
+ kDefaultAngle,
+ Point32(kDefaultHotspotX, kDefaultHotspotY),
+ true,
+ BLEND_NORMAL,
+ kDefaultRgbaMod,
+ false, false,
Point32(kDefaultOffsetX, kDefaultOffsetY));
}
diff --git a/engines/wintermute/graphics/transform_struct.h b/engines/wintermute/graphics/transform_struct.h
index d5a03ea331..f80b0967cb 100644
--- a/engines/wintermute/graphics/transform_struct.h
+++ b/engines/wintermute/graphics/transform_struct.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/graphics/transform_tools.cpp b/engines/wintermute/graphics/transform_tools.cpp
index dc92cdbbfd..7a009c26fa 100644
--- a/engines/wintermute/graphics/transform_tools.cpp
+++ b/engines/wintermute/graphics/transform_tools.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/graphics/transform_tools.h b/engines/wintermute/graphics/transform_tools.h
index 9a73e3b69f..e259db04e5 100644
--- a/engines/wintermute/graphics/transform_tools.h
+++ b/engines/wintermute/graphics/transform_tools.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 79722439bd..5fe0d13766 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -84,20 +84,23 @@ void BlenderAdditive::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *o
if (ina == 0) {
return;
} else {
- if (*cb != 255)
+ if (*cb != 255) {
*outb = MIN(*outb + ((inb * (*cb) * ina) >> 16), 255);
- else
+ } else {
*outb = MIN(*outb + (inb * ina >> 8), 255);
+ }
- if (*cg != 255)
+ if (*cg != 255) {
*outg = MIN(*outg + ((ing * (*cg) * ina) >> 16), 255);
- else
+ } else {
*outg = MIN(*outg + (ing * ina >> 8), 255);
+ }
- if (*cr != 255)
+ if (*cr != 255) {
*outr = MIN(*outr + ((inr * (*cr) * ina) >> 16), 255);
- else
+ } else {
*outr = MIN(*outr + (inr * ina >> 8), 255);
+ }
}
}
@@ -120,20 +123,23 @@ void BlenderSubtractive::blendPixel(byte ina, byte inr, byte ing, byte inb, byte
if (ina == 0) {
return;
} else {
- if (*cb != 255)
+ if (*cb != 255) {
*outb = MAX(*outb - ((inb * (*cb) * (*outb) * ina) >> 24), 0);
- else
+ } else {
*outb = MAX(*outb - (inb * (*outb) * ina >> 16), 0);
+ }
- if (*cg != 255)
+ if (*cg != 255) {
*outg = MAX(*outg - ((ing * (*cg) * (*outg) * ina) >> 24), 0);
- else
+ } else {
*outg = MAX(*outg - (ing * (*outg) * ina >> 16), 0);
+ }
- if (*cr != 255)
- *outr = MAX(*outr - ((inr * (*cr) * (*outr) * ina) >> 24), 0);
- else
+ if (*cr != 255) {
+ *outr = MAX(*outr - ((inr * (*cr) * (*outr) * ina) >> 24), 0);
+ } else {
*outr = MAX(*outr - (inr * (*outr) * ina >> 16), 0);
+ }
}
}
@@ -152,20 +158,23 @@ void BlenderNormal::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *out
if (ina == 0) {
return;
} else if (ina == 255) {
- if (*cb != 255)
+ if (*cb != 255) {
*outb = (inb * (*cb)) >> 8;
- else
+ } else {
*outb = inb;
+ }
- if (*cr != 255)
+ if (*cr != 255) {
*outr = (inr * (*cr)) >> 8;
- else
+ } else {
*outr = inr;
+ }
- if (*cg != 255)
+ if (*cg != 255) {
*outg = (ing * (*cg)) >> 8;
- else
+ } else {
*outg = ing;
+ }
*outa = ina;
@@ -178,26 +187,29 @@ void BlenderNormal::blendPixel(byte ina, byte inr, byte ing, byte inb, byte *out
*outr = (*outr * (255 - ina) >> 8);
*outg = (*outg * (255 - ina) >> 8);
- if (*cb == 0)
+ if (*cb == 0) {
*outb = *outb;
- else if (*cb != 255)
+ } else if (*cb != 255) {
*outb = *outb + (inb * ina * (*cb) >> 16);
- else
+ } else {
*outb = *outb + (inb * ina >> 8);
+ }
- if (*cr == 0)
+ if (*cr == 0) {
*outr = *outr;
- else if (*cr != 255)
+ } else if (*cr != 255) {
*outr = *outr + (inr * ina * (*cr) >> 16);
- else
+ } else {
*outr = *outr + (inr * ina >> 8);
+ }
- if (*cg == 0)
+ if (*cg == 0) {
*outg = *outg;
- else if (*cg != 255)
+ } else if (*cg != 255) {
*outg = *outg + (ing * ina * (*cg) >> 16);
- else
+ } else {
*outg = *outg + (ing * ina >> 8);
+ }
return;
}
@@ -356,7 +368,7 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
* @color colormod in 0xAARRGGBB format - 0xFFFFFFFF for no colormod
*/
-template<class Blender>
+template<class Blender>
void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) {
Blender b;
byte *in;
@@ -375,10 +387,10 @@ void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, in
byte *outb = &out[TransparentSurface::kBIndex];
b.blendPixel(in[TransparentSurface::kAIndex],
- in[TransparentSurface::kRIndex],
- in[TransparentSurface::kGIndex],
- in[TransparentSurface::kBIndex],
- outa, outr, outg, outb);
+ in[TransparentSurface::kRIndex],
+ in[TransparentSurface::kGIndex],
+ in[TransparentSurface::kBIndex],
+ outa, outr, outg, outb);
in += inStep;
out += 4;
@@ -404,10 +416,10 @@ void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, in
byte *outb = &out[TransparentSurface::kBIndex];
b.blendPixel(in[TransparentSurface::kAIndex],
- in[TransparentSurface::kRIndex],
- in[TransparentSurface::kGIndex],
- in[TransparentSurface::kBIndex],
- outa, outr, outg, outb, &ca, &cr, &cg, &cb);
+ in[TransparentSurface::kRIndex],
+ in[TransparentSurface::kGIndex],
+ in[TransparentSurface::kBIndex],
+ outa, outr, outg, outb, &ca, &cr, &cg, &cb);
in += inStep;
out += 4;
}
@@ -427,8 +439,9 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
// Check if we need to draw anything at all
int ca = (color >> 24) & 0xff;
- if (ca == 0)
+ if (ca == 0) {
return retSize;
+ }
// Create an encapsulating surface for the data
TransparentSurface srcImage(*this, false);
@@ -456,17 +469,19 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
srcImage.h = pPartRect->height();
debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %08x, %d, %d)", posX, posY, flipping,
- pPartRect->left, pPartRect->top, pPartRect->width(), pPartRect->height(), color, width, height);
+ pPartRect->left, pPartRect->top, pPartRect->width(), pPartRect->height(), color, width, height);
} else {
debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %08x, %d, %d)", posX, posY, flipping, 0, 0,
- srcImage.w, srcImage.h, color, width, height);
+ srcImage.w, srcImage.h, color, width, height);
}
- if (width == -1)
+ if (width == -1) {
width = srcImage.w;
- if (height == -1)
+ }
+ if (height == -1) {
height = srcImage.h;
+ }
#ifdef SCALING_TESTING
// Hardcode scaling to 66% to test scaling
@@ -516,7 +531,7 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
yp = img->h - 1;
}
- byte *ino= (byte *)img->getBasePtr(xp, yp);
+ byte *ino = (byte *)img->getBasePtr(xp, yp);
byte *outo = (byte *)target.getBasePtr(posX, posY);
if (color == 0xFFFFFFFF && blendMode == BLEND_NORMAL && _alphaMode == ALPHA_OPAQUE) {
@@ -649,8 +664,9 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
target->create((uint16)dstW, (uint16)dstH, this->format);
- if (transform._zoom.x == 0 || transform._zoom.y == 0)
+ if (transform._zoom.x == 0 || transform._zoom.y == 0) {
return target;
+ }
uint32 invAngle = 360 - (transform._angle % 360);
float invCos = cos(invAngle * M_PI / 180.0);
@@ -684,8 +700,12 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
for (int x = 0; x < dstW; x++) {
int dx = (sdx >> 16);
int dy = (sdy >> 16);
- if (flipx) dx = sw - dx;
- if (flipy) dy = sh - dy;
+ if (flipx) {
+ dx = sw - dx;
+ }
+ if (flipy) {
+ dy = sh - dy;
+ }
#ifdef ENABLE_BILINEAR
if ((dx > -1) && (dy > -1) && (dx < sw) && (dy < sh)) {
@@ -694,7 +714,7 @@ TransparentSurface *TransparentSurface::rotoscale(const TransformStruct &transfo
c00 = *sp;
sp += 1;
c01 = *sp;
- sp += (this->pitch/4);
+ sp += (this->pitch / 4);
c11 = *sp;
sp -= 1;
c10 = *sp;
@@ -764,12 +784,12 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
bool flipx = false, flipy = false; // TODO: See mirroring comment in RenderTicket ctor
- int *sax = new int[dstW+1];
- int *say = new int[dstH+1];
+ int *sax = new int[dstW + 1];
+ int *say = new int[dstH + 1];
assert(sax && say);
/*
- * Precalculate row increments
+ * Precalculate row increments
*/
int spixelw = (srcW - 1);
int spixelh = (srcH - 1);
@@ -789,8 +809,8 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
csx += sx;
/* Guard from overflows */
- if (csx > ssx) {
- csx = ssx;
+ if (csx > ssx) {
+ csx = ssx;
}
}
@@ -808,14 +828,16 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
}
}
- const tColorRGBA *sp = (const tColorRGBA *) getBasePtr(0,0);
- tColorRGBA *dp = (tColorRGBA *) target->getBasePtr(0,0);
+ const tColorRGBA *sp = (const tColorRGBA *) getBasePtr(0, 0);
+ tColorRGBA *dp = (tColorRGBA *) target->getBasePtr(0, 0);
int spixelgap = srcW;
- if (flipx)
+ if (flipx) {
sp += spixelw;
- if (flipy)
+ }
+ if (flipy) {
sp += spixelgap * spixelh;
+ }
csay = say;
for (int y = 0; y < dstH; y++) {
@@ -835,10 +857,11 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
c01 = sp;
c10 = sp;
if (cy < spixelh) {
- if (flipy)
+ if (flipy) {
c10 -= spixelgap;
- else
+ } else {
c10 += spixelgap;
+ }
}
c11 = c10;
if (cx < spixelw) {
@@ -874,10 +897,11 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
int *salastx = csax;
csax++;
int sstepx = (*csax >> 16) - (*salastx >> 16);
- if (flipx)
+ if (flipx) {
sp -= sstepx;
- else
+ } else {
sp += sstepx;
+ }
/*
* Advance destination pointer x
@@ -891,10 +915,11 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
csay++;
int sstepy = (*csay >> 16) - (*salasty >> 16);
sstepy *= spixelgap;
- if (flipy)
+ if (flipy) {
sp = csp - sstepy;
- else
+ } else {
sp = csp + sstepy;
+ }
}
delete[] sax;
@@ -903,14 +928,16 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight)
#else
int *scaleCacheX = new int[dstW];
- for (int x = 0; x < dstW; x++)
+ for (int x = 0; x < dstW; x++) {
scaleCacheX[x] = (x * srcW) / dstW;
+ }
for (int y = 0; y < dstH; y++) {
uint32 *destP = (uint32 *)target->getBasePtr(0, y);
const uint32 *srcP = (const uint32 *)getBasePtr(0, (y * srcH) / dstH);
- for (int x = 0; x < dstW; x++)
+ for (int x = 0; x < dstW; x++) {
*destP++ = srcP[scaleCacheX[x]];
+ }
}
delete[] scaleCacheX;
diff --git a/engines/wintermute/graphics/transparent_surface.h b/engines/wintermute/graphics/transparent_surface.h
index 1f3827d1a9..4ad9bf07eb 100644
--- a/engines/wintermute/graphics/transparent_surface.h
+++ b/engines/wintermute/graphics/transparent_surface.h
@@ -17,6 +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#ifndef GRAPHICS_TRANSPARENTSURFACE_H
@@ -73,17 +74,17 @@ struct TransparentSurface : public Graphics::Surface {
ALPHA_FULL = 2
};
- #ifdef SCUMM_LITTLE_ENDIAN
+#ifdef SCUMM_LITTLE_ENDIAN
static const int kAIndex = 0;
static const int kBIndex = 1;
static const int kGIndex = 2;
static const int kRIndex = 3;
- #else
+#else
static const int kAIndex = 3;
static const int kBIndex = 2;
static const int kGIndex = 1;
static const int kRIndex = 0;
- #endif
+#endif
static const int kBShift = 8;//img->format.bShift;
static const int kGShift = 16;//img->format.gShift;
@@ -131,13 +132,13 @@ struct TransparentSurface : public Graphics::Surface {
int width = -1, int height = -1,
TSpriteBlendMode blend = BLEND_NORMAL);
void applyColorKey(uint8 r, uint8 g, uint8 b, bool overwriteAlpha = false);
-
+
/**
* @brief Scale function; this returns a transformed version of this surface after rotation and
* scaling. Please do not use this if angle != 0, use rotoscale.
*
* @param newWidth the resulting width.
- * @param newHeight the resulting height.
+ * @param newHeight the resulting height.
* @see TransformStruct
*/
TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const;
@@ -147,7 +148,7 @@ struct TransparentSurface : public Graphics::Surface {
* scaling. Please do not use this if angle == 0, use plain old scaling function.
*
* @param transform a TransformStruct wrapping the required info. @see TransformStruct
- *
+ *
*/
TransparentSurface *rotoscale(const TransformStruct &transform) const;
AlphaType getAlphaMode() const;
diff --git a/engines/wintermute/math/floatpoint.h b/engines/wintermute/math/floatpoint.h
index 0c47ef09d7..77cd9980b9 100644
--- a/engines/wintermute/math/floatpoint.h
+++ b/engines/wintermute/math/floatpoint.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/math_util.cpp b/engines/wintermute/math/math_util.cpp
index 903cea6d39..ed2b932693 100644
--- a/engines/wintermute/math/math_util.cpp
+++ b/engines/wintermute/math/math_util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/math_util.h b/engines/wintermute/math/math_util.h
index 41a7a43e2e..30b58baa39 100644
--- a/engines/wintermute/math/math_util.h
+++ b/engines/wintermute/math/math_util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/matrix4.cpp b/engines/wintermute/math/matrix4.cpp
index 011766f510..dff4301df3 100644
--- a/engines/wintermute/math/matrix4.cpp
+++ b/engines/wintermute/math/matrix4.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/matrix4.h b/engines/wintermute/math/matrix4.h
index 4198b50484..245fb4a4a0 100644
--- a/engines/wintermute/math/matrix4.h
+++ b/engines/wintermute/math/matrix4.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/rect32.h b/engines/wintermute/math/rect32.h
index a4a64690e2..93b5c68a30 100644
--- a/engines/wintermute/math/rect32.h
+++ b/engines/wintermute/math/rect32.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/vector2.cpp b/engines/wintermute/math/vector2.cpp
index 618ee9bda9..a88edb1e6f 100644
--- a/engines/wintermute/math/vector2.cpp
+++ b/engines/wintermute/math/vector2.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/math/vector2.h b/engines/wintermute/math/vector2.h
index e4ba97c517..65aa6961f8 100644
--- a/engines/wintermute/math/vector2.h
+++ b/engines/wintermute/math/vector2.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk
index 95f9ba2ffb..19fb3d6717 100644
--- a/engines/wintermute/module.mk
+++ b/engines/wintermute/module.mk
@@ -1,5 +1,5 @@
MODULE := engines/wintermute
-
+
MODULE_OBJS := \
ad/ad_actor.o \
ad/ad_entity.o \
@@ -116,14 +116,14 @@ MODULE_OBJS := \
debugger.o \
wintermute.o \
persistent.o
-
+
MODULE_DIRS += \
engines/wintermute
-
+
# This module can be built as a plugin
ifeq ($(ENABLE_WINTERMUTE), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
-
-# Include common rules
+
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/wintermute/persistent.cpp b/engines/wintermute/persistent.cpp
index 514fd61d34..558fb82a0f 100644
--- a/engines/wintermute/persistent.cpp
+++ b/engines/wintermute/persistent.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/persistent.h b/engines/wintermute/persistent.h
index ddc0791054..202a0fcda6 100644
--- a/engines/wintermute/persistent.h
+++ b/engines/wintermute/persistent.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp
index 9fa23c6074..e18051f43f 100644
--- a/engines/wintermute/platform_osystem.cpp
+++ b/engines/wintermute/platform_osystem.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/platform_osystem.h b/engines/wintermute/platform_osystem.h
index 16d55745b9..dd18f99038 100644
--- a/engines/wintermute/platform_osystem.h
+++ b/engines/wintermute/platform_osystem.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/system/sys_class.cpp b/engines/wintermute/system/sys_class.cpp
index 0577f29e2c..4152b6fa7d 100644
--- a/engines/wintermute/system/sys_class.cpp
+++ b/engines/wintermute/system/sys_class.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/system/sys_class.h b/engines/wintermute/system/sys_class.h
index 9fb3f70696..a86f476f70 100644
--- a/engines/wintermute/system/sys_class.h
+++ b/engines/wintermute/system/sys_class.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/system/sys_class_registry.cpp b/engines/wintermute/system/sys_class_registry.cpp
index 20e4661efb..825fd8f32a 100644
--- a/engines/wintermute/system/sys_class_registry.cpp
+++ b/engines/wintermute/system/sys_class_registry.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/system/sys_class_registry.h b/engines/wintermute/system/sys_class_registry.h
index 48a6738ffb..a9c7e641db 100644
--- a/engines/wintermute/system/sys_class_registry.h
+++ b/engines/wintermute/system/sys_class_registry.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/system/sys_instance.cpp b/engines/wintermute/system/sys_instance.cpp
index b8e5c9b50a..490324167f 100644
--- a/engines/wintermute/system/sys_instance.cpp
+++ b/engines/wintermute/system/sys_instance.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/system/sys_instance.h b/engines/wintermute/system/sys_instance.h
index 115de28094..7f6661eb0e 100644
--- a/engines/wintermute/system/sys_instance.h
+++ b/engines/wintermute/system/sys_instance.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_button.cpp b/engines/wintermute/ui/ui_button.cpp
index 7526174b64..12ecfe152d 100644
--- a/engines/wintermute/ui/ui_button.cpp
+++ b/engines/wintermute/ui/ui_button.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_button.h b/engines/wintermute/ui/ui_button.h
index 6452cfc4f7..2e4fa8486b 100644
--- a/engines/wintermute/ui/ui_button.h
+++ b/engines/wintermute/ui/ui_button.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_edit.cpp b/engines/wintermute/ui/ui_edit.cpp
index 1f224c79c8..ffe8d66b4d 100644
--- a/engines/wintermute/ui/ui_edit.cpp
+++ b/engines/wintermute/ui/ui_edit.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_edit.h b/engines/wintermute/ui/ui_edit.h
index 19ea5ecc5d..ea110a74a8 100644
--- a/engines/wintermute/ui/ui_edit.h
+++ b/engines/wintermute/ui/ui_edit.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_entity.cpp b/engines/wintermute/ui/ui_entity.cpp
index 0dbf8df00b..9e1e2a28e5 100644
--- a/engines/wintermute/ui/ui_entity.cpp
+++ b/engines/wintermute/ui/ui_entity.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_entity.h b/engines/wintermute/ui/ui_entity.h
index 63f0026412..b1ea2d579f 100644
--- a/engines/wintermute/ui/ui_entity.h
+++ b/engines/wintermute/ui/ui_entity.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_object.cpp b/engines/wintermute/ui/ui_object.cpp
index c04c7cbd28..194943add8 100644
--- a/engines/wintermute/ui/ui_object.cpp
+++ b/engines/wintermute/ui/ui_object.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h
index ecbaebcee6..e7c0d56eb8 100644
--- a/engines/wintermute/ui/ui_object.h
+++ b/engines/wintermute/ui/ui_object.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_text.cpp b/engines/wintermute/ui/ui_text.cpp
index b255e6e790..18b134a338 100644
--- a/engines/wintermute/ui/ui_text.cpp
+++ b/engines/wintermute/ui/ui_text.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_text.h b/engines/wintermute/ui/ui_text.h
index c39260b228..d82ae9a1a2 100644
--- a/engines/wintermute/ui/ui_text.h
+++ b/engines/wintermute/ui/ui_text.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_tiled_image.cpp b/engines/wintermute/ui/ui_tiled_image.cpp
index e895477a36..caa93df21c 100644
--- a/engines/wintermute/ui/ui_tiled_image.cpp
+++ b/engines/wintermute/ui/ui_tiled_image.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_tiled_image.h b/engines/wintermute/ui/ui_tiled_image.h
index fa92c46781..916353af2d 100644
--- a/engines/wintermute/ui/ui_tiled_image.h
+++ b/engines/wintermute/ui/ui_tiled_image.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp
index 842bf700b5..9f3cdeaaa3 100644
--- a/engines/wintermute/ui/ui_window.cpp
+++ b/engines/wintermute/ui/ui_window.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/ui/ui_window.h b/engines/wintermute/ui/ui_window.h
index 6b4d970581..dad8c89e6c 100644
--- a/engines/wintermute/ui/ui_window.h
+++ b/engines/wintermute/ui/ui_window.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/utils/path_util.cpp b/engines/wintermute/utils/path_util.cpp
index ee8b298562..71311713af 100644
--- a/engines/wintermute/utils/path_util.cpp
+++ b/engines/wintermute/utils/path_util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/utils/path_util.h b/engines/wintermute/utils/path_util.h
index 2c7dfa99d1..264dc5d241 100644
--- a/engines/wintermute/utils/path_util.h
+++ b/engines/wintermute/utils/path_util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp
index 702dd04c27..82d4fe6902 100644
--- a/engines/wintermute/utils/string_util.cpp
+++ b/engines/wintermute/utils/string_util.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/utils/string_util.h b/engines/wintermute/utils/string_util.h
index 14c40fcb2b..431d401d96 100644
--- a/engines/wintermute/utils/string_util.h
+++ b/engines/wintermute/utils/string_util.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index 8fa6313ba6..d592019418 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/utils/utils.h b/engines/wintermute/utils/utils.h
index 6c804ff01e..4ee875fb06 100644
--- a/engines/wintermute/utils/utils.h
+++ b/engines/wintermute/utils/utils.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/video/video_player.cpp b/engines/wintermute/video/video_player.cpp
index f18311c3e1..5a71b04377 100644
--- a/engines/wintermute/video/video_player.cpp
+++ b/engines/wintermute/video/video_player.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/video/video_player.h b/engines/wintermute/video/video_player.h
index 51c6bf41d3..8812e2597b 100644
--- a/engines/wintermute/video/video_player.h
+++ b/engines/wintermute/video/video_player.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp
index 299b64f915..e1553580ec 100644
--- a/engines/wintermute/video/video_theora_player.cpp
+++ b/engines/wintermute/video/video_theora_player.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -127,6 +127,7 @@ bool VideoTheoraPlayer::initialize(const Common::String &filename, const Common:
#if defined (USE_THEORADEC)
_theoraDecoder = new Video::TheoraDecoder();
#else
+ warning("VideoTheoraPlayer::initialize - Theora support not compiled in, video will be skipped: %s", filename.c_str());
return STATUS_FAILED;
#endif
_theoraDecoder->loadStream(_file);
@@ -305,7 +306,7 @@ bool VideoTheoraPlayer::update() {
if (!_theoraDecoder->endOfVideo() && _theoraDecoder->getTimeToNextFrame() == 0) {
const Graphics::Surface *decodedFrame = _theoraDecoder->decodeNextFrame();
if (decodedFrame) {
- if (decodedFrame->format == _surface.format && decodedFrame->w == _surface.w && decodedFrame->h == _surface.h) {
+ if (decodedFrame->format == _surface.format && decodedFrame->pitch == _surface.pitch && decodedFrame->h == _surface.h) {
const byte *src = (const byte *)decodedFrame->getBasePtr(0, 0);
byte *dst = (byte *)_surface.getBasePtr(0, 0);
memcpy(dst, src, _surface.pitch * _surface.h);
diff --git a/engines/wintermute/video/video_theora_player.h b/engines/wintermute/video/video_theora_player.h
index 7b28a71e17..8274a1444f 100644
--- a/engines/wintermute/video/video_theora_player.h
+++ b/engines/wintermute/video/video_theora_player.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 0a6be4caf8..81b6e53c9f 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -365,6 +365,17 @@ bool WintermuteEngine::getGameInfo(const Common::FSList &fslist, Common::String
name = value;
} else if (key == "CAPTION") {
retVal = true;
+ // Remove any translation tags, if they are included in the game description.
+ // This can potentially remove parts of a string that has translation tags
+ // and contains a "/" in its description (e.g. /tag/Name start / name end will
+ // result in "name end"), but it's a very rare case, and this code is just used
+ // for fallback anyway.
+ if (value.hasPrefix("/")) {
+ value.deleteChar(0);
+ while (value.contains("/")) {
+ value.deleteChar(0);
+ }
+ }
caption = value;
}
}
diff --git a/engines/wintermute/wintermute.h b/engines/wintermute/wintermute.h
index fcaa2840a9..017809d56a 100644
--- a/engines/wintermute/wintermute.h
+++ b/engines/wintermute/wintermute.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/wintypes.h b/engines/wintermute/wintypes.h
index 1288ac1a65..b30c09dff7 100644
--- a/engines/wintermute/wintypes.h
+++ b/engines/wintermute/wintypes.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/animation/rlf_animation.cpp b/engines/zvision/animation/rlf_animation.cpp
index c7307265c0..945461e7b2 100644
--- a/engines/zvision/animation/rlf_animation.cpp
+++ b/engines/zvision/animation/rlf_animation.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
@@ -35,7 +35,7 @@
namespace ZVision {
-RlfAnimation::RlfAnimation(const Common::String &fileName, bool stream)
+RlfAnimation::RlfAnimation(const Common::String &fileName, bool stream)
: _stream(stream),
_lastFrameRead(0),
_frameCount(0),
@@ -301,7 +301,7 @@ void RlfAnimation::decodeSimpleRunLengthEncoding(int8 *source, int8 *dest, uint3
numberOfSamples--;
}
- // If numberOfSamples is >= 0, copy one sample from source to the
+ // If numberOfSamples is >= 0, copy one sample from source to the
// next (numberOfSamples + 2) dest spots
} else {
if (sourceOffset + 1 >= sourceSize) {
diff --git a/engines/zvision/animation/rlf_animation.h b/engines/zvision/animation/rlf_animation.h
index fe5b0d68b4..4bb779301b 100644
--- a/engines/zvision/animation/rlf_animation.h
+++ b/engines/zvision/animation/rlf_animation.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/archives/zfs_archive.cpp b/engines/zvision/archives/zfs_archive.cpp
index b8175b4903..f5fa6fc9bf 100644
--- a/engines/zvision/archives/zfs_archive.cpp
+++ b/engines/zvision/archives/zfs_archive.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/archives/zfs_archive.h b/engines/zvision/archives/zfs_archive.h
index d7b45e4b47..3509cfee26 100644
--- a/engines/zvision/archives/zfs_archive.h
+++ b/engines/zvision/archives/zfs_archive.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp
index 0d325ef7f7..22382bc264 100644
--- a/engines/zvision/core/console.cpp
+++ b/engines/zvision/core/console.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
diff --git a/engines/zvision/core/console.h b/engines/zvision/core/console.h
index 0ca1b8cc70..29523c57ee 100644
--- a/engines/zvision/core/console.h
+++ b/engines/zvision/core/console.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef ZVISION_CONSOLE_H
#define ZVISION_CONSOLE_H
diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp
index 40bfb879b1..83d6c17dec 100644
--- a/engines/zvision/core/events.cpp
+++ b/engines/zvision/core/events.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/core/menu.h b/engines/zvision/core/menu.h
index affc69abd5..3ab6d4c2ec 100644
--- a/engines/zvision/core/menu.h
+++ b/engines/zvision/core/menu.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/core/save_manager.cpp b/engines/zvision/core/save_manager.cpp
index b91f8eacad..07fb7637e7 100644
--- a/engines/zvision/core/save_manager.cpp
+++ b/engines/zvision/core/save_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/core/save_manager.h b/engines/zvision/core/save_manager.h
index b4770e68b2..43fb0c0faf 100644
--- a/engines/zvision/core/save_manager.h
+++ b/engines/zvision/core/save_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -60,7 +60,7 @@ private:
public:
/**
* Called every room change. Saves the state of the room just before
- * we switched rooms. Uses ZVision::generateAutoSaveFileName() to
+ * we switched rooms. Uses ZVision::generateAutoSaveFileName() to
* create the save file name.
*/
void autoSave();
diff --git a/engines/zvision/cursors/cursor.cpp b/engines/zvision/cursors/cursor.cpp
index be80f6585b..9b9b9a3f71 100644
--- a/engines/zvision/cursors/cursor.cpp
+++ b/engines/zvision/cursors/cursor.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
@@ -30,14 +30,14 @@
namespace ZVision {
-ZorkCursor::ZorkCursor()
+ZorkCursor::ZorkCursor()
: _width(0),
_height(0),
_hotspotX(0),
_hotspotY(0) {
}
-ZorkCursor::ZorkCursor(const Common::String &fileName)
+ZorkCursor::ZorkCursor(const Common::String &fileName)
: _width(0),
_height(0),
_hotspotX(0),
diff --git a/engines/zvision/cursors/cursor.h b/engines/zvision/cursors/cursor.h
index 18ac28ce8b..be9fae64da 100644
--- a/engines/zvision/cursors/cursor.h
+++ b/engines/zvision/cursors/cursor.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -32,7 +32,7 @@ class String;
namespace ZVision {
-/**
+/**
* Utility class to parse and hold cursor data
* Modeled off Graphics::Cursor
*/
diff --git a/engines/zvision/cursors/cursor_manager.cpp b/engines/zvision/cursors/cursor_manager.cpp
index 671f26ba2d..7f70c8b4e3 100644
--- a/engines/zvision/cursors/cursor_manager.cpp
+++ b/engines/zvision/cursors/cursor_manager.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
diff --git a/engines/zvision/cursors/cursor_manager.h b/engines/zvision/cursors/cursor_manager.h
index e982a40188..0576517f58 100644
--- a/engines/zvision/cursors/cursor_manager.h
+++ b/engines/zvision/cursors/cursor_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -77,7 +77,7 @@ public:
/**
* Parses a cursor name into a cursor file then creates and shows that cursor.
*
- * @param cursorName The name of a cursor. This *HAS* to correspond to one of the entries in _cursorNames[]
+ * @param cursorName The name of a cursor. This *HAS* to correspond to one of the entries in _cursorNames[]
* @param pushed Should the cursor be pushed (true) or not pushed (false) (Another way to say it: down or up)
*/
void changeCursor(const Common::String &cursorName, bool pushed);
diff --git a/engines/zvision/detection.cpp b/engines/zvision/detection.cpp
index 49664935e1..9961db1215 100644
--- a/engines/zvision/detection.cpp
+++ b/engines/zvision/detection.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/scummsys.h"
diff --git a/engines/zvision/detection.h b/engines/zvision/detection.h
index 34417601e8..a788e710b7 100644
--- a/engines/zvision/detection.h
+++ b/engines/zvision/detection.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef ZVISION_DETECTION_H
#define ZVISION_DETECTION_H
diff --git a/engines/zvision/fonts/truetype_font.cpp b/engines/zvision/fonts/truetype_font.cpp
index f8910bfe06..ba4d72bde8 100644
--- a/engines/zvision/fonts/truetype_font.cpp
+++ b/engines/zvision/fonts/truetype_font.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -39,12 +39,9 @@
namespace ZVision {
TruetypeFont::TruetypeFont(ZVision *engine, int32 fontHeight)
- : _engine(engine),
- _fontHeight(fontHeight),
+ : _fontHeight(fontHeight),
_font(0),
- _lineHeight(0),
- _maxCharWidth(0),
- _maxCharHeight(0) {
+ _lineHeight(0) {
}
TruetypeFont::~TruetypeFont(void) {
diff --git a/engines/zvision/fonts/truetype_font.h b/engines/zvision/fonts/truetype_font.h
index 33f016cffd..64f53a2c3b 100644
--- a/engines/zvision/fonts/truetype_font.h
+++ b/engines/zvision/fonts/truetype_font.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -43,12 +43,12 @@ public:
~TruetypeFont();
private:
- ZVision *_engine;
+// ZVision *_engine;
Graphics::Font *_font;
int _lineHeight;
- size_t _maxCharWidth;
- size_t _maxCharHeight;
+// size_t _maxCharWidth;
+// size_t _maxCharHeight;
public:
int32 _fontHeight;
@@ -60,10 +60,10 @@ public:
*
* @param filename The file name of the .ttf file to load
*/
- bool loadFile(const Common::String &filename);
+ bool loadFile(const Common::String &filename);
/**
- * Renders the supplied text to a Surface using 0x0 as the
- * background color.
+ * Renders the supplied text to a Surface using 0x0 as the
+ * background color.
*
* @param text The to render
* @param textColor The color to render the text with
diff --git a/engines/zvision/graphics/render_manager.cpp b/engines/zvision/graphics/render_manager.cpp
index f19df88935..aed30ea12c 100644
--- a/engines/zvision/graphics/render_manager.cpp
+++ b/engines/zvision/graphics/render_manager.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
@@ -32,7 +32,7 @@
#include "engines/util.h"
-#include "graphics/decoders/tga.h"
+#include "image/tga.h"
namespace ZVision {
@@ -159,7 +159,7 @@ void RenderManager::clearWorkingWindowTo555Color(uint16 color) {
}
}
-void RenderManager::renderSubRectToScreen(Graphics::Surface &surface, int16 destinationX, int16 destinationY, bool wrap) {
+void RenderManager::renderSubRectToScreen(Graphics::Surface &surface, int16 destinationX, int16 destinationY, bool wrap) {
int16 subRectX = 0;
int16 subRectY = 0;
@@ -184,8 +184,8 @@ void RenderManager::renderSubRectToScreen(Graphics::Surface &surface, int16 dest
if (wrap) {
_backgroundWidth = surface.w;
_backgroundHeight = surface.h;
-
- if (destinationX > 0) {
+
+ if (destinationX > 0) {
// Move destinationX to 0
subRectX = surface.w - destinationX;
destinationX = 0;
@@ -238,7 +238,7 @@ void RenderManager::readImageToSurface(const Common::String &fileName, Graphics:
uint32 imageWidth;
uint32 imageHeight;
- Graphics::TGADecoder tga;
+ Image::TGADecoder tga;
uint16 *buffer;
bool isTransposed = _renderTable.getRenderState() == RenderTable::PANORAMA;
// All ZVision images are in RGB 555
@@ -373,7 +373,7 @@ Common::Rect RenderManager::renderTextToWorkingWindow(uint32 idNumber, const Com
entry.alphaColor = 0;
entry.destX = destX;
entry.destY = destY;
-
+
// Draw the text to the working window
entry.data = font->drawTextToSurface(text, textColor, maxWidth, maxHeight, align, wrap);
entry.width = entry.data->w;
diff --git a/engines/zvision/graphics/render_manager.h b/engines/zvision/graphics/render_manager.h
index cb71308bc3..9feff4c030 100644
--- a/engines/zvision/graphics/render_manager.h
+++ b/engines/zvision/graphics/render_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -89,7 +89,7 @@ private:
/** Center of the screen in the y direction */
const int _screenCenterY;
- /**
+ /**
* A Rectangle centered inside the actual window. All in-game coordinates
* are given in this coordinate space. Also, all images are clipped to the
* edges of this Rectangle
@@ -106,7 +106,7 @@ private:
/** The height of the current background image */
uint16 _backgroundHeight;
- /**
+ /**
* The "velocity" at which the background image is panning. We actually store the inverse of velocity (ms/pixel instead of pixels/ms)
* because it allows you to accumulate whole pixels 'steps' instead of rounding pixels every frame
*/
@@ -224,17 +224,17 @@ public:
/**
* Set the background position (_backgroundOffset). If the current RenderState is PANORAMA, the offset
* will be in the horizontal direction. If the current RenderState is TILT, the offset will be in the
- * vertical direction.
+ * vertical direction.
*
- * This method will not render anything on the screen. So if nothing else is called that renders the
+ * This method will not render anything on the screen. So if nothing else is called that renders the
* background, the change won't be seen until next frame.
*
* @param offset The amount to offset the background
*/
void setBackgroundPosition(int offset);
-
+
/**
- * Set the background scroll velocity. Negative velocities correspond to left / up scrolling and
+ * Set the background scroll velocity. Negative velocities correspond to left / up scrolling and
* positive velocities correspond to right / down scrolling
*
* @param velocity Velocity
@@ -249,7 +249,7 @@ public:
*/
const Common::Point screenSpaceToImageSpace(const Common::Point &point);
/**
- * Converts a point in image coordinate space to ***PRE-WARP***
+ * Converts a point in image coordinate space to ***PRE-WARP***
* working window coordinate space
*
* @param point Point in image coordinate space
@@ -313,7 +313,7 @@ private:
* Move the background image by an offset. If we are currently in Panorama mode,
* the offset will correspond to a horizontal motion. If we are currently in Tilt mode,
* the offset will correspond to a vertical motion. This function should not be called
- * if we are in Flat mode.
+ * if we are in Flat mode.
*
* The RenderManager will take care of wrapping the image.
* Ex: If the image has width 1400px, it is legal to offset 1500px.
diff --git a/engines/zvision/graphics/render_table.cpp b/engines/zvision/graphics/render_table.cpp
index ffd42e6a60..49b934dc37 100644
--- a/engines/zvision/graphics/render_table.cpp
+++ b/engines/zvision/graphics/render_table.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
@@ -115,7 +115,7 @@ void RenderTable::mutateImage(uint16 *sourceBuffer, uint16* destBuffer, uint32 d
// RenderTable only stores offsets from the original coordinates
uint32 sourceYIndex = y + _internalBuffer[index].y;
uint32 sourceXIndex = x + _internalBuffer[index].x;
-
+
destBuffer[destOffset + normalizedX] = sourceBuffer[sourceYIndex * _numColumns + sourceXIndex];
}
@@ -154,11 +154,11 @@ void RenderTable::generatePanoramaLookupTable() {
// To get x in cylinder coordinates, we just need to calculate the arc length
// We also scale it by _panoramaOptions.linearScale
int32 xInCylinderCoords = int32(floor((cylinderRadius * _panoramaOptions.linearScale * alpha) + halfWidth));
-
+
float cosAlpha = cos(alpha);
for (uint y = 0; y < _numRows; ++y) {
- // To calculate y in cylinder coordinates, we can do similar triangles comparison,
+ // To calculate y in cylinder coordinates, we can do similar triangles comparison,
// comparing the triangle from the center to the screen and from the center to the edge of the cylinder
int32 yInCylinderCoords = int32(floor(halfHeight + ((float)y - halfHeight) * cosAlpha));
@@ -179,7 +179,7 @@ void RenderTable::generateTiltLookupTable() {
float cylinderRadius = halfWidth / tan(fovInRadians);
for (uint y = 0; y < _numRows; ++y) {
-
+
// Add an offset of 0.01 to overcome zero tan/atan issue (horizontal line on half of screen)
// Alpha represents the vertical angle between the viewer at the center of a cylinder and y
float alpha = atan(((float)y - halfHeight + 0.01f) / cylinderRadius);
@@ -192,7 +192,7 @@ void RenderTable::generateTiltLookupTable() {
uint32 columnIndex = y * _numColumns;
for (uint x = 0; x < _numColumns; ++x) {
- // To calculate x in cylinder coordinates, we can do similar triangles comparison,
+ // To calculate x in cylinder coordinates, we can do similar triangles comparison,
// comparing the triangle from the center to the screen and from the center to the edge of the cylinder
int32 xInCylinderCoords = int32(floor(halfWidth + ((float)x - halfWidth) * cosAlpha));
diff --git a/engines/zvision/graphics/render_table.h b/engines/zvision/graphics/render_table.h
index 898091193a..f066187ad1 100644
--- a/engines/zvision/graphics/render_table.h
+++ b/engines/zvision/graphics/render_table.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/inventory/inventory_manager.h b/engines/zvision/inventory/inventory_manager.h
index ae6d116b18..f9d2ff294a 100644
--- a/engines/zvision/inventory/inventory_manager.h
+++ b/engines/zvision/inventory/inventory_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/module.mk b/engines/zvision/module.mk
index 4cf9c989cd..2e298f24c6 100644
--- a/engines/zvision/module.mk
+++ b/engines/zvision/module.mk
@@ -1,5 +1,5 @@
MODULE := engines/zvision
-
+
MODULE_OBJS := \
animation/rlf_animation.o \
archives/zfs_archive.o \
@@ -30,14 +30,14 @@ MODULE_OBJS := \
video/video.o \
video/zork_avi_decoder.o \
zvision.o
-
+
MODULE_DIRS += \
engines/zvision
-
+
# This module can be built as a plugin
ifeq ($(ENABLE_ZVISION), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
-
-# Include common rules
+
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index 878fa752d5..e854378ae4 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/actions.h b/engines/zvision/scripting/actions.h
index afa3e3a2ac..01457d21cc 100644
--- a/engines/zvision/scripting/actions.h
+++ b/engines/zvision/scripting/actions.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/control.cpp b/engines/zvision/scripting/control.cpp
index 35c4ea1441..2343c83c56 100644
--- a/engines/zvision/scripting/control.cpp
+++ b/engines/zvision/scripting/control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/control.h b/engines/zvision/scripting/control.h
index 770c540a12..ffeacb273d 100644
--- a/engines/zvision/scripting/control.h
+++ b/engines/zvision/scripting/control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -95,7 +95,7 @@ public:
* store the amount of time left on the timer. Any Controls overriding this *MUST* write
* their key as the first data outputted. The default implementation is NOP.
*
- * NOTE: If this method is overridden, you MUST also override deserialize()
+ * NOTE: If this method is overridden, you MUST also override deserialize()
* and needsSerialization()
*
* @param stream Stream to write any needed data to
diff --git a/engines/zvision/scripting/controls/animation_control.cpp b/engines/zvision/scripting/controls/animation_control.cpp
index ec8f7a9647..e351e81d25 100644
--- a/engines/zvision/scripting/controls/animation_control.cpp
+++ b/engines/zvision/scripting/controls/animation_control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -38,7 +38,7 @@
namespace ZVision {
AnimationControl::AnimationControl(ZVision *engine, uint32 controlKey, const Common::String &fileName)
- : Control(engine, controlKey),
+ : Control(engine, controlKey),
_fileType(RLF),
_loopCount(1),
_currentLoop(0),
diff --git a/engines/zvision/scripting/controls/animation_control.h b/engines/zvision/scripting/controls/animation_control.h
index 77663aaf1e..6c4d6dfcf7 100644
--- a/engines/zvision/scripting/controls/animation_control.h
+++ b/engines/zvision/scripting/controls/animation_control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/input_control.cpp b/engines/zvision/scripting/controls/input_control.cpp
index 2685b01312..5cf5086691 100644
--- a/engines/zvision/scripting/controls/input_control.cpp
+++ b/engines/zvision/scripting/controls/input_control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -37,7 +37,7 @@
namespace ZVision {
-InputControl::InputControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream)
+InputControl::InputControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream)
: Control(engine, key),
_nextTabstop(0),
_focused(false),
diff --git a/engines/zvision/scripting/controls/input_control.h b/engines/zvision/scripting/controls/input_control.h
index f0fd8b502d..32432438bb 100644
--- a/engines/zvision/scripting/controls/input_control.h
+++ b/engines/zvision/scripting/controls/input_control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/lever_control.cpp b/engines/zvision/scripting/controls/lever_control.cpp
index e08fdd10f3..9724e661b7 100644
--- a/engines/zvision/scripting/controls/lever_control.cpp
+++ b/engines/zvision/scripting/controls/lever_control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/lever_control.h b/engines/zvision/scripting/controls/lever_control.h
index 69473cf119..49e4fd3806 100644
--- a/engines/zvision/scripting/controls/lever_control.h
+++ b/engines/zvision/scripting/controls/lever_control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/push_toggle_control.cpp b/engines/zvision/scripting/controls/push_toggle_control.cpp
index 11ec4bb73f..82736b7576 100644
--- a/engines/zvision/scripting/controls/push_toggle_control.cpp
+++ b/engines/zvision/scripting/controls/push_toggle_control.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/push_toggle_control.h b/engines/zvision/scripting/controls/push_toggle_control.h
index 13dc54a65f..3854fc2005 100644
--- a/engines/zvision/scripting/controls/push_toggle_control.h
+++ b/engines/zvision/scripting/controls/push_toggle_control.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/timer_node.cpp b/engines/zvision/scripting/controls/timer_node.cpp
index 3b691be275..c8c8a85d34 100644
--- a/engines/zvision/scripting/controls/timer_node.cpp
+++ b/engines/zvision/scripting/controls/timer_node.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/controls/timer_node.h b/engines/zvision/scripting/controls/timer_node.h
index a8e579cbe4..48b5fad1e9 100644
--- a/engines/zvision/scripting/controls/timer_node.h
+++ b/engines/zvision/scripting/controls/timer_node.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/puzzle.h b/engines/zvision/scripting/puzzle.h
index 0d717f1fa9..ee9ce521c9 100644
--- a/engines/zvision/scripting/puzzle.h
+++ b/engines/zvision/scripting/puzzle.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -52,7 +52,7 @@ struct Puzzle {
struct CriteriaEntry {
/** The key of a global state */
uint32 key;
- /**
+ /**
* What we're comparing the value of the global state against
* This can either be a pure value or it can be the key of another global state
*/
diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp
index d93094a3b2..753ce4ac6a 100644
--- a/engines/zvision/scripting/scr_file_handling.cpp
+++ b/engines/zvision/scripting/scr_file_handling.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp
index adcc5c7545..41b835e550 100644
--- a/engines/zvision/scripting/script_manager.cpp
+++ b/engines/zvision/scripting/script_manager.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
diff --git a/engines/zvision/scripting/script_manager.h b/engines/zvision/scripting/script_manager.h
index ab9b03ed30..4d1b1f359b 100644
--- a/engines/zvision/scripting/script_manager.h
+++ b/engines/zvision/scripting/script_manager.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -70,15 +70,15 @@ public:
private:
ZVision *_engine;
- /**
- * Holds the global state variable. Do NOT directly modify this. Use the accessors and
- * mutators getStateValue() and setStateValue(). This ensures that Puzzles that reference a
+ /**
+ * Holds the global state variable. Do NOT directly modify this. Use the accessors and
+ * mutators getStateValue() and setStateValue(). This ensures that Puzzles that reference a
* particular state key are checked after the key is modified.
*/
StateMap _globalState;
- /**
- * Holds the flags for the global states. This is used to enable/disable puzzles and/or
- * controls as well as which puzzles should are allowed to be re-executed
+ /**
+ * Holds the flags for the global states. This is used to enable/disable puzzles and/or
+ * controls as well as which puzzles should are allowed to be re-executed
*/
StateFlagMap _globalStateFlags;
/** References _globalState keys to Puzzles */
@@ -153,7 +153,7 @@ public:
void deserializeStateTable(Common::SeekableReadStream *stream);
void serializeControls(Common::WriteStream *stream);
void deserializeControls(Common::SeekableReadStream *stream);
-
+
Location getCurrentLocation() const;
private:
@@ -175,7 +175,7 @@ public:
private:
/**
* Parses the stream into a Puzzle object
- * Helper method for parseScrFile.
+ * Helper method for parseScrFile.
*
* @param puzzle The object to store what is parsed
* @param stream Scr file stream
@@ -184,7 +184,7 @@ private:
/**
* Parses the stream into a Criteria object
- * Helper method for parsePuzzle.
+ * Helper method for parsePuzzle.
*
* @param criteria Pointer to the Criteria object to fill
* @param stream Scr file stream
@@ -194,7 +194,7 @@ private:
/**
* Parses the stream into a ResultAction objects
- * Helper method for parsePuzzle.
+ * Helper method for parsePuzzle.
*
* @param stream Scr file stream
* @param actionList The list where the results will be added
diff --git a/engines/zvision/sound/zork_raw.cpp b/engines/zvision/sound/zork_raw.cpp
index 321ac93de2..55353acbb9 100644
--- a/engines/zvision/sound/zork_raw.cpp
+++ b/engines/zvision/sound/zork_raw.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -47,16 +47,16 @@ const int32 RawZorkStream::_amplitudeLookupTable[89] = {0x0007, 0x0008, 0x0009,
0x0010, 0x0011, 0x0013, 0x0015, 0x0017, 0x0019, 0x001C, 0x001F,
0x0022, 0x0025, 0x0029, 0x002D, 0x0032, 0x0037, 0x003C, 0x0042,
0x0049, 0x0050, 0x0058, 0x0061, 0x006B, 0x0076, 0x0082, 0x008F,
- 0x009D, 0x00AD, 0x00BE, 0x00D1, 0x00E6, 0x00FD, 0x0117, 0x0133,
+ 0x009D, 0x00AD, 0x00BE, 0x00D1, 0x00E6, 0x00FD, 0x0117, 0x0133,
0x0151, 0x0173, 0x0198, 0x01C1, 0x01EE, 0x0220, 0x0256, 0x0292,
- 0x02D4, 0x031C, 0x036C, 0x03C3, 0x0424, 0x048E, 0x0502, 0x0583,
+ 0x02D4, 0x031C, 0x036C, 0x03C3, 0x0424, 0x048E, 0x0502, 0x0583,
0x0610, 0x06AB, 0x0756, 0x0812, 0x08E0, 0x09C3, 0x0ABD, 0x0BD0,
- 0x0CFF, 0x0E4C, 0x0FBA, 0x114C, 0x1307, 0x14EE, 0x1706, 0x1954,
+ 0x0CFF, 0x0E4C, 0x0FBA, 0x114C, 0x1307, 0x14EE, 0x1706, 0x1954,
0x1BDC, 0x1EA5, 0x21B6, 0x2515, 0x28CA, 0x2CDF, 0x315B, 0x364B,
0x3BB9, 0x41B2, 0x4844, 0x4F7E, 0x5771, 0x602F, 0x69CE, 0x7462, 0x7FFF};
const SoundParams RawZorkStream::_zNemSoundParamLookupTable[6] = {{'6', 0x2B11, false, false},
- {'a', 0x5622, false, true},
+ {'a', 0x5622, false, true},
{'b', 0x5622, true, true},
{'n', 0x2B11, false, true},
{'s', 0x5622, false, true},
@@ -199,7 +199,7 @@ Audio::RewindableAudioStream *makeRawZorkStream(const Common::String &filePath,
}
}
}
-
+
if (!foundParams)
error("Unable to find sound params for file '%s'. File identifier is '%c'", filePath.c_str(), fileIdentifier);
diff --git a/engines/zvision/sound/zork_raw.h b/engines/zvision/sound/zork_raw.h
index 481ea79f2d..ef98e3e1ef 100644
--- a/engines/zvision/sound/zork_raw.h
+++ b/engines/zvision/sound/zork_raw.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -62,7 +62,7 @@ private:
bool _endOfData; // Whether the stream end has been reached
uint _stereo;
- /**
+ /**
* Holds the frequency and index from the last sample
* 0 holds the left channel, 1 holds the right channel
*/
diff --git a/engines/zvision/strings/string_manager.cpp b/engines/zvision/strings/string_manager.cpp
index 77ed501672..22331d8a24 100644
--- a/engines/zvision/strings/string_manager.cpp
+++ b/engines/zvision/strings/string_manager.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -36,7 +36,7 @@
namespace ZVision {
-StringManager::StringManager(ZVision *engine)
+StringManager::StringManager(ZVision *engine)
: _engine(engine) {
}
@@ -218,7 +218,7 @@ Common::String StringManager::readWideLine(Common::SeekableReadStream &stream) {
// Don't spam the user with warnings about UTF-16 support.
// Just do one warning per String
bool charOverflowWarning = false;
-
+
uint16 value = stream.readUint16LE();
while (!stream.eos()) {
// Check for CRLF
@@ -235,7 +235,7 @@ Common::String StringManager::readWideLine(Common::SeekableReadStream &stream) {
value = '?';
}
char charValue = (char)value;
-
+
asciiString += charValue;
value = stream.readUint16LE();
diff --git a/engines/zvision/strings/string_manager.h b/engines/zvision/strings/string_manager.h
index 86bb9638d7..af8324b890 100644
--- a/engines/zvision/strings/string_manager.h
+++ b/engines/zvision/strings/string_manager.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef ZVISION_STRING_MANAGER_H
diff --git a/engines/zvision/subtitles/subtitles.h b/engines/zvision/subtitles/subtitles.h
index 13426e03e4..776ddd3a97 100644
--- a/engines/zvision/subtitles/subtitles.h
+++ b/engines/zvision/subtitles/subtitles.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef ZVISION_SUBTITLES_H
diff --git a/engines/zvision/utility/clock.cpp b/engines/zvision/utility/clock.cpp
index 49e4b32054..45ab23ab65 100644
--- a/engines/zvision/utility/clock.cpp
+++ b/engines/zvision/utility/clock.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/scummsys.h"
@@ -30,7 +29,7 @@
namespace ZVision {
-Clock::Clock(OSystem *system)
+Clock::Clock(OSystem *system)
: _system(system),
_lastTime(0),
_deltaTime(0),
diff --git a/engines/zvision/utility/clock.h b/engines/zvision/utility/clock.h
index 3939ba1612..6ae0f86161 100644
--- a/engines/zvision/utility/clock.h
+++ b/engines/zvision/utility/clock.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef ZVISION_CLOCK_H
@@ -63,12 +62,12 @@ public:
/**
* Pause the clock. Any future delta times will take this pause into account.
- * Has no effect if the clock is already paused.
+ * Has no effect if the clock is already paused.
*/
void start();
/**
* Un-pause the clock.
- * Has no effect if the clock is already un-paused.
+ * Has no effect if the clock is already un-paused.
*/
void stop();
};
diff --git a/engines/zvision/utility/lzss_read_stream.cpp b/engines/zvision/utility/lzss_read_stream.cpp
index dc537cd8ab..e094188ef6 100644
--- a/engines/zvision/utility/lzss_read_stream.cpp
+++ b/engines/zvision/utility/lzss_read_stream.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#include "common/scummsys.h"
diff --git a/engines/zvision/utility/lzss_read_stream.h b/engines/zvision/utility/lzss_read_stream.h
index f6b1eb1a65..b51cf3905f 100644
--- a/engines/zvision/utility/lzss_read_stream.h
+++ b/engines/zvision/utility/lzss_read_stream.h
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
-*
-* ScummVM is the legal property of its developers, whose names
-* are too numerous to list here. Please refer to the COPYRIGHT
-* file distributed with this source distribution.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-*/
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
#ifndef ZVISION_LZSS_STREAM_H
#define ZVISION_LZSS_STREAM_H
@@ -36,7 +36,7 @@ namespace ZVision {
class LzssReadStream : public Common::ReadStream {
public:
/**
- * A class that decompresses LZSS data and implements ReadStream for easy access
+ * A class that decompresses LZSS data and implements ReadStream for easy access
* to the decompiled data.
*
* @param source The source data
diff --git a/engines/zvision/utility/single_value_container.cpp b/engines/zvision/utility/single_value_container.cpp
index 2667b27b75..e609474285 100644
--- a/engines/zvision/utility/single_value_container.cpp
+++ b/engines/zvision/utility/single_value_container.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/utility/single_value_container.h b/engines/zvision/utility/single_value_container.h
index 45b5a89e95..951383661a 100644
--- a/engines/zvision/utility/single_value_container.h
+++ b/engines/zvision/utility/single_value_container.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -30,7 +30,7 @@ class String;
namespace ZVision {
/**
- * A generic single value storage class. It is useful for storing different
+ * A generic single value storage class. It is useful for storing different
* value types in a single List, Hashmap, etc.
*/
class SingleValueContainer {
@@ -94,7 +94,7 @@ public:
SingleValueContainer& operator=(const SingleValueContainer &rhs);
/**
- * Retrieve a bool from the container. If the container is not storing a
+ * Retrieve a bool from the container. If the container is not storing a
* bool, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -102,7 +102,7 @@ public:
*/
bool getBoolValue(bool *returnValue) const;
/**
- * Retrieve a byte from the container. If the container is not storing a
+ * Retrieve a byte from the container. If the container is not storing a
* byte, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -110,7 +110,7 @@ public:
*/
bool getByteValue(byte *returnValue) const;
/**
- * Retrieve an int16 from the container. If the container is not storing an
+ * Retrieve an int16 from the container. If the container is not storing an
* int16, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -118,7 +118,7 @@ public:
*/
bool getInt16Value(int16 *returnValue) const;
/**
- * Retrieve a uint16 from the container. If the container is not storing a
+ * Retrieve a uint16 from the container. If the container is not storing a
* uint16, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -126,7 +126,7 @@ public:
*/
bool getUInt16Value(uint16 *returnValue) const;
/**
- * Retrieve an int32 from the container. If the container is not storing an
+ * Retrieve an int32 from the container. If the container is not storing an
* int32, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -134,7 +134,7 @@ public:
*/
bool getInt32Value(int32 *returnValue) const;
/**
- * Retrieve a uint32 from the container. If the container is not storing a
+ * Retrieve a uint32 from the container. If the container is not storing a
* uint32, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -142,7 +142,7 @@ public:
*/
bool getUInt32Value(uint32 *returnValue) const;
/**
- * Retrieve a float from the container. If the container is not storing a
+ * Retrieve a float from the container. If the container is not storing a
* float, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -150,7 +150,7 @@ public:
*/
bool getFloatValue(float *returnValue) const;
/**
- * Retrieve a double from the container. If the container is not storing a
+ * Retrieve a double from the container. If the container is not storing a
* double, this will return false and display a warning().
*
* @param returnValue Pointer to where you want the value stored
@@ -158,9 +158,9 @@ public:
*/
bool getDoubleValue(double *returnValue) const;
/**
- * Retrieve a String from the container. If the container is not storing a
+ * Retrieve a String from the container. If the container is not storing a
* string, this will return false and display a warning().
- *
+ *
* Caution: Strings are internally stored as char[]. getStringValue uses
* Common::String::operator=(char *) to do the assigment, which uses both
* strlen() AND memmove().
diff --git a/engines/zvision/utility/utility.cpp b/engines/zvision/utility/utility.cpp
index 6471d21e6c..905bc4513a 100644
--- a/engines/zvision/utility/utility.cpp
+++ b/engines/zvision/utility/utility.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/utility/utility.h b/engines/zvision/utility/utility.h
index fb571f3fe8..063d4c0663 100644
--- a/engines/zvision/utility/utility.h
+++ b/engines/zvision/utility/utility.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef ZVISION_UTILITY_H
@@ -93,7 +92,7 @@ void removeDuplicateEntries(Common::Array<T> &container) {
}
/**
- * Gets the name of the file (including extension). Forward or back slashes
+ * Gets the name of the file (including extension). Forward or back slashes
* are interpreted as directory changes
*
* @param fullPath A full or partial path to the file. Ex: folderOne/folderTwo/file.txt
diff --git a/engines/zvision/video/video.cpp b/engines/zvision/video/video.cpp
index efaecb5045..d1fff30408 100644
--- a/engines/zvision/video/video.cpp
+++ b/engines/zvision/video/video.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp
index d3db3421af..f22a4203ab 100644
--- a/engines/zvision/video/zork_avi_decoder.cpp
+++ b/engines/zvision/video/zork_avi_decoder.cpp
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#include "common/scummsys.h"
diff --git a/engines/zvision/video/zork_avi_decoder.h b/engines/zvision/video/zork_avi_decoder.h
index ec2be1bb13..c47f007f9b 100644
--- a/engines/zvision/video/zork_avi_decoder.h
+++ b/engines/zvision/video/zork_avi_decoder.h
@@ -8,24 +8,23 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef ZORK_AVI_DECODER_H
#define ZORK_AVI_DECODER_H
#include "video/avi_decoder.h"
-
+
namespace ZVision {
@@ -56,5 +55,5 @@ private:
};
} // End of namespace ZVision
-
+
#endif
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index f57e225ac1..b464f6ee81 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -47,7 +47,7 @@
namespace ZVision {
-
+
ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc)
: Engine(syst),
_gameDescription(gameDesc),
@@ -61,13 +61,13 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc)
_saveManager(nullptr),
_stringManager(nullptr),
_cursorManager(nullptr) {
-
+
debug(1, "ZVision::ZVision");
}
ZVision::~ZVision() {
debug(1, "ZVision::~ZVision");
-
+
// Dispose of resources
delete _console;
delete _cursorManager;
@@ -76,15 +76,15 @@ ZVision::~ZVision() {
delete _renderManager;
delete _scriptManager;
delete _rnd;
-
+
// Remove all of our debug levels
DebugMan.clearAllDebugChannels();
}
void ZVision::initialize() {
const Common::FSNode gameDataDir(ConfMan.get("path"));
- // TODO: There are 10 file clashes when we flatten the directories.
- // From a quick look, the files are exactly the same, so it shouldn't matter.
+ // TODO: There are 10 file clashes when we flatten the directories.
+ // From a quick look, the files are exactly the same, so it shouldn't matter.
// But I'm noting it here just in-case it does become a problem.
SearchMan.addSubDirectoryMatching(gameDataDir, "data1", 0, 4, true);
SearchMan.addSubDirectoryMatching(gameDataDir, "data2", 0, 4, true);
@@ -142,7 +142,7 @@ Common::Error ZVision::run() {
processEvents();
- // Call _renderManager->update() first so the background renders
+ // Call _renderManager->update() first so the background renders
// before anything that puzzles/controls will render
_renderManager->update(deltaTime);
_scriptManager->update(deltaTime);
diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h
index 7c130fc87f..0b5a86f370 100644
--- a/engines/zvision/zvision.h
+++ b/engines/zvision/zvision.h
@@ -8,17 +8,16 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- *
*/
#ifndef ZVISION_ZVISION_H
@@ -51,7 +50,7 @@ class CursorManager;
class StringManager;
class SaveManager;
class RlfAnimation;
-
+
class ZVision : public Engine {
public:
ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc);
@@ -70,11 +69,11 @@ private:
enum {
WINDOW_WIDTH = 640,
WINDOW_HEIGHT = 480,
-
+
//Zork nemesis working window sizes
ZNEM_WORKING_WINDOW_WIDTH = 512,
ZNEM_WORKING_WINDOW_HEIGHT = 320,
-
+
//ZGI(and default) working window sizes
ZGI_WORKING_WINDOW_WIDTH = 640,
ZGI_WORKING_WINDOW_HEIGHT = 344,
@@ -148,5 +147,5 @@ private:
};
} // End of namespace ZVision
-
+
#endif