aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-31 14:16:29 -0400
committerMatthew Hoops2011-05-31 14:16:29 -0400
commitaa49b38c5a8032586cb94fc4ca07149eecabe64a (patch)
treeea5c7617f8c482c8cf4141b728b3ccff5a7f84c7 /engines
parentd3ea9ab2a9334747eb445c1b45aa30cb17ffdf1b (diff)
parentc86a6c466fabe31fbf36363aa8d0ac8ea6001b9f (diff)
downloadscummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.gz
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.tar.bz2
scummvm-rg350-aa49b38c5a8032586cb94fc4ca07149eecabe64a.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: engines/groovie/script.cpp
Diffstat (limited to 'engines')
-rw-r--r--engines/advancedDetector.cpp3
-rw-r--r--engines/advancedDetector.h3
-rw-r--r--engines/agi/agi.cpp21
-rw-r--r--engines/agi/agi.h6
-rw-r--r--engines/agi/checks.cpp5
-rw-r--r--engines/agi/console.cpp3
-rw-r--r--engines/agi/console.h3
-rw-r--r--engines/agi/cycle.cpp3
-rw-r--r--engines/agi/detection.cpp5
-rw-r--r--engines/agi/detection_tables.h3
-rw-r--r--engines/agi/font.h3
-rw-r--r--engines/agi/global.cpp3
-rw-r--r--engines/agi/graphics.cpp5
-rw-r--r--engines/agi/graphics.h3
-rw-r--r--engines/agi/id.cpp3
-rw-r--r--engines/agi/inv.cpp3
-rw-r--r--engines/agi/keyboard.cpp3
-rw-r--r--engines/agi/keyboard.h3
-rw-r--r--engines/agi/loader_v2.cpp7
-rw-r--r--engines/agi/loader_v3.cpp3
-rw-r--r--engines/agi/logic.cpp3
-rw-r--r--engines/agi/logic.h3
-rw-r--r--engines/agi/lzw.cpp3
-rw-r--r--engines/agi/lzw.h3
-rw-r--r--engines/agi/menu.cpp3
-rw-r--r--engines/agi/menu.h3
-rw-r--r--engines/agi/motion.cpp3
-rw-r--r--engines/agi/objects.cpp3
-rw-r--r--engines/agi/op_cmd.cpp5
-rw-r--r--engines/agi/op_dbg.cpp3
-rw-r--r--engines/agi/op_test.cpp7
-rw-r--r--engines/agi/opcodes.h3
-rw-r--r--engines/agi/picture.cpp3
-rw-r--r--engines/agi/picture.h3
-rw-r--r--engines/agi/preagi.cpp5
-rw-r--r--engines/agi/preagi.h3
-rw-r--r--engines/agi/preagi_common.cpp3
-rw-r--r--engines/agi/preagi_common.h3
-rw-r--r--engines/agi/preagi_mickey.cpp3
-rw-r--r--engines/agi/preagi_mickey.h3
-rw-r--r--engines/agi/preagi_troll.cpp3
-rw-r--r--engines/agi/preagi_troll.h3
-rw-r--r--engines/agi/preagi_winnie.cpp3
-rw-r--r--engines/agi/preagi_winnie.h3
-rw-r--r--engines/agi/predictive.cpp3
-rw-r--r--engines/agi/saveload.cpp3
-rw-r--r--engines/agi/sound.cpp37
-rw-r--r--engines/agi/sound.h3
-rw-r--r--engines/agi/sound_2gs.cpp1016
-rw-r--r--engines/agi/sound_2gs.h349
-rw-r--r--engines/agi/sound_coco3.cpp3
-rw-r--r--engines/agi/sound_coco3.h3
-rw-r--r--engines/agi/sound_midi.cpp3
-rw-r--r--engines/agi/sound_midi.h3
-rw-r--r--engines/agi/sound_pcjr.cpp3
-rw-r--r--engines/agi/sound_pcjr.h3
-rw-r--r--engines/agi/sound_sarien.cpp3
-rw-r--r--engines/agi/sound_sarien.h3
-rw-r--r--engines/agi/sprite.cpp3
-rw-r--r--engines/agi/sprite.h3
-rw-r--r--engines/agi/text.cpp10
-rw-r--r--engines/agi/view.cpp3
-rw-r--r--engines/agi/view.h3
-rw-r--r--engines/agi/wagparser.cpp3
-rw-r--r--engines/agi/wagparser.h3
-rw-r--r--engines/agi/words.cpp11
-rw-r--r--engines/agos/agos.cpp38
-rw-r--r--engines/agos/agos.h30
-rw-r--r--engines/agos/animation.cpp3
-rw-r--r--engines/agos/animation.h3
-rw-r--r--engines/agos/charset-fontdata.cpp3
-rw-r--r--engines/agos/charset.cpp3
-rw-r--r--engines/agos/contain.cpp3
-rw-r--r--engines/agos/cursor.cpp3
-rw-r--r--engines/agos/debug.cpp3
-rw-r--r--engines/agos/debug.h3
-rw-r--r--engines/agos/debugger.cpp3
-rw-r--r--engines/agos/debugger.h3
-rw-r--r--engines/agos/detection.cpp26
-rw-r--r--engines/agos/detection_tables.h3
-rw-r--r--engines/agos/draw.cpp3
-rw-r--r--engines/agos/event.cpp3
-rw-r--r--engines/agos/feeble.cpp11
-rw-r--r--engines/agos/gfx.cpp3
-rw-r--r--engines/agos/icons.cpp3
-rw-r--r--engines/agos/input.cpp3
-rw-r--r--engines/agos/input_pn.cpp3
-rw-r--r--engines/agos/intern.h3
-rw-r--r--engines/agos/items.cpp3
-rw-r--r--engines/agos/menus.cpp3
-rw-r--r--engines/agos/midi.cpp5
-rw-r--r--engines/agos/midi.h3
-rw-r--r--engines/agos/midiparser_s1d.cpp3
-rw-r--r--engines/agos/oracle.cpp3
-rw-r--r--engines/agos/pn.cpp7
-rw-r--r--engines/agos/res.cpp3
-rw-r--r--engines/agos/res_ami.cpp3
-rw-r--r--engines/agos/res_snd.cpp3
-rw-r--r--engines/agos/rooms.cpp3
-rw-r--r--engines/agos/saveload.cpp5
-rw-r--r--engines/agos/script.cpp3
-rw-r--r--engines/agos/script_dp.cpp3
-rw-r--r--engines/agos/script_e1.cpp3
-rw-r--r--engines/agos/script_e2.cpp3
-rw-r--r--engines/agos/script_ff.cpp3
-rw-r--r--engines/agos/script_pn.cpp3
-rw-r--r--engines/agos/script_pp.cpp3
-rw-r--r--engines/agos/script_s1.cpp3
-rw-r--r--engines/agos/script_s2.cpp3
-rw-r--r--engines/agos/script_ww.cpp3
-rw-r--r--engines/agos/sound.cpp3
-rw-r--r--engines/agos/sound.h3
-rw-r--r--engines/agos/string.cpp3
-rw-r--r--engines/agos/string_pn.cpp5
-rw-r--r--engines/agos/subroutine.cpp3
-rw-r--r--engines/agos/verb.cpp3
-rw-r--r--engines/agos/verb_pn.cpp3
-rw-r--r--engines/agos/vga.cpp3
-rw-r--r--engines/agos/vga.h3
-rw-r--r--engines/agos/vga_e2.cpp3
-rw-r--r--engines/agos/vga_ff.cpp3
-rw-r--r--engines/agos/vga_pn.cpp3
-rw-r--r--engines/agos/vga_s1.cpp3
-rw-r--r--engines/agos/vga_s2.cpp3
-rw-r--r--engines/agos/vga_ww.cpp3
-rw-r--r--engines/agos/window.cpp3
-rw-r--r--engines/agos/zones.cpp3
-rw-r--r--engines/cine/anim.cpp3
-rw-r--r--engines/cine/anim.h3
-rw-r--r--engines/cine/bg.cpp3
-rw-r--r--engines/cine/bg.h3
-rw-r--r--engines/cine/bg_list.cpp3
-rw-r--r--engines/cine/bg_list.h3
-rw-r--r--engines/cine/cine.cpp11
-rw-r--r--engines/cine/cine.h3
-rw-r--r--engines/cine/console.cpp3
-rw-r--r--engines/cine/console.h3
-rw-r--r--engines/cine/detection.cpp5
-rw-r--r--engines/cine/detection_tables.h3
-rw-r--r--engines/cine/gfx.cpp3
-rw-r--r--engines/cine/gfx.h3
-rw-r--r--engines/cine/main_loop.cpp3
-rw-r--r--engines/cine/main_loop.h3
-rw-r--r--engines/cine/msg.cpp3
-rw-r--r--engines/cine/msg.h3
-rw-r--r--engines/cine/object.cpp3
-rw-r--r--engines/cine/object.h3
-rw-r--r--engines/cine/pal.cpp3
-rw-r--r--engines/cine/pal.h3
-rw-r--r--engines/cine/part.cpp3
-rw-r--r--engines/cine/part.h3
-rw-r--r--engines/cine/prc.cpp3
-rw-r--r--engines/cine/prc.h3
-rw-r--r--engines/cine/rel.cpp3
-rw-r--r--engines/cine/rel.h3
-rw-r--r--engines/cine/saveload.cpp3
-rw-r--r--engines/cine/saveload.h3
-rw-r--r--engines/cine/script.h3
-rw-r--r--engines/cine/script_fw.cpp3
-rw-r--r--engines/cine/script_os.cpp3
-rw-r--r--engines/cine/sound.cpp3
-rw-r--r--engines/cine/sound.h3
-rw-r--r--engines/cine/texte.cpp3
-rw-r--r--engines/cine/texte.h3
-rw-r--r--engines/cine/unpack.cpp3
-rw-r--r--engines/cine/unpack.h3
-rw-r--r--engines/cine/various.cpp3
-rw-r--r--engines/cine/various.h3
-rw-r--r--engines/cruise/actor.cpp3
-rw-r--r--engines/cruise/actor.h3
-rw-r--r--engines/cruise/background.cpp3
-rw-r--r--engines/cruise/background.h3
-rw-r--r--engines/cruise/backgroundIncrust.cpp3
-rw-r--r--engines/cruise/backgroundIncrust.h3
-rw-r--r--engines/cruise/cell.cpp3
-rw-r--r--engines/cruise/cell.h3
-rw-r--r--engines/cruise/cruise.cpp13
-rw-r--r--engines/cruise/cruise.h5
-rw-r--r--engines/cruise/cruise_main.cpp3
-rw-r--r--engines/cruise/cruise_main.h3
-rw-r--r--engines/cruise/ctp.cpp3
-rw-r--r--engines/cruise/ctp.h3
-rw-r--r--engines/cruise/dataLoader.cpp3
-rw-r--r--engines/cruise/dataLoader.h3
-rw-r--r--engines/cruise/debugger.cpp3
-rw-r--r--engines/cruise/debugger.h3
-rw-r--r--engines/cruise/decompiler.cpp3
-rw-r--r--engines/cruise/delphine-unpack.cpp3
-rw-r--r--engines/cruise/detection.cpp5
-rw-r--r--engines/cruise/font.cpp3
-rw-r--r--engines/cruise/font.h3
-rw-r--r--engines/cruise/function.cpp3
-rw-r--r--engines/cruise/function.h3
-rw-r--r--engines/cruise/gfxModule.cpp3
-rw-r--r--engines/cruise/gfxModule.h3
-rw-r--r--engines/cruise/linker.cpp3
-rw-r--r--engines/cruise/linker.h3
-rw-r--r--engines/cruise/mainDraw.cpp5
-rw-r--r--engines/cruise/mainDraw.h3
-rw-r--r--engines/cruise/menu.cpp3
-rw-r--r--engines/cruise/menu.h3
-rw-r--r--engines/cruise/mouse.cpp3
-rw-r--r--engines/cruise/mouse.h3
-rw-r--r--engines/cruise/object.cpp3
-rw-r--r--engines/cruise/object.h3
-rw-r--r--engines/cruise/overlay.cpp3
-rw-r--r--engines/cruise/overlay.h3
-rw-r--r--engines/cruise/perso.cpp3
-rw-r--r--engines/cruise/perso.h3
-rw-r--r--engines/cruise/polys.cpp3
-rw-r--r--engines/cruise/polys.h3
-rw-r--r--engines/cruise/saveload.cpp3
-rw-r--r--engines/cruise/saveload.h3
-rw-r--r--engines/cruise/script.cpp3
-rw-r--r--engines/cruise/script.h3
-rw-r--r--engines/cruise/sound.cpp3
-rw-r--r--engines/cruise/sound.h3
-rw-r--r--engines/cruise/stack.cpp3
-rw-r--r--engines/cruise/stack.h3
-rw-r--r--engines/cruise/staticres.cpp3
-rw-r--r--engines/cruise/staticres.h3
-rw-r--r--engines/cruise/various.cpp3
-rw-r--r--engines/cruise/various.h3
-rw-r--r--engines/cruise/vars.cpp3
-rw-r--r--engines/cruise/vars.h3
-rw-r--r--engines/cruise/volume.cpp3
-rw-r--r--engines/cruise/volume.h3
-rw-r--r--engines/dialogs.cpp3
-rw-r--r--engines/dialogs.h3
-rw-r--r--engines/draci/animation.cpp3
-rw-r--r--engines/draci/animation.h3
-rw-r--r--engines/draci/barchive.cpp3
-rw-r--r--engines/draci/barchive.h3
-rw-r--r--engines/draci/console.cpp3
-rw-r--r--engines/draci/console.h3
-rw-r--r--engines/draci/detection.cpp5
-rw-r--r--engines/draci/draci.cpp10
-rw-r--r--engines/draci/draci.h3
-rw-r--r--engines/draci/font.cpp3
-rw-r--r--engines/draci/font.h3
-rw-r--r--engines/draci/game.cpp3
-rw-r--r--engines/draci/game.h3
-rw-r--r--engines/draci/mouse.cpp3
-rw-r--r--engines/draci/mouse.h3
-rw-r--r--engines/draci/music.cpp3
-rw-r--r--engines/draci/music.h3
-rw-r--r--engines/draci/saveload.cpp3
-rw-r--r--engines/draci/saveload.h3
-rw-r--r--engines/draci/screen.cpp3
-rw-r--r--engines/draci/screen.h3
-rw-r--r--engines/draci/script.cpp3
-rw-r--r--engines/draci/script.h5
-rw-r--r--engines/draci/sound.cpp3
-rw-r--r--engines/draci/sound.h3
-rw-r--r--engines/draci/sprite.cpp3
-rw-r--r--engines/draci/sprite.h3
-rw-r--r--engines/draci/surface.cpp3
-rw-r--r--engines/draci/surface.h3
-rw-r--r--engines/draci/walking.cpp3
-rw-r--r--engines/draci/walking.h3
-rw-r--r--engines/drascula/actors.cpp3
-rw-r--r--engines/drascula/animation.cpp3
-rw-r--r--engines/drascula/console.cpp3
-rw-r--r--engines/drascula/console.h3
-rw-r--r--engines/drascula/converse.cpp3
-rw-r--r--engines/drascula/detection.cpp5
-rw-r--r--engines/drascula/drascula.cpp7
-rw-r--r--engines/drascula/drascula.h3
-rw-r--r--engines/drascula/graphics.cpp3
-rw-r--r--engines/drascula/interface.cpp3
-rw-r--r--engines/drascula/objects.cpp3
-rw-r--r--engines/drascula/palette.cpp3
-rw-r--r--engines/drascula/resource.cpp3
-rw-r--r--engines/drascula/rooms.cpp3
-rw-r--r--engines/drascula/saveload.cpp3
-rw-r--r--engines/drascula/sound.cpp3
-rw-r--r--engines/drascula/talk.cpp3
-rw-r--r--engines/engine.cpp3
-rw-r--r--engines/engine.h3
-rw-r--r--engines/game.cpp3
-rw-r--r--engines/game.h3
-rw-r--r--engines/gob/console.cpp3
-rw-r--r--engines/gob/console.h3
-rw-r--r--engines/gob/databases.cpp3
-rw-r--r--engines/gob/databases.h3
-rw-r--r--engines/gob/dataio.cpp3
-rw-r--r--engines/gob/dataio.h3
-rw-r--r--engines/gob/dbase.cpp3
-rw-r--r--engines/gob/dbase.h3
-rw-r--r--engines/gob/demos/batplayer.cpp3
-rw-r--r--engines/gob/demos/batplayer.h3
-rw-r--r--engines/gob/demos/demoplayer.cpp6
-rw-r--r--engines/gob/demos/demoplayer.h3
-rw-r--r--engines/gob/demos/scnplayer.cpp3
-rw-r--r--engines/gob/demos/scnplayer.h3
-rw-r--r--engines/gob/detection.cpp5
-rw-r--r--engines/gob/detection_tables.h57
-rw-r--r--engines/gob/draw.cpp3
-rw-r--r--engines/gob/draw.h3
-rw-r--r--engines/gob/draw_bargon.cpp3
-rw-r--r--engines/gob/draw_fascin.cpp3
-rw-r--r--engines/gob/draw_playtoons.cpp3
-rw-r--r--engines/gob/draw_v1.cpp3
-rw-r--r--engines/gob/draw_v2.cpp3
-rw-r--r--engines/gob/expression.cpp3
-rw-r--r--engines/gob/expression.h3
-rw-r--r--engines/gob/game.cpp3
-rw-r--r--engines/gob/game.h3
-rw-r--r--engines/gob/global.cpp3
-rw-r--r--engines/gob/global.h3
-rw-r--r--engines/gob/gob.cpp8
-rw-r--r--engines/gob/gob.h3
-rw-r--r--engines/gob/goblin.cpp3
-rw-r--r--engines/gob/goblin.h3
-rw-r--r--engines/gob/goblin_v1.cpp3
-rw-r--r--engines/gob/goblin_v2.cpp3
-rw-r--r--engines/gob/goblin_v3.cpp3
-rw-r--r--engines/gob/goblin_v4.cpp3
-rw-r--r--engines/gob/hotspots.cpp3
-rw-r--r--engines/gob/hotspots.h3
-rw-r--r--engines/gob/iniconfig.cpp3
-rw-r--r--engines/gob/iniconfig.h3
-rw-r--r--engines/gob/init.cpp3
-rw-r--r--engines/gob/init.h3
-rw-r--r--engines/gob/init_fascin.cpp3
-rw-r--r--engines/gob/init_v1.cpp3
-rw-r--r--engines/gob/init_v2.cpp3
-rw-r--r--engines/gob/init_v3.cpp3
-rw-r--r--engines/gob/init_v4.cpp3
-rw-r--r--engines/gob/init_v6.cpp3
-rw-r--r--engines/gob/init_v7.cpp3
-rw-r--r--engines/gob/inter.cpp3
-rw-r--r--engines/gob/inter.h3
-rw-r--r--engines/gob/inter_bargon.cpp3
-rw-r--r--engines/gob/inter_fascin.cpp3
-rw-r--r--engines/gob/inter_inca2.cpp3
-rw-r--r--engines/gob/inter_playtoons.cpp3
-rw-r--r--engines/gob/inter_v1.cpp3
-rw-r--r--engines/gob/inter_v2.cpp3
-rw-r--r--engines/gob/inter_v3.cpp3
-rw-r--r--engines/gob/inter_v4.cpp3
-rw-r--r--engines/gob/inter_v5.cpp3
-rw-r--r--engines/gob/inter_v6.cpp3
-rw-r--r--engines/gob/inter_v7.cpp3
-rw-r--r--engines/gob/map.cpp3
-rw-r--r--engines/gob/map.h3
-rw-r--r--engines/gob/map_v1.cpp3
-rw-r--r--engines/gob/map_v2.cpp3
-rw-r--r--engines/gob/mult.cpp3
-rw-r--r--engines/gob/mult.h3
-rw-r--r--engines/gob/mult_v1.cpp3
-rw-r--r--engines/gob/mult_v2.cpp3
-rw-r--r--engines/gob/palanim.cpp3
-rw-r--r--engines/gob/palanim.h3
-rw-r--r--engines/gob/resources.cpp3
-rw-r--r--engines/gob/resources.h3
-rw-r--r--engines/gob/save/saveconverter.cpp5
-rw-r--r--engines/gob/save/saveconverter.h3
-rw-r--r--engines/gob/save/saveconverter_v2.cpp3
-rw-r--r--engines/gob/save/saveconverter_v3.cpp3
-rw-r--r--engines/gob/save/saveconverter_v4.cpp3
-rw-r--r--engines/gob/save/savefile.cpp3
-rw-r--r--engines/gob/save/savefile.h3
-rw-r--r--engines/gob/save/savehandler.cpp3
-rw-r--r--engines/gob/save/savehandler.h3
-rw-r--r--engines/gob/save/saveload.cpp3
-rw-r--r--engines/gob/save/saveload.h3
-rw-r--r--engines/gob/save/saveload_fascin.cpp3
-rw-r--r--engines/gob/save/saveload_inca2.cpp3
-rw-r--r--engines/gob/save/saveload_playtoons.cpp3
-rw-r--r--engines/gob/save/saveload_v2.cpp3
-rw-r--r--engines/gob/save/saveload_v3.cpp3
-rw-r--r--engines/gob/save/saveload_v4.cpp3
-rw-r--r--engines/gob/save/saveload_v6.cpp3
-rw-r--r--engines/gob/save/saveload_v7.cpp3
-rw-r--r--engines/gob/scenery.cpp3
-rw-r--r--engines/gob/scenery.h3
-rw-r--r--engines/gob/scenery_v1.cpp3
-rw-r--r--engines/gob/scenery_v2.cpp3
-rw-r--r--engines/gob/script.cpp3
-rw-r--r--engines/gob/script.h3
-rw-r--r--engines/gob/sound/adlib.cpp3
-rw-r--r--engines/gob/sound/adlib.h3
-rw-r--r--engines/gob/sound/bgatmosphere.cpp9
-rw-r--r--engines/gob/sound/bgatmosphere.h3
-rw-r--r--engines/gob/sound/cdrom.cpp3
-rw-r--r--engines/gob/sound/cdrom.h3
-rw-r--r--engines/gob/sound/infogrames.cpp3
-rw-r--r--engines/gob/sound/infogrames.h3
-rw-r--r--engines/gob/sound/pcspeaker.cpp3
-rw-r--r--engines/gob/sound/pcspeaker.h3
-rw-r--r--engines/gob/sound/protracker.cpp3
-rw-r--r--engines/gob/sound/protracker.h3
-rw-r--r--engines/gob/sound/sound.cpp3
-rw-r--r--engines/gob/sound/sound.h3
-rw-r--r--engines/gob/sound/soundblaster.cpp3
-rw-r--r--engines/gob/sound/soundblaster.h3
-rw-r--r--engines/gob/sound/sounddesc.cpp3
-rw-r--r--engines/gob/sound/sounddesc.h3
-rw-r--r--engines/gob/sound/soundmixer.cpp3
-rw-r--r--engines/gob/sound/soundmixer.h3
-rw-r--r--engines/gob/surface.cpp3
-rw-r--r--engines/gob/surface.h3
-rw-r--r--engines/gob/totfile.cpp3
-rw-r--r--engines/gob/totfile.h3
-rw-r--r--engines/gob/util.cpp3
-rw-r--r--engines/gob/util.h3
-rw-r--r--engines/gob/variables.cpp3
-rw-r--r--engines/gob/variables.h3
-rw-r--r--engines/gob/video.cpp3
-rw-r--r--engines/gob/video.h3
-rw-r--r--engines/gob/video_v1.cpp3
-rw-r--r--engines/gob/video_v2.cpp3
-rw-r--r--engines/gob/video_v6.cpp3
-rw-r--r--engines/gob/videoplayer.cpp3
-rw-r--r--engines/gob/videoplayer.h3
-rw-r--r--engines/groovie/cell.cpp3
-rw-r--r--engines/groovie/cell.h3
-rw-r--r--engines/groovie/cursor.cpp3
-rw-r--r--engines/groovie/cursor.h3
-rw-r--r--engines/groovie/debug.cpp3
-rw-r--r--engines/groovie/debug.h3
-rw-r--r--engines/groovie/detection.cpp5
-rw-r--r--engines/groovie/detection.h3
-rw-r--r--engines/groovie/font.cpp3
-rw-r--r--engines/groovie/font.h3
-rw-r--r--engines/groovie/graphics.cpp3
-rw-r--r--engines/groovie/graphics.h3
-rw-r--r--engines/groovie/groovie.cpp3
-rw-r--r--engines/groovie/groovie.h3
-rw-r--r--engines/groovie/lzss.cpp3
-rw-r--r--engines/groovie/lzss.h3
-rw-r--r--engines/groovie/music.cpp3
-rw-r--r--engines/groovie/music.h3
-rw-r--r--engines/groovie/player.cpp3
-rw-r--r--engines/groovie/player.h3
-rw-r--r--engines/groovie/resource.cpp3
-rw-r--r--engines/groovie/resource.h3
-rw-r--r--engines/groovie/roq.cpp3
-rw-r--r--engines/groovie/roq.h3
-rw-r--r--engines/groovie/saveload.cpp3
-rw-r--r--engines/groovie/saveload.h3
-rw-r--r--engines/groovie/script.cpp10
-rw-r--r--engines/groovie/script.h3
-rw-r--r--engines/groovie/vdx.cpp3
-rw-r--r--engines/groovie/vdx.h3
-rw-r--r--engines/hugo/console.cpp121
-rw-r--r--engines/hugo/console.h9
-rw-r--r--engines/hugo/detection.cpp5
-rw-r--r--engines/hugo/dialogs.cpp3
-rw-r--r--engines/hugo/dialogs.h3
-rw-r--r--engines/hugo/display.cpp9
-rw-r--r--engines/hugo/display.h3
-rw-r--r--engines/hugo/file.cpp3
-rw-r--r--engines/hugo/file.h3
-rw-r--r--engines/hugo/file_v1d.cpp3
-rw-r--r--engines/hugo/file_v1w.cpp3
-rw-r--r--engines/hugo/file_v2d.cpp3
-rw-r--r--engines/hugo/file_v2w.cpp3
-rw-r--r--engines/hugo/file_v3d.cpp3
-rw-r--r--engines/hugo/game.h3
-rw-r--r--engines/hugo/hugo.cpp28
-rw-r--r--engines/hugo/hugo.h5
-rw-r--r--engines/hugo/intro.cpp3
-rw-r--r--engines/hugo/intro.h3
-rw-r--r--engines/hugo/inventory.cpp3
-rw-r--r--engines/hugo/inventory.h3
-rw-r--r--engines/hugo/mouse.cpp3
-rw-r--r--engines/hugo/mouse.h3
-rw-r--r--engines/hugo/object.cpp3
-rw-r--r--engines/hugo/object.h3
-rw-r--r--engines/hugo/object_v1d.cpp5
-rw-r--r--engines/hugo/object_v1w.cpp5
-rw-r--r--engines/hugo/object_v2d.cpp5
-rw-r--r--engines/hugo/object_v3d.cpp3
-rw-r--r--engines/hugo/parser.cpp3
-rw-r--r--engines/hugo/parser.h8
-rw-r--r--engines/hugo/parser_v1d.cpp3
-rw-r--r--engines/hugo/parser_v1w.cpp3
-rw-r--r--engines/hugo/parser_v2d.cpp3
-rw-r--r--engines/hugo/parser_v3d.cpp3
-rw-r--r--engines/hugo/route.cpp3
-rw-r--r--engines/hugo/route.h3
-rw-r--r--engines/hugo/schedule.cpp29
-rw-r--r--engines/hugo/schedule.h19
-rw-r--r--engines/hugo/sound.cpp3
-rw-r--r--engines/hugo/sound.h3
-rw-r--r--engines/hugo/text.cpp3
-rw-r--r--engines/hugo/text.h3
-rw-r--r--engines/hugo/util.cpp3
-rw-r--r--engines/hugo/util.h3
-rw-r--r--engines/kyra/animator_hof.cpp3
-rw-r--r--engines/kyra/animator_lok.cpp3
-rw-r--r--engines/kyra/animator_lok.h3
-rw-r--r--engines/kyra/animator_mr.cpp3
-rw-r--r--engines/kyra/animator_tim.cpp3
-rw-r--r--engines/kyra/animator_v2.cpp3
-rw-r--r--engines/kyra/debugger.cpp3
-rw-r--r--engines/kyra/debugger.h3
-rw-r--r--engines/kyra/detection.cpp5
-rw-r--r--engines/kyra/detection_tables.h3
-rw-r--r--engines/kyra/gui.cpp3
-rw-r--r--engines/kyra/gui.h3
-rw-r--r--engines/kyra/gui_hof.cpp3
-rw-r--r--engines/kyra/gui_hof.h3
-rw-r--r--engines/kyra/gui_lok.cpp3
-rw-r--r--engines/kyra/gui_lok.h3
-rw-r--r--engines/kyra/gui_lol.cpp3
-rw-r--r--engines/kyra/gui_lol.h3
-rw-r--r--engines/kyra/gui_mr.cpp3
-rw-r--r--engines/kyra/gui_mr.h3
-rw-r--r--engines/kyra/gui_v2.cpp3
-rw-r--r--engines/kyra/gui_v2.h3
-rw-r--r--engines/kyra/item.h3
-rw-r--r--engines/kyra/items_hof.cpp3
-rw-r--r--engines/kyra/items_lok.cpp3
-rw-r--r--engines/kyra/items_lol.cpp3
-rw-r--r--engines/kyra/items_mr.cpp3
-rw-r--r--engines/kyra/items_v2.cpp3
-rw-r--r--engines/kyra/kyra_hof.cpp3
-rw-r--r--engines/kyra/kyra_hof.h3
-rw-r--r--engines/kyra/kyra_lok.cpp3
-rw-r--r--engines/kyra/kyra_lok.h3
-rw-r--r--engines/kyra/kyra_mr.cpp3
-rw-r--r--engines/kyra/kyra_mr.h3
-rw-r--r--engines/kyra/kyra_v1.cpp10
-rw-r--r--engines/kyra/kyra_v1.h3
-rw-r--r--engines/kyra/kyra_v2.cpp3
-rw-r--r--engines/kyra/kyra_v2.h3
-rw-r--r--engines/kyra/lol.cpp3
-rw-r--r--engines/kyra/lol.h3
-rw-r--r--engines/kyra/resource.cpp3
-rw-r--r--engines/kyra/resource.h3
-rw-r--r--engines/kyra/resource_intern.cpp3
-rw-r--r--engines/kyra/resource_intern.h3
-rw-r--r--engines/kyra/saveload.cpp3
-rw-r--r--engines/kyra/saveload_hof.cpp3
-rw-r--r--engines/kyra/saveload_lok.cpp3
-rw-r--r--engines/kyra/saveload_lol.cpp3
-rw-r--r--engines/kyra/saveload_mr.cpp3
-rw-r--r--engines/kyra/scene_hof.cpp3
-rw-r--r--engines/kyra/scene_lok.cpp3
-rw-r--r--engines/kyra/scene_lol.cpp3
-rw-r--r--engines/kyra/scene_mr.cpp3
-rw-r--r--engines/kyra/scene_v1.cpp3
-rw-r--r--engines/kyra/scene_v2.cpp3
-rw-r--r--engines/kyra/screen.cpp3
-rw-r--r--engines/kyra/screen.h3
-rw-r--r--engines/kyra/screen_hof.cpp3
-rw-r--r--engines/kyra/screen_hof.h3
-rw-r--r--engines/kyra/screen_lok.cpp3
-rw-r--r--engines/kyra/screen_lok.h3
-rw-r--r--engines/kyra/screen_lol.cpp3
-rw-r--r--engines/kyra/screen_lol.h3
-rw-r--r--engines/kyra/screen_mr.cpp3
-rw-r--r--engines/kyra/screen_mr.h3
-rw-r--r--engines/kyra/screen_v2.cpp3
-rw-r--r--engines/kyra/screen_v2.h3
-rw-r--r--engines/kyra/script.cpp3
-rw-r--r--engines/kyra/script.h3
-rw-r--r--engines/kyra/script_hof.cpp3
-rw-r--r--engines/kyra/script_lok.cpp3
-rw-r--r--engines/kyra/script_lol.cpp3
-rw-r--r--engines/kyra/script_mr.cpp3
-rw-r--r--engines/kyra/script_tim.cpp3
-rw-r--r--engines/kyra/script_tim.h3
-rw-r--r--engines/kyra/script_v1.cpp3
-rw-r--r--engines/kyra/script_v2.cpp3
-rw-r--r--engines/kyra/seqplayer.cpp3
-rw-r--r--engines/kyra/seqplayer.h3
-rw-r--r--engines/kyra/sequences_hof.cpp3
-rw-r--r--engines/kyra/sequences_lok.cpp3
-rw-r--r--engines/kyra/sequences_lol.cpp3
-rw-r--r--engines/kyra/sequences_mr.cpp3
-rw-r--r--engines/kyra/sequences_v2.cpp3
-rw-r--r--engines/kyra/sound.cpp7
-rw-r--r--engines/kyra/sound.h11
-rw-r--r--engines/kyra/sound_adlib.cpp5
-rw-r--r--engines/kyra/sound_adlib.h3
-rw-r--r--engines/kyra/sound_amiga.cpp3
-rw-r--r--engines/kyra/sound_digital.cpp3
-rw-r--r--engines/kyra/sound_intern.h7
-rw-r--r--engines/kyra/sound_lok.cpp3
-rw-r--r--engines/kyra/sound_lol.cpp3
-rw-r--r--engines/kyra/sound_midi.cpp23
-rw-r--r--engines/kyra/sound_pcspk.cpp3
-rw-r--r--engines/kyra/sound_towns.cpp19
-rw-r--r--engines/kyra/sprites.cpp7
-rw-r--r--engines/kyra/sprites.h3
-rw-r--r--engines/kyra/sprites_lol.cpp3
-rw-r--r--engines/kyra/staticres.cpp3
-rw-r--r--engines/kyra/staticres_lol.cpp3
-rw-r--r--engines/kyra/text.cpp3
-rw-r--r--engines/kyra/text.h3
-rw-r--r--engines/kyra/text_hof.cpp3
-rw-r--r--engines/kyra/text_hof.h3
-rw-r--r--engines/kyra/text_lok.cpp3
-rw-r--r--engines/kyra/text_lol.cpp3
-rw-r--r--engines/kyra/text_lol.h3
-rw-r--r--engines/kyra/text_mr.cpp3
-rw-r--r--engines/kyra/text_mr.h3
-rw-r--r--engines/kyra/timer.cpp3
-rw-r--r--engines/kyra/timer.h3
-rw-r--r--engines/kyra/timer_hof.cpp3
-rw-r--r--engines/kyra/timer_lok.cpp3
-rw-r--r--engines/kyra/timer_lol.cpp3
-rw-r--r--engines/kyra/timer_mr.cpp3
-rw-r--r--engines/kyra/util.cpp3
-rw-r--r--engines/kyra/util.h3
-rw-r--r--engines/kyra/vqa.cpp3
-rw-r--r--engines/kyra/vqa.h3
-rw-r--r--engines/kyra/wsamovie.cpp3
-rw-r--r--engines/kyra/wsamovie.h3
-rw-r--r--engines/lastexpress/data/animation.cpp3
-rw-r--r--engines/lastexpress/data/animation.h3
-rw-r--r--engines/lastexpress/data/archive.cpp3
-rw-r--r--engines/lastexpress/data/archive.h3
-rw-r--r--engines/lastexpress/data/background.cpp3
-rw-r--r--engines/lastexpress/data/background.h3
-rw-r--r--engines/lastexpress/data/cursor.cpp3
-rw-r--r--engines/lastexpress/data/cursor.h3
-rw-r--r--engines/lastexpress/data/font.cpp3
-rw-r--r--engines/lastexpress/data/font.h3
-rw-r--r--engines/lastexpress/data/scene.cpp3
-rw-r--r--engines/lastexpress/data/scene.h3
-rw-r--r--engines/lastexpress/data/sequence.cpp3
-rw-r--r--engines/lastexpress/data/sequence.h3
-rw-r--r--engines/lastexpress/data/snd.cpp3
-rw-r--r--engines/lastexpress/data/snd.h3
-rw-r--r--engines/lastexpress/data/subtitle.cpp3
-rw-r--r--engines/lastexpress/data/subtitle.h3
-rw-r--r--engines/lastexpress/debug.cpp3
-rw-r--r--engines/lastexpress/debug.h3
-rw-r--r--engines/lastexpress/detection.cpp5
-rw-r--r--engines/lastexpress/drawable.h3
-rw-r--r--engines/lastexpress/entities/abbot.cpp3
-rw-r--r--engines/lastexpress/entities/abbot.h3
-rw-r--r--engines/lastexpress/entities/alexei.cpp3
-rw-r--r--engines/lastexpress/entities/alexei.h3
-rw-r--r--engines/lastexpress/entities/alouan.cpp3
-rw-r--r--engines/lastexpress/entities/alouan.h3
-rw-r--r--engines/lastexpress/entities/anna.cpp3
-rw-r--r--engines/lastexpress/entities/anna.h3
-rw-r--r--engines/lastexpress/entities/august.cpp3
-rw-r--r--engines/lastexpress/entities/august.h3
-rw-r--r--engines/lastexpress/entities/boutarel.cpp3
-rw-r--r--engines/lastexpress/entities/boutarel.h3
-rw-r--r--engines/lastexpress/entities/chapters.cpp3
-rw-r--r--engines/lastexpress/entities/chapters.h3
-rw-r--r--engines/lastexpress/entities/cooks.cpp3
-rw-r--r--engines/lastexpress/entities/cooks.h3
-rw-r--r--engines/lastexpress/entities/coudert.cpp3
-rw-r--r--engines/lastexpress/entities/coudert.h3
-rw-r--r--engines/lastexpress/entities/entity.cpp3
-rw-r--r--engines/lastexpress/entities/entity.h3
-rw-r--r--engines/lastexpress/entities/entity39.cpp3
-rw-r--r--engines/lastexpress/entities/entity39.h3
-rw-r--r--engines/lastexpress/entities/entity_intern.h3
-rw-r--r--engines/lastexpress/entities/francois.cpp3
-rw-r--r--engines/lastexpress/entities/francois.h3
-rw-r--r--engines/lastexpress/entities/gendarmes.cpp3
-rw-r--r--engines/lastexpress/entities/gendarmes.h3
-rw-r--r--engines/lastexpress/entities/hadija.cpp3
-rw-r--r--engines/lastexpress/entities/hadija.h3
-rw-r--r--engines/lastexpress/entities/ivo.cpp3
-rw-r--r--engines/lastexpress/entities/ivo.h3
-rw-r--r--engines/lastexpress/entities/kahina.cpp3
-rw-r--r--engines/lastexpress/entities/kahina.h3
-rw-r--r--engines/lastexpress/entities/kronos.cpp3
-rw-r--r--engines/lastexpress/entities/kronos.h3
-rw-r--r--engines/lastexpress/entities/mahmud.cpp3
-rw-r--r--engines/lastexpress/entities/mahmud.h3
-rw-r--r--engines/lastexpress/entities/max.cpp3
-rw-r--r--engines/lastexpress/entities/max.h3
-rw-r--r--engines/lastexpress/entities/mertens.cpp3
-rw-r--r--engines/lastexpress/entities/mertens.h3
-rw-r--r--engines/lastexpress/entities/milos.cpp3
-rw-r--r--engines/lastexpress/entities/milos.h3
-rw-r--r--engines/lastexpress/entities/mmeboutarel.cpp3
-rw-r--r--engines/lastexpress/entities/mmeboutarel.h3
-rw-r--r--engines/lastexpress/entities/pascale.cpp3
-rw-r--r--engines/lastexpress/entities/pascale.h3
-rw-r--r--engines/lastexpress/entities/rebecca.cpp3
-rw-r--r--engines/lastexpress/entities/rebecca.h3
-rw-r--r--engines/lastexpress/entities/salko.cpp3
-rw-r--r--engines/lastexpress/entities/salko.h3
-rw-r--r--engines/lastexpress/entities/servers0.cpp3
-rw-r--r--engines/lastexpress/entities/servers0.h3
-rw-r--r--engines/lastexpress/entities/servers1.cpp3
-rw-r--r--engines/lastexpress/entities/servers1.h3
-rw-r--r--engines/lastexpress/entities/sophie.cpp3
-rw-r--r--engines/lastexpress/entities/sophie.h3
-rw-r--r--engines/lastexpress/entities/tables.cpp3
-rw-r--r--engines/lastexpress/entities/tables.h3
-rw-r--r--engines/lastexpress/entities/tatiana.cpp3
-rw-r--r--engines/lastexpress/entities/tatiana.h3
-rw-r--r--engines/lastexpress/entities/train.cpp3
-rw-r--r--engines/lastexpress/entities/train.h3
-rw-r--r--engines/lastexpress/entities/vassili.cpp3
-rw-r--r--engines/lastexpress/entities/vassili.h3
-rw-r--r--engines/lastexpress/entities/verges.cpp3
-rw-r--r--engines/lastexpress/entities/verges.h3
-rw-r--r--engines/lastexpress/entities/vesna.cpp3
-rw-r--r--engines/lastexpress/entities/vesna.h3
-rw-r--r--engines/lastexpress/entities/yasmin.cpp3
-rw-r--r--engines/lastexpress/entities/yasmin.h3
-rw-r--r--engines/lastexpress/eventhandler.h3
-rw-r--r--engines/lastexpress/game/action.cpp3
-rw-r--r--engines/lastexpress/game/action.h3
-rw-r--r--engines/lastexpress/game/beetle.cpp3
-rw-r--r--engines/lastexpress/game/beetle.h3
-rw-r--r--engines/lastexpress/game/entities.cpp3
-rw-r--r--engines/lastexpress/game/entities.h3
-rw-r--r--engines/lastexpress/game/fight.cpp3
-rw-r--r--engines/lastexpress/game/fight.h3
-rw-r--r--engines/lastexpress/game/inventory.cpp74
-rw-r--r--engines/lastexpress/game/inventory.h3
-rw-r--r--engines/lastexpress/game/logic.cpp3
-rw-r--r--engines/lastexpress/game/logic.h3
-rw-r--r--engines/lastexpress/game/menu.cpp3
-rw-r--r--engines/lastexpress/game/menu.h3
-rw-r--r--engines/lastexpress/game/object.cpp3
-rw-r--r--engines/lastexpress/game/object.h3
-rw-r--r--engines/lastexpress/game/savegame.cpp3
-rw-r--r--engines/lastexpress/game/savegame.h3
-rw-r--r--engines/lastexpress/game/savepoint.cpp3
-rw-r--r--engines/lastexpress/game/savepoint.h3
-rw-r--r--engines/lastexpress/game/scenes.cpp3
-rw-r--r--engines/lastexpress/game/scenes.h3
-rw-r--r--engines/lastexpress/game/sound.cpp107
-rw-r--r--engines/lastexpress/game/sound.h21
-rw-r--r--engines/lastexpress/game/state.cpp3
-rw-r--r--engines/lastexpress/game/state.h3
-rw-r--r--engines/lastexpress/graphics.cpp3
-rw-r--r--engines/lastexpress/graphics.h3
-rw-r--r--engines/lastexpress/helpers.h3
-rw-r--r--engines/lastexpress/lastexpress.cpp20
-rw-r--r--engines/lastexpress/lastexpress.h3
-rw-r--r--engines/lastexpress/resource.cpp3
-rw-r--r--engines/lastexpress/resource.h3
-rw-r--r--engines/lastexpress/shared.h3
-rw-r--r--engines/lure/animseq.cpp3
-rw-r--r--engines/lure/animseq.h3
-rw-r--r--engines/lure/debugger.cpp5
-rw-r--r--engines/lure/debugger.h3
-rw-r--r--engines/lure/decode.cpp13
-rw-r--r--engines/lure/decode.h3
-rw-r--r--engines/lure/detection.cpp5
-rw-r--r--engines/lure/disk.cpp3
-rw-r--r--engines/lure/disk.h3
-rw-r--r--engines/lure/events.cpp3
-rw-r--r--engines/lure/events.h3
-rw-r--r--engines/lure/fights.cpp3
-rw-r--r--engines/lure/fights.h3
-rw-r--r--engines/lure/game.cpp3
-rw-r--r--engines/lure/game.h3
-rw-r--r--engines/lure/hotspots.cpp3
-rw-r--r--engines/lure/hotspots.h3
-rw-r--r--engines/lure/intro.cpp3
-rw-r--r--engines/lure/intro.h3
-rw-r--r--engines/lure/lure.cpp20
-rw-r--r--engines/lure/lure.h5
-rw-r--r--engines/lure/luredefs.h3
-rw-r--r--engines/lure/memory.cpp3
-rw-r--r--engines/lure/memory.h3
-rw-r--r--engines/lure/menu.cpp3
-rw-r--r--engines/lure/menu.h3
-rw-r--r--engines/lure/palette.cpp3
-rw-r--r--engines/lure/palette.h3
-rw-r--r--engines/lure/res.cpp5
-rw-r--r--engines/lure/res.h5
-rw-r--r--engines/lure/res_struct.cpp5
-rw-r--r--engines/lure/res_struct.h3
-rw-r--r--engines/lure/room.cpp3
-rw-r--r--engines/lure/room.h3
-rw-r--r--engines/lure/screen.cpp3
-rw-r--r--engines/lure/screen.h3
-rw-r--r--engines/lure/scripts.cpp6
-rw-r--r--engines/lure/scripts.h3
-rw-r--r--engines/lure/sound.cpp3
-rw-r--r--engines/lure/sound.h5
-rw-r--r--engines/lure/strings.cpp3
-rw-r--r--engines/lure/strings.h3
-rw-r--r--engines/lure/surface.cpp11
-rw-r--r--engines/lure/surface.h7
-rw-r--r--engines/m4/actor.cpp3
-rw-r--r--engines/m4/actor.h3
-rw-r--r--engines/m4/animation.cpp15
-rw-r--r--engines/m4/animation.h5
-rw-r--r--engines/m4/assets.cpp3
-rw-r--r--engines/m4/assets.h3
-rw-r--r--engines/m4/burger_data.h3
-rw-r--r--engines/m4/compression.cpp11
-rw-r--r--engines/m4/compression.h5
-rw-r--r--engines/m4/console.cpp23
-rw-r--r--engines/m4/console.h3
-rw-r--r--engines/m4/converse.cpp3
-rw-r--r--engines/m4/converse.h3
-rw-r--r--engines/m4/detection.cpp5
-rw-r--r--engines/m4/dialogs.cpp3
-rw-r--r--engines/m4/dialogs.h3
-rw-r--r--engines/m4/events.cpp3
-rw-r--r--engines/m4/events.h3
-rw-r--r--engines/m4/font.cpp3
-rw-r--r--engines/m4/font.h3
-rw-r--r--engines/m4/globals.cpp27
-rw-r--r--engines/m4/globals.h77
-rw-r--r--engines/m4/graphics.cpp3
-rw-r--r--engines/m4/graphics.h3
-rw-r--r--engines/m4/gui.cpp3
-rw-r--r--engines/m4/gui.h5
-rw-r--r--engines/m4/hotspot.cpp3
-rw-r--r--engines/m4/hotspot.h3
-rw-r--r--engines/m4/m4.cpp11
-rw-r--r--engines/m4/m4.h7
-rw-r--r--engines/m4/m4_menus.cpp3
-rw-r--r--engines/m4/m4_menus.h3
-rw-r--r--engines/m4/m4_scene.cpp3
-rw-r--r--engines/m4/m4_scene.h3
-rw-r--r--engines/m4/m4_views.cpp3
-rw-r--r--engines/m4/m4_views.h3
-rw-r--r--engines/m4/mads_anim.cpp5
-rw-r--r--engines/m4/mads_anim.h3
-rw-r--r--engines/m4/mads_logic.cpp107
-rw-r--r--engines/m4/mads_logic.h11
-rw-r--r--engines/m4/mads_menus.cpp13
-rw-r--r--engines/m4/mads_menus.h7
-rw-r--r--engines/m4/mads_player.cpp3
-rw-r--r--engines/m4/mads_player.h3
-rw-r--r--engines/m4/mads_scene.cpp57
-rw-r--r--engines/m4/mads_scene.h10
-rw-r--r--engines/m4/mads_views.cpp17
-rw-r--r--engines/m4/mads_views.h14
-rw-r--r--engines/m4/midi.cpp3
-rw-r--r--engines/m4/midi.h3
-rw-r--r--engines/m4/rails.cpp11
-rw-r--r--engines/m4/rails.h5
-rw-r--r--engines/m4/resource.cpp3
-rw-r--r--engines/m4/resource.h3
-rw-r--r--engines/m4/saveload.cpp3
-rw-r--r--engines/m4/saveload.h3
-rw-r--r--engines/m4/scene.cpp3
-rw-r--r--engines/m4/scene.h3
-rw-r--r--engines/m4/script.cpp3
-rw-r--r--engines/m4/script.h3
-rw-r--r--engines/m4/sound.cpp3
-rw-r--r--engines/m4/sound.h3
-rw-r--r--engines/m4/sprite.cpp3
-rw-r--r--engines/m4/sprite.h3
-rw-r--r--engines/m4/staticres.cpp3
-rw-r--r--engines/m4/staticres.h3
-rw-r--r--engines/m4/viewmgr.cpp3
-rw-r--r--engines/m4/viewmgr.h3
-rw-r--r--engines/m4/woodscript.cpp3
-rw-r--r--engines/m4/woodscript.h3
-rw-r--r--engines/m4/ws_machine.cpp3
-rw-r--r--engines/m4/ws_sequence.cpp3
-rw-r--r--engines/made/console.cpp3
-rw-r--r--engines/made/console.h3
-rw-r--r--engines/made/database.cpp3
-rw-r--r--engines/made/database.h3
-rw-r--r--engines/made/detection.cpp5
-rw-r--r--engines/made/graphics.cpp3
-rw-r--r--engines/made/graphics.h3
-rw-r--r--engines/made/made.cpp7
-rw-r--r--engines/made/made.h3
-rw-r--r--engines/made/music.cpp3
-rw-r--r--engines/made/music.h3
-rw-r--r--engines/made/pmvplayer.cpp3
-rw-r--r--engines/made/pmvplayer.h3
-rw-r--r--engines/made/redreader.cpp3
-rw-r--r--engines/made/redreader.h3
-rw-r--r--engines/made/resource.cpp3
-rw-r--r--engines/made/resource.h3
-rw-r--r--engines/made/screen.cpp3
-rw-r--r--engines/made/screen.h3
-rw-r--r--engines/made/screenfx.cpp3
-rw-r--r--engines/made/screenfx.h3
-rw-r--r--engines/made/script.cpp3
-rw-r--r--engines/made/script.h3
-rw-r--r--engines/made/scriptfuncs.cpp3
-rw-r--r--engines/made/scriptfuncs.h3
-rw-r--r--engines/made/sound.cpp3
-rw-r--r--engines/made/sound.h3
-rw-r--r--engines/metaengine.h3
-rw-r--r--engines/mohawk/bitmap.cpp3
-rw-r--r--engines/mohawk/bitmap.h3
-rw-r--r--engines/mohawk/console.cpp3
-rw-r--r--engines/mohawk/console.h3
-rw-r--r--engines/mohawk/cstime.cpp8
-rw-r--r--engines/mohawk/cstime.h3
-rw-r--r--engines/mohawk/cstime_cases.cpp3
-rw-r--r--engines/mohawk/cstime_cases.h3
-rw-r--r--engines/mohawk/cstime_game.cpp3
-rw-r--r--engines/mohawk/cstime_game.h3
-rw-r--r--engines/mohawk/cstime_ui.cpp7
-rw-r--r--engines/mohawk/cstime_ui.h3
-rw-r--r--engines/mohawk/cstime_view.cpp3
-rw-r--r--engines/mohawk/cstime_view.h3
-rw-r--r--engines/mohawk/cursors.cpp10
-rw-r--r--engines/mohawk/cursors.h3
-rw-r--r--engines/mohawk/detection.cpp5
-rw-r--r--engines/mohawk/detection_tables.h3
-rw-r--r--engines/mohawk/dialogs.cpp28
-rw-r--r--engines/mohawk/dialogs.h5
-rw-r--r--engines/mohawk/graphics.cpp46
-rw-r--r--engines/mohawk/graphics.h10
-rw-r--r--engines/mohawk/installer_archive.cpp3
-rw-r--r--engines/mohawk/installer_archive.h3
-rw-r--r--engines/mohawk/livingbooks.cpp63
-rw-r--r--engines/mohawk/livingbooks.h14
-rw-r--r--engines/mohawk/livingbooks_code.cpp15
-rw-r--r--engines/mohawk/livingbooks_code.h5
-rw-r--r--engines/mohawk/mohawk.cpp3
-rw-r--r--engines/mohawk/mohawk.h3
-rw-r--r--engines/mohawk/myst.cpp84
-rw-r--r--engines/mohawk/myst.h7
-rw-r--r--engines/mohawk/myst_areas.cpp3
-rw-r--r--engines/mohawk/myst_areas.h3
-rw-r--r--engines/mohawk/myst_scripts.cpp22
-rw-r--r--engines/mohawk/myst_scripts.h8
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp7
-rw-r--r--engines/mohawk/myst_stacks/channelwood.h5
-rw-r--r--engines/mohawk/myst_stacks/credits.cpp3
-rw-r--r--engines/mohawk/myst_stacks/credits.h3
-rw-r--r--engines/mohawk/myst_stacks/demo.cpp3
-rw-r--r--engines/mohawk/myst_stacks/demo.h3
-rw-r--r--engines/mohawk/myst_stacks/dni.cpp3
-rw-r--r--engines/mohawk/myst_stacks/dni.h3
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp3
-rw-r--r--engines/mohawk/myst_stacks/intro.h3
-rw-r--r--engines/mohawk/myst_stacks/makingof.cpp3
-rw-r--r--engines/mohawk/myst_stacks/makingof.h3
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp362
-rw-r--r--engines/mohawk/myst_stacks/mechanical.h57
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp19
-rw-r--r--engines/mohawk/myst_stacks/myst.h5
-rw-r--r--engines/mohawk/myst_stacks/preview.cpp3
-rw-r--r--engines/mohawk/myst_stacks/preview.h3
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp3
-rw-r--r--engines/mohawk/myst_stacks/selenitic.h5
-rw-r--r--engines/mohawk/myst_stacks/slides.cpp3
-rw-r--r--engines/mohawk/myst_stacks/slides.h3
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp3
-rw-r--r--engines/mohawk/myst_stacks/stoneship.h5
-rw-r--r--engines/mohawk/myst_state.cpp9
-rw-r--r--engines/mohawk/myst_state.h3
-rw-r--r--engines/mohawk/resource.cpp3
-rw-r--r--engines/mohawk/resource.h3
-rw-r--r--engines/mohawk/resource_cache.cpp3
-rw-r--r--engines/mohawk/resource_cache.h3
-rw-r--r--engines/mohawk/riven.cpp8
-rw-r--r--engines/mohawk/riven.h3
-rw-r--r--engines/mohawk/riven_external.cpp3
-rw-r--r--engines/mohawk/riven_external.h3
-rw-r--r--engines/mohawk/riven_saveload.cpp3
-rw-r--r--engines/mohawk/riven_saveload.h3
-rw-r--r--engines/mohawk/riven_scripts.cpp3
-rw-r--r--engines/mohawk/riven_scripts.h3
-rw-r--r--engines/mohawk/riven_vars.cpp3
-rw-r--r--engines/mohawk/sound.cpp12
-rw-r--r--engines/mohawk/sound.h3
-rw-r--r--engines/mohawk/video.cpp3
-rw-r--r--engines/mohawk/video.h3
-rw-r--r--engines/mohawk/view.cpp3
-rw-r--r--engines/mohawk/view.h3
-rw-r--r--engines/parallaction/balloons.cpp3
-rw-r--r--engines/parallaction/callables_br.cpp3
-rw-r--r--engines/parallaction/callables_ns.cpp3
-rw-r--r--engines/parallaction/debug.cpp3
-rw-r--r--engines/parallaction/detection.cpp5
-rw-r--r--engines/parallaction/dialogue.cpp3
-rw-r--r--engines/parallaction/disk.cpp3
-rw-r--r--engines/parallaction/disk.h3
-rw-r--r--engines/parallaction/disk_br.cpp3
-rw-r--r--engines/parallaction/disk_ns.cpp3
-rw-r--r--engines/parallaction/exec.cpp3
-rw-r--r--engines/parallaction/exec.h3
-rw-r--r--engines/parallaction/exec_br.cpp3
-rw-r--r--engines/parallaction/exec_ns.cpp3
-rw-r--r--engines/parallaction/font.cpp3
-rw-r--r--engines/parallaction/gfxbase.cpp3
-rw-r--r--engines/parallaction/graphics.cpp3
-rw-r--r--engines/parallaction/graphics.h3
-rw-r--r--engines/parallaction/gui.cpp3
-rw-r--r--engines/parallaction/gui.h3
-rw-r--r--engines/parallaction/gui_br.cpp3
-rw-r--r--engines/parallaction/gui_ns.cpp3
-rw-r--r--engines/parallaction/input.cpp3
-rw-r--r--engines/parallaction/input.h3
-rw-r--r--engines/parallaction/inventory.cpp3
-rw-r--r--engines/parallaction/inventory.h3
-rw-r--r--engines/parallaction/objects.cpp3
-rw-r--r--engines/parallaction/objects.h3
-rw-r--r--engines/parallaction/parallaction.cpp8
-rw-r--r--engines/parallaction/parallaction.h3
-rw-r--r--engines/parallaction/parallaction_br.cpp3
-rw-r--r--engines/parallaction/parallaction_ns.cpp3
-rw-r--r--engines/parallaction/parser.cpp3
-rw-r--r--engines/parallaction/parser.h3
-rw-r--r--engines/parallaction/parser_br.cpp3
-rw-r--r--engines/parallaction/parser_ns.cpp3
-rw-r--r--engines/parallaction/saveload.cpp3
-rw-r--r--engines/parallaction/saveload.h3
-rw-r--r--engines/parallaction/sound.h3
-rw-r--r--engines/parallaction/sound_br.cpp3
-rw-r--r--engines/parallaction/sound_ns.cpp3
-rw-r--r--engines/parallaction/staticres.cpp3
-rw-r--r--engines/parallaction/walk.cpp3
-rw-r--r--engines/parallaction/walk.h3
-rw-r--r--engines/queen/bankman.cpp3
-rw-r--r--engines/queen/bankman.h3
-rw-r--r--engines/queen/command.cpp7
-rw-r--r--engines/queen/command.h5
-rw-r--r--engines/queen/credits.cpp3
-rw-r--r--engines/queen/credits.h3
-rw-r--r--engines/queen/cutaway.cpp7
-rw-r--r--engines/queen/cutaway.h3
-rw-r--r--engines/queen/debug.cpp3
-rw-r--r--engines/queen/debug.h3
-rw-r--r--engines/queen/defs.h3
-rw-r--r--engines/queen/display.cpp7
-rw-r--r--engines/queen/display.h7
-rw-r--r--engines/queen/graphics.cpp3
-rw-r--r--engines/queen/graphics.h3
-rw-r--r--engines/queen/grid.cpp3
-rw-r--r--engines/queen/grid.h3
-rw-r--r--engines/queen/input.cpp3
-rw-r--r--engines/queen/input.h3
-rw-r--r--engines/queen/journal.cpp3
-rw-r--r--engines/queen/journal.h3
-rw-r--r--engines/queen/logic.cpp5
-rw-r--r--engines/queen/logic.h3
-rw-r--r--engines/queen/midiadlib.cpp3
-rw-r--r--engines/queen/music.cpp10
-rw-r--r--engines/queen/music.h3
-rw-r--r--engines/queen/musicdata.cpp9
-rw-r--r--engines/queen/queen.cpp9
-rw-r--r--engines/queen/queen.h3
-rw-r--r--engines/queen/resource.cpp3
-rw-r--r--engines/queen/resource.h3
-rw-r--r--engines/queen/restables.cpp3
-rw-r--r--engines/queen/sound.cpp3
-rw-r--r--engines/queen/sound.h3
-rw-r--r--engines/queen/state.cpp3
-rw-r--r--engines/queen/state.h3
-rw-r--r--engines/queen/structs.h9
-rw-r--r--engines/queen/talk.cpp3
-rw-r--r--engines/queen/talk.h3
-rw-r--r--engines/queen/walk.cpp7
-rw-r--r--engines/queen/walk.h3
-rw-r--r--engines/saga/actor.cpp3
-rw-r--r--engines/saga/actor.h3
-rw-r--r--engines/saga/actor_path.cpp3
-rw-r--r--engines/saga/actor_walk.cpp3
-rw-r--r--engines/saga/animation.cpp3
-rw-r--r--engines/saga/animation.h3
-rw-r--r--engines/saga/console.cpp3
-rw-r--r--engines/saga/console.h3
-rw-r--r--engines/saga/detection.cpp5
-rw-r--r--engines/saga/detection_tables.h3
-rw-r--r--engines/saga/displayinfo.h3
-rw-r--r--engines/saga/events.cpp3
-rw-r--r--engines/saga/events.h3
-rw-r--r--engines/saga/font.cpp3
-rw-r--r--engines/saga/font.h3
-rw-r--r--engines/saga/font_map.cpp3
-rw-r--r--engines/saga/gfx.cpp3
-rw-r--r--engines/saga/gfx.h3
-rw-r--r--engines/saga/image.cpp3
-rw-r--r--engines/saga/input.cpp3
-rw-r--r--engines/saga/interface.cpp3
-rw-r--r--engines/saga/interface.h3
-rw-r--r--engines/saga/introproc_ihnm.cpp3
-rw-r--r--engines/saga/introproc_ite.cpp3
-rw-r--r--engines/saga/introproc_saga2.cpp3
-rw-r--r--engines/saga/isomap.cpp3
-rw-r--r--engines/saga/isomap.h3
-rw-r--r--engines/saga/itedata.cpp3
-rw-r--r--engines/saga/itedata.h3
-rw-r--r--engines/saga/music.cpp3
-rw-r--r--engines/saga/music.h3
-rw-r--r--engines/saga/objectmap.cpp3
-rw-r--r--engines/saga/objectmap.h3
-rw-r--r--engines/saga/palanim.cpp3
-rw-r--r--engines/saga/palanim.h3
-rw-r--r--engines/saga/puzzle.cpp3
-rw-r--r--engines/saga/puzzle.h3
-rw-r--r--engines/saga/render.cpp3
-rw-r--r--engines/saga/render.h3
-rw-r--r--engines/saga/resource.cpp3
-rw-r--r--engines/saga/resource.h3
-rw-r--r--engines/saga/resource_hrs.cpp3
-rw-r--r--engines/saga/resource_res.cpp3
-rw-r--r--engines/saga/resource_rsc.cpp3
-rw-r--r--engines/saga/saga.cpp7
-rw-r--r--engines/saga/saga.h3
-rw-r--r--engines/saga/saveload.cpp3
-rw-r--r--engines/saga/scene.cpp3
-rw-r--r--engines/saga/scene.h3
-rw-r--r--engines/saga/script.cpp3
-rw-r--r--engines/saga/script.h3
-rw-r--r--engines/saga/sfuncs.cpp3
-rw-r--r--engines/saga/sfuncs_ihnm.cpp3
-rw-r--r--engines/saga/shorten.cpp3
-rw-r--r--engines/saga/shorten.h3
-rw-r--r--engines/saga/sndres.cpp3
-rw-r--r--engines/saga/sndres.h3
-rw-r--r--engines/saga/sound.cpp3
-rw-r--r--engines/saga/sound.h3
-rw-r--r--engines/saga/sprite.cpp3
-rw-r--r--engines/saga/sprite.h3
-rw-r--r--engines/saga/sthread.cpp3
-rw-r--r--engines/savestate.cpp3
-rw-r--r--engines/savestate.h3
-rw-r--r--engines/sci/console.cpp24
-rw-r--r--engines/sci/console.h3
-rw-r--r--engines/sci/debug.h3
-rw-r--r--engines/sci/decompressor.cpp3
-rw-r--r--engines/sci/decompressor.h3
-rw-r--r--engines/sci/detection.cpp5
-rw-r--r--engines/sci/detection_tables.h3
-rw-r--r--engines/sci/engine/features.cpp3
-rw-r--r--engines/sci/engine/features.h3
-rw-r--r--engines/sci/engine/gc.cpp3
-rw-r--r--engines/sci/engine/gc.h3
-rw-r--r--engines/sci/engine/kernel.cpp3
-rw-r--r--engines/sci/engine/kernel.h3
-rw-r--r--engines/sci/engine/kernel_tables.h3
-rw-r--r--engines/sci/engine/kevent.cpp3
-rw-r--r--engines/sci/engine/kfile.cpp5
-rw-r--r--engines/sci/engine/kgraphics.cpp24
-rw-r--r--engines/sci/engine/klists.cpp3
-rw-r--r--engines/sci/engine/kmath.cpp3
-rw-r--r--engines/sci/engine/kmenu.cpp3
-rw-r--r--engines/sci/engine/kmisc.cpp3
-rw-r--r--engines/sci/engine/kmovement.cpp3
-rw-r--r--engines/sci/engine/kparse.cpp3
-rw-r--r--engines/sci/engine/kpathing.cpp97
-rw-r--r--engines/sci/engine/kscripts.cpp9
-rw-r--r--engines/sci/engine/ksound.cpp3
-rw-r--r--engines/sci/engine/kstring.cpp6
-rw-r--r--engines/sci/engine/kvideo.cpp3
-rw-r--r--engines/sci/engine/message.cpp3
-rw-r--r--engines/sci/engine/message.h3
-rw-r--r--engines/sci/engine/object.cpp7
-rw-r--r--engines/sci/engine/object.h5
-rw-r--r--engines/sci/engine/savegame.cpp3
-rw-r--r--engines/sci/engine/savegame.h3
-rw-r--r--engines/sci/engine/script.cpp23
-rw-r--r--engines/sci/engine/script.h15
-rw-r--r--engines/sci/engine/script_patches.cpp45
-rw-r--r--engines/sci/engine/scriptdebug.cpp10
-rw-r--r--engines/sci/engine/seg_manager.cpp11
-rw-r--r--engines/sci/engine/seg_manager.h5
-rw-r--r--engines/sci/engine/segment.cpp3
-rw-r--r--engines/sci/engine/segment.h5
-rw-r--r--engines/sci/engine/selector.cpp3
-rw-r--r--engines/sci/engine/selector.h5
-rw-r--r--engines/sci/engine/state.cpp3
-rw-r--r--engines/sci/engine/state.h3
-rw-r--r--engines/sci/engine/static_selectors.cpp3
-rw-r--r--engines/sci/engine/vm.cpp5
-rw-r--r--engines/sci/engine/vm.h3
-rw-r--r--engines/sci/engine/vm_types.cpp3
-rw-r--r--engines/sci/engine/vm_types.h3
-rw-r--r--engines/sci/engine/workarounds.cpp8
-rw-r--r--engines/sci/engine/workarounds.h3
-rw-r--r--engines/sci/event.cpp5
-rw-r--r--engines/sci/event.h3
-rw-r--r--engines/sci/graphics/animate.cpp5
-rw-r--r--engines/sci/graphics/animate.h3
-rw-r--r--engines/sci/graphics/cache.cpp3
-rw-r--r--engines/sci/graphics/cache.h3
-rw-r--r--engines/sci/graphics/compare.cpp3
-rw-r--r--engines/sci/graphics/compare.h3
-rw-r--r--engines/sci/graphics/controls.cpp3
-rw-r--r--engines/sci/graphics/controls.h3
-rw-r--r--engines/sci/graphics/coordadjuster.cpp3
-rw-r--r--engines/sci/graphics/coordadjuster.h3
-rw-r--r--engines/sci/graphics/cursor.cpp7
-rw-r--r--engines/sci/graphics/cursor.h3
-rw-r--r--engines/sci/graphics/font.cpp3
-rw-r--r--engines/sci/graphics/font.h3
-rw-r--r--engines/sci/graphics/fontsjis.cpp3
-rw-r--r--engines/sci/graphics/fontsjis.h3
-rw-r--r--engines/sci/graphics/frameout.cpp3
-rw-r--r--engines/sci/graphics/frameout.h3
-rw-r--r--engines/sci/graphics/helpers.h3
-rw-r--r--engines/sci/graphics/maciconbar.cpp3
-rw-r--r--engines/sci/graphics/maciconbar.h3
-rw-r--r--engines/sci/graphics/menu.cpp3
-rw-r--r--engines/sci/graphics/menu.h3
-rw-r--r--engines/sci/graphics/paint.cpp3
-rw-r--r--engines/sci/graphics/paint.h3
-rw-r--r--engines/sci/graphics/paint16.cpp3
-rw-r--r--engines/sci/graphics/paint16.h3
-rw-r--r--engines/sci/graphics/paint32.cpp3
-rw-r--r--engines/sci/graphics/paint32.h3
-rw-r--r--engines/sci/graphics/palette.cpp3
-rw-r--r--engines/sci/graphics/palette.h3
-rw-r--r--engines/sci/graphics/picture.cpp3
-rw-r--r--engines/sci/graphics/picture.h3
-rw-r--r--engines/sci/graphics/portrait.cpp3
-rw-r--r--engines/sci/graphics/portrait.h3
-rw-r--r--engines/sci/graphics/ports.cpp3
-rw-r--r--engines/sci/graphics/ports.h3
-rw-r--r--engines/sci/graphics/screen.cpp3
-rw-r--r--engines/sci/graphics/screen.h3
-rw-r--r--engines/sci/graphics/text16.cpp5
-rw-r--r--engines/sci/graphics/text16.h3
-rw-r--r--engines/sci/graphics/transitions.cpp3
-rw-r--r--engines/sci/graphics/transitions.h3
-rw-r--r--engines/sci/graphics/view.cpp3
-rw-r--r--engines/sci/graphics/view.h3
-rw-r--r--engines/sci/parser/grammar.cpp3
-rw-r--r--engines/sci/parser/said.cpp3
-rw-r--r--engines/sci/parser/vocabulary.cpp9
-rw-r--r--engines/sci/parser/vocabulary.h3
-rw-r--r--engines/sci/resource.cpp3
-rw-r--r--engines/sci/resource.h3
-rw-r--r--engines/sci/resource_audio.cpp3
-rw-r--r--engines/sci/resource_intern.h3
-rw-r--r--engines/sci/sci.cpp14
-rw-r--r--engines/sci/sci.h3
-rw-r--r--engines/sci/sound/audio.cpp3
-rw-r--r--engines/sci/sound/audio.h3
-rw-r--r--engines/sci/sound/drivers/adlib.cpp3
-rw-r--r--engines/sci/sound/drivers/amigamac.cpp3
-rw-r--r--engines/sci/sound/drivers/cms.cpp3
-rw-r--r--engines/sci/sound/drivers/fb01.cpp3
-rw-r--r--engines/sci/sound/drivers/gm_names.h10
-rw-r--r--engines/sci/sound/drivers/map-mt32-to-gm.h3
-rw-r--r--engines/sci/sound/drivers/midi.cpp7
-rw-r--r--engines/sci/sound/drivers/mididriver.h3
-rw-r--r--engines/sci/sound/drivers/pcjr.cpp3
-rw-r--r--engines/sci/sound/midiparser_sci.cpp12
-rw-r--r--engines/sci/sound/midiparser_sci.h3
-rw-r--r--engines/sci/sound/music.cpp3
-rw-r--r--engines/sci/sound/music.h3
-rw-r--r--engines/sci/sound/soundcmd.cpp3
-rw-r--r--engines/sci/sound/soundcmd.h3
-rw-r--r--engines/sci/util.cpp3
-rw-r--r--engines/sci/util.h3
-rw-r--r--engines/sci/video/robot_decoder.cpp3
-rw-r--r--engines/sci/video/robot_decoder.h3
-rw-r--r--engines/sci/video/seq_decoder.cpp3
-rw-r--r--engines/sci/video/seq_decoder.h3
-rw-r--r--engines/scumm/actor.cpp23
-rw-r--r--engines/scumm/actor.h3
-rw-r--r--engines/scumm/actor_he.h3
-rw-r--r--engines/scumm/akos.cpp4
-rw-r--r--engines/scumm/akos.h3
-rw-r--r--engines/scumm/base-costume.cpp3
-rw-r--r--engines/scumm/base-costume.h3
-rw-r--r--engines/scumm/bomp.cpp3
-rw-r--r--engines/scumm/bomp.h3
-rw-r--r--engines/scumm/boxes.cpp16
-rw-r--r--engines/scumm/boxes.h3
-rw-r--r--engines/scumm/camera.cpp3
-rw-r--r--engines/scumm/charset-fontdata.cpp3
-rw-r--r--engines/scumm/charset.cpp3
-rw-r--r--engines/scumm/charset.h3
-rw-r--r--engines/scumm/costume.cpp3
-rw-r--r--engines/scumm/costume.h3
-rw-r--r--engines/scumm/cursor.cpp3
-rw-r--r--engines/scumm/debugger.cpp19
-rw-r--r--engines/scumm/debugger.h3
-rw-r--r--engines/scumm/detection.cpp74
-rw-r--r--engines/scumm/detection.h3
-rw-r--r--engines/scumm/detection_tables.h9
-rw-r--r--engines/scumm/dialogs.cpp3
-rw-r--r--engines/scumm/dialogs.h3
-rw-r--r--engines/scumm/file.cpp3
-rw-r--r--engines/scumm/file.h3
-rw-r--r--engines/scumm/file_nes.cpp3
-rw-r--r--engines/scumm/file_nes.h3
-rw-r--r--engines/scumm/gfx.cpp79
-rw-r--r--engines/scumm/gfx.h32
-rw-r--r--engines/scumm/gfxARM.s3
-rw-r--r--engines/scumm/gfx_towns.cpp3
-rw-r--r--engines/scumm/he/animation_he.cpp3
-rw-r--r--engines/scumm/he/animation_he.h3
-rw-r--r--engines/scumm/he/cup_player_he.cpp3
-rw-r--r--engines/scumm/he/cup_player_he.h3
-rw-r--r--engines/scumm/he/floodfill_he.cpp3
-rw-r--r--engines/scumm/he/floodfill_he.h3
-rw-r--r--engines/scumm/he/intern_he.h14
-rw-r--r--engines/scumm/he/logic_he.cpp3
-rw-r--r--engines/scumm/he/logic_he.h3
-rw-r--r--engines/scumm/he/palette_he.cpp3
-rw-r--r--engines/scumm/he/resource_he.cpp17
-rw-r--r--engines/scumm/he/resource_he.h3
-rw-r--r--engines/scumm/he/script_v100he.cpp13
-rw-r--r--engines/scumm/he/script_v60he.cpp3
-rw-r--r--engines/scumm/he/script_v70he.cpp8
-rw-r--r--engines/scumm/he/script_v71he.cpp3
-rw-r--r--engines/scumm/he/script_v72he.cpp14
-rw-r--r--engines/scumm/he/script_v80he.cpp3
-rw-r--r--engines/scumm/he/script_v90he.cpp3
-rw-r--r--engines/scumm/he/sound_he.cpp8
-rw-r--r--engines/scumm/he/sound_he.h3
-rw-r--r--engines/scumm/he/sprite_he.cpp3
-rw-r--r--engines/scumm/he/sprite_he.h3
-rw-r--r--engines/scumm/he/wiz_he.cpp3
-rw-r--r--engines/scumm/he/wiz_he.h3
-rw-r--r--engines/scumm/help.cpp5
-rw-r--r--engines/scumm/help.h3
-rw-r--r--engines/scumm/imuse/imuse.cpp128
-rw-r--r--engines/scumm/imuse/imuse.h4
-rw-r--r--engines/scumm/imuse/imuse_internal.h15
-rw-r--r--engines/scumm/imuse/imuse_part.cpp6
-rw-r--r--engines/scumm/imuse/imuse_player.cpp50
-rw-r--r--engines/scumm/imuse/instrument.cpp3
-rw-r--r--engines/scumm/imuse/instrument.h3
-rw-r--r--engines/scumm/imuse/sysex.h3
-rw-r--r--engines/scumm/imuse/sysex_samnmax.cpp3
-rw-r--r--engines/scumm/imuse/sysex_scumm.cpp12
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp3
-rw-r--r--engines/scumm/imuse_digi/dimuse.h3
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.cpp3
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.h3
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.cpp7
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.h3
-rw-r--r--engines/scumm/imuse_digi/dimuse_music.cpp3
-rw-r--r--engines/scumm/imuse_digi/dimuse_script.cpp3
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp4
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.h3
-rw-r--r--engines/scumm/imuse_digi/dimuse_tables.cpp3
-rw-r--r--engines/scumm/imuse_digi/dimuse_tables.h3
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.cpp3
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.h3
-rw-r--r--engines/scumm/input.cpp8
-rw-r--r--engines/scumm/insane/insane.cpp4
-rw-r--r--engines/scumm/insane/insane.h3
-rw-r--r--engines/scumm/insane/insane_ben.cpp3
-rw-r--r--engines/scumm/insane/insane_enemy.cpp99
-rw-r--r--engines/scumm/insane/insane_iact.cpp3
-rw-r--r--engines/scumm/insane/insane_scenes.cpp3
-rw-r--r--engines/scumm/midiparser_ro.cpp3
-rw-r--r--engines/scumm/music.h3
-rw-r--r--engines/scumm/nut_renderer.cpp3
-rw-r--r--engines/scumm/nut_renderer.h3
-rw-r--r--engines/scumm/object.cpp14
-rw-r--r--engines/scumm/object.h3
-rw-r--r--engines/scumm/palette.cpp8
-rw-r--r--engines/scumm/player_mod.cpp3
-rw-r--r--engines/scumm/player_mod.h3
-rw-r--r--engines/scumm/player_nes.cpp3
-rw-r--r--engines/scumm/player_nes.h3
-rw-r--r--engines/scumm/player_pce.cpp3
-rw-r--r--engines/scumm/player_pce.h3
-rw-r--r--engines/scumm/player_sid.cpp3
-rw-r--r--engines/scumm/player_sid.h3
-rw-r--r--engines/scumm/player_towns.cpp23
-rw-r--r--engines/scumm/player_towns.h7
-rw-r--r--engines/scumm/player_v1.cpp3
-rw-r--r--engines/scumm/player_v1.h3
-rw-r--r--engines/scumm/player_v2.cpp3
-rw-r--r--engines/scumm/player_v2.h3
-rw-r--r--engines/scumm/player_v2a.cpp3
-rw-r--r--engines/scumm/player_v2a.h3
-rw-r--r--engines/scumm/player_v2base.cpp3
-rw-r--r--engines/scumm/player_v2base.h3
-rw-r--r--engines/scumm/player_v2cms.cpp3
-rw-r--r--engines/scumm/player_v2cms.h3
-rw-r--r--engines/scumm/player_v3a.cpp3
-rw-r--r--engines/scumm/player_v3a.h3
-rw-r--r--engines/scumm/player_v4a.cpp3
-rw-r--r--engines/scumm/player_v4a.h5
-rw-r--r--engines/scumm/proc3ARM.s3
-rw-r--r--engines/scumm/resource.cpp520
-rw-r--r--engines/scumm/resource.h185
-rw-r--r--engines/scumm/resource_v2.cpp35
-rw-r--r--engines/scumm/resource_v3.cpp34
-rw-r--r--engines/scumm/resource_v4.cpp22
-rw-r--r--engines/scumm/room.cpp20
-rw-r--r--engines/scumm/saveload.cpp158
-rw-r--r--engines/scumm/saveload.h3
-rw-r--r--engines/scumm/script.cpp28
-rw-r--r--engines/scumm/script.h12
-rw-r--r--engines/scumm/script_v0.cpp4
-rw-r--r--engines/scumm/script_v2.cpp16
-rw-r--r--engines/scumm/script_v3.cpp3
-rw-r--r--engines/scumm/script_v4.cpp3
-rw-r--r--engines/scumm/script_v5.cpp8
-rw-r--r--engines/scumm/script_v6.cpp7
-rw-r--r--engines/scumm/script_v8.cpp3
-rw-r--r--engines/scumm/scumm.cpp58
-rw-r--r--engines/scumm/scumm.h132
-rw-r--r--engines/scumm/scumm_v0.h5
-rw-r--r--engines/scumm/scumm_v2.h3
-rw-r--r--engines/scumm/scumm_v3.h5
-rw-r--r--engines/scumm/scumm_v4.h5
-rw-r--r--engines/scumm/scumm_v5.h3
-rw-r--r--engines/scumm/scumm_v6.h5
-rw-r--r--engines/scumm/scumm_v7.h3
-rw-r--r--engines/scumm/scumm_v8.h3
-rw-r--r--engines/scumm/smush/channel.cpp3
-rw-r--r--engines/scumm/smush/channel.h3
-rw-r--r--engines/scumm/smush/codec1.cpp3
-rw-r--r--engines/scumm/smush/codec37.cpp3
-rw-r--r--engines/scumm/smush/codec37.h3
-rw-r--r--engines/scumm/smush/codec47.cpp3
-rw-r--r--engines/scumm/smush/codec47.h3
-rw-r--r--engines/scumm/smush/codec47ARM.s3
-rw-r--r--engines/scumm/smush/imuse_channel.cpp3
-rw-r--r--engines/scumm/smush/saud_channel.cpp3
-rw-r--r--engines/scumm/smush/smush_font.cpp3
-rw-r--r--engines/scumm/smush/smush_font.h3
-rw-r--r--engines/scumm/smush/smush_mixer.cpp3
-rw-r--r--engines/scumm/smush/smush_mixer.h3
-rw-r--r--engines/scumm/smush/smush_player.cpp3
-rw-r--r--engines/scumm/smush/smush_player.h3
-rw-r--r--engines/scumm/sound.cpp22
-rw-r--r--engines/scumm/sound.h3
-rw-r--r--engines/scumm/string.cpp13
-rw-r--r--engines/scumm/usage_bits.cpp3
-rw-r--r--engines/scumm/usage_bits.h3
-rw-r--r--engines/scumm/util.cpp3
-rw-r--r--engines/scumm/util.h3
-rw-r--r--engines/scumm/vars.cpp3
-rw-r--r--engines/scumm/verbs.cpp3
-rw-r--r--engines/scumm/verbs.h3
-rw-r--r--engines/sky/autoroute.cpp3
-rw-r--r--engines/sky/autoroute.h3
-rw-r--r--engines/sky/compact.cpp3
-rw-r--r--engines/sky/compact.h3
-rw-r--r--engines/sky/control.cpp3
-rw-r--r--engines/sky/control.h3
-rw-r--r--engines/sky/debug.cpp3
-rw-r--r--engines/sky/debug.h3
-rw-r--r--engines/sky/detection.cpp5
-rw-r--r--engines/sky/disk.cpp3
-rw-r--r--engines/sky/disk.h3
-rw-r--r--engines/sky/grid.cpp3
-rw-r--r--engines/sky/grid.h3
-rw-r--r--engines/sky/hufftext.cpp3
-rw-r--r--engines/sky/intro.cpp3
-rw-r--r--engines/sky/intro.h3
-rw-r--r--engines/sky/logic.cpp12
-rw-r--r--engines/sky/logic.h3
-rw-r--r--engines/sky/mouse.cpp3
-rw-r--r--engines/sky/mouse.h3
-rw-r--r--engines/sky/music/adlibchannel.cpp3
-rw-r--r--engines/sky/music/adlibchannel.h3
-rw-r--r--engines/sky/music/adlibmusic.cpp3
-rw-r--r--engines/sky/music/adlibmusic.h3
-rw-r--r--engines/sky/music/gmchannel.cpp3
-rw-r--r--engines/sky/music/gmchannel.h3
-rw-r--r--engines/sky/music/gmmusic.cpp3
-rw-r--r--engines/sky/music/gmmusic.h3
-rw-r--r--engines/sky/music/mt32music.cpp3
-rw-r--r--engines/sky/music/mt32music.h3
-rw-r--r--engines/sky/music/musicbase.cpp3
-rw-r--r--engines/sky/music/musicbase.h3
-rw-r--r--engines/sky/rnc_deco.cpp3
-rw-r--r--engines/sky/rnc_deco.h3
-rw-r--r--engines/sky/screen.cpp3
-rw-r--r--engines/sky/screen.h3
-rw-r--r--engines/sky/sky.cpp3
-rw-r--r--engines/sky/sky.h3
-rw-r--r--engines/sky/skydefs.h3
-rw-r--r--engines/sky/sound.cpp7
-rw-r--r--engines/sky/sound.h3
-rw-r--r--engines/sky/struc.h3
-rw-r--r--engines/sky/text.cpp3
-rw-r--r--engines/sky/text.h3
-rw-r--r--engines/sword1/animation.cpp16
-rw-r--r--engines/sword1/animation.h16
-rw-r--r--engines/sword1/collision.h3
-rw-r--r--engines/sword1/console.cpp3
-rw-r--r--engines/sword1/console.h3
-rw-r--r--engines/sword1/control.cpp3
-rw-r--r--engines/sword1/control.h3
-rw-r--r--engines/sword1/debug.cpp3
-rw-r--r--engines/sword1/debug.h3
-rw-r--r--engines/sword1/detection.cpp5
-rw-r--r--engines/sword1/eventman.cpp3
-rw-r--r--engines/sword1/eventman.h3
-rw-r--r--engines/sword1/logic.cpp8
-rw-r--r--engines/sword1/logic.h5
-rw-r--r--engines/sword1/memman.cpp3
-rw-r--r--engines/sword1/memman.h3
-rw-r--r--engines/sword1/menu.cpp3
-rw-r--r--engines/sword1/menu.h3
-rw-r--r--engines/sword1/mouse.cpp3
-rw-r--r--engines/sword1/mouse.h3
-rw-r--r--engines/sword1/music.cpp3
-rw-r--r--engines/sword1/music.h3
-rw-r--r--engines/sword1/object.h3
-rw-r--r--engines/sword1/objectman.cpp3
-rw-r--r--engines/sword1/objectman.h3
-rw-r--r--engines/sword1/resman.cpp3
-rw-r--r--engines/sword1/resman.h3
-rw-r--r--engines/sword1/router.cpp5
-rw-r--r--engines/sword1/router.h3
-rw-r--r--engines/sword1/screen.cpp3
-rw-r--r--engines/sword1/screen.h3
-rw-r--r--engines/sword1/sound.cpp8
-rw-r--r--engines/sword1/sound.h3
-rw-r--r--engines/sword1/staticres.cpp3
-rw-r--r--engines/sword1/sword1.cpp3
-rw-r--r--engines/sword1/sword1.h3
-rw-r--r--engines/sword1/sworddefs.h7
-rw-r--r--engines/sword1/swordres.h3
-rw-r--r--engines/sword1/text.cpp7
-rw-r--r--engines/sword1/text.h7
-rw-r--r--engines/sword2/animation.cpp3
-rw-r--r--engines/sword2/animation.h3
-rw-r--r--engines/sword2/anims.cpp3
-rw-r--r--engines/sword2/console.cpp9
-rw-r--r--engines/sword2/console.h3
-rw-r--r--engines/sword2/controls.cpp5
-rw-r--r--engines/sword2/controls.h3
-rw-r--r--engines/sword2/debug.cpp3
-rw-r--r--engines/sword2/debug.h3
-rw-r--r--engines/sword2/defs.h3
-rw-r--r--engines/sword2/events.cpp3
-rw-r--r--engines/sword2/function.cpp3
-rw-r--r--engines/sword2/header.cpp3
-rw-r--r--engines/sword2/header.h3
-rw-r--r--engines/sword2/icons.cpp5
-rw-r--r--engines/sword2/interpreter.cpp9
-rw-r--r--engines/sword2/interpreter.h3
-rw-r--r--engines/sword2/layers.cpp29
-rw-r--r--engines/sword2/logic.cpp3
-rw-r--r--engines/sword2/logic.h3
-rw-r--r--engines/sword2/maketext.cpp21
-rw-r--r--engines/sword2/maketext.h5
-rw-r--r--engines/sword2/memory.cpp3
-rw-r--r--engines/sword2/memory.h3
-rw-r--r--engines/sword2/menu.cpp3
-rw-r--r--engines/sword2/mouse.cpp3
-rw-r--r--engines/sword2/mouse.h3
-rw-r--r--engines/sword2/music.cpp3
-rw-r--r--engines/sword2/object.h3
-rw-r--r--engines/sword2/palette.cpp3
-rw-r--r--engines/sword2/protocol.cpp3
-rw-r--r--engines/sword2/render.cpp21
-rw-r--r--engines/sword2/resman.cpp3
-rw-r--r--engines/sword2/resman.h3
-rw-r--r--engines/sword2/router.cpp5
-rw-r--r--engines/sword2/router.h5
-rw-r--r--engines/sword2/saveload.cpp3
-rw-r--r--engines/sword2/saveload.h3
-rw-r--r--engines/sword2/screen.cpp17
-rw-r--r--engines/sword2/screen.h11
-rw-r--r--engines/sword2/scroll.cpp3
-rw-r--r--engines/sword2/sound.cpp3
-rw-r--r--engines/sword2/sound.h3
-rw-r--r--engines/sword2/speech.cpp3
-rw-r--r--engines/sword2/sprite.cpp3
-rw-r--r--engines/sword2/startup.cpp3
-rw-r--r--engines/sword2/sword2.cpp14
-rw-r--r--engines/sword2/sword2.h7
-rw-r--r--engines/sword2/sync.cpp3
-rw-r--r--engines/sword2/walker.cpp3
-rw-r--r--engines/sword25/console.cpp3
-rw-r--r--engines/sword25/console.h3
-rw-r--r--engines/sword25/detection.cpp38
-rw-r--r--engines/sword25/detection_tables.h129
-rw-r--r--engines/sword25/fmv/movieplayer.cpp31
-rw-r--r--engines/sword25/fmv/movieplayer.h3
-rw-r--r--engines/sword25/fmv/movieplayer_script.cpp3
-rw-r--r--engines/sword25/fmv/theora_decoder.cpp327
-rw-r--r--engines/sword25/fmv/theora_decoder.h56
-rw-r--r--engines/sword25/gfx/animation.cpp3
-rw-r--r--engines/sword25/gfx/animation.h3
-rw-r--r--engines/sword25/gfx/animationdescription.cpp3
-rw-r--r--engines/sword25/gfx/animationdescription.h3
-rw-r--r--engines/sword25/gfx/animationresource.cpp3
-rw-r--r--engines/sword25/gfx/animationresource.h3
-rw-r--r--engines/sword25/gfx/animationtemplate.cpp3
-rw-r--r--engines/sword25/gfx/animationtemplate.h3
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.cpp3
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.h3
-rw-r--r--engines/sword25/gfx/bitmap.cpp3
-rw-r--r--engines/sword25/gfx/bitmap.h3
-rw-r--r--engines/sword25/gfx/bitmapresource.h3
-rw-r--r--engines/sword25/gfx/dynamicbitmap.cpp3
-rw-r--r--engines/sword25/gfx/dynamicbitmap.h3
-rw-r--r--engines/sword25/gfx/fontresource.cpp3
-rw-r--r--engines/sword25/gfx/fontresource.h3
-rw-r--r--engines/sword25/gfx/graphicengine.cpp3
-rw-r--r--engines/sword25/gfx/graphicengine.h5
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp3
-rw-r--r--engines/sword25/gfx/image/art.cpp3
-rw-r--r--engines/sword25/gfx/image/art.h3
-rw-r--r--engines/sword25/gfx/image/image.h3
-rw-r--r--engines/sword25/gfx/image/imgloader.cpp85
-rw-r--r--engines/sword25/gfx/image/imgloader.h (renamed from engines/sword25/gfx/image/pngloader.h)42
-rw-r--r--engines/sword25/gfx/image/pngloader.cpp295
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp88
-rw-r--r--engines/sword25/gfx/image/renderedimage.h3
-rw-r--r--engines/sword25/gfx/image/swimage.cpp15
-rw-r--r--engines/sword25/gfx/image/swimage.h3
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp3
-rw-r--r--engines/sword25/gfx/image/vectorimage.h3
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.cpp3
-rw-r--r--engines/sword25/gfx/panel.cpp7
-rw-r--r--engines/sword25/gfx/panel.h3
-rw-r--r--engines/sword25/gfx/renderobject.cpp3
-rw-r--r--engines/sword25/gfx/renderobject.h3
-rw-r--r--engines/sword25/gfx/renderobjectmanager.cpp3
-rw-r--r--engines/sword25/gfx/renderobjectmanager.h3
-rw-r--r--engines/sword25/gfx/renderobjectptr.h3
-rw-r--r--engines/sword25/gfx/renderobjectregistry.h3
-rw-r--r--engines/sword25/gfx/rootrenderobject.h3
-rw-r--r--engines/sword25/gfx/screenshot.cpp82
-rw-r--r--engines/sword25/gfx/screenshot.h3
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp3
-rw-r--r--engines/sword25/gfx/staticbitmap.h3
-rw-r--r--engines/sword25/gfx/text.cpp3
-rw-r--r--engines/sword25/gfx/text.h3
-rw-r--r--engines/sword25/gfx/timedrenderobject.cpp3
-rw-r--r--engines/sword25/gfx/timedrenderobject.h3
-rw-r--r--engines/sword25/input/inputengine.cpp3
-rw-r--r--engines/sword25/input/inputengine.h5
-rw-r--r--engines/sword25/input/inputengine_script.cpp3
-rw-r--r--engines/sword25/kernel/common.h3
-rw-r--r--engines/sword25/kernel/filesystemutil.cpp3
-rw-r--r--engines/sword25/kernel/filesystemutil.h3
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.cpp3
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.h3
-rw-r--r--engines/sword25/kernel/kernel.cpp8
-rw-r--r--engines/sword25/kernel/kernel.h5
-rw-r--r--engines/sword25/kernel/kernel_script.cpp3
-rw-r--r--engines/sword25/kernel/objectregistry.h3
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.cpp3
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.h3
-rw-r--r--engines/sword25/kernel/persistable.h3
-rw-r--r--engines/sword25/kernel/persistenceblock.h3
-rw-r--r--engines/sword25/kernel/persistenceservice.cpp59
-rw-r--r--engines/sword25/kernel/persistenceservice.h3
-rw-r--r--engines/sword25/kernel/resmanager.cpp3
-rw-r--r--engines/sword25/kernel/resmanager.h3
-rw-r--r--engines/sword25/kernel/resource.cpp3
-rw-r--r--engines/sword25/kernel/resource.h3
-rw-r--r--engines/sword25/kernel/resservice.h3
-rw-r--r--engines/sword25/kernel/service.h3
-rw-r--r--engines/sword25/math/geometry.h3
-rw-r--r--engines/sword25/math/geometry_script.cpp3
-rw-r--r--engines/sword25/math/line.h3
-rw-r--r--engines/sword25/math/polygon.cpp5
-rw-r--r--engines/sword25/math/polygon.h9
-rw-r--r--engines/sword25/math/region.cpp5
-rw-r--r--engines/sword25/math/region.h7
-rw-r--r--engines/sword25/math/regionregistry.cpp3
-rw-r--r--engines/sword25/math/regionregistry.h3
-rw-r--r--engines/sword25/math/vertex.cpp3
-rw-r--r--engines/sword25/math/vertex.h6
-rw-r--r--engines/sword25/math/walkregion.cpp9
-rw-r--r--engines/sword25/math/walkregion.h3
-rw-r--r--engines/sword25/module.mk6
-rw-r--r--engines/sword25/package/packagemanager.cpp3
-rw-r--r--engines/sword25/package/packagemanager.h3
-rw-r--r--engines/sword25/package/packagemanager_script.cpp3
-rw-r--r--engines/sword25/script/lua_extensions.cpp3
-rw-r--r--engines/sword25/script/luabindhelper.cpp3
-rw-r--r--engines/sword25/script/luabindhelper.h3
-rw-r--r--engines/sword25/script/luacallback.cpp3
-rw-r--r--engines/sword25/script/luacallback.h3
-rw-r--r--engines/sword25/script/luascript.cpp7
-rw-r--r--engines/sword25/script/luascript.h8
-rw-r--r--engines/sword25/script/script.h5
-rw-r--r--engines/sword25/sfx/soundengine.cpp7
-rw-r--r--engines/sword25/sfx/soundengine.h5
-rw-r--r--engines/sword25/sfx/soundengine_script.cpp3
-rw-r--r--engines/sword25/sword25.cpp7
-rw-r--r--engines/sword25/sword25.h3
-rw-r--r--engines/sword25/util/lua/lapi.cpp16
-rw-r--r--engines/sword25/util/lua/lauxlib.cpp50
-rw-r--r--engines/sword25/util/lua/ldo.cpp30
-rw-r--r--engines/sword25/util/lua/ldump.cpp164
-rw-r--r--engines/sword25/util/lua/liolib.cpp222
-rw-r--r--engines/sword25/util/lua/llex.cpp20
-rw-r--r--engines/sword25/util/lua/lmathlib.cpp4
-rw-r--r--engines/sword25/util/lua/loadlib.cpp197
-rw-r--r--engines/sword25/util/lua/loslib.cpp77
-rw-r--r--engines/sword25/util/lua/lua.h2
-rw-r--r--engines/sword25/util/lua/luaconf.h35
-rw-r--r--engines/sword25/util/lua/lundump.cpp225
-rw-r--r--engines/sword25/util/lua/lundump.h36
-rw-r--r--engines/sword25/util/lua/lvm.cpp2
-rw-r--r--engines/sword25/util/lua/print.cpp227
-rw-r--r--engines/sword25/util/lua/scummvm_file.cpp205
-rw-r--r--engines/sword25/util/lua/scummvm_file.h56
-rw-r--r--engines/teenagent/actor.cpp10
-rw-r--r--engines/teenagent/actor.h9
-rw-r--r--engines/teenagent/animation.cpp3
-rw-r--r--engines/teenagent/animation.h3
-rw-r--r--engines/teenagent/callbacks.cpp7
-rw-r--r--engines/teenagent/console.cpp3
-rw-r--r--engines/teenagent/console.h3
-rw-r--r--engines/teenagent/detection.cpp5
-rw-r--r--engines/teenagent/dialog.cpp3
-rw-r--r--engines/teenagent/dialog.h3
-rw-r--r--engines/teenagent/font.cpp3
-rw-r--r--engines/teenagent/font.h3
-rw-r--r--engines/teenagent/inventory.cpp163
-rw-r--r--engines/teenagent/inventory.h38
-rw-r--r--engines/teenagent/music.cpp3
-rw-r--r--engines/teenagent/music.h3
-rw-r--r--engines/teenagent/objects.cpp3
-rw-r--r--engines/teenagent/objects.h3
-rw-r--r--engines/teenagent/pack.cpp3
-rw-r--r--engines/teenagent/pack.h3
-rw-r--r--engines/teenagent/resources.cpp3
-rw-r--r--engines/teenagent/resources.h3
-rw-r--r--engines/teenagent/scene.cpp5
-rw-r--r--engines/teenagent/scene.h3
-rw-r--r--engines/teenagent/segment.cpp3
-rw-r--r--engines/teenagent/segment.h3
-rw-r--r--engines/teenagent/surface.cpp3
-rw-r--r--engines/teenagent/surface.h3
-rw-r--r--engines/teenagent/surface_list.cpp3
-rw-r--r--engines/teenagent/surface_list.h3
-rw-r--r--engines/teenagent/teenagent.cpp11
-rw-r--r--engines/teenagent/teenagent.h7
-rw-r--r--engines/testbed/config-params.cpp3
-rw-r--r--engines/testbed/config-params.h3
-rw-r--r--engines/testbed/config.cpp3
-rw-r--r--engines/testbed/config.h3
-rw-r--r--engines/testbed/detection.cpp3
-rw-r--r--engines/testbed/events.cpp3
-rw-r--r--engines/testbed/events.h3
-rw-r--r--engines/testbed/fs.cpp3
-rw-r--r--engines/testbed/fs.h3
-rw-r--r--engines/testbed/graphics.cpp3
-rw-r--r--engines/testbed/graphics.h3
-rw-r--r--engines/testbed/midi.cpp3
-rw-r--r--engines/testbed/midi.h3
-rw-r--r--engines/testbed/misc.cpp3
-rw-r--r--engines/testbed/misc.h3
-rw-r--r--engines/testbed/savegame.cpp3
-rw-r--r--engines/testbed/savegame.h3
-rw-r--r--engines/testbed/sound.cpp3
-rw-r--r--engines/testbed/sound.h3
-rw-r--r--engines/testbed/template.h3
-rw-r--r--engines/testbed/testbed.cpp3
-rw-r--r--engines/testbed/testbed.h3
-rw-r--r--engines/testbed/testsuite.cpp3
-rw-r--r--engines/testbed/testsuite.h3
-rw-r--r--engines/tinsel/actors.cpp5
-rw-r--r--engines/tinsel/actors.h3
-rw-r--r--engines/tinsel/adpcm.cpp3
-rw-r--r--engines/tinsel/adpcm.h3
-rw-r--r--engines/tinsel/anim.cpp3
-rw-r--r--engines/tinsel/anim.h3
-rw-r--r--engines/tinsel/background.cpp16
-rw-r--r--engines/tinsel/background.h7
-rw-r--r--engines/tinsel/bg.cpp11
-rw-r--r--engines/tinsel/bmv.cpp15
-rw-r--r--engines/tinsel/bmv.h7
-rw-r--r--engines/tinsel/cliprect.cpp13
-rw-r--r--engines/tinsel/cliprect.h7
-rw-r--r--engines/tinsel/config.cpp3
-rw-r--r--engines/tinsel/config.h3
-rw-r--r--engines/tinsel/coroutine.cpp3
-rw-r--r--engines/tinsel/coroutine.h3
-rw-r--r--engines/tinsel/cursor.cpp27
-rw-r--r--engines/tinsel/cursor.h3
-rw-r--r--engines/tinsel/debugger.cpp3
-rw-r--r--engines/tinsel/debugger.h3
-rw-r--r--engines/tinsel/detection.cpp5
-rw-r--r--engines/tinsel/detection_tables.h3
-rw-r--r--engines/tinsel/dialogs.cpp5
-rw-r--r--engines/tinsel/dialogs.h3
-rw-r--r--engines/tinsel/drives.cpp3
-rw-r--r--engines/tinsel/drives.h3
-rw-r--r--engines/tinsel/dw.h3
-rw-r--r--engines/tinsel/effect.cpp3
-rw-r--r--engines/tinsel/events.cpp3
-rw-r--r--engines/tinsel/events.h3
-rw-r--r--engines/tinsel/faders.cpp3
-rw-r--r--engines/tinsel/faders.h3
-rw-r--r--engines/tinsel/film.h3
-rw-r--r--engines/tinsel/font.cpp3
-rw-r--r--engines/tinsel/font.h3
-rw-r--r--engines/tinsel/graphics.cpp3
-rw-r--r--engines/tinsel/graphics.h3
-rw-r--r--engines/tinsel/handle.cpp6
-rw-r--r--engines/tinsel/handle.h3
-rw-r--r--engines/tinsel/heapmem.cpp7
-rw-r--r--engines/tinsel/heapmem.h7
-rw-r--r--engines/tinsel/mareels.cpp3
-rw-r--r--engines/tinsel/mareels.h3
-rw-r--r--engines/tinsel/move.cpp5
-rw-r--r--engines/tinsel/move.h3
-rw-r--r--engines/tinsel/multiobj.cpp9
-rw-r--r--engines/tinsel/multiobj.h9
-rw-r--r--engines/tinsel/music.cpp3
-rw-r--r--engines/tinsel/music.h3
-rw-r--r--engines/tinsel/object.cpp31
-rw-r--r--engines/tinsel/object.h18
-rw-r--r--engines/tinsel/palette.cpp3
-rw-r--r--engines/tinsel/palette.h3
-rw-r--r--engines/tinsel/pcode.cpp7
-rw-r--r--engines/tinsel/pcode.h5
-rw-r--r--engines/tinsel/pdisplay.cpp3
-rw-r--r--engines/tinsel/pdisplay.h3
-rw-r--r--engines/tinsel/pid.h3
-rw-r--r--engines/tinsel/play.cpp3
-rw-r--r--engines/tinsel/play.h3
-rw-r--r--engines/tinsel/polygons.cpp25
-rw-r--r--engines/tinsel/polygons.h3
-rw-r--r--engines/tinsel/rince.cpp3
-rw-r--r--engines/tinsel/rince.h3
-rw-r--r--engines/tinsel/saveload.cpp3
-rw-r--r--engines/tinsel/savescn.cpp7
-rw-r--r--engines/tinsel/savescn.h5
-rw-r--r--engines/tinsel/scene.cpp15
-rw-r--r--engines/tinsel/scene.h3
-rw-r--r--engines/tinsel/sched.cpp3
-rw-r--r--engines/tinsel/sched.h3
-rw-r--r--engines/tinsel/scn.cpp3
-rw-r--r--engines/tinsel/scn.h3
-rw-r--r--engines/tinsel/scroll.cpp5
-rw-r--r--engines/tinsel/scroll.h3
-rw-r--r--engines/tinsel/sound.cpp3
-rw-r--r--engines/tinsel/sound.h3
-rw-r--r--engines/tinsel/strres.cpp3
-rw-r--r--engines/tinsel/strres.h3
-rw-r--r--engines/tinsel/sysvar.cpp5
-rw-r--r--engines/tinsel/sysvar.h3
-rw-r--r--engines/tinsel/text.cpp5
-rw-r--r--engines/tinsel/text.h5
-rw-r--r--engines/tinsel/timers.cpp3
-rw-r--r--engines/tinsel/timers.h3
-rw-r--r--engines/tinsel/tinlib.cpp7
-rw-r--r--engines/tinsel/tinlib.h3
-rw-r--r--engines/tinsel/tinsel.cpp10
-rw-r--r--engines/tinsel/tinsel.h3
-rw-r--r--engines/tinsel/token.cpp3
-rw-r--r--engines/tinsel/token.h3
-rw-r--r--engines/toon/anim.cpp3
-rw-r--r--engines/toon/anim.h3
-rw-r--r--engines/toon/audio.cpp4
-rw-r--r--engines/toon/audio.h3
-rw-r--r--engines/toon/character.cpp3
-rw-r--r--engines/toon/character.h3
-rw-r--r--engines/toon/console.cpp3
-rw-r--r--engines/toon/console.h3
-rw-r--r--engines/toon/conversation.cpp3
-rw-r--r--engines/toon/conversation.h3
-rw-r--r--engines/toon/detection.cpp5
-rw-r--r--engines/toon/drew.cpp3
-rw-r--r--engines/toon/drew.h3
-rw-r--r--engines/toon/flux.cpp3
-rw-r--r--engines/toon/flux.h3
-rw-r--r--engines/toon/font.cpp3
-rw-r--r--engines/toon/font.h3
-rw-r--r--engines/toon/hotspot.cpp3
-rw-r--r--engines/toon/hotspot.h3
-rw-r--r--engines/toon/movie.cpp3
-rw-r--r--engines/toon/movie.h3
-rw-r--r--engines/toon/path.cpp3
-rw-r--r--engines/toon/path.h3
-rw-r--r--engines/toon/picture.cpp3
-rw-r--r--engines/toon/picture.h3
-rw-r--r--engines/toon/resource.cpp3
-rw-r--r--engines/toon/resource.h3
-rw-r--r--engines/toon/script.cpp3
-rw-r--r--engines/toon/script.h3
-rw-r--r--engines/toon/script_func.cpp3
-rw-r--r--engines/toon/script_func.h3
-rw-r--r--engines/toon/state.cpp3
-rw-r--r--engines/toon/state.h3
-rw-r--r--engines/toon/text.cpp3
-rw-r--r--engines/toon/text.h3
-rw-r--r--engines/toon/tools.cpp3
-rw-r--r--engines/toon/tools.h3
-rw-r--r--engines/toon/toon.cpp11
-rw-r--r--engines/toon/toon.h3
-rw-r--r--engines/touche/console.cpp3
-rw-r--r--engines/touche/console.h3
-rw-r--r--engines/touche/detection.cpp5
-rw-r--r--engines/touche/graphics.cpp3
-rw-r--r--engines/touche/graphics.h3
-rw-r--r--engines/touche/menu.cpp3
-rw-r--r--engines/touche/midi.cpp3
-rw-r--r--engines/touche/midi.h3
-rw-r--r--engines/touche/opcodes.cpp3
-rw-r--r--engines/touche/resource.cpp3
-rw-r--r--engines/touche/saveload.cpp3
-rw-r--r--engines/touche/staticres.cpp3
-rw-r--r--engines/touche/touche.cpp8
-rw-r--r--engines/touche/touche.h3
-rw-r--r--engines/tsage/blueforce_logic.cpp120
-rw-r--r--engines/tsage/blueforce_logic.h42
-rw-r--r--engines/tsage/converse.cpp9
-rw-r--r--engines/tsage/converse.h3
-rw-r--r--engines/tsage/core.cpp84
-rw-r--r--engines/tsage/core.h27
-rw-r--r--engines/tsage/debugger.cpp18
-rw-r--r--engines/tsage/debugger.h3
-rw-r--r--engines/tsage/detection.cpp5
-rw-r--r--engines/tsage/detection_tables.h32
-rw-r--r--engines/tsage/dialogs.cpp14
-rw-r--r--engines/tsage/dialogs.h3
-rw-r--r--engines/tsage/events.cpp40
-rw-r--r--engines/tsage/events.h4
-rw-r--r--engines/tsage/globals.cpp35
-rw-r--r--engines/tsage/globals.h9
-rw-r--r--engines/tsage/graphics.cpp56
-rw-r--r--engines/tsage/graphics.h21
-rw-r--r--engines/tsage/module.mk1
-rw-r--r--engines/tsage/resources.cpp3
-rw-r--r--engines/tsage/resources.h3
-rw-r--r--engines/tsage/ringworld_demo.cpp77
-rw-r--r--engines/tsage/ringworld_demo.h12
-rw-r--r--engines/tsage/ringworld_logic.cpp78
-rw-r--r--engines/tsage/ringworld_logic.h17
-rw-r--r--engines/tsage/ringworld_scenes1.cpp8
-rw-r--r--engines/tsage/ringworld_scenes1.h4
-rw-r--r--engines/tsage/ringworld_scenes10.cpp46
-rw-r--r--engines/tsage/ringworld_scenes10.h5
-rw-r--r--engines/tsage/ringworld_scenes2.cpp8
-rw-r--r--engines/tsage/ringworld_scenes2.h3
-rw-r--r--engines/tsage/ringworld_scenes3.cpp169
-rw-r--r--engines/tsage/ringworld_scenes3.h7
-rw-r--r--engines/tsage/ringworld_scenes4.cpp3
-rw-r--r--engines/tsage/ringworld_scenes4.h3
-rw-r--r--engines/tsage/ringworld_scenes5.cpp35
-rw-r--r--engines/tsage/ringworld_scenes5.h7
-rw-r--r--engines/tsage/ringworld_scenes6.cpp34
-rw-r--r--engines/tsage/ringworld_scenes6.h3
-rw-r--r--engines/tsage/ringworld_scenes8.cpp42
-rw-r--r--engines/tsage/ringworld_scenes8.h10
-rw-r--r--engines/tsage/saveload.cpp10
-rw-r--r--engines/tsage/saveload.h7
-rw-r--r--engines/tsage/scenes.cpp70
-rw-r--r--engines/tsage/scenes.h27
-rw-r--r--engines/tsage/sound.cpp3
-rw-r--r--engines/tsage/sound.h3
-rw-r--r--engines/tsage/staticres.cpp9
-rw-r--r--engines/tsage/staticres.h9
-rw-r--r--engines/tsage/tsage.cpp19
-rw-r--r--engines/tsage/tsage.h7
-rw-r--r--engines/tucker/console.cpp3
-rw-r--r--engines/tucker/console.h3
-rw-r--r--engines/tucker/detection.cpp5
-rw-r--r--engines/tucker/graphics.cpp3
-rw-r--r--engines/tucker/graphics.h3
-rw-r--r--engines/tucker/locations.cpp3
-rw-r--r--engines/tucker/resource.cpp3
-rw-r--r--engines/tucker/saveload.cpp3
-rw-r--r--engines/tucker/sequences.cpp3
-rw-r--r--engines/tucker/staticres.cpp3
-rw-r--r--engines/tucker/tucker.cpp5
-rw-r--r--engines/tucker/tucker.h3
-rw-r--r--engines/util.h3
1953 files changed, 5357 insertions, 10656 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 8170452102..6874806bc7 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// FIXME: Avoid using printf
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 757fb12f33..6ee0822f47 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef ENGINES_ADVANCED_DETECTOR_H
#define ENGINES_ADVANCED_DETECTOR_H
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index a69d19f06c..78316588b0 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -18,14 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/md5.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/memstream.h"
#include "common/savefile.h"
@@ -488,10 +484,16 @@ static const GameSettings agiSettings[] = {
AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
_noSaveLoadAllowed = false;
+ _rnd = new Common::RandomSource("agi");
+
initFeatures();
initVersion();
}
+AgiBase::~AgiBase() {
+ delete _rnd;
+}
+
AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBase(syst, gameDesc) {
// Setup mixer
@@ -499,9 +501,6 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
parseFeatures();
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "agi");
-
DebugMan.addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");
DebugMan.addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");
DebugMan.addDebugChannel(kDebugLevelSprites, "Sprites", "Sprites debugging");
@@ -652,10 +651,11 @@ void AgiEngine::initialize() {
}
AgiEngine::~AgiEngine() {
- // If the engine hasn't been initialized yet via AgiEngine::initialize(), don't attempt to free any resources,
- // as they haven't been allocated. Fixes bug #1742432 - AGI: Engine crashes if no game is detected
+ // If the engine hasn't been initialized yet via
+ // AgiEngine::initialize(), don't attempt to free any resources, as
+ // they haven't been allocated. Fixes bug #1742432 - AGI: Engine
+ // crashes if no game is detected
if (_game.state == STATE_INIT) {
- delete _rnd; // delete _rnd, as it is allocated in the constructor, not in initialize()
return;
}
@@ -669,7 +669,6 @@ AgiEngine::~AgiEngine() {
free(_game.sbufOrig);
_gfx->deinitMachine();
delete _gfx;
- delete _rnd;
delete _console;
free(_predictiveDictLine);
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index c71a0ebf64..a42148b1ef 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_H
@@ -758,6 +755,7 @@ public:
virtual void clearKeyQueue() = 0;
AgiBase(OSystem *syst, const AGIGameDescription *gameDesc);
+ ~AgiBase();
virtual void clearImageStack() = 0;
virtual void recordImageStackCall(uint8 type, int16 p1, int16 p2, int16 p3,
@@ -971,7 +969,7 @@ public:
int showWords();
int loadWords(const char *);
void unloadWords();
- int findWord(char *word, int *flen);
+ int findWord(const char *word, int *flen);
void dictionaryWords(char *);
// Motion
diff --git a/engines/agi/checks.cpp b/engines/agi/checks.cpp
index afede0b836..20276657ff 100644
--- a/engines/agi/checks.cpp
+++ b/engines/agi/checks.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
@@ -268,7 +265,7 @@ void AgiEngine::updatePosition() {
* This function adjusts the position of a sprite moving it until
* certain criteria is matched. According to priority and control line
* data, a sprite may not always appear at the location we specified.
- * This behaviour is also known as the "Budin-Sonneveld effect".
+ * This behavior is also known as the "Budin-Sonneveld effect".
*
* @param n view table entry number
*/
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index f4b50c0909..d49bd57ea2 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/console.h b/engines/agi/console.h
index e79db42054..308b0f1d1f 100644
--- a/engines/agi/console.h
+++ b/engines/agi/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_CONSOLE_H
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 86c1b519a9..d86fb36709 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index fb92344de2..22d8adf92d 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// FIXME: Avoid using printf
@@ -167,7 +164,7 @@ public:
AgiMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "AGI preAGI + v2 + v3 Engine";
+ return "AGI preAGI + v2 + v3";
}
virtual const char *getOriginalCopyright() const {
return "Sierra AGI Engine (C) Sierra On-Line Software";
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index 4689915007..cd3edf50c6 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Agi {
diff --git a/engines/agi/font.h b/engines/agi/font.h
index 171106145c..c2516d3520 100644
--- a/engines/agi/font.h
+++ b/engines/agi/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_FONT_H
diff --git a/engines/agi/global.cpp b/engines/agi/global.cpp
index ed8e9e8dbe..fdece0737e 100644
--- a/engines/agi/global.cpp
+++ b/engines/agi/global.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index f0d38761d0..eb162e4ab0 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
@@ -844,7 +841,7 @@ void GfxMgr::setAGIPal(int p0) {
// Use only the lowest 6 bits of each color component (Red, Green and Blue)
// because VGA used only 6 bits per color component (i.e. VGA had 18-bit colors).
- // This should now be identical to the original AGIPAL-hack's behaviour.
+ // This should now be identical to the original AGIPAL-hack's behavior.
bool validVgaPalette = true;
for (int i = 0; i < 16 * 3; i++) {
if (_agipalPalette[i] >= (1 << 6)) {
diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h
index 60fbea2285..037dacd8de 100644
--- a/engines/agi/graphics.h
+++ b/engines/agi/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_GRAPHICS_H
diff --git a/engines/agi/id.cpp b/engines/agi/id.cpp
index 2e12e45458..00f8407529 100644
--- a/engines/agi/id.cpp
+++ b/engines/agi/id.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/inv.cpp b/engines/agi/inv.cpp
index f1d9523887..a165a32b29 100644
--- a/engines/agi/inv.cpp
+++ b/engines/agi/inv.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 95211f8e3c..f5810a6e8c 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/keyboard.h b/engines/agi/keyboard.h
index c4dadb5836..665ee6a62c 100644
--- a/engines/agi/keyboard.h
+++ b/engines/agi/keyboard.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_KEYBOARD_H
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp
index 0141a61065..a2ac6f0111 100644
--- a/engines/agi/loader_v2.cpp
+++ b/engines/agi/loader_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -152,11 +149,11 @@ uint8 *AgiLoader_v2::loadVolRes(struct AgiDir *agid) {
fp.read(&x, 5);
if ((sig = READ_BE_UINT16((uint8 *) x)) == 0x1234) {
agid->len = READ_LE_UINT16((uint8 *) x + 3);
- data = (uint8 *) calloc(1, agid->len + 32);
+ data = (uint8 *)calloc(1, agid->len + 32);
if (data != NULL) {
fp.read(data, agid->len);
} else {
- exit(1);
+ error("AgiLoader_v2::loadVolRes out of memory");
}
} else {
warning("AgiLoader_v2::loadVolRes: bad signature %04x", sig);
diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp
index 025e755c8b..29635f935b 100644
--- a/engines/agi/loader_v3.cpp
+++ b/engines/agi/loader_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/logic.cpp b/engines/agi/logic.cpp
index cc61d3455a..22798ba831 100644
--- a/engines/agi/logic.cpp
+++ b/engines/agi/logic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/logic.h b/engines/agi/logic.h
index d285aa1dfb..fecc2e3b8a 100644
--- a/engines/agi/logic.h
+++ b/engines/agi/logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_LOGIC_H
diff --git a/engines/agi/lzw.cpp b/engines/agi/lzw.cpp
index 495d6458da..a00281bd49 100644
--- a/engines/agi/lzw.cpp
+++ b/engines/agi/lzw.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/***************************************************************************
diff --git a/engines/agi/lzw.h b/engines/agi/lzw.h
index 5e1f74c819..e3fbafe584 100644
--- a/engines/agi/lzw.h
+++ b/engines/agi/lzw.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_LZW_H
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index b62bcd9ad8..b504cd3e30 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/menu.h b/engines/agi/menu.h
index 724ec3877c..e659c71fab 100644
--- a/engines/agi/menu.h
+++ b/engines/agi/menu.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_MENU_H
diff --git a/engines/agi/motion.cpp b/engines/agi/motion.cpp
index 7498aafb5d..261a7f3e61 100644
--- a/engines/agi/motion.cpp
+++ b/engines/agi/motion.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp
index bea53d7fa4..e04c9742f3 100644
--- a/engines/agi/objects.cpp
+++ b/engines/agi/objects.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index e1f99456e8..bde62fe2d9 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/version.h"
@@ -675,7 +672,7 @@ void AgiEngine::cmd_adj_ego_move_to_x_y(uint8 *p) {
// Turn off ego's current movement caused with the mouse if
// adj.ego.move.to.x.y is called with other arguments than previously.
- // Fixes weird looping behaviour when walking to a ladder in the mines
+ // Fixes weird looping behavior when walking to a ladder in the mines
// (Rooms 147-162) in Gold Rush using the mouse. Sometimes the ego didn't
// stop when walking to a ladder using the mouse but kept moving on the
// ladder in a horizontally looping manner i.e. from right to left, from
diff --git a/engines/agi/op_dbg.cpp b/engines/agi/op_dbg.cpp
index f3b4815790..be73dbefae 100644
--- a/engines/agi/op_dbg.cpp
+++ b/engines/agi/op_dbg.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp
index f5234d4e6c..0660a614b6 100644
--- a/engines/agi/op_test.cpp
+++ b/engines/agi/op_test.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -170,7 +167,7 @@ uint8 AgiEngine::testSaid(uint8 nwords, uint8 *cc) {
// user typed should be correct, but it looks like code 9999 means that
// if the string is empty at this point, the entry is also correct...
//
- // With the removal of this code, the behaviour of the scene was
+ // With the removal of this code, the behavior of the scene was
// corrected
for (c = 0; nwords && n; c++, nwords--, n--) {
@@ -319,7 +316,7 @@ int AgiEngine::testIfCode(int lognum) {
case 0x13: // Unknown test command 19
// My current theory is that this command checks whether the ego is currently moving
// and that that movement has been caused using the mouse and not using the keyboard.
- // I base this theory on the game's behaviour on an Amiga emulator, not on disassembly.
+ // I base this theory on the game's behavior on an Amiga emulator, not on disassembly.
// This command is used at least in the Amiga version of Gold Rush! v2.05 1989-03-09
// (AGI 2.316) in logics 1, 3, 5, 6, 137 and 192 (Logic.192 revealed this command's nature).
// TODO: Check this command's implementation using disassembly just to be sure.
diff --git a/engines/agi/opcodes.h b/engines/agi/opcodes.h
index 6b62f9ee99..b0d2051f0b 100644
--- a/engines/agi/opcodes.h
+++ b/engines/agi/opcodes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_OPCODES_H
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index 8951fc81df..47e40fb5f1 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/picture.h b/engines/agi/picture.h
index 31f8605cde..f2a6586b93 100644
--- a/engines/agi/picture.h
+++ b/engines/agi/picture.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_PICTURE_H
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index c51c53e76e..c1a6cd33fe 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -45,8 +42,6 @@ PreAgiEngine::PreAgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) :
// Setup mixer
syncSoundSettings();
- _rnd = new Common::RandomSource();
-
DebugMan.addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");
DebugMan.addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");
DebugMan.addDebugChannel(kDebugLevelSprites, "Sprites", "Sprites debugging");
diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h
index 58e08945b6..1a178497ad 100644
--- a/engines/agi/preagi.h
+++ b/engines/agi/preagi.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_PREAGI_H
diff --git a/engines/agi/preagi_common.cpp b/engines/agi/preagi_common.cpp
index 5bc0c92ab8..d437dc08f2 100644
--- a/engines/agi/preagi_common.cpp
+++ b/engines/agi/preagi_common.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/preagi.h"
diff --git a/engines/agi/preagi_common.h b/engines/agi/preagi_common.h
index 8b6dc0ee59..a557f69977 100644
--- a/engines/agi/preagi_common.h
+++ b/engines/agi/preagi_common.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index 64fc4e9ae5..21eb780916 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h
index 5ef12bfad2..62981375c6 100644
--- a/engines/agi/preagi_mickey.h
+++ b/engines/agi/preagi_mickey.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_PREAGI_MICKEY_H
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp
index 76849949c7..445a9e34ff 100644
--- a/engines/agi/preagi_troll.cpp
+++ b/engines/agi/preagi_troll.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/preagi.h"
diff --git a/engines/agi/preagi_troll.h b/engines/agi/preagi_troll.h
index f460758b2c..d9a995072b 100644
--- a/engines/agi/preagi_troll.h
+++ b/engines/agi/preagi_troll.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_PREAGI_TROLL_H
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index ef35a0b4e0..1df31ff72a 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/preagi.h"
diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h
index 0187d80326..002eada65c 100644
--- a/engines/agi/preagi_winnie.h
+++ b/engines/agi/preagi_winnie.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_PREAGI_WINNIE_H
diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp
index 96ad78ace5..80e89f410b 100644
--- a/engines/agi/predictive.cpp
+++ b/engines/agi/predictive.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index c8df726fc7..deda186439 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
//
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index b40cef67ef..aa338db0f2 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
@@ -102,51 +99,53 @@ void SoundMgr::unloadSound(int resnum) {
}
}
+/**
+ * Start playing a sound resource. The logic here is that when the sound is
+ * finished we set the given flag to be true. This way the condition can be
+ * detected by the game. On the other hand, if the game wishes to start
+ * playing a new sound before the current one is finished, we also let it
+ * do that.
+ * @param resnum the sound resource number
+ * @param flag the flag that is wished to be set true when finished
+ */
void SoundMgr::startSound(int resnum, int flag) {
- AgiSoundEmuType type;
-
- if (_vm->_game.sounds[resnum] != NULL && _vm->_game.sounds[resnum]->isPlaying())
- return;
-
- stopSound();
+ debugC(3, kDebugLevelSound, "startSound(resnum = %d, flag = %d)", resnum, flag);
if (_vm->_game.sounds[resnum] == NULL) // Is this needed at all?
return;
- type = (AgiSoundEmuType)_vm->_game.sounds[resnum]->type();
+ stopSound();
+ AgiSoundEmuType type = (AgiSoundEmuType)_vm->_game.sounds[resnum]->type();
if (type != AGI_SOUND_SAMPLE && type != AGI_SOUND_MIDI && type != AGI_SOUND_4CHN)
return;
+ debugC(3, kDebugLevelSound, " type = %d", type);
_vm->_game.sounds[resnum]->play();
_playingSound = resnum;
-
- debugC(3, kDebugLevelSound, "startSound(resnum = %d, flag = %d) type = %d", resnum, flag, type);
-
_soundGen->play(resnum);
+ // Reset the flag
_endflag = flag;
-
- // Nat Budin reports that the flag should be reset when sound starts
_vm->setflag(_endflag, false);
}
void SoundMgr::stopSound() {
debugC(3, kDebugLevelSound, "stopSound() --> %d", _playingSound);
- _endflag = -1;
-
if (_playingSound != -1) {
if (_vm->_game.sounds[_playingSound]) // sanity checking
_vm->_game.sounds[_playingSound]->stop();
-
_soundGen->stop();
-
_playingSound = -1;
}
+ // This is probably not needed most of the time, but there also should
+ // not be any harm doing it, so do it anyway.
if (_endflag != -1)
_vm->setflag(_endflag, true);
+
+ _endflag = -1;
}
int SoundMgr::initSound() {
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index b858493cb8..0ee19878c4 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_SOUND_H
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index f5758ed140..6d64c29de9 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -18,13 +18,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
#include "common/fs.h"
+#include "common/archive.h"
#include "common/md5.h"
#include "common/memstream.h"
#include "common/str-array.h"
@@ -36,47 +34,91 @@
namespace Agi {
SoundGen2GS::SoundGen2GS(AgiEngine *vm, Audio::Mixer *pMixer) : SoundGen(vm, pMixer) {
- _disabledMidi = !loadInstruments();
+ // Allocate memory for the wavetable
+ _wavetable = new int8[SIERRASTANDARD_SIZE];
+
+ // Apple IIGS AGI MIDI player advances 60 ticks per second. Strategy
+ // here is to first generate audio for a 1/60th of a second and then
+ // advance the MIDI player by one tick. Thus, make the output buffer
+ // to be a 1/60th of a second in length.
+ _outSize = _sampleRate / 60;
+ _out = new int16[2 * _outSize]; // stereo
+ // Initialize player variables
+ _nextGen = 0;
+ _ticks = 0;
+
+ // Not playing anything yet
_playingSound = -1;
_playing = false;
- _sndBuffer = (int16 *)calloc(2, BUFFER_SIZE);
-
- _midiChannels.resize(16); // Set the amount of available MIDI channels
+ // Load instruments
+ _disableMidi = !loadInstruments();
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
SoundGen2GS::~SoundGen2GS() {
_mixer->stopHandle(_soundHandle);
-
- free(_sndBuffer);
+ delete[] _wavetable;
+ delete[] _out;
}
int SoundGen2GS::readBuffer(int16 *buffer, const int numSamples) {
- fillAudio(buffer, numSamples / 2);
-
+ static uint data_available = 0;
+ static uint data_offset = 0;
+ uint n = numSamples << 1;
+ uint8 *p = (uint8*)buffer;
+
+ while (n > data_available) {
+ memcpy(p, (uint8*)_out + data_offset, data_available);
+ p += data_available;
+ n -= data_available;
+
+ advancePlayer();
+
+ data_available = generateOutput() << 1;
+ data_offset = 0;
+ }
+
+ memcpy(p, (uint8*)_out + data_offset, n);
+ data_offset += n;
+ data_available -= n;
+
return numSamples;
}
+/**
+ * Initiate the playing of a sound resource.
+ * @param resnum Resource number
+ */
void SoundGen2GS::play(int resnum) {
AgiSoundEmuType type;
_playingSound = resnum;
type = (AgiSoundEmuType)_vm->_game.sounds[resnum]->type();
-
assert (type == AGI_SOUND_SAMPLE || type == AGI_SOUND_MIDI);
+ if (_vm->_soundemu != SOUND_EMU_APPLE2GS) {
+ warning("Trying to play sample or MIDI resource but not using Apple IIGS sound emulation mode");
+ return;
+ }
+
+ haltGenerators();
+
switch (type) {
case AGI_SOUND_SAMPLE: {
IIgsSample *sampleRes = (IIgsSample *) _vm->_game.sounds[_playingSound];
- playSampleSound(sampleRes->getHeader(), sampleRes->getSample());
+ const IIgsSampleHeader &header = sampleRes->getHeader();
+ _channels[kSfxMidiChannel].setInstrument(&header.instrument);
+ _channels[kSfxMidiChannel].setVolume(header.volume);
+ midiNoteOn(kSfxMidiChannel, header.pitch, 127);
break;
}
case AGI_SOUND_MIDI:
((IIgsMidi *) _vm->_game.sounds[_playingSound])->rewind();
+ _ticks = 0;
break;
default:
break;
@@ -84,213 +126,178 @@ void SoundGen2GS::play(int resnum) {
}
void SoundGen2GS::stop() {
+ haltGenerators();
_playingSound = -1;
-
- // Stops all sounds on all MIDI channels
- for (iterator iter = _midiChannels.begin(); iter != _midiChannels.end(); ++iter)
- iter->stopSounds();
+ _playing = 0;
}
-void SoundGen2GS::playSound() {
- if (_playingSound == -1)
- return;
-
- if (_vm->_game.sounds[_playingSound]->type() == AGI_SOUND_MIDI) {
- playMidiSound();
- //warning("playSound: Trying to play an Apple IIGS MIDI sound. Not yet implemented");
- } else if (_vm->_game.sounds[_playingSound]->type() == AGI_SOUND_SAMPLE) {
- //debugC(3, kDebugLevelSound, "playSound: Trying to play an Apple IIGS sample");
- playSampleSound();
- }
-
- if (!_playing) {
- _vm->_sound->soundIsFinished();
-
- _playingSound = -1;
- }
-}
-
-uint32 SoundGen2GS::mixSound() {
- int i, b;
-
- memset(_sndBuffer, 0, BUFFER_SIZE << 1);
+/**
+ * Fill output buffer by advancing the generators for a 1/60th of a second.
+ * @return Number of generated samples
+ */
+uint32 SoundGen2GS::generateOutput() {
+ memset(_out, 0, _outSize * 2 * 2);
if (!_playing || _playingSound == -1)
- return BUFFER_SIZE;
-
- // Handle Apple IIGS sound mixing here
- // TODO: Implement playing both waves in an oscillator
- // TODO: Implement swap-mode in an oscillator
- for (uint midiChan = 0; midiChan < _midiChannels.size(); midiChan++) {
- for (uint gsChan = 0; gsChan < _midiChannels[midiChan]._gsChannels.size(); gsChan++) {
- IIgsChannelInfo &channel = _midiChannels[midiChan]._gsChannels[gsChan];
- if (channel.playing()) { // Only mix in actively playing channels
- // Frequency multiplier was 1076.0 based on tests made with MESS 0.117.
- // Tests made with KEGS32 averaged the multiplier to around 1045.
- // So this is a guess but maybe it's 1046.5... i.e. C6's frequency?
- double hertz = C6_FREQ * pow(SEMITONE, fracToDouble(channel.note));
- channel.posAdd = doubleToFrac(hertz / getRate());
- channel.vol = doubleToFrac(fracToDouble(channel.envVol) * fracToDouble(channel.chanVol) / 127.0);
- double tempVol = fracToDouble(channel.vol)/127.0;
- for (i = 0; i < IIGS_BUFFER_SIZE; i++) {
- b = channel.relocatedSample[fracToInt(channel.pos)];
- // TODO: Find out what volume/amplification setting is loud enough
- // but still doesn't clip when playing many channels on it.
- _sndBuffer[i] += (int16) (b * tempVol * 256/4);
- channel.pos += channel.posAdd;
-
- if (channel.pos >= intToFrac(channel.size)) {
- if (channel.loop) {
- // Don't divide by zero on zero length samples
- channel.pos %= intToFrac(channel.size + (channel.size == 0));
- // Probably we should loop the envelope too
- channel.envSeg = 0;
- channel.envVol = channel.startEnvVol;
- } else {
- channel.pos = channel.chanVol = 0;
- channel.end = true;
- break;
- }
+ return _outSize * 2;
+
+ int16 *p = _out;
+ int n = _outSize;
+ while (n--) {
+ int outl = 0;
+ int outr = 0;
+ for (int k = 0; k < MAX_GENERATORS; k++) {
+ IIgsGenerator *g = &_generators[k];
+ if (!g->ins)
+ continue;
+ const IIgsInstrumentHeader *i = g->ins;
+
+ // Advance envelope
+ int vol = fracToInt(g->a);
+ if (g->a <= i->env[g->seg].bp) {
+ g->a += i->env[g->seg].inc * ENVELOPE_COEF;
+ if (g->a > i->env[g->seg].bp) {
+ g->a = i->env[g->seg].bp;
+ g->seg++;
+ }
+ } else {
+ g->a -= i->env[g->seg].inc * ENVELOPE_COEF;
+ if (g->a < i->env[g->seg].bp) {
+ g->a = i->env[g->seg].bp;
+ g->seg++;
+ }
+ }
+
+ // TODO: Advance vibrato here. The Apple IIGS uses a LFO with
+ // triangle wave to modulate the frequency of both oscillators.
+ // In Apple IIGS the vibrato and the envelope are updated at the
+ // same time, so the vibrato speed depends on ENVELOPE_COEF.
+
+ // Advance oscillators
+ int s0 = 0;
+ int s1 = 0;
+ if (!g->osc[0].halt) {
+ s0 = g->osc[0].base[fracToInt(g->osc[0].p)];
+ g->osc[0].p += g->osc[0].pd;
+ if ((uint)fracToInt(g->osc[0].p) >= g->osc[0].size) {
+ g->osc[0].p -= intToFrac(g->osc[0].size);
+ if (!g->osc[0].loop)
+ g->osc[0].halt = 1;
+ if (g->osc[0].swap) {
+ g->osc[0].halt = 1;
+ g->osc[1].halt = 0;
}
}
-
- if (channel.envSeg < ENVELOPE_SEGMENT_COUNT) {
- const IIgsEnvelopeSegment &seg = channel.ins->env.seg[channel.envSeg];
- // I currently assume enveloping works with the same speed as the MIDI
- // (i.e. with 1/60ths of a second ticks).
- // TODO: Check if enveloping really works with the same speed as MIDI
- frac_t envVolDelta = doubleToFrac(seg.inc/256.0);
- if (intToFrac(seg.bp) >= channel.envVol) {
- channel.envVol += envVolDelta;
- if (channel.envVol >= intToFrac(seg.bp)) {
- channel.envVol = intToFrac(seg.bp);
- channel.envSeg += 1;
- }
- } else {
- channel.envVol -= envVolDelta;
- if (channel.envVol <= intToFrac(seg.bp)) {
- channel.envVol = intToFrac(seg.bp);
- channel.envSeg += 1;
- }
+ }
+ if (!g->osc[1].halt) {
+ s1 = g->osc[1].base[fracToInt(g->osc[1].p)];
+ g->osc[1].p += g->osc[1].pd;
+ if ((uint)fracToInt(g->osc[1].p) >= g->osc[1].size) {
+ g->osc[1].p -= intToFrac(g->osc[1].size);
+ if (!g->osc[1].loop)
+ g->osc[1].halt = 1;
+ if (g->osc[1].swap) {
+ g->osc[0].halt = 0;
+ g->osc[1].halt = 1;
}
}
}
+
+ // Take envelope and MIDI volume information into account.
+ // Also amplify.
+ s0 *= vol * g->vel / 127 * 80 / 256;
+ s1 *= vol * g->vel / 127 * 80 / 256;
+
+ // Select output channel.
+ if (g->osc[0].chn)
+ outl += s0;
+ else
+ outr += s0;
+
+ if (g->osc[1].chn)
+ outl += s1;
+ else
+ outr += s1;
}
- }
-
- removeStoppedSounds();
-
- return IIGS_BUFFER_SIZE;
-}
-
-void SoundGen2GS::fillAudio(int16 *stream, uint len) {
- uint32 p = 0;
-
- // current number of audio bytes in _sndBuffer
- static uint32 data_available = 0;
- // offset of start of audio bytes in _sndBuffer
- static uint32 data_offset = 0;
-
- len <<= 2;
-
- debugC(5, kDebugLevelSound, "(%p, %d)", (void *)stream, len);
- while (len > data_available) {
- memcpy((uint8 *)stream + p, (uint8*)_sndBuffer + data_offset, data_available);
- p += data_available;
- len -= data_available;
-
- playSound();
- data_available = mixSound() << 1;
- data_offset = 0;
+ if (outl > 32768)
+ outl = 32768;
+ if (outl < -32767)
+ outl = -32767;
+ if (outr > 32768)
+ outr = 32768;
+ if (outr < -32767)
+ outr = -32767;
+
+ *p++ = outl;
+ *p++ = outr;
}
- memcpy((uint8 *)stream + p, (uint8*)_sndBuffer + data_offset, len);
- data_offset += len;
- data_available -= len;
+ return _outSize * 2;
}
-void SoundGen2GS::playSampleSound() {
- if (_vm->_soundemu != SOUND_EMU_APPLE2GS) {
- warning("Trying to play a sample but not using Apple IIGS sound emulation mode");
+void SoundGen2GS::advancePlayer() {
+ if (_playingSound == -1)
return;
- }
- if (_playingSound != -1)
- _playing = activeSounds() > 0;
-}
-
-void SoundGen2GS::stopSounds() {
- // Stops all sounds on all MIDI channels
- for (iterator iter = _midiChannels.begin(); iter != _midiChannels.end(); ++iter)
- iter->stopSounds();
-}
-
-bool SoundGen2GS::playSampleSound(const IIgsSampleHeader &sampleHeader, const int8 *sample) {
- stopSounds();
- IIgsMidiChannel &channel = _midiChannels[kSfxMidiChannel];
-
- channel.setInstrument(&sampleHeader.instrument, sample);
- channel.setVolume(sampleHeader.volume);
- channel.noteOn(sampleHeader.pitch, 64); // Use default velocity (i.e. 64)
+ if (_vm->_game.sounds[_playingSound]->type() == AGI_SOUND_MIDI) {
+ advanceMidiPlayer();
+ } else if (_vm->_game.sounds[_playingSound]->type() == AGI_SOUND_SAMPLE) {
+ _playing = activeGenerators() > 0;
+ }
- return true;
+ if (!_playing) {
+ _vm->_sound->soundIsFinished();
+ _playingSound = -1;
+ }
}
-void SoundGen2GS::playMidiSound() {
- if (_disabledMidi)
+void SoundGen2GS::advanceMidiPlayer() {
+ if (_disableMidi)
return;
const uint8 *p;
uint8 parm1, parm2;
- static uint8 cmd, ch;
+ static uint8 cmd, chn;
if (_playingSound == -1 || _vm->_game.sounds[_playingSound] == NULL) {
warning("Error playing Apple IIGS MIDI sound resource");
_playing = false;
-
return;
}
IIgsMidi *midiObj = (IIgsMidi *) _vm->_game.sounds[_playingSound];
+ _ticks++;
_playing = true;
p = midiObj->getPtr();
- midiObj->_soundBufTicks++;
-
while (true) {
- uint8 readByte = *p;
-
// Check for end of MIDI sequence marker (Can also be here before delta-time)
- if (readByte == MIDI_BYTE_STOP_SEQUENCE) {
+ if (*p == MIDI_STOP_SEQUENCE) {
debugC(3, kDebugLevelSound, "End of MIDI sequence (Before reading delta-time)");
_playing = false;
-
midiObj->rewind();
-
return;
- } else if (readByte == MIDI_BYTE_TIMER_SYNC) {
+ }
+ if (*p == MIDI_TIMER_SYNC) {
debugC(3, kDebugLevelSound, "Timer sync");
p++; // Jump over the timer sync byte as it's not needed
-
continue;
}
- uint8 deltaTime = readByte;
- if (midiObj->_midiTicks + deltaTime > midiObj->_soundBufTicks) {
+ // Check for delta time
+ uint8 delta = *p;
+ if (midiObj->_ticks + delta > _ticks)
break;
- }
- midiObj->_midiTicks += deltaTime;
- p++; // Jump over the delta-time byte as it was already taken care of
+ midiObj->_ticks += delta;
+ p++;
// Check for end of MIDI sequence marker (This time it after reading delta-time)
- if (*p == MIDI_BYTE_STOP_SEQUENCE) {
+ if (*p == MIDI_STOP_SEQUENCE) {
debugC(3, kDebugLevelSound, "End of MIDI sequence (After reading delta-time)");
_playing = false;
-
midiObj->rewind();
-
return;
}
@@ -298,36 +305,51 @@ void SoundGen2GS::playMidiSound() {
// Otherwise use running status (i.e. previously set command and channel).
if (*p & 0x80) {
cmd = *p++;
- ch = cmd & 0x0f;
+ chn = cmd & 0x0f;
cmd >>= 4;
}
switch (cmd) {
- case MIDI_CMD_NOTE_OFF:
+ case MIDI_NOTE_OFF:
parm1 = *p++;
parm2 = *p++;
- midiNoteOff(ch, parm1, parm2);
+ debugC(3, kDebugLevelSound, "channel %X: note off (key = %d, velocity = %d)", chn, parm1, parm2);
+ midiNoteOff(chn, parm1, parm2);
break;
- case MIDI_CMD_NOTE_ON:
+ case MIDI_NOTE_ON:
parm1 = *p++;
parm2 = *p++;
- midiNoteOn(ch, parm1, parm2);
+ debugC(3, kDebugLevelSound, "channel %X: note on (key = %d, velocity = %d)", chn, parm1, parm2);
+ midiNoteOn(chn, parm1, parm2);
break;
- case MIDI_CMD_CONTROLLER:
+ case MIDI_CONTROLLER:
parm1 = *p++;
parm2 = *p++;
- midiController(ch, parm1, parm2);
+ debugC(3, kDebugLevelSound, "channel %X: controller %02X = %02X", chn, parm1, parm2);
+ // The tested Apple IIGS AGI MIDI resources only used
+ // controllers 0 (Bank select?), 7 (Volume) and 64 (Sustain On/Off).
+ // Controller 0's parameter was in range 94-127,
+ // controller 7's parameter was in range 0-127 and
+ // controller 64's parameter was always 0 (i.e. sustain off).
+ switch (parm1) {
+ case 7:
+ _channels[chn].setVolume(parm2);
+ break;
+ }
break;
- case MIDI_CMD_PROGRAM_CHANGE:
+ case MIDI_PROGRAM_CHANGE:
parm1 = *p++;
- midiProgramChange(ch, parm1);
+ debugC(3, kDebugLevelSound, "channel %X: program change %02X", chn, parm1);
+ _channels[chn].setInstrument(getInstrument(parm1));
break;
- case MIDI_CMD_PITCH_WHEEL:
+ case MIDI_PITCH_WHEEL:
parm1 = *p++;
parm2 = *p++;
+ debugC(3, kDebugLevelSound, "channel %X: pitch wheel (unimplemented)", chn);
+ break;
- uint16 wheelPos = ((parm2 & 0x7F) << 7) | (parm1 & 0x7F); // 14-bit value
- midiPitchWheel(wheelPos);
+ default:
+ debugC(3, kDebugLevelSound, "channel %X: unimplemented command %02X", chn, cmd);
break;
}
}
@@ -335,78 +357,102 @@ void SoundGen2GS::playMidiSound() {
midiObj->setPtr(p);
}
-void SoundGen2GS::midiNoteOff(uint8 channel, uint8 note, uint8 velocity) {
- _midiChannels[channel].noteOff(note, velocity);
- debugC(3, kDebugLevelSound, "note off, channel %02x, note %02x, velocity %02x", channel, note, velocity);
-}
-
-void SoundGen2GS::midiNoteOn(uint8 channel, uint8 note, uint8 velocity) {
- _midiChannels[channel].noteOn(note, velocity);
- debugC(3, kDebugLevelSound, "note on, channel %02x, note %02x, velocity %02x", channel, note, velocity);
-}
-
-// TODO: Check if controllers behave differently on different MIDI channels
-// TODO: Doublecheck what other controllers than the volume controller do
-void SoundGen2GS::midiController(uint8 channel, uint8 controller, uint8 value) {
- IIgsMidiChannel &midiChannel = _midiChannels[channel];
-
- // The tested Apple IIGS AGI MIDI resources only used
- // controllers 0 (Bank select?), 7 (Volume) and 64 (Sustain On/Off).
- // Controller 0's parameter was in range 94-127,
- // controller 7's parameter was in range 0-127 and
- // controller 64's parameter was always 0 (i.e. sustain off).
- bool unimplemented = false;
- switch (controller) {
- case 7: // Volume
- midiChannel.setVolume(value);
- break;
- default:
- unimplemented = true;
- break;
+void SoundGen2GS::midiNoteOff(int channel, int note, int velocity) {
+ // Release keys within the given MIDI channel
+ for (int i = 0; i < MAX_GENERATORS; i++) {
+ if (_generators[i].chn == channel && _generators[i].key == note)
+ _generators[i].seg = _generators[i].ins->seg;
}
- debugC(3, kDebugLevelSound, "controller %02x, ch %02x, val %02x%s", controller, channel, value, unimplemented ? " (Unimplemented)" : "");
}
-void SoundGen2GS::midiProgramChange(uint8 channel, uint8 program) {
- _midiChannels[channel].setInstrument(getInstrument(program), _wave.begin());
- debugC(3, kDebugLevelSound, "program change %02x, channel %02x", program, channel);
-}
-
-void SoundGen2GS::midiPitchWheel(uint8 wheelPos) {
- // In all the tested Apple IIGS AGI MIDI resources
- // pitch wheel commands always used 0x2000 (Center position).
- // Therefore it should be quite safe to ignore this command.
- debugC(3, kDebugLevelSound, "pitch wheel position %04x (Unimplemented)", wheelPos);
-}
-
-const IIgsInstrumentHeader* SoundGen2GS::getInstrument(uint8 program) const {
- return &_instruments[_midiProgToInst->map(program)];
-}
+void SoundGen2GS::midiNoteOn(int channel, int note, int velocity) {
+ if (!_channels[channel].getInstrument()) {
+ debugC(3, kDebugLevelSound, "midiNoteOn(): no instrument specified for channel %d", channel);
+ return;
+ }
-void SoundGen2GS::setProgramChangeMapping(const MidiProgramChangeMapping *mapping) {
- _midiProgToInst = mapping;
+ // Allocate a generator for the note.
+ IIgsGenerator* g = allocateGenerator();
+ g->ins = _channels[channel].getInstrument();
+ const IIgsInstrumentHeader* i = g->ins;
+
+ // Pass information from the MIDI channel to the generator. Take
+ // velocity into account, although simplistically.
+ velocity *= 5 / 3;
+ if (velocity > 127)
+ velocity = 127;
+
+ g->key = note;
+ g->vel = velocity * _channels[channel].getVolume() / 127;
+ g->chn = channel;
+
+ // Instruments can define different samples to be used based on
+ // what the key is. Find the correct samples for our key.
+ int wa = 0;
+ int wb = 0;
+ while (wa < i->waveCount[0] - 1 && note > i->wave[0][wa].key)
+ wa++;
+ while (wb < i->waveCount[1] - 1 && note > i->wave[1][wb].key)
+ wb++;
+
+ // Prepare the generator.
+ g->osc[0].base = i->base + i->wave[0][wa].offset;
+ g->osc[0].size = i->wave[0][wa].size;
+ g->osc[0].pd = doubleToFrac(midiKeyToFreq(note, (double)i->wave[0][wa].tune / 256.0) / (double)_sampleRate);
+ g->osc[0].p = 0;
+ g->osc[0].halt = i->wave[0][wa].halt;
+ g->osc[0].loop = i->wave[0][wa].loop;
+ g->osc[0].swap = i->wave[0][wa].swap;
+ g->osc[0].chn = i->wave[0][wa].chn;
+
+ g->osc[1].base = i->base + i->wave[1][wb].offset;
+ g->osc[1].size = i->wave[1][wb].size;
+ g->osc[1].pd = doubleToFrac(midiKeyToFreq(note, (double)i->wave[1][wb].tune / 256.0) / (double)_sampleRate);
+ g->osc[1].p = 0;
+ g->osc[1].halt = i->wave[1][wb].halt;
+ g->osc[1].loop = i->wave[1][wb].loop;
+ g->osc[1].swap = i->wave[1][wb].swap;
+ g->osc[1].chn = i->wave[1][wb].chn;
+
+ g->seg = 0;
+ g->a = 0;
+
+ // Print debug messages for instruments with swap mode or vibrato enabled
+ if (g->osc[0].swap || g->osc[1].swap)
+ debugC(2, kDebugLevelSound, "Detected swap mode in a playing instrument. This is rare and is not tested well...");
+ if (i->vibDepth > 0)
+ debugC(2, kDebugLevelSound, "Detected vibrato in a playing instrument. Vibrato is not implemented, playing without...");
+}
+
+double SoundGen2GS::midiKeyToFreq(int key, double finetune) {
+ return 440.0 * pow(2.0, (15.0 + (double)key + finetune) / 12.0);
+}
+
+void SoundGen2GS::haltGenerators() {
+ for (int i = 0; i < MAX_GENERATORS; i++) {
+ _generators[i].osc[0].halt = true;
+ _generators[i].osc[1].halt = true;
+ }
}
-void SoundGen2GS::removeStoppedSounds() {
- for (Common::Array<IIgsMidiChannel>::iterator iter = _midiChannels.begin(); iter != _midiChannels.end(); ++iter)
- iter->removeStoppedSounds();
+uint SoundGen2GS::activeGenerators() {
+ int n = 0;
+ for (int i = 0; i < MAX_GENERATORS; i++)
+ if (!_generators[i].osc[0].halt || !_generators[i].osc[1].halt)
+ n++;
+ return n;
}
-uint SoundGen2GS::activeSounds() const {
- uint result = 0;
-
- for (Common::Array<IIgsMidiChannel>::const_iterator iter = _midiChannels.begin(); iter != _midiChannels.end(); ++iter)
- result += iter->activeSounds();
-
- return result;
+void SoundGen2GS::setProgramChangeMapping(const IIgsMidiProgramMapping *mapping) {
+ _progToInst = mapping;
}
IIgsMidi::IIgsMidi(uint8 *data, uint32 len, int resnum, SoundMgr &manager) : AgiSound(manager) {
_data = data; // Save the resource pointer
_ptr = _data + 2; // Set current position to just after the header
- _len = len; // Save the resource's length
+ _len = len; // Save the resource's length
_type = READ_LE_UINT16(data); // Read sound resource's type
- _midiTicks = _soundBufTicks = 0;
+ _ticks = 0;
_isValid = (_type == AGI_SOUND_MIDI) && (_data != NULL) && (_len >= 2);
if (!_isValid) // Check for errors
@@ -422,7 +468,7 @@ IIgsMidi::IIgsMidi(uint8 *data, uint32 len, int resnum, SoundMgr &manager) : Agi
static bool convertWave(Common::SeekableReadStream &source, int8 *dest, uint length) {
// Convert the wave from 8-bit unsigned to 8-bit signed format
for (uint i = 0; i < length; i++)
- dest[i] = (int8) ((int) source.readByte() - 128);
+ dest[i] = (int8) ((int) source.readByte() - ZERO_OFFSET);
return !(source.eos() || source.err());
}
@@ -449,330 +495,136 @@ IIgsSample::IIgsSample(uint8 *data, uint32 len, int resnum, SoundMgr &manager) :
_header.pitch &= 0x7F; // Apple IIGS AGI probably did it this way too
}
- // Finalize the header info using the 8-bit unsigned sample data
- _header.finalize(stream);
-
// Convert sample data from 8-bit unsigned to 8-bit signed format
stream.seek(sampleStartPos);
_sample = new int8[_header.sampleSize];
- if (_sample != NULL)
+ if (_sample != NULL) {
_isValid = convertWave(stream, _sample, _header.sampleSize);
+ // Finalize header info using sample data
+ _header.finalize(_sample);
+ }
}
if (!_isValid) // Check for errors
warning("Error creating Apple IIGS sample from resource %d (Type %d, length %d)", resnum, _header.type, len);
}
-/** Reads an Apple IIGS envelope from then given stream. */
-bool IIgsEnvelope::read(Common::SeekableReadStream &stream) {
- for (int segNum = 0; segNum < ENVELOPE_SEGMENT_COUNT; segNum++) {
- seg[segNum].bp = stream.readByte();
- seg[segNum].inc = stream.readUint16LE();
- }
-
- return !(stream.eos() || stream.err());
-}
-
-/** Reads an Apple IIGS wave information structure from the given stream. */
-bool IIgsWaveInfo::read(Common::SeekableReadStream &stream, bool ignoreAddr) {
- top = stream.readByte();
- addr = stream.readByte() * 256;
- size = (1 << (stream.readByte() & 7)) * 256;
-
- // Read packed mode byte and parse it into parts
- byte packedModeByte = stream.readByte();
- channel = (packedModeByte >> 4) & 1; // Bit 4
- mode = (packedModeByte >> 1) & 3; // Bits 1-2
- halt = (packedModeByte & 1) != 0; // Bit 0 (Converted to boolean)
- relPitch = stream.readSint16LE();
+bool IIgsInstrumentHeader::read(Common::SeekableReadStream &stream, bool ignoreAddr) {
+ for (int i = 0; i < ENVELOPE_SEGMENT_COUNT; i++) {
+ env[i].bp = intToFrac(stream.readByte());
+ env[i].inc = intToFrac(stream.readUint16LE()) >> 8;
+ }
+ seg = stream.readByte();
+ /*priority =*/ stream.readByte(); // Not needed. 32 in all tested data.
+ bend = stream.readByte();
+ vibDepth = stream.readByte();
+ vibSpeed = stream.readByte();
+ stream.readByte(); // Not needed? 0 in all tested data.
+
+ waveCount[0] = stream.readByte();
+ waveCount[1] = stream.readByte();
+ for (int i = 0; i < 2; i++)
+ for (int k = 0; k < waveCount[i]; k++) {
+ wave[i][k].key = stream.readByte();
+ wave[i][k].offset = stream.readByte() << 8;
+ wave[i][k].size = 0x100 << (stream.readByte() & 7);
+ uint8 b = stream.readByte();
+ wave[i][k].tune = stream.readUint16LE();
+
+ // For sample resources we ignore the address.
+ if (ignoreAddr)
+ wave[i][k].offset = 0;
+
+ // Check for samples that extend out of the wavetable.
+ if (wave[i][k].offset + wave[i][k].size >= SIERRASTANDARD_SIZE) {
+ warning("Invalid data detected in the instrument set of Apple IIGS AGI. Continuing anyway...");
+ wave[i][k].size = SIERRASTANDARD_SIZE - wave[i][k].offset;
+ }
- // Zero the wave address if we want to ignore the wave address info
- if (ignoreAddr)
- addr = 0;
+ // Parse the generator mode byte to separate fields.
+ wave[i][k].halt = b & 0x1; // Bit 0 = HALT
+ wave[i][k].loop = !(b & 0x2); // Bit 1 =!LOOP
+ wave[i][k].swap = (b & 0x6) == 0x6; // Bit 1&2 = SWAP
+ wave[k][k].chn = (b >> 4) > 0; // Output channel (left or right)
+ }
return !(stream.eos() || stream.err());
}
-bool IIgsWaveInfo::finalize(Common::SeekableReadStream &uint8Wave) {
- uint32 startPos = uint8Wave.pos(); // Save stream's starting position
- uint8Wave.seek(addr, SEEK_CUR); // Seek to wave's address
-
- // Calculate the true sample size (A zero ends the sample prematurely)
- uint trueSize = size; // Set a default value for the result
- for (uint i = 0; i < size; i++) {
- if (uint8Wave.readByte() == 0) {
- trueSize = i;
- // A zero in the sample stream turns off looping
- // (At least that's what MESS 0.117 and KEGS32 0.91 seem to do)
- if (mode == OSC_MODE_LOOP)
- mode = OSC_MODE_ONESHOT;
- break;
- }
+bool IIgsInstrumentHeader::finalize(int8 *wavetable) {
+ // Calculate final pointers to sample data and detect true sample size
+ // in case the sample ends prematurely.
+ for (int i = 0; i < 2; i++)
+ for (int k = 0; k < waveCount[i]; k++) {
+ base = wavetable;
+ int8 *p = base + wave[i][k].offset;
+ uint trueSize;
+ for (trueSize = 0; trueSize < wave[i][k].size; trueSize++)
+ if (p[trueSize] == -ZERO_OFFSET)
+ break;
+ wave[i][k].size = trueSize;
}
- size = trueSize; // Set the true sample size
-
- uint8Wave.seek(startPos); // Seek back to the stream's starting position
return true;
}
-bool IIgsOscillator::finalize(Common::SeekableReadStream &uint8Wave) {
- for (uint i = 0; i < WAVES_PER_OSCILLATOR; i++)
- if (!waves[i].finalize(uint8Wave))
- return false;
-
- return true;
-}
-
-bool IIgsOscillatorList::read(Common::SeekableReadStream &stream, uint oscillatorCount, bool ignoreAddr) {
- // First read the A waves and then the B waves for the oscillators
- for (uint waveNum = 0; waveNum < WAVES_PER_OSCILLATOR; waveNum++)
- for (uint oscNum = 0; oscNum < oscillatorCount; oscNum++)
- if (!osc[oscNum].waves[waveNum].read(stream, ignoreAddr))
- return false;
-
- count = oscillatorCount; // Set the oscillator count
-
- return true;
-}
-
-bool IIgsOscillatorList::finalize(Common::SeekableReadStream &uint8Wave) {
- for (uint i = 0; i < count; i++)
- if (!osc[i].finalize(uint8Wave))
- return false;
-
- return true;
-}
-
-bool IIgsInstrumentHeader::read(Common::SeekableReadStream &stream, bool ignoreAddr) {
- env.read(stream);
- relseg = stream.readByte();
- /*byte priority =*/ stream.readByte(); // Not needed? 32 in all tested data.
- bendrange = stream.readByte();
- vibdepth = stream.readByte();
- vibspeed = stream.readByte();
- /*byte spare =*/ stream.readByte(); // Not needed? 0 in all tested data.
- byte wac = stream.readByte(); // Read A wave count
- byte wbc = stream.readByte(); // Read B wave count
- oscList.read(stream, wac, ignoreAddr); // Read the oscillators
- return (wac == wbc) && !(stream.eos() || stream.err()); // A and B wave counts must match
-}
-
-bool IIgsInstrumentHeader::finalize(Common::SeekableReadStream &uint8Wave) {
- return oscList.finalize(uint8Wave);
-}
-
bool IIgsSampleHeader::read(Common::SeekableReadStream &stream) {
- type = stream.readUint16LE();
- pitch = stream.readByte();
- unknownByte_Ofs3 = stream.readByte();
- volume = stream.readByte();
- unknownByte_Ofs5 = stream.readByte();
- instrumentSize = stream.readUint16LE();
- sampleSize = stream.readUint16LE();
+ type = stream.readUint16LE();
+ pitch = stream.readByte();
+ unknownByte_Ofs3 = stream.readByte();
+ volume = stream.readByte();
+ unknownByte_Ofs5 = stream.readByte();
+ instrumentSize = stream.readUint16LE();
+ sampleSize = stream.readUint16LE();
// Read the instrument header *ignoring* its wave address info
-
return instrument.read(stream, true);
}
-bool IIgsSampleHeader::finalize(Common::SeekableReadStream &uint8Wave) {
- return instrument.finalize(uint8Wave);
-}
-
-void IIgsMidiChannel::stopSounds() {
- // Stops all sounds on this single MIDI channel
- for (iterator iter = _gsChannels.begin(); iter != _gsChannels.end(); ++iter)
- iter->stop();
-
- _gsChannels.clear();
-}
-
-void IIgsMidiChannel::removeStoppedSounds() {
- for (int i = _gsChannels.size() - 1; i >= 0; i--)
- if (!_gsChannels[i].playing())
- _gsChannels.remove_at(i);
-}
-
-uint IIgsMidiChannel::activeSounds() const {
- uint result = 0;
-
- for (const_iterator iter = _gsChannels.begin(); iter != _gsChannels.end(); ++iter)
- if (!iter->end)
- result++;
-
- return result;
+bool IIgsSampleHeader::finalize(int8 *sample) {
+ return instrument.finalize(sample);
}
-void IIgsMidiChannel::setInstrument(const IIgsInstrumentHeader *instrument, const int8 *sample) {
- _instrument = instrument;
- _sample = sample;
-
- // Set program on each Apple IIGS channel playing on this MIDI channel
- for (iterator iter = _gsChannels.begin(); iter != _gsChannels.end(); ++iter)
- iter->setInstrument(instrument, sample);
-}
-
-void IIgsMidiChannel::setVolume(uint8 volume) {
- _volume = volume;
-
- // Set volume on each Apple IIGS channel playing on this MIDI channel
- for (iterator iter = _gsChannels.begin(); iter != _gsChannels.end(); ++iter)
- iter->setChannelVolume(volume);
-}
-
-void IIgsMidiChannel::noteOff(uint8 note, uint8 velocity) {
- // Go through all the notes playing on this MIDI channel
- // and turn off the ones that are playing the given note
- for (iterator iter = _gsChannels.begin(); iter != _gsChannels.end(); ++iter)
- if (iter->origNote == note)
- iter->noteOff(velocity);
-}
-
-void IIgsMidiChannel::noteOn(uint8 note, uint8 velocity) {
- IIgsChannelInfo channel;
-
- // Use the default channel volume and instrument
- channel.setChannelVolume(_volume);
- channel.setInstrument(_instrument, _sample);
-
- // Set the note on and save the channel
- channel.noteOn(note, velocity);
- _gsChannels.push_back(channel);
-}
-
-void IIgsChannelInfo::rewind() {
- this->envVol = this->startEnvVol;
- this->envSeg = 0;
- this->pos = intToFrac(0);
-}
-
-void IIgsChannelInfo::setChannelVolume(uint8 volume) {
- this->chanVol = intToFrac(volume);
-}
-
-void IIgsChannelInfo::setInstrument(const IIgsInstrumentHeader *instrument, const int8 *sample) {
- assert(instrument != NULL && sample != NULL);
- this->ins = instrument;
- this->unrelocatedSample = sample;
-}
-
-// TODO/FIXME: Implement correctly and fully (Take velocity into account etc)
-void IIgsChannelInfo::noteOn(uint8 noteParam, uint8 velocity) {
- this->origNote = noteParam;
- this->startEnvVol = intToFrac(0);
- rewind();
-
- const IIgsWaveInfo *waveInfo = NULL;
-
- for (uint i = 0; i < ins->oscList.count; i++)
- if (ins->oscList(i).waves[0].top >= noteParam)
- waveInfo = &ins->oscList(i).waves[0];
-
- assert(waveInfo != NULL);
-
- this->relocatedSample = this->unrelocatedSample + waveInfo->addr;
- this->posAdd = intToFrac(0);
- this->note = intToFrac(noteParam) + doubleToFrac(waveInfo->relPitch/256.0);
- this->vol = doubleToFrac(fracToDouble(this->envVol) * fracToDouble(this->chanVol) / 127.0);
- this->loop = (waveInfo->mode == OSC_MODE_LOOP);
- this->size = waveInfo->size - waveInfo->addr;
- this->end = waveInfo->halt;
-}
-
-// TODO/FIXME: Implement correctly and fully (Take release time and velocity into account etc)
-void IIgsChannelInfo::noteOff(uint8 velocity) {
- this->loop = false;
- this->envSeg = ins->relseg;
-}
-
-void IIgsChannelInfo::stop() {
- this->end = true;
-}
-
-bool IIgsChannelInfo::playing() {
- return !this->end;
-}
-
-/**
- * A function object (i.e. a functor) for testing if a Common::FSNode
- * object's name is equal (Ignoring case) to a string or to at least
- * one of the strings in a list of strings. Can be used e.g. with find_if().
- */
-struct fsnodeNameEqualsIgnoreCase : public Common::UnaryFunction<const Common::FSNode&, bool> {
-// FIXME: This should be replaced; use SearchMan instead
- fsnodeNameEqualsIgnoreCase(const Common::StringArray &str) : _str(str) {}
- fsnodeNameEqualsIgnoreCase(const Common::String str) { _str.push_back(str); }
- bool operator()(const Common::FSNode &param) const {
- for (Common::StringArray::const_iterator iter = _str.begin(); iter != _str.end(); ++iter)
- if (param.getName().equalsIgnoreCase(*iter))
- return true;
- return false;
- }
-private:
- Common::StringArray _str;
-};
+//###
+//### LOADER METHODS
+//###
bool SoundGen2GS::loadInstruments() {
- // Check that the platform is Apple IIGS, as only it uses custom instruments
- if (_vm->getPlatform() != Common::kPlatformApple2GS) {
- debugC(3, kDebugLevelSound, "Platform isn't Apple IIGS so not loading any instruments");
- return true;
- }
-
// Get info on the particular Apple IIGS AGI game's executable
- const IIgsExeInfo *exeInfo = getIIgsExeInfo((enum AgiGameID) _vm->getGameID());
+ const IIgsExeInfo *exeInfo = getIIgsExeInfo((enum AgiGameID)_vm->getGameID());
if (exeInfo == NULL) {
warning("Unsupported Apple IIGS game, not loading instruments");
return false;
}
- // List files in the game path
- Common::FSList fslist;
- Common::FSNode dir(ConfMan.get("path"));
- if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly)) {
- warning("Invalid game path (\"%s\"), not loading Apple IIGS instruments", dir.getPath().c_str());
- return false;
- }
-
- // Populate executable filenames list (Long filename and short filename) for searching
- Common::StringArray exeNames;
- exeNames.push_back(Common::String(exeInfo->exePrefix) + ".SYS16");
- exeNames.push_back(Common::String(exeInfo->exePrefix) + ".SYS");
+ // Find the executable file and the wavetable file
+ Common::ArchiveMemberList exeNames, waveNames;
+ SearchMan.listMatchingMembers(exeNames, "*.SYS16");
+ SearchMan.listMatchingMembers(exeNames, "*.SYS");
+ SearchMan.listMatchingMembers(waveNames, "SIERRASTANDARD");
+ SearchMan.listMatchingMembers(waveNames, "SIERRAST");
- // Populate wave filenames list (Long filename and short filename) for searching
- Common::StringArray waveNames;
- waveNames.push_back("SIERRASTANDARD");
- waveNames.push_back("SIERRAST");
-
- // Search for the executable file and the wave file (i.e. check if any of the filenames match)
- Common::FSList::const_iterator exeFsnode, waveFsnode;
- exeFsnode = Common::find_if(fslist.begin(), fslist.end(), fsnodeNameEqualsIgnoreCase(exeNames));
- waveFsnode = Common::find_if(fslist.begin(), fslist.end(), fsnodeNameEqualsIgnoreCase(waveNames));
-
- // Make sure that we found the executable file
- if (exeFsnode == fslist.end()) {
- warning("Couldn't find Apple IIGS game executable (%s), not loading instruments", exeNames.begin()->c_str());
+ if (exeNames.empty()) {
+ warning("Couldn't find Apple IIGS game executable (*.SYS16 or *.SYS), not loading instruments");
return false;
}
-
- // Make sure that we found the wave file
- if (waveFsnode == fslist.end()) {
- warning("Couldn't find Apple IIGS wave file (%s), not loading instruments", waveNames.begin()->c_str());
+ if (waveNames.empty()) {
+ warning("Couldn't find Apple IIGS wave file (SIERRASTANDARD or SIERRAST), not loading instruments");
return false;
}
+ Common::String exeName = exeNames.front()->getName();
+ Common::String waveName = waveNames.front()->getName();
+
// Set the MIDI program change to instrument number mapping and
// load the instrument headers and their sample data.
- // None of the tested SIERRASTANDARD-files have zeroes in them so
- // there's no need to check for prematurely ending samples here.
setProgramChangeMapping(exeInfo->instSet->progToInst);
- return loadWaveFile(*waveFsnode, *exeInfo) && loadInstrumentHeaders(*exeFsnode, *exeInfo);
+ return loadWaveFile(waveName, *exeInfo) && loadInstrumentHeaders(exeName, *exeInfo);
}
/** Older Apple IIGS AGI MIDI program change to instrument number mapping. */
-static const MidiProgramChangeMapping progToInstMappingV1 = {
+static const IIgsMidiProgramMapping progToInstMappingV1 = {
{19, 20, 22, 23, 21, 24, 5, 5, 5, 5,
6, 7, 10, 9, 11, 9, 15, 8, 5, 5,
17, 16, 18, 12, 14, 5, 5, 5, 5, 5,
@@ -781,8 +633,9 @@ static const MidiProgramChangeMapping progToInstMappingV1 = {
5
};
-/** Newer Apple IIGS AGI MIDI program change to instrument number mapping. */
-static const MidiProgramChangeMapping progToInstMappingV2 = {
+/** Newer Apple IIGS AGI MIDI program change to instrument number mapping.
+ FIXME: Some instrument choices sound wrong. */
+static const IIgsMidiProgramMapping progToInstMappingV2 = {
{21, 22, 24, 25, 23, 26, 6, 6, 6, 6,
7, 9, 12, 8, 13, 11, 17, 10, 6, 6,
19, 18, 20, 14, 16, 6, 6, 6, 6, 6,
@@ -791,13 +644,39 @@ static const MidiProgramChangeMapping progToInstMappingV2 = {
6
};
-/** Older Apple IIGS AGI instrument set. Used only by Space Quest I (AGI v1.002). */
-static const InstrumentSetInfo instSetV1 = {
+// Older Apple IIGS AGI instrument set. Used only by Space Quest I (AGI v1.002).
+//
+// Instrument 0 uses vibrato.
+// Instrument 1 uses vibrato.
+// Instrument 3 uses vibrato.
+// Instrument 5 has swap mode enabled for the first oscillator.
+// Instruemnt 9 uses vibrato.
+// Instrument 10 uses vibrato.
+// Instrument 12 uses vibrato.
+// Instrument 15 uses vibrato.
+// Instrument 16 uses vibrato.
+// Instrument 18 uses vibrato.
+static const IIgsInstrumentSetInfo instSetV1 = {
1192, 26, "7ee16bbc135171ffd6b9120cc7ff1af2", "edd3bf8905d9c238e02832b732fb2e18", &progToInstMappingV1
};
-/** Newer Apple IIGS AGI instrument set (AGI v1.003+). Used by all others than Space Quest I. */
-static const InstrumentSetInfo instSetV2 = {
+// Newer Apple IIGS AGI instrument set (AGI v1.003+). Used by all others than Space Quest I.
+//
+// Instrument 0 uses vibrato.
+// Instrument 1 uses vibrato.
+// Instrument 3 uses vibrato.
+// Instrument 6 has swap mode enabled for the first oscillator.
+// Instrument 11 uses vibrato.
+// Instrument 12 uses vibrato.
+// Instrument 14 uses vibrato.
+// Instrument 17 uses vibrato.
+// Instrument 18 uses vibrato.
+// Instrument 20 uses vibrato.
+//
+// In KQ1 intro and in LSL intro one (and the same, or at least similar)
+// instrument is using vibrato. In PQ intro there is also one instrument
+// using vibrato.
+static const IIgsInstrumentSetInfo instSetV2 = {
1292, 28, "b7d428955bb90721996de1cbca25e768", "c05fb0b0e11deefab58bc68fbd2a3d07", &progToInstMappingV2
};
@@ -829,15 +708,14 @@ const IIgsExeInfo *SoundGen2GS::getIIgsExeInfo(enum AgiGameID gameid) const {
return NULL;
}
-bool SoundGen2GS::loadInstrumentHeaders(const Common::FSNode &exePath, const IIgsExeInfo &exeInfo) {
- bool loadedOk = false; // Was loading successful?
+bool SoundGen2GS::loadInstrumentHeaders(Common::String &exePath, const IIgsExeInfo &exeInfo) {
Common::File file;
// Open the executable file and check that it has correct size
file.open(exePath);
if (file.size() != (int32)exeInfo.exeSize) {
debugC(3, kDebugLevelSound, "Apple IIGS executable (%s) has wrong size (Is %d, should be %d)",
- exePath.getPath().c_str(), file.size(), exeInfo.exeSize);
+ exePath.c_str(), file.size(), exeInfo.exeSize);
}
// Read the whole executable file into memory
@@ -845,50 +723,49 @@ bool SoundGen2GS::loadInstrumentHeaders(const Common::FSNode &exePath, const IIg
file.close();
// Check that we got enough data to be able to parse the instruments
- if (data && data->size() >= (int32)(exeInfo.instSetStart + exeInfo.instSet->byteCount)) {
- // Check instrument set's length (The info's saved in the executable)
- data->seek(exeInfo.instSetStart - 4);
- uint16 instSetByteCount = data->readUint16LE();
- if (instSetByteCount != exeInfo.instSet->byteCount) {
- debugC(3, kDebugLevelSound, "Wrong instrument set size (Is %d, should be %d) in Apple IIGS executable (%s)",
- instSetByteCount, exeInfo.instSet->byteCount, exePath.getPath().c_str());
- }
+ if (!data || data->size() < (int32)(exeInfo.instSetStart + exeInfo.instSet->byteCount)) {
+ warning("Error loading instruments from Apple IIGS executable (%s)", exePath.c_str());
+ return false;
+ }
- // Check instrument set's md5sum
- data->seek(exeInfo.instSetStart);
+ // Check instrument set's length (The info's saved in the executable)
+ data->seek(exeInfo.instSetStart - 4);
+ uint16 instSetByteCount = data->readUint16LE();
+ if (instSetByteCount != exeInfo.instSet->byteCount) {
+ debugC(3, kDebugLevelSound, "Wrong instrument set size (Is %d, should be %d) in Apple IIGS executable (%s)",
+ instSetByteCount, exeInfo.instSet->byteCount, exePath.c_str());
+ }
- Common::String md5str = Common::computeStreamMD5AsString(*data, exeInfo.instSet->byteCount);
- if (md5str != exeInfo.instSet->md5) {
- warning("Unknown Apple IIGS instrument set (md5: %s) in %s, trying to use it nonetheless",
- md5str.c_str(), exePath.getPath().c_str());
- }
+ // Check instrument set's md5sum
+ data->seek(exeInfo.instSetStart);
+ Common::String md5str = Common::computeStreamMD5AsString(*data, exeInfo.instSet->byteCount);
+ if (md5str != exeInfo.instSet->md5) {
+ warning("Unknown Apple IIGS instrument set (md5: %s) in %s, trying to use it nonetheless",
+ md5str.c_str(), exePath.c_str());
+ }
- // Read in the instrument set one instrument at a time
- data->seek(exeInfo.instSetStart);
+ // Read in the instrument set one instrument at a time
+ data->seek(exeInfo.instSetStart);
- // Load the instruments
- _instruments.clear();
- _instruments.reserve(exeInfo.instSet->instCount);
+ _instruments.clear();
+ _instruments.reserve(exeInfo.instSet->instCount);
- IIgsInstrumentHeader instrument;
- for (uint i = 0; i < exeInfo.instSet->instCount; i++) {
- if (!instrument.read(*data)) {
- warning("Error loading Apple IIGS instrument (%d. of %d) from %s, not loading more instruments",
- i + 1, exeInfo.instSet->instCount, exePath.getPath().c_str());
- break;
- }
- _instruments.push_back(instrument); // Add the successfully loaded instrument to the instruments array
+ IIgsInstrumentHeader instrument;
+ for (uint i = 0; i < exeInfo.instSet->instCount; i++) {
+ if (!instrument.read(*data)) {
+ warning("Error loading Apple IIGS instrument (%d. of %d) from %s, not loading more instruments",
+ i + 1, exeInfo.instSet->instCount, exePath.c_str());
+ break;
}
+ instrument.finalize(_wavetable);
+ _instruments.push_back(instrument);
+ }
- // Loading was successful only if all instruments were loaded successfully
- loadedOk = (_instruments.size() == exeInfo.instSet->instCount);
- } else // Couldn't read enough data from the executable file
- warning("Error loading instruments from Apple IIGS executable (%s)", exePath.getPath().c_str());
-
- return loadedOk;
+ // Loading was successful only if all instruments were loaded successfully
+ return (_instruments.size() == exeInfo.instSet->instCount);
}
-bool SoundGen2GS::loadWaveFile(const Common::FSNode &wavePath, const IIgsExeInfo &exeInfo) {
+bool SoundGen2GS::loadWaveFile(Common::String &wavePath, const IIgsExeInfo &exeInfo) {
Common::File file;
// Open the wave file and read it into memory
@@ -897,23 +774,22 @@ bool SoundGen2GS::loadWaveFile(const Common::FSNode &wavePath, const IIgsExeInfo
file.close();
// Check that we got the whole wave file
- if (uint8Wave && uint8Wave->size() == SIERRASTANDARD_SIZE) {
- // Check wave file's md5sum
- Common::String md5str = Common::computeStreamMD5AsString(*uint8Wave, SIERRASTANDARD_SIZE);
- if (md5str != exeInfo.instSet->waveFileMd5) {
- warning("Unknown Apple IIGS wave file (md5: %s, game: %s).\n" \
+ if (!uint8Wave || (uint8Wave->size() != SIERRASTANDARD_SIZE)) {
+ warning("Error loading Apple IIGS wave file (%s), not loading instruments", wavePath.c_str());
+ return false;
+ }
+
+ // Check wave file's md5sum
+ Common::String md5str = Common::computeStreamMD5AsString(*uint8Wave, SIERRASTANDARD_SIZE);
+ if (md5str != exeInfo.instSet->waveFileMd5) {
+ warning("Unknown Apple IIGS wave file (md5: %s, game: %s).\n" \
"Please report the information on the previous line to the ScummVM team.\n" \
"Using the wave file as it is - music may sound weird", md5str.c_str(), exeInfo.exePrefix);
- }
-
- uint8Wave->seek(0); // Seek wave to its start
- // Convert the wave file from 8-bit unsigned to 8-bit signed and save the result
- _wave.resize(uint8Wave->size());
- return convertWave(*uint8Wave, _wave.begin(), uint8Wave->size());
- } else { // Couldn't read the wave file or it had incorrect size
- warning("Error loading Apple IIGS wave file (%s), not loading instruments", wavePath.getPath().c_str());
- return false;
}
+
+ // Convert the wave file to 8-bit signed and save the result
+ uint8Wave->seek(0);
+ return convertWave(*uint8Wave, _wavetable, SIERRASTANDARD_SIZE);
}
} // End of namespace Agi
diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h
index 76f0642b7b..1a225300ae 100644
--- a/engines/agi/sound_2gs.h
+++ b/engines/agi/sound_2gs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_SOUND_2GS_H
@@ -31,45 +28,30 @@
namespace Agi {
-#define BUFFER_SIZE 410
-
-// Apple IIGS MIDI uses 60 ticks per second (Based on tests with Apple IIGS
-// KQ1 and SQ1 under MESS 0.124a). So we make the audio buffer size to be a
-// 1/60th of a second in length. That should be getSampleRate() / 60 samples
-// in length but as getSampleRate() is always 22050 at the moment we just use
-// the hardcoded value of 368 (22050/60 = 367.5 which rounds up to 368).
-// FIXME: Use getSampleRate() / 60 rather than a hardcoded value
-#define IIGS_BUFFER_SIZE 368
-
-// MIDI command values (Shifted right by 4 so they're in the lower nibble)
-#define MIDI_CMD_NOTE_OFF 0x08
-#define MIDI_CMD_NOTE_ON 0x09
-#define MIDI_CMD_CONTROLLER 0x0B
-#define MIDI_CMD_PROGRAM_CHANGE 0x0C
-#define MIDI_CMD_PITCH_WHEEL 0x0E
-// Whole MIDI byte values (Command and channel info together)
-#define MIDI_BYTE_STOP_SEQUENCE 0xFC
-#define MIDI_BYTE_TIMER_SYNC 0xF8
-
-struct IIgsEnvelopeSegment {
- uint8 bp;
- uint16 inc; ///< 8b.8b fixed point, very probably little endian
-};
-
-#define ENVELOPE_SEGMENT_COUNT 8
-struct IIgsEnvelope {
- IIgsEnvelopeSegment seg[ENVELOPE_SEGMENT_COUNT];
-
- /** Reads an Apple IIGS envelope from then given stream. */
- bool read(Common::SeekableReadStream &stream);
-};
-
-// 2**(1/12) i.e. the 12th root of 2
-#define SEMITONE 1.059463094359295
-
-// C6's frequency is A4's (440 Hz) frequency but one full octave and three semitones higher
-// i.e. C6_FREQ = 440 * pow(2.0, 15/12.0)
-#define C6_FREQ 1046.502261202395
+// Sample data in SIERRASTANDARD files is in unsigned 8-bit format. A zero
+// occurring in the sample data causes the ES5503 wavetable sound chip in
+// Apple IIGS to halt the corresponding oscillator immediately. We preprocess
+// the sample data by converting it to signed values and the instruments by
+// detecting prematurely stopping samples beforehand.
+//
+// Note: None of the tested SIERRASTANDARD files have zeroes in them. So in
+// practice there is no need to check for them. However, they still do exist
+// in the sample resources.
+#define ZERO_OFFSET 0x80
+
+// Apple IIGS envelope update frequency defaults to 100Hz. It can be changed,
+// so there might be differences per game, for example.
+#define ENVELOPE_COEF 100 / _sampleRate
+
+// MIDI player commands
+#define MIDI_NOTE_OFF 0x8
+#define MIDI_NOTE_ON 0x9
+#define MIDI_CONTROLLER 0xB
+#define MIDI_PROGRAM_CHANGE 0xC
+#define MIDI_PITCH_WHEEL 0xE
+
+#define MIDI_STOP_SEQUENCE 0xFC
+#define MIDI_TIMER_SYNC 0xF8
// Size of the SIERRASTANDARD file (i.e. the wave file i.e. the sample data used by the instruments).
#define SIERRASTANDARD_SIZE 65536
@@ -78,63 +60,36 @@ struct IIgsEnvelope {
// Chosen empirically based on Apple IIGS AGI game data, increase if needed.
#define MAX_INSTRUMENTS 28
-struct IIgsWaveInfo {
- uint8 top;
- uint addr;
- uint size;
-// Oscillator channel
-#define OSC_CHANNEL_RIGHT 0
-#define OSC_CHANNEL_LEFT 1
- uint channel;
-// Oscillator mode
-#define OSC_MODE_LOOP 0
-#define OSC_MODE_ONESHOT 1
-#define OSC_MODE_SYNC_AM 2
-#define OSC_MODE_SWAP 3
- uint mode;
- bool halt;
- int16 relPitch; ///< Relative pitch in semitones (Signed 8b.8b fixed point)
-
- /** Reads an Apple IIGS wave information structure from the given stream. */
- bool read(Common::SeekableReadStream &stream, bool ignoreAddr = false);
- bool finalize(Common::SeekableReadStream &uint8Wave);
-};
-
-// Number of waves per Apple IIGS sound oscillator
-#define WAVES_PER_OSCILLATOR 2
-
-/** An Apple IIGS sound oscillator. Consists always of two waves. */
-struct IIgsOscillator {
- IIgsWaveInfo waves[WAVES_PER_OSCILLATOR];
-
- bool finalize(Common::SeekableReadStream &uint8Wave);
-};
-
-// Maximum number of oscillators in an Apple IIGS instrument.
-// Chosen empirically based on Apple IIGS AGI game data, increase if needed.
-#define MAX_OSCILLATORS 4
-
-/** An Apple IIGS sound oscillator list. */
-struct IIgsOscillatorList {
- uint count; ///< Oscillator count
- IIgsOscillator osc[MAX_OSCILLATORS]; ///< The oscillators
-
- /** Indexing operators for easier access to the oscillators. */
- const IIgsOscillator &operator()(uint index) const { return osc[index]; }
- IIgsOscillator &operator()(uint index) { return osc[index]; }
+// The MIDI player allocates one generator for each note it starts to play.
+// Here the maximum number of generators is defined. Feel free to increase
+// this if it does not seem to be enough.
+#define MAX_GENERATORS 16
- /** Reads an Apple IIGS oscillator list from the given stream. */
- bool read(Common::SeekableReadStream &stream, uint oscillatorCount, bool ignoreAddr = false);
- bool finalize(Common::SeekableReadStream &uint8Wave);
-};
+#define ENVELOPE_SEGMENT_COUNT 8
+#define MAX_OSCILLATOR_WAVES 127 // Maximum is one for every MIDI key
struct IIgsInstrumentHeader {
- IIgsEnvelope env;
- uint8 relseg;
- uint8 bendrange;
- uint8 vibdepth;
- uint8 vibspeed;
- IIgsOscillatorList oscList;
+ struct {
+ frac_t bp; ///< Envelope segment breakpoint
+ frac_t inc; ///< Envelope segment velocity
+ } env[ENVELOPE_SEGMENT_COUNT];
+ uint8 seg; ///< Envelope release segment
+ uint8 bend; ///< Maximum range for pitch bend
+ uint8 vibDepth; ///< Vibrato depth
+ uint8 vibSpeed; ///< Vibrato speed
+ uint8 waveCount[2]; ///< Wave count for both generators
+ struct {
+ uint8 key; ///< Highest MIDI key to use this wave
+ int offset; ///< Offset of wave data, relative to base
+ uint size; ///< Wave size
+ bool halt; ///< Oscillator halted?
+ bool loop; ///< Loop mode?
+ bool swap; ///< Swap mode?
+ bool chn; ///< Output channel (left / right)
+ int16 tune; ///< Fine tune in semitones (8.8 fixed point)
+ } wave[2][MAX_OSCILLATOR_WAVES];
+
+ int8* base; ///< Base of wave data
/**
* Read an Apple IIGS instrument header from the given stream.
@@ -143,7 +98,7 @@ struct IIgsInstrumentHeader {
* @return True if successful, false otherwise.
*/
bool read(Common::SeekableReadStream &stream, bool ignoreAddr = false);
- bool finalize(Common::SeekableReadStream &uint8Wave);
+ bool finalize(int8 *);
};
struct IIgsSampleHeader {
@@ -162,33 +117,29 @@ struct IIgsSampleHeader {
* @return True if successful, false otherwise.
*/
bool read(Common::SeekableReadStream &stream);
- bool finalize(Common::SeekableReadStream &uint8Wave);
+ bool finalize(int8 *sample);
};
-struct IIgsChannelInfo {
- const IIgsInstrumentHeader *ins; ///< Instrument info
- const int8 *relocatedSample; ///< Source sample data (8-bit signed format) using relocation
- const int8 *unrelocatedSample; ///< Source sample data (8-bit signed format) without relocation
- frac_t pos; ///< Current sample position
- frac_t posAdd; ///< Current sample position adder (Calculated using note, vibrato etc)
- uint8 origNote; ///< The original note without the added relative pitch
- frac_t note; ///< Note (With the added relative pitch)
- frac_t vol; ///< Current volume (Takes both channel volume and enveloping into account)
- frac_t chanVol; ///< Channel volume
- frac_t startEnvVol; ///< Starting envelope volume
- frac_t envVol; ///< Current envelope volume
- uint envSeg; ///< Current envelope segment
- uint size; ///< Sample size
- bool loop; ///< Should we loop the sample?
- bool end; ///< Has the playing ended?
-
- void rewind(); ///< Rewinds the sound playing on this channel to its start
- void setChannelVolume(uint8 volume); ///< Sets the channel volume
- void setInstrument(const IIgsInstrumentHeader *instrument, const int8 *sample); ///< Sets the instrument to be used on this channel
- void noteOn(uint8 noteParam, uint8 velocity); ///< Starts playing a note on this channel
- void noteOff(uint8 velocity); ///< Releases the note on this channel
- void stop(); ///< Stops the note playing on this channel instantly
- bool playing(); ///< Is there a note playing on this channel?
+class IIgsGenerator {
+public:
+ IIgsGenerator() : ins(NULL), key(-1), chn(-1) {}
+
+ const IIgsInstrumentHeader *ins; ///< Currently used instrument
+ int key; ///< MIDI key
+ int vel; ///< MIDI velocity (& channel volume)
+ int chn; ///< MIDI channel
+ struct {
+ int8 *base; ///< Sample base pointer
+ uint size; ///< Sample size
+ frac_t p; ///< Sample pointer
+ frac_t pd; ///< Sample pointer delta
+ bool halt; ///< Is oscillator halted?
+ bool loop; ///< Is looping enabled?
+ bool swap; ///< Is swapping enabled?
+ bool chn; ///< Output channel (left / right)
+ } osc[2];
+ int seg; ///< Current envelope segment
+ frac_t a; ///< Current envelope amplitude
};
class IIgsMidi : public AgiSound {
@@ -198,15 +149,14 @@ public:
virtual uint16 type() { return _type; }
virtual const uint8 *getPtr() { return _ptr; }
virtual void setPtr(const uint8 *ptr) { _ptr = ptr; }
- virtual void rewind() { _ptr = _data + 2; _midiTicks = _soundBufTicks = 0; }
+ virtual void rewind() { _ptr = _data + 2; _ticks = 0; }
protected:
uint8 *_data; ///< Raw sound resource data
const uint8 *_ptr; ///< Pointer to the current position in the MIDI data
uint32 _len; ///< Length of the raw sound resource
uint16 _type; ///< Sound resource type
public:
- uint _midiTicks; ///< MIDI song position in ticks (1/60ths of a second)
- uint _soundBufTicks; ///< Sound buffer position in ticks (1/60ths of a second)
+ uint _ticks; ///< MIDI song position in ticks (1/60ths of a second)
};
class IIgsSample : public AgiSound {
@@ -217,12 +167,12 @@ public:
const IIgsSampleHeader &getHeader() const { return _header; }
const int8 *getSample() const { return _sample; }
protected:
- IIgsSampleHeader _header; ///< Apple IIGS AGI sample header
- int8 *_sample; ///< Sample data (8-bit signed format)
+ IIgsSampleHeader _header; ///< Apple IIGS AGI sample header
+ int8 *_sample; ///< Sample data (8-bit signed format)
};
/** Apple IIGS MIDI program change to instrument number mapping. */
-struct MidiProgramChangeMapping {
+struct IIgsMidiProgramMapping {
byte midiProgToInst[44]; ///< Lookup table for the MIDI program number to instrument number mapping
byte undefinedInst; ///< The undefined instrument number
@@ -233,42 +183,34 @@ struct MidiProgramChangeMapping {
};
/** Apple IIGS AGI instrument set information. */
-struct InstrumentSetInfo {
- uint byteCount; ///< Length of the whole instrument set in bytes
- uint instCount; ///< Amount of instrument in the set
- const char *md5; ///< MD5 hex digest of the whole instrument set
+struct IIgsInstrumentSetInfo {
+ uint byteCount; ///< Length of the whole instrument set in bytes
+ uint instCount; ///< Amount of instrument in the set
+ const char *md5; ///< MD5 hex digest of the whole instrument set
const char *waveFileMd5; ///< MD5 hex digest of the wave file (i.e. the sample data used by the instruments)
- const MidiProgramChangeMapping *progToInst; ///< Program change to instrument number mapping
+ const IIgsMidiProgramMapping *progToInst; ///< Program change to instrument number mapping
};
/** Apple IIGS AGI executable file information. */
struct IIgsExeInfo {
- enum AgiGameID gameid; ///< Game ID
- const char *exePrefix; ///< Prefix of the Apple IIGS AGI executable (e.g. "SQ", "PQ", "KQ4" etc)
- uint agiVer; ///< Apple IIGS AGI version number, not strictly needed
- uint exeSize; ///< Size of the Apple IIGS AGI executable file in bytes
- uint instSetStart; ///< Starting offset of the instrument set inside the executable file
- const InstrumentSetInfo *instSet; ///< Information about the used instrument set
+ enum AgiGameID gameid; ///< Game ID
+ const char *exePrefix; ///< Prefix of the Apple IIGS AGI executable (e.g. "SQ", "PQ", "KQ4" etc)
+ uint agiVer; ///< Apple IIGS AGI version number, not strictly needed
+ uint exeSize; ///< Size of the Apple IIGS AGI executable file in bytes
+ uint instSetStart; ///< Starting offset of the instrument set inside the executable file
+ const IIgsInstrumentSetInfo *instSet; ///< Information about the used instrument set
};
class IIgsMidiChannel {
public:
- IIgsMidiChannel() : _instrument(0), _sample(0), _volume(0) {}
- uint activeSounds() const; ///< How many active sounds are playing?
- void setInstrument(const IIgsInstrumentHeader *instrument, const int8 *sample);
- void setVolume(uint8 volume);
- void noteOff(uint8 note, uint8 velocity);
- void noteOn(uint8 note, uint8 velocity);
- void stopSounds(); ///< Clears the channel of any sounds
- void removeStoppedSounds(); ///< Removes all stopped sounds from this MIDI channel
-public:
- typedef Common::Array<IIgsChannelInfo>::const_iterator const_iterator;
- typedef Common::Array<IIgsChannelInfo>::iterator iterator;
- Common::Array<IIgsChannelInfo> _gsChannels; ///< Apple IIGS channels playing on this MIDI channel
-protected:
+ IIgsMidiChannel() : _instrument(NULL), _volume(127) {}
+ void setInstrument(const IIgsInstrumentHeader *instrument) { _instrument = instrument; }
+ const IIgsInstrumentHeader* getInstrument() { return _instrument; }
+ void setVolume(int volume) { _volume = volume; }
+ int getVolume() { return _volume; }
+private:
const IIgsInstrumentHeader *_instrument; ///< Instrument used on this MIDI channel
- const int8 *_sample; ///< Sample data used on this MIDI channel
- uint8 _volume; ///< MIDI controller number 7 (Volume)
+ int _volume; ///< MIDI controller number 7 (Volume)
};
class SoundGen2GS : public SoundGen, public Audio::AudioStream {
@@ -279,73 +221,50 @@ public:
void play(int resnum);
void stop(void);
- // AudioStream API
int readBuffer(int16 *buffer, const int numSamples);
- bool isStereo() const {
- return false;
- }
-
- bool endOfData() const {
- return false;
- }
-
- int getRate() const {
- // FIXME: Ideally, we should use _sampleRate.
- return 22050;
- }
+ bool isStereo() const { return true; }
+ bool endOfData() const { return false; }
+ int getRate() const { return _sampleRate; }
private:
- bool _disabledMidi;
- int _playingSound;
- bool _playing;
-
- int16 *_sndBuffer;
-
-/**
- * Class for managing Apple IIGS sound channels.
- * TODO: Check what instruments are used by default on the MIDI channels
- * FIXME: Some instrument choices sound wrong
- */
-private:
- typedef Common::Array<IIgsMidiChannel>::const_iterator const_iterator;
- typedef Common::Array<IIgsMidiChannel>::iterator iterator;
- static const uint kSfxMidiChannel = 0; ///< The MIDI channel used for playing sound effects
-
+ // Loader methods
bool loadInstruments();
- const IIgsExeInfo *getIIgsExeInfo(enum AgiGameID gameid) const;
+ bool loadInstrumentHeaders(Common::String &exePath, const IIgsExeInfo &exeInfo);
+ bool loadWaveFile(Common::String &wavePath, const IIgsExeInfo &exeInfo);
- void setProgramChangeMapping(const MidiProgramChangeMapping *mapping);
- bool loadInstrumentHeaders(const Common::FSNode &exePath, const IIgsExeInfo &exeInfo);
- bool loadWaveFile(const Common::FSNode &wavePath, const IIgsExeInfo &exeInfo);
-
- // Miscellaneous methods
- void fillAudio(int16 *stream, uint len);
- uint32 mixSound();
- void playSound();
- uint activeSounds() const; ///< How many active sounds are playing?
- void stopSounds(); ///< Stops all sounds
- void removeStoppedSounds(); ///< Removes all stopped sounds from the MIDI channels
-
- // For playing Apple IIGS AGI samples (Sound effects etc)
- bool playSampleSound(const IIgsSampleHeader &sampleHeader, const int8 *sample);
- void playMidiSound();
- void playSampleSound();
-
- // MIDI commands
- void midiNoteOff(uint8 channel, uint8 note, uint8 velocity);
- void midiNoteOn(uint8 channel, uint8 note, uint8 velocity);
- void midiController(uint8 channel, uint8 controller, uint8 value);
- void midiProgramChange(uint8 channel, uint8 program);
- void midiPitchWheel(uint8 wheelPos);
- //protected:
- const IIgsInstrumentHeader* getInstrument(uint8 program) const;
- //public:
- Common::Array<IIgsMidiChannel> _midiChannels; ///< Information about each MIDI channel
- //protected:
- Common::Array<int8> _wave; ///< Sample data used by the Apple IIGS MIDI instruments
- const MidiProgramChangeMapping *_midiProgToInst; ///< MIDI program change to instrument number mapping
- Common::Array<IIgsInstrumentHeader> _instruments; ///< Instruments used by the Apple IIGS AGI
+ const IIgsExeInfo *getIIgsExeInfo(enum AgiGameID gameid) const;
+ void setProgramChangeMapping(const IIgsMidiProgramMapping *mapping);
+
+ // Player methods
+ void advancePlayer(); ///< Advance the player
+ void advanceMidiPlayer(); ///< Advance MIDI player
+ uint generateOutput(); ///< Fill the output buffer
+
+ void haltGenerators(); ///< Halt all generators
+ uint activeGenerators(); ///< How many generators are active?
+
+ void midiNoteOff(int channel, int note, int velocity);
+ void midiNoteOn(int channel, int note, int velocity);
+ double midiKeyToFreq(int key, double finetune);
+ IIgsInstrumentHeader* getInstrument(uint8 program) { return &_instruments[_progToInst->map(program)]; };
+ IIgsGenerator* allocateGenerator() { IIgsGenerator* g = &_generators[_nextGen++]; _nextGen %= 16; return g; }
+
+ bool _disableMidi; ///< Disable MIDI if loading instruments fail
+ int _playingSound; ///< Resource number for the currently playing sound
+ bool _playing; ///< True when the resource is still playing
+
+ IIgsGenerator _generators[MAX_GENERATORS]; ///< IIGS sound generators that are used to play single notes
+ uint _nextGen; ///< Next generator available for allocation
+ IIgsMidiChannel _channels[16]; ///< MIDI channels
+ Common::Array<IIgsInstrumentHeader> _instruments; ///< Instrument data
+ const IIgsMidiProgramMapping *_progToInst; ///< MIDI program number to instrument mapping
+ int8 *_wavetable; ///< Sample data used by the instruments
+ uint _ticks; ///< MIDI ticks (60Hz)
+ int16 *_out; ///< Output buffer
+ uint _outSize; ///< Output buffer size
+
+ static const int kSfxMidiChannel = 15; ///< MIDI channel used for playing sample resources
};
} // End of namespace Agi
diff --git a/engines/agi/sound_coco3.cpp b/engines/agi/sound_coco3.cpp
index 858c1c8515..281f2cb2d4 100644
--- a/engines/agi/sound_coco3.cpp
+++ b/engines/agi/sound_coco3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/sound_coco3.h b/engines/agi/sound_coco3.h
index a1cc271871..7058b770f5 100644
--- a/engines/agi/sound_coco3.h
+++ b/engines/agi/sound_coco3.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_SOUND_COCO3_H
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index 997c1edd6b..d2c99171e2 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Code is based on:
diff --git a/engines/agi/sound_midi.h b/engines/agi/sound_midi.h
index 5733358fee..92a4002498 100644
--- a/engines/agi/sound_midi.h
+++ b/engines/agi/sound_midi.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Music class
diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index 35c960d260..319b7049ed 100644
--- a/engines/agi/sound_pcjr.cpp
+++ b/engines/agi/sound_pcjr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* Heavily based on code from NAGI
diff --git a/engines/agi/sound_pcjr.h b/engines/agi/sound_pcjr.h
index 3aad29d2ce..f50fd0aa82 100644
--- a/engines/agi/sound_pcjr.h
+++ b/engines/agi/sound_pcjr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_SOUND_PCJR_H
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index 6f2f3c5ad3..fc9a57791c 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/random.h"
diff --git a/engines/agi/sound_sarien.h b/engines/agi/sound_sarien.h
index cea396255c..22bfff3395 100644
--- a/engines/agi/sound_sarien.h
+++ b/engines/agi/sound_sarien.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_SOUND_SARIEN_H
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index e2b74e87bb..ea0b07f4da 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/sprite.h b/engines/agi/sprite.h
index 57fd0dacf2..68f0e32b86 100644
--- a/engines/agi/sprite.h
+++ b/engines/agi/sprite.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_SPRITE_H
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index f85c4c1cdd..fedfd29362 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
@@ -92,8 +89,11 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
x1++;
// DF: changed the len-1 to len...
- if (x1 == len && m[len] != '\n')
- y1++, x1 = foff = 0;
+ // FIXME: m[len] doesn't make sense and may read out of bounds?
+ if (x1 == len && m[len] != '\n') {
+ y1++;
+ x1 = foff = 0;
+ }
} else {
y1++;
x1 = foff = 0;
diff --git a/engines/agi/view.cpp b/engines/agi/view.cpp
index fcca1e2a79..0d420caa81 100644
--- a/engines/agi/view.cpp
+++ b/engines/agi/view.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agi/agi.h"
diff --git a/engines/agi/view.h b/engines/agi/view.h
index 85f2d6eaf9..0ef443f8e5 100644
--- a/engines/agi/view.h
+++ b/engines/agi/view.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGI_VIEW_H
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index fab3b5cf50..14159c0147 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/agi/wagparser.h b/engines/agi/wagparser.h
index c16d4092e7..81cfecef1b 100644
--- a/engines/agi/wagparser.h
+++ b/engines/agi/wagparser.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Agi {
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index d8596dec97..4b96fdf711 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
//
@@ -40,7 +37,7 @@ static uint32 wordsFlen; // length of word memory
// Local implementation to avoid problems with strndup() used by
// gcc 3.2 Cygwin (see #635984)
//
-static char *myStrndup(char *src, int n) {
+static char *myStrndup(const char *src, int n) {
char *tmp = strncpy((char *)malloc(n + 1), src, n);
tmp[n] = 0;
return tmp;
@@ -89,11 +86,11 @@ void AgiEngine::unloadWords() {
*
* Thomas Akesson, November 2001
*/
-int AgiEngine::findWord(char *word, int *flen) {
+int AgiEngine::findWord(const char *word, int *flen) {
int mchr = 0; // matched chars
int len, fchr, id = -1;
- uint8 *p = words;
- uint8 *q = words + wordsFlen;
+ const uint8 *p = words;
+ const uint8 *q = words + wordsFlen;
*flen = 0;
debugC(2, kDebugLevelScripts, "find_word(%s)", word);
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 56501b5294..4d879909c4 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -18,13 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
-#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/fs.h"
#include "common/textconsole.h"
@@ -60,8 +56,8 @@ static const GameSpecificSettings puzzlepack_settings = {
};
#ifdef ENABLE_AGOS2
-AGOSEngine_DIMP::AGOSEngine_DIMP(OSystem *system)
- : AGOSEngine_PuzzlePack(system) {
+AGOSEngine_DIMP::AGOSEngine_DIMP(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_PuzzlePack(system, gd) {
_iconToggleCount = 0;
_voiceCount = 0;
@@ -71,24 +67,24 @@ AGOSEngine_DIMP::AGOSEngine_DIMP(OSystem *system)
_tSecondCount = 0;
}
-AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system)
- : AGOSEngine_Feeble(system) {
+AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Feeble(system, gd) {
_oopsValid = false;
_gameTime = 0;
}
#endif
-AGOSEngine_Simon2::AGOSEngine_Simon2(OSystem *system)
- : AGOSEngine_Simon1(system) {
+AGOSEngine_Simon2::AGOSEngine_Simon2(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Simon1(system, gd) {
}
-AGOSEngine_Simon1::AGOSEngine_Simon1(OSystem *system)
- : AGOSEngine_Waxworks(system) {
+AGOSEngine_Simon1::AGOSEngine_Simon1(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Waxworks(system, gd) {
}
-AGOSEngine_Waxworks::AGOSEngine_Waxworks(OSystem *system)
- : AGOSEngine_Elvira2(system) {
+AGOSEngine_Waxworks::AGOSEngine_Waxworks(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Elvira2(system, gd) {
_boxCR = false;
_boxLineCount = 0;
@@ -104,16 +100,16 @@ AGOSEngine_Waxworks::AGOSEngine_Waxworks(OSystem *system)
memset(_lineCounts, 0, sizeof(_lineCounts));
}
-AGOSEngine_Elvira2::AGOSEngine_Elvira2(OSystem *system)
- : AGOSEngine_Elvira1(system) {
+AGOSEngine_Elvira2::AGOSEngine_Elvira2(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Elvira1(system, gd) {
}
-AGOSEngine_Elvira1::AGOSEngine_Elvira1(OSystem *system)
- : AGOSEngine(system) {
+AGOSEngine_Elvira1::AGOSEngine_Elvira1(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine(system, gd) {
}
-AGOSEngine::AGOSEngine(OSystem *syst)
- : Engine(syst) {
+AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
+ : Engine(system), _rnd("agos"), _gameDescription(gd) {
_vcPtr = 0;
_vcGetOutOfCode = 0;
@@ -529,8 +525,6 @@ AGOSEngine::AGOSEngine(OSystem *syst)
SearchMan.addSubDirectoryMatching(gameDataDir, "movies");
SearchMan.addSubDirectoryMatching(gameDataDir, "sfx");
SearchMan.addSubDirectoryMatching(gameDataDir, "speech");
-
- g_eventRec.registerRandomSource(_rnd, "agos");
}
Common::Error AGOSEngine::init() {
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index aecf2437a7..aa68a05eee 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_AGOS_H
@@ -179,6 +176,7 @@ class Debugger;
#endif
class AGOSEngine : public Engine {
+protected:
friend class Debugger;
// Engine APIs
@@ -196,7 +194,6 @@ class AGOSEngine : public Engine {
virtual void syncSoundSettings();
virtual void pauseEngineIntern(bool pause);
-public:
virtual void setupOpcodes();
uint16 _numOpcodes, _opcode;
@@ -208,8 +205,9 @@ public:
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
- const AGOSGameDescription *_gameDescription;
+ const AGOSGameDescription * const _gameDescription;
+public:
virtual void setupGame();
int getGameId() const;
@@ -587,7 +585,7 @@ protected:
byte _hebrewCharWidths[32];
public:
- AGOSEngine(OSystem *syst);
+ AGOSEngine(OSystem *system, const AGOSGameDescription *gd);
virtual ~AGOSEngine();
byte *_curSfxFile;
@@ -1284,7 +1282,7 @@ class AGOSEngine_PN : public AGOSEngine {
void setupBoxes();
int readfromline();
public:
- AGOSEngine_PN(OSystem *system);
+ AGOSEngine_PN(OSystem *system, const AGOSGameDescription *gd);
~AGOSEngine_PN();
virtual void setupGame();
@@ -1526,7 +1524,7 @@ protected:
class AGOSEngine_Elvira1 : public AGOSEngine {
public:
- AGOSEngine_Elvira1(OSystem *system);
+ AGOSEngine_Elvira1(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Elvira1();
virtual void setupGame();
@@ -1607,7 +1605,7 @@ protected:
class AGOSEngine_Elvira2 : public AGOSEngine_Elvira1 {
public:
- AGOSEngine_Elvira2(OSystem *system);
+ AGOSEngine_Elvira2(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Elvira2();
virtual void setupGame();
@@ -1702,7 +1700,7 @@ protected:
class AGOSEngine_Waxworks : public AGOSEngine_Elvira2 {
public:
- AGOSEngine_Waxworks(OSystem *system);
+ AGOSEngine_Waxworks(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Waxworks();
virtual void setupGame();
@@ -1769,7 +1767,7 @@ protected:
class AGOSEngine_Simon1 : public AGOSEngine_Waxworks {
public:
- AGOSEngine_Simon1(OSystem *system);
+ AGOSEngine_Simon1(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Simon1();
virtual void setupGame();
@@ -1840,7 +1838,7 @@ protected:
class AGOSEngine_Simon2 : public AGOSEngine_Simon1 {
public:
- AGOSEngine_Simon2(OSystem *system);
+ AGOSEngine_Simon2(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_Simon2();
virtual void setupGame();
@@ -1887,7 +1885,7 @@ protected:
#ifdef ENABLE_AGOS2
class AGOSEngine_Feeble : public AGOSEngine_Simon2 {
public:
- AGOSEngine_Feeble(OSystem *system);
+ AGOSEngine_Feeble(OSystem *system, const AGOSGameDescription *gd);
~AGOSEngine_Feeble();
virtual void setupGame();
@@ -2026,7 +2024,7 @@ protected:
class AGOSEngine_FeebleDemo : public AGOSEngine_Feeble {
public:
- AGOSEngine_FeebleDemo(OSystem *system);
+ AGOSEngine_FeebleDemo(OSystem *system, const AGOSGameDescription *gd);
protected:
bool _filmMenuUsed;
@@ -2047,7 +2045,7 @@ protected:
class AGOSEngine_PuzzlePack : public AGOSEngine_Feeble {
public:
- AGOSEngine_PuzzlePack(OSystem *system);
+ AGOSEngine_PuzzlePack(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_PuzzlePack();
virtual void setupGame();
@@ -2106,7 +2104,7 @@ protected:
class AGOSEngine_DIMP : public AGOSEngine_PuzzlePack {
public:
- AGOSEngine_DIMP(OSystem *system);
+ AGOSEngine_DIMP(OSystem *system, const AGOSGameDescription *gd);
//~AGOSEngine_DIMP();
virtual void setupOpcodes();
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index ee47f62a58..eb78ca3d9b 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 77b02ffd13..e1d7207251 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_AGOS2
diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp
index a131bb841b..b708b4890b 100644
--- a/engines/agos/charset-fontdata.cpp
+++ b/engines/agos/charset-fontdata.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp
index 5e9279c491..9d27afaa27 100644
--- a/engines/agos/charset.cpp
+++ b/engines/agos/charset.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/contain.cpp b/engines/agos/contain.cpp
index 932557e798..ba60c65ff3 100644
--- a/engines/agos/contain.cpp
+++ b/engines/agos/contain.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index cf42fe1f36..ef4a1406c9 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index bb27557a6b..9c44342975 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// AGOS debug functions
diff --git a/engines/agos/debug.h b/engines/agos/debug.h
index 5865065ac3..fd5908997f 100644
--- a/engines/agos/debug.h
+++ b/engines/agos/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_DEBUG_H
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index 5f46a9bc93..a313dbbd1e 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/debugger.h b/engines/agos/debugger.h
index 43c04c67c2..0ab992ebbe 100644
--- a/engines/agos/debugger.h
+++ b/engines/agos/debugger.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_DEBUGGER_H
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index c8c70c0ecc..629a5d63fc 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -151,44 +148,41 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
switch (gd->gameType) {
case AGOS::GType_PN:
- *engine = new AGOS::AGOSEngine_PN(syst);
+ *engine = new AGOS::AGOSEngine_PN(syst, gd);
break;
case AGOS::GType_ELVIRA1:
- *engine = new AGOS::AGOSEngine_Elvira1(syst);
+ *engine = new AGOS::AGOSEngine_Elvira1(syst, gd);
break;
case AGOS::GType_ELVIRA2:
- *engine = new AGOS::AGOSEngine_Elvira2(syst);
+ *engine = new AGOS::AGOSEngine_Elvira2(syst, gd);
break;
case AGOS::GType_WW:
- *engine = new AGOS::AGOSEngine_Waxworks(syst);
+ *engine = new AGOS::AGOSEngine_Waxworks(syst, gd);
break;
case AGOS::GType_SIMON1:
- *engine = new AGOS::AGOSEngine_Simon1(syst);
+ *engine = new AGOS::AGOSEngine_Simon1(syst, gd);
break;
case AGOS::GType_SIMON2:
- *engine = new AGOS::AGOSEngine_Simon2(syst);
+ *engine = new AGOS::AGOSEngine_Simon2(syst, gd);
break;
#ifdef ENABLE_AGOS2
case AGOS::GType_FF:
if (gd->features & GF_DEMO)
- *engine = new AGOS::AGOSEngine_FeebleDemo(syst);
+ *engine = new AGOS::AGOSEngine_FeebleDemo(syst, gd);
else
- *engine = new AGOS::AGOSEngine_Feeble(syst);
+ *engine = new AGOS::AGOSEngine_Feeble(syst, gd);
break;
case AGOS::GType_PP:
if (gd->gameId == GID_DIMP)
- *engine = new AGOS::AGOSEngine_DIMP(syst);
+ *engine = new AGOS::AGOSEngine_DIMP(syst, gd);
else
- *engine = new AGOS::AGOSEngine_PuzzlePack(syst);
+ *engine = new AGOS::AGOSEngine_PuzzlePack(syst, gd);
break;
#endif
default:
res = false;
error("AGOS engine: unknown gameType");
}
- if (res) {
- ((AGOS::AGOSEngine *)*engine)->_gameDescription = gd;
- }
return res;
}
diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h
index 963c08849c..a43d581173 100644
--- a/engines/agos/detection_tables.h
+++ b/engines/agos/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace AGOS {
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index 6b9f65ee2b..4d66b56a96 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 8799dbaa28..3411e6d632 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/feeble.cpp b/engines/agos/feeble.cpp
index 843298c6d7..4c82b7e19d 100644
--- a/engines/agos/feeble.cpp
+++ b/engines/agos/feeble.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -35,8 +32,8 @@
namespace AGOS {
-AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system)
- : AGOSEngine_Simon2(system) {
+AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Simon2(system, gd) {
_interactiveVideo = 0;
_moviePlayer = 0;
@@ -111,8 +108,8 @@ void AGOSEngine_Feeble::stopInteractiveVideo() {
}
}
-AGOSEngine_FeebleDemo::AGOSEngine_FeebleDemo(OSystem *system)
- : AGOSEngine_Feeble(system) {
+AGOSEngine_FeebleDemo::AGOSEngine_FeebleDemo(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine_Feeble(system, gd) {
_filmMenuUsed = 0;
}
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 4c998dfa5f..0b045bae01 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index 39a7705c54..ead4e49ebb 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index 1246149aa5..2ab543a943 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/input_pn.cpp b/engines/agos/input_pn.cpp
index 9c35fbb3a2..9cc97ff10f 100644
--- a/engines/agos/input_pn.cpp
+++ b/engines/agos/input_pn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/intern.h b/engines/agos/intern.h
index 2f5fc6278f..18f56be4a4 100644
--- a/engines/agos/intern.h
+++ b/engines/agos/intern.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_INTERN_H
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 5d1523bbd5..0fb873a733 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp
index 2b103a75cb..4d62e34820 100644
--- a/engines/agos/menus.cpp
+++ b/engines/agos/menus.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index 26e2f2c736..88f6dd80d1 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -153,7 +150,7 @@ void MidiPlayer::send(uint32 b) {
// We have received a "Reset All Controllers" message
// and passed it on to the MIDI driver. This may or may
// not have affected the volume controller. To ensure
- // consistent behaviour, explicitly set the volume to
+ // consistent behavior, explicitly set the volume to
// what we think it should be.
if (_current == &_sfx)
diff --git a/engines/agos/midi.h b/engines/agos/midi.h
index 40f54dbaf0..635e091906 100644
--- a/engines/agos/midi.h
+++ b/engines/agos/midi.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_MIDI_H
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp
index f96518b5e9..01690247f0 100644
--- a/engines/agos/midiparser_s1d.cpp
+++ b/engines/agos/midiparser_s1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/agos/oracle.cpp b/engines/agos/oracle.cpp
index 8ff79965e4..2a3c668c08 100644
--- a/engines/agos/oracle.cpp
+++ b/engines/agos/oracle.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/pn.cpp b/engines/agos/pn.cpp
index 62d65de219..667a5c3fc8 100644
--- a/engines/agos/pn.cpp
+++ b/engines/agos/pn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -30,8 +27,8 @@
namespace AGOS {
-AGOSEngine_PN::AGOSEngine_PN(OSystem *system)
- : AGOSEngine(system) {
+AGOSEngine_PN::AGOSEngine_PN(OSystem *system, const AGOSGameDescription *gd)
+ : AGOSEngine(system, gd) {
_stackbase = 0;
_tagOfActiveDoline = 0;
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 0e818963e2..a71d4d8150 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Resource file routines for Simon1/Simon2
diff --git a/engines/agos/res_ami.cpp b/engines/agos/res_ami.cpp
index 35432e1cc4..b83d10364a 100644
--- a/engines/agos/res_ami.cpp
+++ b/engines/agos/res_ami.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Conversion routines for planar graphics in Amiga versions
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index 34deff37ab..819af4fa40 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp
index 0993197594..f2629e419e 100644
--- a/engines/agos/rooms.cpp
+++ b/engines/agos/rooms.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index d6f25814bb..e6cce36b22 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
@@ -38,7 +35,7 @@
namespace AGOS {
int AGOSEngine::countSaveGames() {
- Common::InSaveFile *f;
+ Common::InSaveFile *f = NULL;
Common::StringArray filenames;
uint i = 1;
char slot[4];
diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp
index 94a3f371cc..68a90e405b 100644
--- a/engines/agos/script.cpp
+++ b/engines/agos/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Item script opcodes for Simon1/Simon2
diff --git a/engines/agos/script_dp.cpp b/engines/agos/script_dp.cpp
index 6eb3ca4779..a4ee249f47 100644
--- a/engines/agos/script_dp.cpp
+++ b/engines/agos/script_dp.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_e1.cpp b/engines/agos/script_e1.cpp
index df37a38a7c..c7a2f5b0a2 100644
--- a/engines/agos/script_e1.cpp
+++ b/engines/agos/script_e1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp
index f8af7db214..79a7e89a89 100644
--- a/engines/agos/script_e2.cpp
+++ b/engines/agos/script_e2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index 8dfee7f7c7..e2a4d0820f 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index b8ba7fb015..bde59b71b8 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agos/agos.h"
diff --git a/engines/agos/script_pp.cpp b/engines/agos/script_pp.cpp
index 624a1bbeba..0a599506b5 100644
--- a/engines/agos/script_pp.cpp
+++ b/engines/agos/script_pp.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp
index dab0302631..0e7e66778e 100644
--- a/engines/agos/script_s1.cpp
+++ b/engines/agos/script_s1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp
index a0b14525f2..c646397ac3 100644
--- a/engines/agos/script_s2.cpp
+++ b/engines/agos/script_s2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/script_ww.cpp b/engines/agos/script_ww.cpp
index 679c67df64..29a91a15aa 100644
--- a/engines/agos/script_ww.cpp
+++ b/engines/agos/script_ww.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 25d861acb5..03932aa4de 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/agos/sound.h b/engines/agos/sound.h
index 9739cfb58f..a7c4cd73db 100644
--- a/engines/agos/sound.h
+++ b/engines/agos/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_SOUND_H
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 1152d6ed04..1cdd7f6d81 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/string_pn.cpp b/engines/agos/string_pn.cpp
index 92d85ab96c..570fbc6200 100644
--- a/engines/agos/string_pn.cpp
+++ b/engines/agos/string_pn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agos/agos.h"
@@ -134,7 +131,7 @@ void AGOSEngine_PN::pcf(uint8 ch) {
if (ch == 255) {
_bp = 0;
_xofs = 0;
- return; /* pcf(255) initialises the routine */
+ return; /* pcf(255) initializes the routine */
} /* pcf(254) flushes its working _buffer */
if (ch != 254) {
if ((ch != 32) || (_bp + _xofs != 50))
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index bd07596a46..bd9abb16b5 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index b05bac1e57..abc45c1ace 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Verb and hitarea handling
diff --git a/engines/agos/verb_pn.cpp b/engines/agos/verb_pn.cpp
index b36f634ec0..19e8bb2d48 100644
--- a/engines/agos/verb_pn.cpp
+++ b/engines/agos/verb_pn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Verb and hitarea handling
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 6c07db13c1..de6a6976e5 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Video script opcodes for Simon1/Simon2
diff --git a/engines/agos/vga.h b/engines/agos/vga.h
index 2a2056ca7b..5a5764532e 100644
--- a/engines/agos/vga.h
+++ b/engines/agos/vga.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef AGOS_VGA_H
diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp
index 9e163ba91f..1bde6945f0 100644
--- a/engines/agos/vga_e2.cpp
+++ b/engines/agos/vga_e2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Video script opcodes for Simon1/Simon2
diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp
index 14a1c60ae5..c8c9673506 100644
--- a/engines/agos/vga_ff.cpp
+++ b/engines/agos/vga_ff.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp
index d249259ba6..3bd5400504 100644
--- a/engines/agos/vga_pn.cpp
+++ b/engines/agos/vga_pn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "agos/agos.h"
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index a2306d3cdb..ef05063fc1 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/vga_s2.cpp b/engines/agos/vga_s2.cpp
index db3a7c18f3..1021ea8f94 100644
--- a/engines/agos/vga_s2.cpp
+++ b/engines/agos/vga_s2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index 08b2cee303..c74f0cf52b 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Video script opcodes for Simon1/Simon2
diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp
index 08680c9e45..c55e3dcdda 100644
--- a/engines/agos/window.cpp
+++ b/engines/agos/window.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp
index d44192d4d2..61efbcb89a 100644
--- a/engines/agos/zones.cpp
+++ b/engines/agos/zones.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index 6b4b29dcfe..410fcca1f3 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/** \file
diff --git a/engines/cine/anim.h b/engines/cine/anim.h
index 2012ef875e..9c06c260ce 100644
--- a/engines/cine/anim.h
+++ b/engines/cine/anim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_ANIM_H
diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp
index 22fd28a99c..2bad2183f5 100644
--- a/engines/cine/bg.cpp
+++ b/engines/cine/bg.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/bg.h b/engines/cine/bg.h
index 9f97bc467d..c464cd68be 100644
--- a/engines/cine/bg.h
+++ b/engines/cine/bg.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_BG_H
diff --git a/engines/cine/bg_list.cpp b/engines/cine/bg_list.cpp
index 3ecda4125d..693fea3294 100644
--- a/engines/cine/bg_list.cpp
+++ b/engines/cine/bg_list.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/bg_list.h b/engines/cine/bg_list.h
index 8c1b3cb6ec..c564b4b43f 100644
--- a/engines/cine/bg_list.h
+++ b/engines/cine/bg_list.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_BGLIST_H
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 8104ad38cd..6f34b0f860 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -18,12 +18,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
-#include "common/EventRecorder.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
@@ -45,7 +41,10 @@ Sound *g_sound = 0;
CineEngine *g_cine = 0;
-CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc)
+ : Engine(syst),
+ _gameDescription(gameDesc),
+ _rnd("cine") {
// Setup mixer
syncSoundSettings();
@@ -56,8 +55,6 @@ CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Eng
_console = new CineConsole(this);
g_cine = this;
-
- g_eventRec.registerRandomSource(_rnd, "cine");
}
CineEngine::~CineEngine() {
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index 7de0bdc86f..371ea0dd1f 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_H
diff --git a/engines/cine/console.cpp b/engines/cine/console.cpp
index dbbeb4c9b7..0a24b2408a 100644
--- a/engines/cine/console.cpp
+++ b/engines/cine/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cine/console.h"
diff --git a/engines/cine/console.h b/engines/cine/console.h
index 92d059cb63..7c19621e5f 100644
--- a/engines/cine/console.h
+++ b/engines/cine/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_CONSOLE_H
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 058c1a1140..0ef2c87288 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -93,7 +90,7 @@ public:
CineMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Cinematique evo 1 engine";
+ return "Cine";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h
index 6e450ebc80..4b293deb62 100644
--- a/engines/cine/detection_tables.h
+++ b/engines/cine/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Cine {
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 18feacd08b..01e05bed6d 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cine/cine.h"
diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h
index da7e3dd572..737c49cc36 100644
--- a/engines/cine/gfx.h
+++ b/engines/cine/gfx.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_GFX_H
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index 644744d3ed..bb0545db72 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/main_loop.h b/engines/cine/main_loop.h
index c729b324ca..4ab29149d8 100644
--- a/engines/cine/main_loop.h
+++ b/engines/cine/main_loop.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_MAINLOOP_H
diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp
index 3d58d6ddcd..b84982b19e 100644
--- a/engines/cine/msg.cpp
+++ b/engines/cine/msg.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/cine/msg.h b/engines/cine/msg.h
index fbf99d4b44..8d6291e2df 100644
--- a/engines/cine/msg.h
+++ b/engines/cine/msg.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_MSG_H
diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp
index d69ddc1271..afd95c04b0 100644
--- a/engines/cine/object.cpp
+++ b/engines/cine/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/object.h b/engines/cine/object.h
index 5a5ea91286..8331cf9f89 100644
--- a/engines/cine/object.h
+++ b/engines/cine/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_OBJECT_H
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index 0f52600db5..779c279ea1 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cine/cine.h"
diff --git a/engines/cine/pal.h b/engines/cine/pal.h
index 58d23e5bf0..d41154aa0b 100644
--- a/engines/cine/pal.h
+++ b/engines/cine/pal.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_PAL_H
diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp
index 17ef01948c..03cb743b46 100644
--- a/engines/cine/part.cpp
+++ b/engines/cine/part.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/cine/part.h b/engines/cine/part.h
index 53ebafaa37..3d321f17e1 100644
--- a/engines/cine/part.h
+++ b/engines/cine/part.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_PART_H
diff --git a/engines/cine/prc.cpp b/engines/cine/prc.cpp
index 183a537416..d86107a8f8 100644
--- a/engines/cine/prc.cpp
+++ b/engines/cine/prc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/prc.h b/engines/cine/prc.h
index 84058426fa..ff0147d81e 100644
--- a/engines/cine/prc.h
+++ b/engines/cine/prc.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_PRC_H
diff --git a/engines/cine/rel.cpp b/engines/cine/rel.cpp
index 4a11995ee1..0af9a2bc1f 100644
--- a/engines/cine/rel.cpp
+++ b/engines/cine/rel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/rel.h b/engines/cine/rel.h
index 8d712dc416..d102791f6b 100644
--- a/engines/cine/rel.h
+++ b/engines/cine/rel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_REL_H
diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp
index 1fc2a8b2fd..700875e302 100644
--- a/engines/cine/saveload.cpp
+++ b/engines/cine/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/cine/saveload.h b/engines/cine/saveload.h
index f88338ed82..49c9c0cef7 100644
--- a/engines/cine/saveload.h
+++ b/engines/cine/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_SAVELOAD_H
diff --git a/engines/cine/script.h b/engines/cine/script.h
index 756bc930e8..3fc86c585b 100644
--- a/engines/cine/script.h
+++ b/engines/cine/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_SCRIPT_H
diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index 674bf4dd86..66150cc5b2 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/** \file
diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp
index aa2c8c33ac..b452d9a8ee 100644
--- a/engines/cine/script_os.cpp
+++ b/engines/cine/script_os.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/** \file
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp
index 414761159b..0c3541fae7 100644
--- a/engines/cine/sound.cpp
+++ b/engines/cine/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/cine/sound.h b/engines/cine/sound.h
index 7b506ab5f3..afc0994a26 100644
--- a/engines/cine/sound.h
+++ b/engines/cine/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_SOUND_H_
diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp
index fb6818d690..dc18d081c7 100644
--- a/engines/cine/texte.cpp
+++ b/engines/cine/texte.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/cine/texte.h b/engines/cine/texte.h
index a23f43913a..f82127db98 100644
--- a/engines/cine/texte.h
+++ b/engines/cine/texte.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_TEXTE_H
diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp
index 7915fd1cf8..f68fbbc02c 100644
--- a/engines/cine/unpack.cpp
+++ b/engines/cine/unpack.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h
index 3215689867..d22c4944a7 100644
--- a/engines/cine/unpack.h
+++ b/engines/cine/unpack.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_UNPACK_H
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index fdc7a28867..1892a78cca 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cine/various.h b/engines/cine/various.h
index 3a14328035..0c1883c323 100644
--- a/engines/cine/various.h
+++ b/engines/cine/various.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CINE_VARIOUS_H
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 2c83aff743..94f620ed7b 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/cruise/actor.h b/engines/cruise/actor.h
index d55aac1eca..b409bf7b7f 100644
--- a/engines/cruise/actor.h
+++ b/engines/cruise/actor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_ACTOR_H
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index 7c63c155d3..1e7e87cf38 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/cruise/background.h b/engines/cruise/background.h
index caa90bea0f..7a8f2d5494 100644
--- a/engines/cruise/background.h
+++ b/engines/cruise/background.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_BACKGROUND_H
diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp
index 1685044c9d..39286670ed 100644
--- a/engines/cruise/backgroundIncrust.cpp
+++ b/engines/cruise/backgroundIncrust.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/backgroundIncrust.h b/engines/cruise/backgroundIncrust.h
index 19982ee91c..567df0a51e 100644
--- a/engines/cruise/backgroundIncrust.h
+++ b/engines/cruise/backgroundIncrust.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_BACKGROUNDINCRUST_H
diff --git a/engines/cruise/cell.cpp b/engines/cruise/cell.cpp
index 19189721e3..f0fb580ec1 100644
--- a/engines/cruise/cell.cpp
+++ b/engines/cruise/cell.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/cell.h b/engines/cruise/cell.h
index 32b3455661..3620a0c945 100644
--- a/engines/cruise/cell.h
+++ b/engines/cruise/cell.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_CELL_H
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 9712bd9439..b57e0ab188 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -18,12 +18,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
-#include "common/EventRecorder.h"
#include "common/file.h"
#include "common/debug-channels.h"
#include "common/textconsole.h"
@@ -44,7 +40,8 @@ namespace Cruise {
CruiseEngine *_vm;
-CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc)
+ : Engine(syst), _gameDescription(gameDesc), _rnd("cruise") {
DebugMan.addDebugChannel(kCruiseDebugScript, "scripts", "Scripts debug level");
DebugMan.addDebugChannel(kCruiseDebugSound, "sound", "Sound debug level");
@@ -55,8 +52,6 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
// Setup mixer
syncSoundSettings();
-
- g_eventRec.registerRandomSource(_rnd, "cruise");
}
extern void listMemory();
@@ -97,7 +92,7 @@ Common::Error CruiseEngine::run() {
mainLoop();
- deinitialise();
+ deinitialize();
return Common::kNoError;
}
@@ -123,7 +118,7 @@ void CruiseEngine::initialize() {
_vm->_polyStruct = NULL;
}
-void CruiseEngine::deinitialise() {
+void CruiseEngine::deinitialize() {
_vm->_polyStructNorm.clear();
_vm->_polyStructExp.clear();
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index 8d03d47327..44e3f26d9d 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_CRUISE_H
@@ -72,7 +69,7 @@ private:
bool _speedFlag;
void initialize();
- void deinitialise();
+ void deinitialize();
bool loadLanguageStrings();
bool makeLoad(char *saveName);
void mainLoop();
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index e2f2d7468e..3f13c6cbff 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/cruise/cruise_main.h b/engines/cruise/cruise_main.h
index 8657b4bc21..9afae4336b 100644
--- a/engines/cruise/cruise_main.h
+++ b/engines/cruise/cruise_main.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_CRUISE_MAIN_H
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index f1223c12e6..a7b6faec1c 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise.h"
diff --git a/engines/cruise/ctp.h b/engines/cruise/ctp.h
index 0aec9c52d8..340832e6fb 100644
--- a/engines/cruise/ctp.h
+++ b/engines/cruise/ctp.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_CTP_H
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 3ccd1689b8..66bc0fbf46 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/dataLoader.h b/engines/cruise/dataLoader.h
index f6bea29cde..96188c7982 100644
--- a/engines/cruise/dataLoader.h
+++ b/engines/cruise/dataLoader.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_DATALOADER_H
diff --git a/engines/cruise/debugger.cpp b/engines/cruise/debugger.cpp
index 3d3d69be58..a74f600ddd 100644
--- a/engines/cruise/debugger.cpp
+++ b/engines/cruise/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/debugger.h"
diff --git a/engines/cruise/debugger.h b/engines/cruise/debugger.h
index 356acdbf84..3cef6b371d 100644
--- a/engines/cruise/debugger.h
+++ b/engines/cruise/debugger.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_DEBUGGER_H
diff --git a/engines/cruise/decompiler.cpp b/engines/cruise/decompiler.cpp
index 3298776d0e..74a78201bc 100644
--- a/engines/cruise/decompiler.cpp
+++ b/engines/cruise/decompiler.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/delphine-unpack.cpp b/engines/cruise/delphine-unpack.cpp
index a78a8af84b..ee7dbd3c5e 100644
--- a/engines/cruise/delphine-unpack.cpp
+++ b/engines/cruise/delphine-unpack.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index 63d7328e78..3bd0c1f76f 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -250,7 +247,7 @@ public:
CruiseMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Cinematique evo 2 engine";
+ return "CruisE";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index 2bf36bbdbd..a6680f7a02 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/cruise/font.h b/engines/cruise/font.h
index 17bb4372cf..679faf194d 100644
--- a/engines/cruise/font.h
+++ b/engines/cruise/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_FONT_H
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 75b90f7ec8..27b9be7e79 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise.h"
diff --git a/engines/cruise/function.h b/engines/cruise/function.h
index 347c9f23b8..4fba8d3c63 100644
--- a/engines/cruise/function.h
+++ b/engines/cruise/function.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_FUNCTION_H
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index 4d48c2c466..7bbcae2259 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/cruise/gfxModule.h b/engines/cruise/gfxModule.h
index 1ca2581af5..ce58c65d34 100644
--- a/engines/cruise/gfxModule.h
+++ b/engines/cruise/gfxModule.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_GFXMODULE_H
diff --git a/engines/cruise/linker.cpp b/engines/cruise/linker.cpp
index afc7992493..e8ef415fe7 100644
--- a/engines/cruise/linker.cpp
+++ b/engines/cruise/linker.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/cruise/linker.h b/engines/cruise/linker.h
index f513d15845..ce212f6cea 100644
--- a/engines/cruise/linker.h
+++ b/engines/cruise/linker.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_LINKER_H
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index f6b04e6d9d..814d0aa9e9 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
@@ -214,7 +211,7 @@ int m_color;
This "worked" on many platforms so far, but on OSX apparently the buffers don't
occupy contiguous memory, and this causes severe corruption and subsequent crashes.
Since I'm not really familiar with how the strange drawing code is supposed to work,
- or whether this behaviour is intentional or not, the short-term fix is to allocate a big
+ or whether this behavior is intentional or not, the short-term fix is to allocate a big
buffer and setup pointers within it. This fixes the crashes I'm seeing without causing any
(visual) side-effects.
If anyone wants to look, this is easily reproduced by starting the game and examining the rug.
diff --git a/engines/cruise/mainDraw.h b/engines/cruise/mainDraw.h
index 306fb6845d..bb21f515af 100644
--- a/engines/cruise/mainDraw.h
+++ b/engines/cruise/mainDraw.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_MAINDRAW_H
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 36689ca0e3..407858574c 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise.h"
diff --git a/engines/cruise/menu.h b/engines/cruise/menu.h
index 3ee2ae6579..d605903cdc 100644
--- a/engines/cruise/menu.h
+++ b/engines/cruise/menu.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_MENU_H
diff --git a/engines/cruise/mouse.cpp b/engines/cruise/mouse.cpp
index 24309030da..6248bd01d3 100644
--- a/engines/cruise/mouse.cpp
+++ b/engines/cruise/mouse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/mouse.h b/engines/cruise/mouse.h
index 509267ad26..a5f5c19073 100644
--- a/engines/cruise/mouse.h
+++ b/engines/cruise/mouse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_MOUSE_H
diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp
index 8e2be0cf13..b4a3489c1d 100644
--- a/engines/cruise/object.cpp
+++ b/engines/cruise/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/cruise/object.h b/engines/cruise/object.h
index 625e8e479e..cbe5872a9d 100644
--- a/engines/cruise/object.h
+++ b/engines/cruise/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_OBJECT_H
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index b7a0293f33..2f4b375865 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/memstream.h"
diff --git a/engines/cruise/overlay.h b/engines/cruise/overlay.h
index 7b2f34b73d..3b69f2acef 100644
--- a/engines/cruise/overlay.h
+++ b/engines/cruise/overlay.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_OVERLAY_H
diff --git a/engines/cruise/perso.cpp b/engines/cruise/perso.cpp
index e86daa5bef..85c9b1614f 100644
--- a/engines/cruise/perso.cpp
+++ b/engines/cruise/perso.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise.h"
diff --git a/engines/cruise/perso.h b/engines/cruise/perso.h
index 19201ecafb..e0ca479dff 100644
--- a/engines/cruise/perso.h
+++ b/engines/cruise/perso.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_PERSO_H
diff --git a/engines/cruise/polys.cpp b/engines/cruise/polys.cpp
index 76792a69ba..964540f802 100644
--- a/engines/cruise/polys.cpp
+++ b/engines/cruise/polys.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/polys.h b/engines/cruise/polys.h
index 53ce4672cd..8505f791a6 100644
--- a/engines/cruise/polys.h
+++ b/engines/cruise/polys.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_POLYS_H
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 6e75088d45..6392009373 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/saveload.h b/engines/cruise/saveload.h
index 9aa1f89e0f..695913f46f 100644
--- a/engines/cruise/saveload.h
+++ b/engines/cruise/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_SAVELOAD_H
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index d6ff784644..4e76194a45 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise.h"
diff --git a/engines/cruise/script.h b/engines/cruise/script.h
index 2a7a85689d..cba4f580f8 100644
--- a/engines/cruise/script.h
+++ b/engines/cruise/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_SCRIPT_H
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 322f808439..290cc220d4 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/cruise/sound.h b/engines/cruise/sound.h
index 61985ce802..11aec0b04e 100644
--- a/engines/cruise/sound.h
+++ b/engines/cruise/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_SOUND_H
diff --git a/engines/cruise/stack.cpp b/engines/cruise/stack.cpp
index 4f36dbec48..985fe8d7fd 100644
--- a/engines/cruise/stack.cpp
+++ b/engines/cruise/stack.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/stack.h b/engines/cruise/stack.h
index a7cd3f556d..fe2d594c9e 100644
--- a/engines/cruise/stack.h
+++ b/engines/cruise/stack.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_STACK_H
diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp
index 101a2038b0..1565f254d0 100644
--- a/engines/cruise/staticres.cpp
+++ b/engines/cruise/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/staticres.h"
diff --git a/engines/cruise/staticres.h b/engines/cruise/staticres.h
index af37b14f5e..a3cf13e41c 100644
--- a/engines/cruise/staticres.h
+++ b/engines/cruise/staticres.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_STATICRES_H
diff --git a/engines/cruise/various.cpp b/engines/cruise/various.cpp
index 599da22de3..90b072b478 100644
--- a/engines/cruise/various.cpp
+++ b/engines/cruise/various.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/various.h b/engines/cruise/various.h
index 9471464b32..b59593961d 100644
--- a/engines/cruise/various.h
+++ b/engines/cruise/various.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_VARIOUS_H
diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp
index 07bd646cae..f381358356 100644
--- a/engines/cruise/vars.cpp
+++ b/engines/cruise/vars.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index 54920a1436..ccbf149610 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_VARS_H
diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp
index 5535d5a016..773a146b9a 100644
--- a/engines/cruise/volume.cpp
+++ b/engines/cruise/volume.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "cruise/cruise.h"
diff --git a/engines/cruise/volume.h b/engines/cruise/volume.h
index a842a30470..80e1f10db2 100644
--- a/engines/cruise/volume.h
+++ b/engines/cruise/volume.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef CRUISE_VOLUME_H
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 7e1f29271e..75b2ca9296 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "base/version.h"
diff --git a/engines/dialogs.h b/engines/dialogs.h
index 587e91a2bb..32174031cc 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GLOBAL_DIALOGS_H
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp
index f2f1727fdd..6e6f167fba 100644
--- a/engines/draci/animation.cpp
+++ b/engines/draci/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "draci/draci.h"
diff --git a/engines/draci/animation.h b/engines/draci/animation.h
index bbcf03b02f..8b2a3d98b8 100644
--- a/engines/draci/animation.h
+++ b/engines/draci/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_ANIMATION_H
diff --git a/engines/draci/barchive.cpp b/engines/draci/barchive.cpp
index 5307e04250..154073250c 100644
--- a/engines/draci/barchive.cpp
+++ b/engines/draci/barchive.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/draci/barchive.h b/engines/draci/barchive.h
index 87ee301de5..52ce79ad2d 100644
--- a/engines/draci/barchive.h
+++ b/engines/draci/barchive.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_BARCHIVE_H
diff --git a/engines/draci/console.cpp b/engines/draci/console.cpp
index 304b421ac3..a0013c59fe 100644
--- a/engines/draci/console.cpp
+++ b/engines/draci/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "draci/console.h"
diff --git a/engines/draci/console.h b/engines/draci/console.h
index 9d463f2eb1..714871ffd3 100644
--- a/engines/draci/console.h
+++ b/engines/draci/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_CONSOLE_H
diff --git a/engines/draci/detection.cpp b/engines/draci/detection.cpp
index 78c5c71605..d3483eb5a4 100644
--- a/engines/draci/detection.cpp
+++ b/engines/draci/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "draci/draci.h"
@@ -116,7 +113,7 @@ public:
DraciMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Draci Historie Engine";
+ return "Draci";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 45d17ea24f..cdc91e8d9f 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
@@ -30,7 +27,6 @@
#include "common/events.h"
#include "common/file.h"
#include "common/keyboard.h"
-#include "common/EventRecorder.h"
#include "engines/util.h"
@@ -74,7 +70,8 @@ const uint kSoundsFrequency = 13000;
const uint kDubbingFrequency = 22050;
DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
- : Engine(syst) {
+ : Engine(syst), _rnd("draci") {
+
// Put your engine in a sane state, but do nothing big yet;
// in particular, do not load data from files; rather, if you
// need to do such things, do them from init().
@@ -95,9 +92,6 @@ DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
DebugMan.addDebugChannel(kDraciWalkingDebugLevel, "walking", "Walking debug info");
_console = new DraciConsole(this);
-
- // Don't forget to register your random source
- g_eventRec.registerRandomSource(_rnd, "draci");
}
bool DraciEngine::hasFeature(EngineFeature f) const {
diff --git a/engines/draci/draci.h b/engines/draci/draci.h
index 6a597e123e..83e69ca332 100644
--- a/engines/draci/draci.h
+++ b/engines/draci/draci.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_H
diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp
index d869d046f3..b4e799deb7 100644
--- a/engines/draci/font.cpp
+++ b/engines/draci/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/draci/font.h b/engines/draci/font.h
index 0ccc900465..3d150f733e 100644
--- a/engines/draci/font.h
+++ b/engines/draci/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_FONT_H
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index e19ec67810..657e381986 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/keyboard.h"
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 0b5b3a03cc..47821fcf86 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_GAME_H
diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp
index 5853d15d21..90c04ed4c3 100644
--- a/engines/draci/mouse.cpp
+++ b/engines/draci/mouse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "draci/draci.h"
diff --git a/engines/draci/mouse.h b/engines/draci/mouse.h
index c7f492cb6e..b934475ade 100644
--- a/engines/draci/mouse.h
+++ b/engines/draci/mouse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_MOUSE_H
diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp
index 1d725ebb15..6f3e3c8384 100644
--- a/engines/draci/music.cpp
+++ b/engines/draci/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// MIDI and digital music class
diff --git a/engines/draci/music.h b/engines/draci/music.h
index c0228074e5..62288a01dc 100644
--- a/engines/draci/music.h
+++ b/engines/draci/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Music class
diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp
index 32e852d9a6..ffb1ed7ff4 100644
--- a/engines/draci/saveload.cpp
+++ b/engines/draci/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "draci/draci.h"
diff --git a/engines/draci/saveload.h b/engines/draci/saveload.h
index ca5f002ecd..3cc13701db 100644
--- a/engines/draci/saveload.h
+++ b/engines/draci/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_SAVELOAD_H
diff --git a/engines/draci/screen.cpp b/engines/draci/screen.cpp
index ab9c49c63a..8c1a0c40f7 100644
--- a/engines/draci/screen.cpp
+++ b/engines/draci/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/memstream.h"
diff --git a/engines/draci/screen.h b/engines/draci/screen.h
index e4e910475a..5a8297feba 100644
--- a/engines/draci/screen.h
+++ b/engines/draci/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_SCREEN_H
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index a7ce8b27d9..c4df9d9dde 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/array.h"
diff --git a/engines/draci/script.h b/engines/draci/script.h
index a75f6bcbc3..72d6f6c344 100644
--- a/engines/draci/script.h
+++ b/engines/draci/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_SCRIPT_H
@@ -109,7 +106,7 @@ private:
int _jump;
bool _endProgram;
- /** List of all GPL commands. Initialised in the constructor. */
+ /** List of all GPL commands. Initialized in the constructor. */
const GPL2Command *_commandList;
const GPL2Operator *_operatorList;
const GPL2Function *_functionList;
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index ab2479f811..bbba9d9cc0 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
diff --git a/engines/draci/sound.h b/engines/draci/sound.h
index 4f69af7ff0..358c228604 100644
--- a/engines/draci/sound.h
+++ b/engines/draci/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_SOUND_H
diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp
index b4296375f2..92ce7d31d9 100644
--- a/engines/draci/sprite.cpp
+++ b/engines/draci/sprite.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/memstream.h"
diff --git a/engines/draci/sprite.h b/engines/draci/sprite.h
index 15e1cf80ca..c86728914e 100644
--- a/engines/draci/sprite.h
+++ b/engines/draci/sprite.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_SPRITE_H
diff --git a/engines/draci/surface.cpp b/engines/draci/surface.cpp
index 37a76dbe0e..8380f8777b 100644
--- a/engines/draci/surface.cpp
+++ b/engines/draci/surface.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "draci/screen.h"
diff --git a/engines/draci/surface.h b/engines/draci/surface.h
index cb15ecebe4..71a3722a2a 100644
--- a/engines/draci/surface.h
+++ b/engines/draci/surface.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_SURFACE_H
diff --git a/engines/draci/walking.cpp b/engines/draci/walking.cpp
index d72e50be07..9a66c6163a 100644
--- a/engines/draci/walking.cpp
+++ b/engines/draci/walking.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/memstream.h"
diff --git a/engines/draci/walking.h b/engines/draci/walking.h
index d6c7f0691d..a43aeb272a 100644
--- a/engines/draci/walking.h
+++ b/engines/draci/walking.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRACI_WALKING_H
diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp
index c0b0b7c98b..9d5d6550fa 100644
--- a/engines/drascula/actors.cpp
+++ b/engines/drascula/actors.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/drascula.h"
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index f939a033d3..c4a8d3eb01 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/drascula.h"
diff --git a/engines/drascula/console.cpp b/engines/drascula/console.cpp
index aa9fcc0960..d2fd32f2e5 100644
--- a/engines/drascula/console.cpp
+++ b/engines/drascula/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/console.h"
diff --git a/engines/drascula/console.h b/engines/drascula/console.h
index d8d1918a60..894c85ff42 100644
--- a/engines/drascula/console.h
+++ b/engines/drascula/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRASCULA_CONSOLE_H
diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp
index dcd93d84d7..6f028e6e12 100644
--- a/engines/drascula/converse.cpp
+++ b/engines/drascula/converse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 8729290d52..5a8903db9d 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -299,7 +296,7 @@ public:
DrasculaMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Drascula Engine";
+ return "Drascula";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 470f28ccff..cac7f93f12 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -18,13 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/file.h"
#include "common/savefile.h"
@@ -100,8 +96,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
rightMouseButton = 0;
*textName = 0;
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "drascula");
+ _rnd = new Common::RandomSource("drascula");
_console = 0;
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index b70384614f..f9dcbe2810 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DRASCULA_H
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index 0811fbede1..d133b3609d 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/drascula.h"
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 7bb94c2542..eb36baed18 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/drascula.h"
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index 630eb08d3c..07b8464de4 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp
index a75e72e249..500333badf 100644
--- a/engines/drascula/palette.cpp
+++ b/engines/drascula/palette.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "graphics/palette.h"
diff --git a/engines/drascula/resource.cpp b/engines/drascula/resource.cpp
index cca1e47586..bda25113b7 100644
--- a/engines/drascula/resource.cpp
+++ b/engines/drascula/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/drascula.h"
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 35d4eedb5d..50d44bab79 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/array.h"
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index eacbe6756d..15f5855bdc 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp
index 5cb1c4486a..4721d2d369 100644
--- a/engines/drascula/sound.cpp
+++ b/engines/drascula/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "audio/audiostream.h"
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index 8cefe0385c..6d1509fe3c 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "drascula/drascula.h"
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 2c1d3a732c..b3cb8bea06 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
diff --git a/engines/engine.h b/engines/engine.h
index b7afc0f09d..375df2b0a3 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef ENGINES_ENGINE_H
diff --git a/engines/game.cpp b/engines/game.cpp
index a27080cbf8..a14edb8af4 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/game.h"
diff --git a/engines/game.h b/engines/game.h
index c9a3b25853..f9988c2965 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef ENGINES_GAME_H
diff --git a/engines/gob/console.cpp b/engines/gob/console.cpp
index 751956a848..b8aed37727 100644
--- a/engines/gob/console.cpp
+++ b/engines/gob/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/console.h"
diff --git a/engines/gob/console.h b/engines/gob/console.h
index 91e62f370e..b9f9b81d0e 100644
--- a/engines/gob/console.h
+++ b/engines/gob/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_CONSOLE_H
diff --git a/engines/gob/databases.cpp b/engines/gob/databases.cpp
index 94f641db4e..497de489ce 100644
--- a/engines/gob/databases.cpp
+++ b/engines/gob/databases.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/gob/databases.h b/engines/gob/databases.h
index cb76ae3b86..fb65d8cf96 100644
--- a/engines/gob/databases.h
+++ b/engines/gob/databases.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_DATABASES_H
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index aa2743b5ed..a576cf9487 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/dataio.h b/engines/gob/dataio.h
index f2b39aed09..d95f001097 100644
--- a/engines/gob/dataio.h
+++ b/engines/gob/dataio.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_DATAIO_H
diff --git a/engines/gob/dbase.cpp b/engines/gob/dbase.cpp
index 12c382dbcb..41bd5308ec 100644
--- a/engines/gob/dbase.cpp
+++ b/engines/gob/dbase.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/dbase.h"
diff --git a/engines/gob/dbase.h b/engines/gob/dbase.h
index 5f260f965f..3da1ef7270 100644
--- a/engines/gob/dbase.h
+++ b/engines/gob/dbase.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_DBASE_H
diff --git a/engines/gob/demos/batplayer.cpp b/engines/gob/demos/batplayer.cpp
index 700aa6316f..9c073f0e77 100644
--- a/engines/gob/demos/batplayer.cpp
+++ b/engines/gob/demos/batplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/demos/batplayer.h b/engines/gob/demos/batplayer.h
index e9d9916f6a..f406ea1bf8 100644
--- a/engines/gob/demos/batplayer.h
+++ b/engines/gob/demos/batplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_BATPLAYER_H
diff --git a/engines/gob/demos/demoplayer.cpp b/engines/gob/demos/demoplayer.cpp
index 715e78adbc..9aa7a4123d 100644
--- a/engines/gob/demos/demoplayer.cpp
+++ b/engines/gob/demos/demoplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
@@ -53,6 +50,9 @@ DemoPlayer::Script DemoPlayer::_scripts[] = {
"slide xant.imd 20\nslide tum.imd 20\nslide voile.imd 20\n" \
"slide int.imd 20\nslide voila.imd 1\nslide voilb.imd 1\n"},
{kScriptSourceFile, "coktelplayer.scn"},
+ {kScriptSourceFile, "demogb.scn"},
+ {kScriptSourceFile, "demoall.scn"},
+ {kScriptSourceFile, "demofra.scn"}
};
DemoPlayer::DemoPlayer(GobEngine *vm) : _vm(vm) {
diff --git a/engines/gob/demos/demoplayer.h b/engines/gob/demos/demoplayer.h
index 207b050363..9ffdb71de1 100644
--- a/engines/gob/demos/demoplayer.h
+++ b/engines/gob/demos/demoplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_DEMOPLAYER_H
diff --git a/engines/gob/demos/scnplayer.cpp b/engines/gob/demos/scnplayer.cpp
index bf81773a15..434c49c4bd 100644
--- a/engines/gob/demos/scnplayer.cpp
+++ b/engines/gob/demos/scnplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/demos/scnplayer.h b/engines/gob/demos/scnplayer.h
index 1eb0ae4ba8..8627f8ceeb 100644
--- a/engines/gob/demos/scnplayer.h
+++ b/engines/gob/demos/scnplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SCNPLAYER_H
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp
index a1eb8055aa..be44c05bfb 100644
--- a/engines/gob/detection.cpp
+++ b/engines/gob/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -119,7 +116,7 @@ public:
GobMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Gob Engine";
+ return "Gob";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h
index 832300f785..11cca2b65e 100644
--- a/engines/gob/detection_tables.h
+++ b/engines/gob/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Gob {
@@ -4794,6 +4791,60 @@ static const GOBGameDescription gameDescriptions[] = {
kFeaturesNone,
0, 0, 0
},
+ {
+ {
+ "adibou2",
+ "Non-Interactive Demo",
+ {
+ {"demogb.scn", 0, "9291455a908ac0e6aaaca686e532609b", 105},
+ {"demogb.vmd", 0, "bc9c1db97db7bec8f566332444fa0090", 14320840},
+ {0, 0, 0, 0}
+ },
+ EN_GRB,
+ kPlatformPC,
+ ADGF_DEMO,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeAdibou2,
+ kFeatures640x480 | kFeaturesSCNDemo,
+ 0, 0, 9
+ },
+ {
+ {
+ "adibou2",
+ "Non-Interactive Demo",
+ {
+ {"demoall.scn", 0, "c8fd308c037b829800006332b2c32674", 106},
+ {"demoall.vmd", 0, "4672b2deacc6fca97484840424b1921b", 14263433},
+ {0, 0, 0, 0}
+ },
+ DE_DEU,
+ kPlatformPC,
+ ADGF_DEMO,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeAdibou2,
+ kFeatures640x480 | kFeaturesSCNDemo,
+ 0, 0, 10
+ },
+ {
+ {
+ "adibou2",
+ "Non-Interactive Demo",
+ {
+ {"demofra.scn", 0, "d1b2b1618af384ea1120def8b986c02b", 106},
+ {"demofra.vmd", 0, "b494cdec1aac7e54c3f2480512d2880e", 14297100},
+ {0, 0, 0, 0}
+ },
+ FR_FRA,
+ kPlatformPC,
+ ADGF_DEMO,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeAdibou2,
+ kFeatures640x480 | kFeaturesSCNDemo,
+ 0, 0, 11
+ },
{ AD_TABLE_END_MARKER, kGameTypeNone, kFeaturesNone, 0, 0, 0}
};
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index d193f6bfa4..580696523f 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/draw.h b/engines/gob/draw.h
index 59bcd58bdb..57faefa314 100644
--- a/engines/gob/draw.h
+++ b/engines/gob/draw.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_DRAW_H
diff --git a/engines/gob/draw_bargon.cpp b/engines/gob/draw_bargon.cpp
index d335310dcf..a2a70927f6 100644
--- a/engines/gob/draw_bargon.cpp
+++ b/engines/gob/draw_bargon.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/draw_fascin.cpp b/engines/gob/draw_fascin.cpp
index 3f939e7790..69e04f74c9 100644
--- a/engines/gob/draw_fascin.cpp
+++ b/engines/gob/draw_fascin.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/draw.h"
diff --git a/engines/gob/draw_playtoons.cpp b/engines/gob/draw_playtoons.cpp
index edd7b76318..a443f81ccf 100644
--- a/engines/gob/draw_playtoons.cpp
+++ b/engines/gob/draw_playtoons.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/draw_v1.cpp b/engines/gob/draw_v1.cpp
index fd0fb8ae4f..3873a99d5f 100644
--- a/engines/gob/draw_v1.cpp
+++ b/engines/gob/draw_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index c07f8de69d..cc8f6b5e3c 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/expression.cpp b/engines/gob/expression.cpp
index d053345b4c..fdb4233444 100644
--- a/engines/gob/expression.cpp
+++ b/engines/gob/expression.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/expression.h b/engines/gob/expression.h
index 2c27ddc8e7..ecce7c869d 100644
--- a/engines/gob/expression.h
+++ b/engines/gob/expression.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_EXPRESSION_H
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp
index 44a730cda0..926027e15d 100644
--- a/engines/gob/game.cpp
+++ b/engines/gob/game.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/game.h b/engines/gob/game.h
index f529f7c025..b3057ac262 100644
--- a/engines/gob/game.h
+++ b/engines/gob/game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_GAME_H
diff --git a/engines/gob/global.cpp b/engines/gob/global.cpp
index 8b8fb3d4c9..1264c09860 100644
--- a/engines/gob/global.cpp
+++ b/engines/gob/global.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/global.h b/engines/gob/global.h
index 24925bc58a..fa2f2c9637 100644
--- a/engines/gob/global.h
+++ b/engines/gob/global.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_GLOBAL_H
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 3d697d3693..ea7e329480 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -18,13 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
#include "backends/audiocd/audiocd.h"
#include "base/plugins.h"
@@ -113,7 +109,7 @@ void PauseDialog::handleKeyDown(Common::KeyState state) {
}
-GobEngine::GobEngine(OSystem *syst) : Engine(syst) {
+GobEngine::GobEngine(OSystem *syst) : Engine(syst), _rnd("gob") {
_sound = 0; _mult = 0; _game = 0;
_global = 0; _dataIO = 0; _goblin = 0;
_vidPlayer = 0; _init = 0; _inter = 0;
@@ -148,8 +144,6 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) {
DebugMan.addDebugChannel(kDebugVideo, "Video", "IMD/VMD video debug level");
DebugMan.addDebugChannel(kDebugHotspots, "Hotspots", "Hotspots debug level");
DebugMan.addDebugChannel(kDebugDemo, "Demo", "Demo script debug level");
-
- g_eventRec.registerRandomSource(_rnd, "gob");
}
GobEngine::~GobEngine() {
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 4a928747b0..74c882e021 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_GOB_H
diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp
index 402b33d5fd..a032588a1f 100644
--- a/engines/gob/goblin.cpp
+++ b/engines/gob/goblin.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/gob/goblin.h b/engines/gob/goblin.h
index c2bcaa5752..3d45da599d 100644
--- a/engines/gob/goblin.h
+++ b/engines/gob/goblin.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_GOBLIN_H
diff --git a/engines/gob/goblin_v1.cpp b/engines/gob/goblin_v1.cpp
index 3dc4c6611d..ea46b4b9a1 100644
--- a/engines/gob/goblin_v1.cpp
+++ b/engines/gob/goblin_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp
index 2b4a529bdb..2dbdf39d7d 100644
--- a/engines/gob/goblin_v2.cpp
+++ b/engines/gob/goblin_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/goblin_v3.cpp b/engines/gob/goblin_v3.cpp
index 0cb3aadc71..38880bfdb6 100644
--- a/engines/gob/goblin_v3.cpp
+++ b/engines/gob/goblin_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/goblin_v4.cpp b/engines/gob/goblin_v4.cpp
index 523357aab1..0d6a995af9 100644
--- a/engines/gob/goblin_v4.cpp
+++ b/engines/gob/goblin_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index 301d594eb9..f3647af76e 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/gob/hotspots.h b/engines/gob/hotspots.h
index 7346c66bb5..8d26ad224e 100644
--- a/engines/gob/hotspots.h
+++ b/engines/gob/hotspots.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_HOTSPOTS_H
diff --git a/engines/gob/iniconfig.cpp b/engines/gob/iniconfig.cpp
index f08303c0bb..9b8f1c703e 100644
--- a/engines/gob/iniconfig.cpp
+++ b/engines/gob/iniconfig.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/iniconfig.h"
diff --git a/engines/gob/iniconfig.h b/engines/gob/iniconfig.h
index fc35315207..bf60f2d125 100644
--- a/engines/gob/iniconfig.h
+++ b/engines/gob/iniconfig.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_INICONFIG_H
diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp
index 7a757caadf..90c2a1602a 100644
--- a/engines/gob/init.cpp
+++ b/engines/gob/init.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init.h b/engines/gob/init.h
index ba4b1f979d..1cb2904099 100644
--- a/engines/gob/init.h
+++ b/engines/gob/init.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_INIT_H
diff --git a/engines/gob/init_fascin.cpp b/engines/gob/init_fascin.cpp
index 9842b7e752..b87d816406 100644
--- a/engines/gob/init_fascin.cpp
+++ b/engines/gob/init_fascin.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init_v1.cpp b/engines/gob/init_v1.cpp
index af09626fe7..6772a13eb0 100644
--- a/engines/gob/init_v1.cpp
+++ b/engines/gob/init_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp
index 78be68d48c..f10d586a34 100644
--- a/engines/gob/init_v2.cpp
+++ b/engines/gob/init_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init_v3.cpp b/engines/gob/init_v3.cpp
index b3816c10e9..bfbe00849f 100644
--- a/engines/gob/init_v3.cpp
+++ b/engines/gob/init_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init_v4.cpp b/engines/gob/init_v4.cpp
index 3bd50a494d..ba92c2fc04 100644
--- a/engines/gob/init_v4.cpp
+++ b/engines/gob/init_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init_v6.cpp b/engines/gob/init_v6.cpp
index 76f006533f..947556835a 100644
--- a/engines/gob/init_v6.cpp
+++ b/engines/gob/init_v6.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/init_v7.cpp b/engines/gob/init_v7.cpp
index 709cefb69d..b5b51aad2a 100644
--- a/engines/gob/init_v7.cpp
+++ b/engines/gob/init_v7.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/fs.h"
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp
index 9b4b06eea3..9df3c06c74 100644
--- a/engines/gob/inter.cpp
+++ b/engines/gob/inter.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 1807dc3ad7..78d5e34271 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_INTER_H
diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp
index 4dcdff8c6c..c2e6a2e912 100644
--- a/engines/gob/inter_bargon.cpp
+++ b/engines/gob/inter_bargon.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter_fascin.cpp b/engines/gob/inter_fascin.cpp
index 5e820cef02..bab1975abc 100644
--- a/engines/gob/inter_fascin.cpp
+++ b/engines/gob/inter_fascin.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter_inca2.cpp b/engines/gob/inter_inca2.cpp
index 01d3cda33e..f868f18242 100644
--- a/engines/gob/inter_inca2.cpp
+++ b/engines/gob/inter_inca2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp
index c5f9d2df06..d57d2f354b 100644
--- a/engines/gob/inter_playtoons.cpp
+++ b/engines/gob/inter_playtoons.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 8f1ff4c73f..47b0beaf63 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 6a42b5ecd4..84cae3b380 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter_v3.cpp b/engines/gob/inter_v3.cpp
index 8a5a839244..47486b0899 100644
--- a/engines/gob/inter_v3.cpp
+++ b/engines/gob/inter_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp
index 1da92b3766..f89af0e45a 100644
--- a/engines/gob/inter_v4.cpp
+++ b/engines/gob/inter_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index f5e87bb936..ed371737bd 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gui/message.h"
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index 53ebfe7513..589328dfdb 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index c318252b68..a36154fe5e 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/map.cpp b/engines/gob/map.cpp
index 503b934074..57f5f7af48 100644
--- a/engines/gob/map.cpp
+++ b/engines/gob/map.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/map.h b/engines/gob/map.h
index 48a9d1d4ac..856cf356da 100644
--- a/engines/gob/map.h
+++ b/engines/gob/map.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_MAP_H
diff --git a/engines/gob/map_v1.cpp b/engines/gob/map_v1.cpp
index 372f501887..45499b71fe 100644
--- a/engines/gob/map_v1.cpp
+++ b/engines/gob/map_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/memstream.h"
diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp
index 42c98c4a80..1db461370f 100644
--- a/engines/gob/map_v2.cpp
+++ b/engines/gob/map_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stream.h"
diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp
index f744f14faf..06a7130cef 100644
--- a/engines/gob/mult.cpp
+++ b/engines/gob/mult.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/mult.h b/engines/gob/mult.h
index fc83e2dbe3..860e5a12e1 100644
--- a/engines/gob/mult.h
+++ b/engines/gob/mult.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_MULT_H
diff --git a/engines/gob/mult_v1.cpp b/engines/gob/mult_v1.cpp
index 78ee3e60f5..230d0d2b4c 100644
--- a/engines/gob/mult_v1.cpp
+++ b/engines/gob/mult_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index 8018fb15c6..6593565e6a 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/palanim.cpp b/engines/gob/palanim.cpp
index 755d28c6e9..42aeaf63eb 100644
--- a/engines/gob/palanim.cpp
+++ b/engines/gob/palanim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/gob/palanim.h b/engines/gob/palanim.h
index 6c91665b29..8d8a1e4388 100644
--- a/engines/gob/palanim.h
+++ b/engines/gob/palanim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_PALANIM_H
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp
index 0c838ca246..92eec0ee25 100644
--- a/engines/gob/resources.cpp
+++ b/engines/gob/resources.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/gob/resources.h b/engines/gob/resources.h
index dec64f6b7c..39155c5176 100644
--- a/engines/gob/resources.h
+++ b/engines/gob/resources.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_RESOURCES_H
diff --git a/engines/gob/save/saveconverter.cpp b/engines/gob/save/saveconverter.cpp
index 59d313138b..ec8bcbcfea 100644
--- a/engines/gob/save/saveconverter.cpp
+++ b/engines/gob/save/saveconverter.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
@@ -304,7 +301,7 @@ bool SaveConverter::createStream(SaveWriter &writer) {
}
/* Stream functions. If the new save data stream is available, redirect the stream
- * operations to that stream. Normal stream error behaviour if not. */
+ * operations to that stream. Normal stream error behavior if not. */
bool SaveConverter::err() const {
if (!_data || !_stream)
diff --git a/engines/gob/save/saveconverter.h b/engines/gob/save/saveconverter.h
index 8154377b64..d8cf723fd3 100644
--- a/engines/gob/save/saveconverter.h
+++ b/engines/gob/save/saveconverter.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SAVE_SAVECONVERTER_H
diff --git a/engines/gob/save/saveconverter_v2.cpp b/engines/gob/save/saveconverter_v2.cpp
index 1260a26280..7661c47836 100644
--- a/engines/gob/save/saveconverter_v2.cpp
+++ b/engines/gob/save/saveconverter_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/save/saveconverter_v3.cpp b/engines/gob/save/saveconverter_v3.cpp
index 2f52c789c6..2256575c4b 100644
--- a/engines/gob/save/saveconverter_v3.cpp
+++ b/engines/gob/save/saveconverter_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/save/saveconverter_v4.cpp b/engines/gob/save/saveconverter_v4.cpp
index ea5afaeebd..2618a25f37 100644
--- a/engines/gob/save/saveconverter_v4.cpp
+++ b/engines/gob/save/saveconverter_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/save/savefile.cpp b/engines/gob/save/savefile.cpp
index 45cd2a2b7d..0713c38684 100644
--- a/engines/gob/save/savefile.cpp
+++ b/engines/gob/save/savefile.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/gob/save/savefile.h b/engines/gob/save/savefile.h
index 22eb79f4bf..01825207e0 100644
--- a/engines/gob/save/savefile.h
+++ b/engines/gob/save/savefile.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SAVE_SAVEFILE_H
diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp
index 21102ae786..9e46f1db6f 100644
--- a/engines/gob/save/savehandler.cpp
+++ b/engines/gob/save/savehandler.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/save/savehandler.h b/engines/gob/save/savehandler.h
index d12d6bca0d..afc31f54f1 100644
--- a/engines/gob/save/savehandler.h
+++ b/engines/gob/save/savehandler.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SAVE_SAVEHANDLER_H
diff --git a/engines/gob/save/saveload.cpp b/engines/gob/save/saveload.cpp
index e490509914..6b2f710159 100644
--- a/engines/gob/save/saveload.cpp
+++ b/engines/gob/save/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h
index dc1c184504..4d51a5b51c 100644
--- a/engines/gob/save/saveload.h
+++ b/engines/gob/save/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SAVE_SAVELOAD_H
diff --git a/engines/gob/save/saveload_fascin.cpp b/engines/gob/save/saveload_fascin.cpp
index 6c3d22ecf3..cf1e7f0c0c 100644
--- a/engines/gob/save/saveload_fascin.cpp
+++ b/engines/gob/save/saveload_fascin.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_inca2.cpp b/engines/gob/save/saveload_inca2.cpp
index 5fa1b69fa7..4c3aaf5a0e 100644
--- a/engines/gob/save/saveload_inca2.cpp
+++ b/engines/gob/save/saveload_inca2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp
index 3f578ce928..93c1b68b0c 100644
--- a/engines/gob/save/saveload_playtoons.cpp
+++ b/engines/gob/save/saveload_playtoons.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_v2.cpp b/engines/gob/save/saveload_v2.cpp
index ea639b861a..b25d4788f7 100644
--- a/engines/gob/save/saveload_v2.cpp
+++ b/engines/gob/save/saveload_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_v3.cpp b/engines/gob/save/saveload_v3.cpp
index 39edddb66f..3e7a3b9e48 100644
--- a/engines/gob/save/saveload_v3.cpp
+++ b/engines/gob/save/saveload_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_v4.cpp b/engines/gob/save/saveload_v4.cpp
index e6973efd64..95283db336 100644
--- a/engines/gob/save/saveload_v4.cpp
+++ b/engines/gob/save/saveload_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp
index 248fe0a93f..c524cad352 100644
--- a/engines/gob/save/saveload_v6.cpp
+++ b/engines/gob/save/saveload_v6.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/save/saveload_v7.cpp b/engines/gob/save/saveload_v7.cpp
index 2693617798..3753b4019f 100644
--- a/engines/gob/save/saveload_v7.cpp
+++ b/engines/gob/save/saveload_v7.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/save/saveload.h"
diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp
index 9f3a908329..bb50818ed8 100644
--- a/engines/gob/scenery.cpp
+++ b/engines/gob/scenery.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h
index 21bf29deda..d8312b1128 100644
--- a/engines/gob/scenery.h
+++ b/engines/gob/scenery.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SCENERY_H
diff --git a/engines/gob/scenery_v1.cpp b/engines/gob/scenery_v1.cpp
index 605b098693..46ceb35457 100644
--- a/engines/gob/scenery_v1.cpp
+++ b/engines/gob/scenery_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/scenery_v2.cpp b/engines/gob/scenery_v2.cpp
index 1a0de6f291..16ce077169 100644
--- a/engines/gob/scenery_v2.cpp
+++ b/engines/gob/scenery_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp
index eb37451229..c7e39f94af 100644
--- a/engines/gob/script.cpp
+++ b/engines/gob/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/gob/script.h b/engines/gob/script.h
index 0e8ac0d69f..0095ad0cb6 100644
--- a/engines/gob/script.h
+++ b/engines/gob/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SCRIPT_H
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp
index 4244df68e5..f1ab2a2d79 100644
--- a/engines/gob/sound/adlib.cpp
+++ b/engines/gob/sound/adlib.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h
index 090841b9d6..934e9966eb 100644
--- a/engines/gob/sound/adlib.h
+++ b/engines/gob/sound/adlib.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_ADLIB_H
diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp
index b351d92275..daba72b2d5 100644
--- a/engines/gob/sound/bgatmosphere.cpp
+++ b/engines/gob/sound/bgatmosphere.cpp
@@ -18,12 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
-#include "common/EventRecorder.h"
+#include "common/array.h"
#include "gob/sound/bgatmosphere.h"
#include "gob/sound/sounddesc.h"
@@ -31,14 +28,12 @@
namespace Gob {
BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) :
- SoundMixer(mixer, Audio::Mixer::kMusicSoundType) {
+ SoundMixer(mixer, Audio::Mixer::kMusicSoundType), _rnd("gobBA") {
_playMode = kPlayModeLinear;
_queuePos = -1;
_shaded = false;
_shadable = true;
-
- g_eventRec.registerRandomSource(_rnd, "gobBA");
}
BackgroundAtmosphere::~BackgroundAtmosphere() {
diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h
index 7e58c0b4e9..e88b91d540 100644
--- a/engines/gob/sound/bgatmosphere.h
+++ b/engines/gob/sound/bgatmosphere.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_BGATMOSPHERE_H
diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp
index 217aa9c18e..4ce3372562 100644
--- a/engines/gob/sound/cdrom.cpp
+++ b/engines/gob/sound/cdrom.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/sound/cdrom.h b/engines/gob/sound/cdrom.h
index 894744ca15..09d4c94865 100644
--- a/engines/gob/sound/cdrom.h
+++ b/engines/gob/sound/cdrom.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_CDROM_H
diff --git a/engines/gob/sound/infogrames.cpp b/engines/gob/sound/infogrames.cpp
index 9fb7410740..febf91719b 100644
--- a/engines/gob/sound/infogrames.cpp
+++ b/engines/gob/sound/infogrames.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/gob/sound/infogrames.h b/engines/gob/sound/infogrames.h
index cdcb0a7c39..ee5ffd1cff 100644
--- a/engines/gob/sound/infogrames.h
+++ b/engines/gob/sound/infogrames.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_INFOGRAMES_H
diff --git a/engines/gob/sound/pcspeaker.cpp b/engines/gob/sound/pcspeaker.cpp
index 61402eb30e..bc031e279f 100644
--- a/engines/gob/sound/pcspeaker.cpp
+++ b/engines/gob/sound/pcspeaker.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/sound/pcspeaker.h"
diff --git a/engines/gob/sound/pcspeaker.h b/engines/gob/sound/pcspeaker.h
index f83d65a615..fe0ec872e3 100644
--- a/engines/gob/sound/pcspeaker.h
+++ b/engines/gob/sound/pcspeaker.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_PCSPEAKER_H
diff --git a/engines/gob/sound/protracker.cpp b/engines/gob/sound/protracker.cpp
index 445d8f8cfb..fbc03256bb 100644
--- a/engines/gob/sound/protracker.cpp
+++ b/engines/gob/sound/protracker.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/gob/sound/protracker.h b/engines/gob/sound/protracker.h
index 0397efb3b7..b4c3be1f61 100644
--- a/engines/gob/sound/protracker.h
+++ b/engines/gob/sound/protracker.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_PROTRACKER_H
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp
index 1aa63eb940..0ad17c1e33 100644
--- a/engines/gob/sound/sound.cpp
+++ b/engines/gob/sound/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/gob.h"
diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h
index 24e161154b..585cf36703 100644
--- a/engines/gob/sound/sound.h
+++ b/engines/gob/sound/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_SOUND_H
diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp
index 69610dc949..4ff555b0e3 100644
--- a/engines/gob/sound/soundblaster.cpp
+++ b/engines/gob/sound/soundblaster.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/sound/soundblaster.h"
diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h
index ffe46801dc..c2704c5482 100644
--- a/engines/gob/sound/soundblaster.h
+++ b/engines/gob/sound/soundblaster.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_SOUNDBLASTER_H
diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp
index cc1c6b1f6b..7d876ec484 100644
--- a/engines/gob/sound/sounddesc.cpp
+++ b/engines/gob/sound/sounddesc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/gob/sound/sounddesc.h b/engines/gob/sound/sounddesc.h
index 07eb73e7c8..f9223de964 100644
--- a/engines/gob/sound/sounddesc.h
+++ b/engines/gob/sound/sounddesc.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_SOUNDDESC_H
diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp
index 3b6b2e5d52..a9303bc927 100644
--- a/engines/gob/sound/soundmixer.cpp
+++ b/engines/gob/sound/soundmixer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/gob/sound/soundmixer.h b/engines/gob/sound/soundmixer.h
index 5b283b2d84..2847c3de12 100644
--- a/engines/gob/sound/soundmixer.h
+++ b/engines/gob/sound/soundmixer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SOUND_SOUNDMIXER_H
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index 7bd8aae597..e294209ed7 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gob/surface.h"
diff --git a/engines/gob/surface.h b/engines/gob/surface.h
index b84927af70..866e63490f 100644
--- a/engines/gob/surface.h
+++ b/engines/gob/surface.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_SURFACE_H
diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp
index 82dd0c38c0..4efe374793 100644
--- a/engines/gob/totfile.cpp
+++ b/engines/gob/totfile.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/gob/totfile.h b/engines/gob/totfile.h
index ce467425e2..5a23912dbe 100644
--- a/engines/gob/totfile.h
+++ b/engines/gob/totfile.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_TOTFILE_H
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 787f85175a..6d83745602 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/gob/util.h b/engines/gob/util.h
index 262bff0a7a..a6a689c1d2 100644
--- a/engines/gob/util.h
+++ b/engines/gob/util.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_UTIL_H
diff --git a/engines/gob/variables.cpp b/engines/gob/variables.cpp
index 94cfadb9a0..efbf10af69 100644
--- a/engines/gob/variables.cpp
+++ b/engines/gob/variables.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/variables.h b/engines/gob/variables.h
index d092a8bc4c..04775ff86c 100644
--- a/engines/gob/variables.h
+++ b/engines/gob/variables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_VARIABLES_H
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index 1d74a07bfc..ee5ff4abff 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/video.h b/engines/gob/video.h
index 69cdfe49ed..ecbb579c5f 100644
--- a/engines/gob/video.h
+++ b/engines/gob/video.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_VIDEO_H
diff --git a/engines/gob/video_v1.cpp b/engines/gob/video_v1.cpp
index 5c2f17d7dd..397e2bef22 100644
--- a/engines/gob/video_v1.cpp
+++ b/engines/gob/video_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/video_v2.cpp b/engines/gob/video_v2.cpp
index c908ccf7b1..bf4823ec90 100644
--- a/engines/gob/video_v2.cpp
+++ b/engines/gob/video_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp
index 23610aded1..e2c952952d 100644
--- a/engines/gob/video_v6.cpp
+++ b/engines/gob/video_v6.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index de149c9787..651c9a3154 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index 15f1f066ab..373832939a 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GOB_VIDEOPLAYER_H
diff --git a/engines/groovie/cell.cpp b/engines/groovie/cell.cpp
index e59115cdf5..8241579156 100644
--- a/engines/groovie/cell.cpp
+++ b/engines/groovie/cell.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/cell.h"
diff --git a/engines/groovie/cell.h b/engines/groovie/cell.h
index a5feab4017..32c7b46547 100644
--- a/engines/groovie/cell.h
+++ b/engines/groovie/cell.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_CELL_H
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index 8b62b829e1..abefac54bd 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/cursor.h"
diff --git a/engines/groovie/cursor.h b/engines/groovie/cursor.h
index e40dc0c486..87d994b077 100644
--- a/engines/groovie/cursor.h
+++ b/engines/groovie/cursor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_CURSOR_H
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index 0b70e4f83a..74fe22922c 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/debug.h"
diff --git a/engines/groovie/debug.h b/engines/groovie/debug.h
index e21746a426..76f6d16c65 100644
--- a/engines/groovie/debug.h
+++ b/engines/groovie/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_DEBUG_H
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 00116d6e00..87ad534c96 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/groovie.h"
@@ -236,7 +233,7 @@ public:
GroovieMetaEngine() : AdvancedMetaEngine(detectionParams) {}
const char *getName() const {
- return "Groovie Engine";
+ return "Groovie";
}
const char *getOriginalCopyright() const {
diff --git a/engines/groovie/detection.h b/engines/groovie/detection.h
index 2304377a11..aa900cc54d 100644
--- a/engines/groovie/detection.h
+++ b/engines/groovie/detection.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_DETECTION_H
diff --git a/engines/groovie/font.cpp b/engines/groovie/font.cpp
index 13d0df0005..d29c22dd02 100644
--- a/engines/groovie/font.cpp
+++ b/engines/groovie/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/array.h"
diff --git a/engines/groovie/font.h b/engines/groovie/font.h
index 71f8393d28..20aaa4cf23 100644
--- a/engines/groovie/font.h
+++ b/engines/groovie/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_FONT_H
diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp
index 71ee231b80..c3ca03750a 100644
--- a/engines/groovie/graphics.cpp
+++ b/engines/groovie/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/graphics.h"
diff --git a/engines/groovie/graphics.h b/engines/groovie/graphics.h
index a405822c9c..c91d895c25 100644
--- a/engines/groovie/graphics.h
+++ b/engines/groovie/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_GRAPHICS_H
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 71b83b9baa..9027262a0c 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/groovie.h"
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index 6f1e5bb52e..eb64cfc60a 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_H
diff --git a/engines/groovie/lzss.cpp b/engines/groovie/lzss.cpp
index 889a12bd12..a09f6e2311 100644
--- a/engines/groovie/lzss.cpp
+++ b/engines/groovie/lzss.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/lzss.h"
diff --git a/engines/groovie/lzss.h b/engines/groovie/lzss.h
index f78bc20351..f60ea14815 100644
--- a/engines/groovie/lzss.h
+++ b/engines/groovie/lzss.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stream.h"
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index 70e3abd55f..26b3458037 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/music.h"
diff --git a/engines/groovie/music.h b/engines/groovie/music.h
index 107e52a67c..5ef6a8e076 100644
--- a/engines/groovie/music.h
+++ b/engines/groovie/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_MUSIC_H
diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp
index 090d99e768..e2a1ff3d56 100644
--- a/engines/groovie/player.cpp
+++ b/engines/groovie/player.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/groovie/player.h b/engines/groovie/player.h
index e75a5fc3c0..d8135a99b2 100644
--- a/engines/groovie/player.h
+++ b/engines/groovie/player.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_PLAYER_H
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 5701f3a73d..10cf24a589 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
diff --git a/engines/groovie/resource.h b/engines/groovie/resource.h
index 0a9a03b42c..33e15e6b98 100644
--- a/engines/groovie/resource.h
+++ b/engines/groovie/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_RESOURCE_H
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index be9c4f6921..7f477c41fa 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// ROQ video player based on this specification by Dr. Tim Ferguson:
diff --git a/engines/groovie/roq.h b/engines/groovie/roq.h
index fd5af9300c..ddb307065c 100644
--- a/engines/groovie/roq.h
+++ b/engines/groovie/roq.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_ROQ_H
diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp
index 4e3e4cfcf8..a0463db0be 100644
--- a/engines/groovie/saveload.cpp
+++ b/engines/groovie/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/saveload.h"
diff --git a/engines/groovie/saveload.h b/engines/groovie/saveload.h
index 24a0ddfbf8..15ce108c7d 100644
--- a/engines/groovie/saveload.h
+++ b/engines/groovie/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_SAVELOAD_H
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 5c9f119d81..b52a8723fc 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/script.h"
@@ -36,7 +33,7 @@
#include "common/archive.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
+#include "common/events.h"
#include "common/file.h"
#include "common/macresman.h"
@@ -69,7 +66,7 @@ static void debugScript(int level, bool nl, const char *s, ...) {
Script::Script(GroovieEngine *vm, EngineVersion version) :
_code(NULL), _savedCode(NULL), _stacktop(0), _debugger(NULL), _vm(vm),
_videoFile(NULL), _videoRef(0), _staufsMove(NULL), _lastCursor(0xff),
- _version(version) {
+ _version(version), _random("GroovieScripts") {
// Initialize the opcode set depending on the engine version
switch (version) {
@@ -81,9 +78,6 @@ Script::Script(GroovieEngine *vm, EngineVersion version) :
break;
}
- // Initialize the random source
- g_eventRec.registerRandomSource(_random, "GroovieScripts");
-
// Prepare the variables
_bitflags = 0;
for (int i = 0; i < 0x400; i++) {
diff --git a/engines/groovie/script.h b/engines/groovie/script.h
index c5ad6da78b..8cd790af5e 100644
--- a/engines/groovie/script.h
+++ b/engines/groovie/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_SCRIPT_H
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index b6f06d7011..b3fcf462b2 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "groovie/vdx.h"
diff --git a/engines/groovie/vdx.h b/engines/groovie/vdx.h
index 31c7606cb7..ebe58cb119 100644
--- a/engines/groovie/vdx.h
+++ b/engines/groovie/vdx.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GROOVIE_VDX_H
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 3ff37ccbc7..0a67b5cd0a 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -18,20 +18,135 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "hugo/console.h"
#include "hugo/hugo.h"
+#include "hugo/object.h"
+#include "hugo/parser.h"
+#include "hugo/schedule.h"
+#include "hugo/text.h"
namespace Hugo {
HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
+ DCmd_Register("listobjects", WRAP_METHOD(HugoConsole, Cmd_listObjects));
+ DCmd_Register("getobject", WRAP_METHOD(HugoConsole, Cmd_getObject));
+ DCmd_Register("getallobjects", WRAP_METHOD(HugoConsole, Cmd_getAllObjects));
+ DCmd_Register("gotoscreen", WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
+ DCmd_Register("Boundaries", WRAP_METHOD(HugoConsole, Cmd_boundaries));
}
HugoConsole::~HugoConsole() {
}
+static int strToInt(const char *s) {
+ if (!*s)
+ // No string at all
+ return 0;
+ else if (toupper(s[strlen(s) - 1]) != 'H')
+ // Standard decimal string
+ return atoi(s);
+
+ // Hexadecimal string
+ uint tmp = 0;
+ int read = sscanf(s, "%xh", &tmp);
+ if (read < 1)
+ error("strToInt failed on string \"%s\"", s);
+ return (int)tmp;
+}
+
+/**
+ * This command loads up the specified screen number
+ */
+bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
+ if ((argc != 2) || (strToInt(argv[1]) > _vm->_numScreens)){
+ DebugPrintf("Usage: %s <screen number>\n", argv[0]);
+ return true;
+ }
+
+ _vm->_scheduler->newScreen(strToInt(argv[1]));
+ return false;
+}
+
+/**
+ * This command lists all the screens available
+ */
+bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ DebugPrintf("Available screens for this game are:\n");
+ for (int i = 0; i < _vm->_numScreens; i++)
+ DebugPrintf("%2d - %s\n", i, _vm->_text->getScreenNames(i));
+ return true;
+}
+
+/**
+ * This command lists all the objects available
+ */
+bool HugoConsole::Cmd_listObjects(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ DebugPrintf("Available objects for this game are:\n");
+ for (int i = 0; i < _vm->_object->_numObj; i++) {
+ if (_vm->_object->_objects[i].genericCmd & TAKE)
+ DebugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2));
+ }
+ return true;
+}
+
+/**
+ * This command puts an object in the inventory
+ */
+bool HugoConsole::Cmd_getObject(int argc, const char **argv) {
+ if ((argc != 2) || (strToInt(argv[1]) > _vm->_object->_numObj)) {
+ DebugPrintf("Usage: %s <object number>\n", argv[0]);
+ return true;
+ }
+
+ if (_vm->_object->_objects[strToInt(argv[1])].genericCmd & TAKE)
+ _vm->_parser->takeObject(&_vm->_object->_objects[strToInt(argv[1])]);
+ else
+ DebugPrintf("Object not available\n");
+
+ return true;
+}
+
+/**
+ * This command puts all the available objects in the inventory
+ */
+bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ for (int i = 0; i < _vm->_object->_numObj; i++) {
+ if (_vm->_object->_objects[i].genericCmd & TAKE)
+ _vm->_parser->takeObject(&_vm->_object->_objects[i]);
+ }
+
+ return false;
+}
+
+/**
+ * This command shows and hides boundaries
+ */
+bool HugoConsole::Cmd_boundaries(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ _vm->getGameStatus().showBoundariesFl = !_vm->getGameStatus().showBoundariesFl;
+ return false;
+}
+
} // End of namespace Hugo
diff --git a/engines/hugo/console.h b/engines/hugo/console.h
index 240b108ab6..16317e83d5 100644
--- a/engines/hugo/console.h
+++ b/engines/hugo/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef HUGO_CONSOLE_H
@@ -39,6 +36,12 @@ public:
private:
HugoEngine *_vm;
+ bool Cmd_listScreens(int argc, const char **argv);
+ bool Cmd_listObjects(int argc, const char **argv);
+ bool Cmd_getObject(int argc, const char **argv);
+ bool Cmd_getAllObjects(int argc, const char **argv);
+ bool Cmd_gotoScreen(int argc, const char **argv);
+ bool Cmd_boundaries(int argc, const char **argv);
};
} // End of namespace Hugo
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp
index 95302c9235..25b8b16084 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/advancedDetector.h"
@@ -164,7 +161,7 @@ public:
HugoMetaEngine() : AdvancedMetaEngine(detectionParams) {}
const char *getName() const {
- return "Hugo Engine";
+ return "Hugo";
}
const char *getOriginalCopyright() const {
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index f0dc84eae8..6c816141f7 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/substream.h"
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index 56dbd41f81..4e710ff2f8 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef HUGO_DIALOGS_H
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index af4d094ceb..c716e80d87 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -647,13 +644,13 @@ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const {
}
/**
- * Display active boundaries in God Mode ('PPG')
+ * Display active boundaries (activated in the console)
* Light Red = Exit hotspots
* Light Green = Visible objects
- * White = Fixed objects, parts of background
+ * White = Fix objects, parts of background
*/
void Screen::drawBoundaries() {
- if (!_vm->getGameStatus().godModeFl)
+ if (!_vm->getGameStatus().showBoundariesFl)
return;
_vm->_mouse->drawHotspots();
diff --git a/engines/hugo/display.h b/engines/hugo/display.h
index 91e1752df0..38c63e9fe5 100644
--- a/engines/hugo/display.h
+++ b/engines/hugo/display.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index ba4e420111..cde6e108ea 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file.h b/engines/hugo/file.h
index 0e131348f9..3792c01ab4 100644
--- a/engines/hugo/file.h
+++ b/engines/hugo/file.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp
index 021969f306..9ebd9d284c 100644
--- a/engines/hugo/file_v1d.cpp
+++ b/engines/hugo/file_v1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp
index 4f327b3095..eb2226f18a 100644
--- a/engines/hugo/file_v1w.cpp
+++ b/engines/hugo/file_v1w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index 0ad89e987e..2a663edcfa 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v2w.cpp b/engines/hugo/file_v2w.cpp
index 245d4d017e..1384f02df6 100644
--- a/engines/hugo/file_v2w.cpp
+++ b/engines/hugo/file_v2w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index 6370fffa4d..7ac0ffc48a 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/game.h b/engines/hugo/game.h
index 08e8deb001..5db57789dc 100644
--- a/engines/hugo/game.h
+++ b/engines/hugo/game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index a872a97bae..a08dbc094b 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
#include "common/random.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/debug-channels.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
@@ -531,15 +527,16 @@ void HugoEngine::initPlaylist(bool playlist[kMaxTunes]) {
*/
void HugoEngine::initStatus() {
debugC(1, kDebugEngine, "initStatus");
- _status.storyModeFl = false; // Not in story mode
- _status.gameOverFl = false; // Hero not knobbled yet
- _status.lookFl = false; // Toolbar "look" button
- _status.recallFl = false; // Toolbar "recall" button
- _status.newScreenFl = false; // Screen not just loaded
- _status.godModeFl = false; // No special cheats allowed
- _status.doQuitFl = false;
- _status.skipIntroFl = false;
- _status.helpFl = false;
+ _status.storyModeFl = false; // Not in story mode
+ _status.gameOverFl = false; // Hero not knobbled yet
+ _status.lookFl = false; // Toolbar "look" button
+ _status.recallFl = false; // Toolbar "recall" button
+ _status.newScreenFl = false; // Screen not just loaded
+ _status.godModeFl = false; // No special cheats allowed
+ _status.showBoundariesFl = false; // Boundaries hidden by default
+ _status.doQuitFl = false;
+ _status.skipIntroFl = false;
+ _status.helpFl = false;
// Initialize every start of new game
_status.tick = 0; // Tick count
@@ -597,10 +594,9 @@ void HugoEngine::initialize() {
_scheduler->initEventQueue(); // Init scheduler stuff
_screen->initDisplay(); // Create Dibs and palette
_file->openDatabaseFiles(); // Open database files
- calcMaxScore(); // Initialise maxscore
+ calcMaxScore(); // Initialize maxscore
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "hugo");
+ _rnd = new Common::RandomSource("hugo");
_rnd->setSeed(42); // Kick random number generator
switch (_gameVariant) {
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index b2d241f241..b5b8d5ea61 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef HUGO_H
@@ -180,6 +177,8 @@ struct status_t { // Game status (not saved)
bool recallFl; // Toolbar "recall" button pressed
bool newScreenFl; // New screen just loaded in dib_a
bool godModeFl; // Allow DEBUG features in live version
+ bool showBoundariesFl; // Flag used to show and hide boundaries,
+ // used by the console
bool doQuitFl;
bool skipIntroFl;
bool helpFl;
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index c31d76abd0..c66c0ef624 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h
index 772d98e244..1bb039216a 100644
--- a/engines/hugo/intro.h
+++ b/engines/hugo/intro.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp
index 45893f6965..410c4e715c 100644
--- a/engines/hugo/inventory.cpp
+++ b/engines/hugo/inventory.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/inventory.h b/engines/hugo/inventory.h
index ec102f3cce..de9e4cd1f0 100644
--- a/engines/hugo/inventory.h
+++ b/engines/hugo/inventory.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index c02908e579..d2d5b59dae 100644
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h
index ae1974b726..35f9e4e87e 100644
--- a/engines/hugo/mouse.h
+++ b/engines/hugo/mouse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index acf9f6e50c..e888a1d998 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/object.h b/engines/hugo/object.h
index 41ea776840..c0933729eb 100644
--- a/engines/hugo/object.h
+++ b/engines/hugo/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp
index 95bedf4fa2..ecdbb3b4c6 100644
--- a/engines/hugo/object_v1d.cpp
+++ b/engines/hugo/object_v1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -61,7 +58,7 @@ ObjectHandler_v1d::~ObjectHandler_v1d() {
void ObjectHandler_v1d::updateImages() {
debugC(5, kDebugObject, "updateImages");
- // Initialise the index array to visible objects in current screen
+ // Initialize the index array to visible objects in current screen
int num_objs = 0;
byte objindex[kMaxObjNumb]; // Array of indeces to objects
diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp
index 54becd8234..11c09176e5 100644
--- a/engines/hugo/object_v1w.cpp
+++ b/engines/hugo/object_v1w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -61,7 +58,7 @@ ObjectHandler_v1w::~ObjectHandler_v1w() {
void ObjectHandler_v1w::updateImages() {
debugC(5, kDebugObject, "updateImages");
- // Initialise the index array to visible objects in current screen
+ // Initialize the index array to visible objects in current screen
int num_objs = 0;
byte objindex[kMaxObjNumb]; // Array of indeces to objects
diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp
index 7c47bf4f92..c9e5104972 100644
--- a/engines/hugo/object_v2d.cpp
+++ b/engines/hugo/object_v2d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -61,7 +58,7 @@ ObjectHandler_v2d::~ObjectHandler_v2d() {
void ObjectHandler_v2d::updateImages() {
debugC(5, kDebugObject, "updateImages");
- // Initialise the index array to visible objects in current screen
+ // Initialize the index array to visible objects in current screen
int num_objs = 0;
byte objindex[kMaxObjNumb]; // Array of indeces to objects
diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp
index 3ff6c56ad3..07bd5e0c7f 100644
--- a/engines/hugo/object_v3d.cpp
+++ b/engines/hugo/object_v3d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 29a1d5efa3..4a53d67377 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index b00b8d5c43..faa6dc2303 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -100,6 +97,7 @@ public:
virtual void lineHandler() = 0;
virtual void showInventory() const = 0;
+ virtual void takeObject(object_t *obj) = 0;
protected:
HugoEngine *_vm;
@@ -138,10 +136,10 @@ public:
virtual void lineHandler();
virtual void showInventory() const;
+ virtual void takeObject(object_t *obj);
protected:
- virtual void dropObject(object_t *obj);
- virtual void takeObject(object_t *obj);
+ virtual void dropObject(object_t *obj);
const char *findNextNoun(const char *noun) const;
bool isBackgroundWord_v1(const char *noun, const char *verb, objectList_t obj) const;
diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp
index b2e515fd42..ccd428311b 100644
--- a/engines/hugo/parser_v1d.cpp
+++ b/engines/hugo/parser_v1d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp
index a39063357b..b1657c3bf4 100644
--- a/engines/hugo/parser_v1w.cpp
+++ b/engines/hugo/parser_v1w.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp
index 6233f11c29..0095c4d726 100644
--- a/engines/hugo/parser_v2d.cpp
+++ b/engines/hugo/parser_v2d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp
index 8c4946c534..b45e9186b3 100644
--- a/engines/hugo/parser_v3d.cpp
+++ b/engines/hugo/parser_v3d.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp
index 68b659cd3f..af8ec3427d 100644
--- a/engines/hugo/route.cpp
+++ b/engines/hugo/route.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/route.h b/engines/hugo/route.h
index 83a36f27ef..a95dd2151b 100644
--- a/engines/hugo/route.h
+++ b/engines/hugo/route.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index 0e91124a7e..a099bec21c 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -64,7 +61,7 @@ void Scheduler::initCypher() {
}
/**
- * Initialise the timer event queue
+ * Initialize the timer event queue
*/
void Scheduler::initEventQueue() {
debugC(1, kDebugSchedule, "initEventQueue");
@@ -162,7 +159,7 @@ void Scheduler::processBonus(const int bonusIndex) {
* 2. Set the new screen (in the hero object and any carried objects)
* 3. Read in the screen files for the new screen
* 4. Schedule action list for new screen
- * 5. Initialise prompt line and status line
+ * 5. Initialize prompt line and status line
*/
void Scheduler::newScreen(const int screenIndex) {
debugC(1, kDebugSchedule, "newScreen(%d)", screenIndex);
@@ -196,7 +193,7 @@ void Scheduler::newScreen(const int screenIndex) {
// 4. Schedule action list for this screen
_vm->_scheduler->screenActions(screenIndex);
- // 5. Initialise prompt line and status line
+ // 5. Initialize prompt line and status line
_vm->_screen->initNewScreenDisplay();
}
@@ -204,7 +201,7 @@ void Scheduler::newScreen(const int screenIndex) {
* Transition to a new screen as follows:
* 1. Set the new screen (in the hero object and any carried objects)
* 2. Read in the screen files for the new screen
- * 3. Initialise prompt line and status line
+ * 3. Initialize prompt line and status line
*/
void Scheduler::restoreScreen(const int screenIndex) {
debugC(1, kDebugSchedule, "restoreScreen(%d)", screenIndex);
@@ -215,7 +212,7 @@ void Scheduler::restoreScreen(const int screenIndex) {
// 2. Read in new screen files
_vm->readScreenFiles(screenIndex);
- // 3. Initialise prompt line and status line
+ // 3. Initialize prompt line and status line
_vm->_screen->initNewScreenDisplay();
}
@@ -1138,7 +1135,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) {
void Scheduler::insertAction(act *action) {
debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType);
- // First, get and initialise the event structure
+ // First, get and initialize the event structure
event_t *curEvent = getQueue();
curEvent->action = action;
switch (action->a0.actType) { // Assign whether local or global
@@ -1211,7 +1208,7 @@ event_t *Scheduler::doAction(event_t *curEvent) {
_vm->_object->_objects[action->a1.objIndex].cycleNumb = action->a1.cycleNumb;
_vm->_object->_objects[action->a1.objIndex].cycling = action->a1.cycle;
break;
- case INIT_OBJXY: // act2: Initialise an object
+ case INIT_OBJXY: // act2: Initialize an object
_vm->_object->_objects[action->a2.objIndex].x = action->a2.x; // Coordinates
_vm->_object->_objects[action->a2.objIndex].y = action->a2.y;
break;
@@ -1221,13 +1218,13 @@ event_t *Scheduler::doAction(event_t *curEvent) {
case BKGD_COLOR: // act4: Set new background color
_vm->_screen->setBackgroundColor(action->a4.newBackgroundColor);
break;
- case INIT_OBJVXY: // act5: Initialise an object velocity
+ case INIT_OBJVXY: // act5: Initialize an object velocity
_vm->_object->setVelocity(action->a5.objIndex, action->a5.vx, action->a5.vy);
break;
- case INIT_CARRY: // act6: Initialise an object
+ case INIT_CARRY: // act6: Initialize an object
_vm->_object->setCarry(action->a6.objIndex, action->a6.carriedFl); // carried status
break;
- case INIT_HF_COORD: // act7: Initialise an object to hero's "feet" coords
+ case INIT_HF_COORD: // act7: Initialize an object to hero's "feet" coords
_vm->_object->_objects[action->a7.objIndex].x = _vm->_hero->x - 1;
_vm->_object->_objects[action->a7.objIndex].y = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - 1;
_vm->_object->_objects[action->a7.objIndex].screenIndex = *_vm->_screen_p; // Don't forget screen!
@@ -1235,10 +1232,10 @@ event_t *Scheduler::doAction(event_t *curEvent) {
case NEW_SCREEN: // act8: Start new screen
newScreen(action->a8.screenIndex);
break;
- case INIT_OBJSTATE: // act9: Initialise an object state
+ case INIT_OBJSTATE: // act9: Initialize an object state
_vm->_object->_objects[action->a9.objIndex].state = action->a9.newState;
break;
- case INIT_PATH: // act10: Initialise an object path and velocity
+ case INIT_PATH: // act10: Initialize an object path and velocity
_vm->_object->setPath(action->a10.objIndex, (path_t) action->a10.newPathType, action->a10.vxPath, action->a10.vyPath);
break;
case COND_R: // act11: action lists conditional on object state
@@ -1287,7 +1284,7 @@ event_t *Scheduler::doAction(event_t *curEvent) {
// any objects are to be made invisible!
gameStatus.gameOverFl = true;
break;
- case INIT_HH_COORD: // act22: Initialise an object to hero's actual coords
+ case INIT_HH_COORD: // act22: Initialize an object to hero's actual coords
_vm->_object->_objects[action->a22.objIndex].x = _vm->_hero->x;
_vm->_object->_objects[action->a22.objIndex].y = _vm->_hero->y;
_vm->_object->_objects[action->a22.objIndex].screenIndex = *_vm->_screen_p;// Don't forget screen!
diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h
index a066fc63c4..e3107809cf 100644
--- a/engines/hugo/schedule.h
+++ b/engines/hugo/schedule.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -76,7 +73,7 @@ enum action_t { // Parameters:
INIT_MAZE, // 30 - Start special maze hotspot processing
EXIT_MAZE, // 31 - Exit special maze processing
INIT_PRIORITY, // 32 - Initialize fbg field
- INIT_SCREEN, // 33 - Initialise screen field of object
+ INIT_SCREEN, // 33 - Initialize screen field of object
AGSCHEDULE, // 34 - Global schedule - lasts over new screen
REMAPPAL, // 35 - Remappe palette - palette index, color
COND_NOUN, // 36 - Conditional on noun appearing in line
@@ -109,7 +106,7 @@ struct act1 { // Type 1 - Start an object
cycle_t cycle; // Direction to start cycling
};
-struct act2 { // Type 2 - Initialise an object coords
+struct act2 { // Type 2 - Initialize an object coords
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
@@ -132,21 +129,21 @@ struct act4 { // Type 4 - Set new backgrou
long newBackgroundColor; // New color
};
-struct act5 { // Type 5 - Initialise an object velocity
+struct act5 { // Type 5 - Initialize an object velocity
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
int vx, vy; // velocity
};
-struct act6 { // Type 6 - Initialise an object carrying
+struct act6 { // Type 6 - Initialize an object carrying
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
bool carriedFl; // carrying
};
-struct act7 { // Type 7 - Initialise an object to hero's coords
+struct act7 { // Type 7 - Initialize an object to hero's coords
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
@@ -158,14 +155,14 @@ struct act8 { // Type 8 - switch to new sc
int screenIndex; // The new screen number
};
-struct act9 { // Type 9 - Initialise an object state
+struct act9 { // Type 9 - Initialize an object state
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
byte newState; // New state
};
-struct act10 { // Type 10 - Initialise an object path type
+struct act10 { // Type 10 - Initialize an object path type
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
@@ -254,7 +251,7 @@ struct act21 { // Type 21 - Gameover. Disa
int timer; // Time to set off the action
};
-struct act22 { // Type 22 - Initialise an object to hero's coords
+struct act22 { // Type 22 - Initialize an object to hero's coords
action_t actType; // The type of action
int timer; // Time to set off the action
int objIndex; // The object number
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index d657eb96a6..9473536a47 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h
index d5f51704aa..33dba9f2a8 100644
--- a/engines/hugo/sound.h
+++ b/engines/hugo/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/text.cpp b/engines/hugo/text.cpp
index d2dcbe1405..f8b02bdf68 100644
--- a/engines/hugo/text.cpp
+++ b/engines/hugo/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/hugo/text.h b/engines/hugo/text.h
index 0854bf3f6e..0ba8de9cdf 100644
--- a/engines/hugo/text.h
+++ b/engines/hugo/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TEXT_H
#define TEXT_H
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index 6846bc98af..a936a23de1 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/hugo/util.h b/engines/hugo/util.h
index 85fef01a6e..d8634c88e0 100644
--- a/engines/hugo/util.h
+++ b/engines/hugo/util.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index a563bc2b4f..4cdb622501 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/animator_lok.cpp b/engines/kyra/animator_lok.cpp
index 452d5e8062..3e9dd7aa66 100644
--- a/engines/kyra/animator_lok.cpp
+++ b/engines/kyra/animator_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/animator_lok.h b/engines/kyra/animator_lok.h
index 6d22524a77..21d24866c8 100644
--- a/engines/kyra/animator_lok.h
+++ b/engines/kyra/animator_lok.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_ANIMATOR_LOK_H
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index 47c0e3b03a..6db2e45b0e 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/animator_tim.cpp b/engines/kyra/animator_tim.cpp
index fa42042bef..90f4ad89ad 100644
--- a/engines/kyra/animator_tim.cpp
+++ b/engines/kyra/animator_tim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/script_tim.h"
diff --git a/engines/kyra/animator_v2.cpp b/engines/kyra/animator_v2.cpp
index 07ff4456e5..ad7057f11a 100644
--- a/engines/kyra/animator_v2.cpp
+++ b/engines/kyra/animator_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v2.h"
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 066648b96f..d0baf8a133 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/debugger.h"
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index de45bd0aaa..70c547381e 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_DEBUGGER_H
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 87cda9f3b6..47a086e08c 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "kyra/kyra_lok.h"
@@ -82,7 +79,7 @@ public:
KyraMetaEngine() : AdvancedMetaEngine(detectionParams) {}
const char *getName() const {
- return "Legend of Kyrandia Engine";
+ return "Kyra";
}
const char *getOriginalCopyright() const {
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 5c97df8895..8a948eff00 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
namespace {
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index 849b65a24b..b9477c950a 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/gui.h"
diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h
index ff387debd6..6afdc431ed 100644
--- a/engines/kyra/gui.h
+++ b/engines/kyra/gui.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_GUI_H
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 26e0d8f18a..1666cdd0e4 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/gui_hof.h"
diff --git a/engines/kyra/gui_hof.h b/engines/kyra/gui_hof.h
index f0e693081f..a02d14e9f1 100644
--- a/engines/kyra/gui_hof.h
+++ b/engines/kyra/gui_hof.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_GUI_HOF_H
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index c31cbe3db2..eac82ec2c5 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/gui_lok.h"
diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h
index 084a798de4..4d7bfa1ada 100644
--- a/engines/kyra/gui_lok.h
+++ b/engines/kyra/gui_lok.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_GUI_LOK_H
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 2625347d50..4c4dc50503 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/gui_lol.h b/engines/kyra/gui_lol.h
index 941f52bd3d..bc49b21299 100644
--- a/engines/kyra/gui_lol.h
+++ b/engines/kyra/gui_lol.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index 6eca24fd46..25a77c6cc8 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/gui_mr.h"
diff --git a/engines/kyra/gui_mr.h b/engines/kyra/gui_mr.h
index b104626db7..9c8d79b321 100644
--- a/engines/kyra/gui_mr.h
+++ b/engines/kyra/gui_mr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_GUI_MR_H
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 01922de7cf..0b82df8cd5 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/gui_v2.h"
diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h
index 4cc52be554..0009bf8e54 100644
--- a/engines/kyra/gui_v2.h
+++ b/engines/kyra/gui_v2.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_GUI_V2_H
diff --git a/engines/kyra/item.h b/engines/kyra/item.h
index 2088f4bd8b..86b6fc7d46 100644
--- a/engines/kyra/item.h
+++ b/engines/kyra/item.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_ITEM_H
diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp
index d460698272..73aed2e067 100644
--- a/engines/kyra/items_hof.cpp
+++ b/engines/kyra/items_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp
index ed1299d239..d66eb553f2 100644
--- a/engines/kyra/items_lok.cpp
+++ b/engines/kyra/items_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index d4567ad737..b6388604f5 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp
index 5659876307..88c02f56c8 100644
--- a/engines/kyra/items_mr.cpp
+++ b/engines/kyra/items_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp
index 90b6194f0d..29dddc6772 100644
--- a/engines/kyra/items_v2.cpp
+++ b/engines/kyra/items_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v2.h"
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index de6aa55b08..9a4f7bc42e 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index 308698484d..da7486bc29 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_KYRA_HOF_H
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index a04c28cad8..ee67062cdd 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index cfa231e2d0..066c27c69a 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_KYRA_LOK_H
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 570ebe0bab..4ce5c5b2cf 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index 912c615757..0d9d66ce95 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_KYRA_MR_H
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index fb56e4a62a..75df1d148b 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v1.h"
@@ -32,12 +29,11 @@
#include "common/error.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
namespace Kyra {
KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
- : Engine(system), _flags(flags) {
+ : Engine(system), _flags(flags), _rnd("kyra") {
_res = 0;
_sound = 0;
_text = 0;
@@ -81,8 +77,6 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
DebugMan.addDebugChannel(kDebugLevelSequence, "Sequence", "Sequence debug level");
DebugMan.addDebugChannel(kDebugLevelMovie, "Movie", "Movie debug level");
DebugMan.addDebugChannel(kDebugLevelTimer, "Timer", "Timer debug level");
-
- g_eventRec.registerRandomSource(_rnd, "kyra");
}
::GUI::Debugger *KyraEngine_v1::getDebugger() {
@@ -90,7 +84,7 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
}
void KyraEngine_v1::pauseEngineIntern(bool pause) {
- Engine::pauseEngineIntern(pause);
+ _sound->pause(pause);
_timer->pause(pause);
}
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 08dc831dd9..bb533b14a5 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_KYRA_V1_H
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 16b5ffa4e8..d0f8d78bd1 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v2.h"
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 9f0aecd78c..f21458ab5d 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_KYRA_V2_H
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index ce73bffc89..9b0ae173d5 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index a3170c2193..a815fa1a37 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 22786c1c7e..bc9c93f8ca 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/resource.h"
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 9948c52001..1c69362bfd 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_RESOURCE_H
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 1dc084f14d..482bd1a5d6 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/resource_intern.h"
diff --git a/engines/kyra/resource_intern.h b/engines/kyra/resource_intern.h
index 16f3a1fe91..03c9d871e8 100644
--- a/engines/kyra/resource_intern.h
+++ b/engines/kyra/resource_intern.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_RESOURCE_INTERN_H
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index 81b3ec15ae..80182d949b 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v1.h"
diff --git a/engines/kyra/saveload_hof.cpp b/engines/kyra/saveload_hof.cpp
index 1fd6c0f3c8..b395a38acd 100644
--- a/engines/kyra/saveload_hof.cpp
+++ b/engines/kyra/saveload_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index 5af4f1d8ca..7689a904b0 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index c5240e2624..c81ace26f0 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/saveload_mr.cpp b/engines/kyra/saveload_mr.cpp
index a5e9b9e0f5..0fd3e520f9 100644
--- a/engines/kyra/saveload_mr.cpp
+++ b/engines/kyra/saveload_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp
index b44c88a0b4..197ef38bf1 100644
--- a/engines/kyra/scene_hof.cpp
+++ b/engines/kyra/scene_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp
index 6200e2ab1e..6cb3e2a98a 100644
--- a/engines/kyra/scene_lok.cpp
+++ b/engines/kyra/scene_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index ab9f89456b..305036fc51 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index 4eac4889b6..6b234d9a73 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp
index bc88377892..5319d4e657 100644
--- a/engines/kyra/scene_v1.cpp
+++ b/engines/kyra/scene_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v1.h"
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp
index 897f2e937f..fbddb6604e 100644
--- a/engines/kyra/scene_v2.cpp
+++ b/engines/kyra/scene_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v2.h"
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 20a1022b26..b4304a6de0 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/screen.h"
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index e35b9b37b2..e23f104760 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCREEN_H
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index f0af53f024..1282447411 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/screen_hof.h"
diff --git a/engines/kyra/screen_hof.h b/engines/kyra/screen_hof.h
index 5117716ac0..08a9133809 100644
--- a/engines/kyra/screen_hof.h
+++ b/engines/kyra/screen_hof.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCREEN_HOF_H
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp
index 2431cde20b..106ef5df29 100644
--- a/engines/kyra/screen_lok.cpp
+++ b/engines/kyra/screen_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/screen_lok.h"
diff --git a/engines/kyra/screen_lok.h b/engines/kyra/screen_lok.h
index 0d30c35bfd..3b74912986 100644
--- a/engines/kyra/screen_lok.h
+++ b/engines/kyra/screen_lok.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCREEN_LOK_H
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 20756e1fae..c6874ca0ed 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h
index 9f4d751d0c..926183225f 100644
--- a/engines/kyra/screen_lol.h
+++ b/engines/kyra/screen_lol.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/screen_mr.cpp b/engines/kyra/screen_mr.cpp
index 4ae52b924d..2687dc8041 100644
--- a/engines/kyra/screen_mr.cpp
+++ b/engines/kyra/screen_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/screen_mr.h"
diff --git a/engines/kyra/screen_mr.h b/engines/kyra/screen_mr.h
index c02fc4bfb2..0cb3240954 100644
--- a/engines/kyra/screen_mr.h
+++ b/engines/kyra/screen_mr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCREEN_MR_H
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 9c224d1562..64fbe2b834 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/screen_v2.h"
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index 92aeb3525d..eb8415be78 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCREEN_V2_H
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index 21dfe0bd31..b185b8ed6f 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/script.h"
diff --git a/engines/kyra/script.h b/engines/kyra/script.h
index faa80a3f21..4250732c7c 100644
--- a/engines/kyra/script.h
+++ b/engines/kyra/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCRIPT_H
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index 056319e6d4..27cfc808cc 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index 30f1138360..2b90d001ca 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 3185032218..2261ef8389 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index b3943e1aef..8ab094ac0c 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 004ceb97bb..501ae2defd 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/script_tim.h"
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index 7cf7d0a7dd..89040720c2 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SCRIPT_TIM_H
diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp
index 13fdcb7d97..b12a08a417 100644
--- a/engines/kyra/script_v1.cpp
+++ b/engines/kyra/script_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v1.h"
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 081f9dd517..2e3a3d2bc4 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v2.h"
diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp
index 16e89de146..ce2eafcea5 100644
--- a/engines/kyra/seqplayer.cpp
+++ b/engines/kyra/seqplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/seqplayer.h"
diff --git a/engines/kyra/seqplayer.h b/engines/kyra/seqplayer.h
index b75410af53..1f030cde19 100644
--- a/engines/kyra/seqplayer.h
+++ b/engines/kyra/seqplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SEQPLAYER_H
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index b268f13fc1..e504278047 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 0b39201f85..5f9bd86724 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index da1245d7e6..d11403ad9f 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/sequences_mr.cpp b/engines/kyra/sequences_mr.cpp
index d3250823c5..b3adc687c2 100644
--- a/engines/kyra/sequences_mr.cpp
+++ b/engines/kyra/sequences_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp
index 4d9cdf0d5d..fb61d7cddf 100644
--- a/engines/kyra/sequences_v2.cpp
+++ b/engines/kyra/sequences_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_v2.h"
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 1392824235..3713537afd 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -46,6 +43,10 @@ Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer)
Sound::~Sound() {
}
+void Sound::pause(bool paused) {
+ _mixer->pauseAll(paused);
+}
+
bool Sound::voiceFileIsPresent(const char *file) {
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
Common::String f = file;
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 326fef94d1..566b37ff43 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SOUND_H
@@ -104,7 +101,7 @@ public:
/**
* Load a sound file for playing music
- * (and somtimes sound effects) from.
+ * (and sometimes sound effects) from.
*/
virtual void loadSoundFile(Common::String file) = 0;
@@ -156,6 +153,11 @@ public:
*/
virtual void beginFadeOut() = 0;
+ /**
+ * Stops all audio playback when paused. Continues after end of pause.
+ */
+ virtual void pause(bool paused);
+
void enableMusic(int enable) { _musicEnabled = enable; }
int musicEnabled() const { return _musicEnabled; }
void enableSFX(bool enable) { _sfxEnabled = enable; }
@@ -278,6 +280,7 @@ public:
void stopAllSoundEffects() { _sfx->stopAllSoundEffects(); }
void beginFadeOut() { _music->beginFadeOut(); }
+ void pause(bool paused) { _music->pause(paused); _sfx->pause(paused); }
private:
Sound *_music, *_sfx;
};
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 16f6ca3eaa..75041b8161 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -34,9 +34,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $URL$
- * $Id$
- *
*/
@@ -1561,7 +1558,7 @@ int AdLibDriver::update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uin
return 0;
}
-// Apart from initialising to zero, these two functions are the only ones that
+// Apart from initializing to zero, these two functions are the only ones that
// modify _vibratoAndAMDepthBits.
int AdLibDriver::update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 value) {
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index aaca1b9138..58b97e3474 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -34,9 +34,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SOUND_ADLIB_H
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index fed21eba84..dc09670408 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/sound_intern.h"
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index 3d318b7e24..3f8eddbb0d 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/sound.h"
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 354f5732bf..2ba0890789 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SOUND_INTERN_H
@@ -74,6 +71,8 @@ public:
void stopAllSoundEffects();
void beginFadeOut();
+
+ void pause(bool paused);
private:
static void onTimer(void *data);
@@ -142,8 +141,6 @@ private:
TownsEuphonyDriver *_driver;
- Common::Mutex _mutex;
-
bool _cdaPlaying;
const uint8 *_musicFadeTable;
diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp
index 83566372bf..95a632c08c 100644
--- a/engines/kyra/sound_lok.cpp
+++ b/engines/kyra/sound_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 10d35e03d5..a7776f0ab6 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index 02ba735a70..6c003d0a11 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/sound_intern.h"
@@ -717,6 +714,26 @@ void SoundMidiPC::beginFadeOut() {
_fadeStartTime = _vm->_system->getMillis();
}
+void SoundMidiPC::pause(bool paused) {
+ // Stop all mixer related sounds
+ Sound::pause(paused);
+
+ Common::StackLock lock(_mutex);
+
+ if (paused) {
+ _music->setMidiDriver(0);
+ for (int i = 0; i < 3; i++)
+ _sfx[i]->setMidiDriver(0);
+ for (int i = 0; i < 16; i++)
+ _output->stopNotesOnChannel(i);
+ } else {
+ _music->setMidiDriver(_output);
+ for (int i = 0; i < 3; ++i)
+ _sfx[i]->setMidiDriver(_output);
+ // Possible TODO (IMHO unnecessary): restore notes and/or update _fadeStartTime
+ }
+}
+
void SoundMidiPC::onTimer(void *data) {
SoundMidiPC *midi = (SoundMidiPC *)data;
diff --git a/engines/kyra/sound_pcspk.cpp b/engines/kyra/sound_pcspk.cpp
index 46f35af3ab..051f36dd1b 100644
--- a/engines/kyra/sound_pcspk.cpp
+++ b/engines/kyra/sound_pcspk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/sound_intern.h"
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 6b30824a2f..73d435f3e5 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/sound_intern.h"
@@ -116,7 +113,7 @@ void SoundTowns::haltTrack() {
for (int i = 0x40; i < 0x46; i++)
_driver->chanVolume(i, 0);
for (int i = 0; i < 32; i++)
- _driver->chanEnable(i, 0);
+ _driver->configChan_enable(i, 0);
_driver->stopParser();
}
@@ -300,8 +297,6 @@ bool SoundTowns::loadInstruments() {
if (!twm)
return false;
- Common::StackLock lock(_mutex);
-
Screen::decodeFrame4(twm, _musicTrackData, 50570);
for (int i = 0; i < 128; i++)
_driver->loadInstrument(0, i, &_musicTrackData[i * 48 + 8]);
@@ -325,23 +320,21 @@ bool SoundTowns::loadInstruments() {
}
void SoundTowns::playEuphonyTrack(uint32 offset, int loop) {
- Common::StackLock lock(_mutex);
-
uint8 *twm = _vm->resource()->fileData("twmusic.pak", 0);
Screen::decodeFrame4(twm + 19312 + offset, _musicTrackData, 50570);
delete[] twm;
const uint8 *src = _musicTrackData + 852;
for (int i = 0; i < 32; i++)
- _driver->chanEnable(i, *src++);
+ _driver->configChan_enable(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanMode(i, *src++);
+ _driver->configChan_setMode(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanOrdr(i, *src++);
+ _driver->configChan_remap(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanVolumeShift(i, *src++);
+ _driver->configChan_adjustVolume(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanNoteShift(i, *src++);
+ _driver->configChan_setTranspose(i, *src++);
src = _musicTrackData + 1748;
for (int i = 0; i < 6; i++)
diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp
index 23775d2946..e0d1142905 100644
--- a/engines/kyra/sprites.cpp
+++ b/engines/kyra/sprites.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/sprites.h"
@@ -28,11 +25,10 @@
#include "kyra/animator_lok.h"
#include "common/system.h"
-#include "common/EventRecorder.h"
namespace Kyra {
-Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) {
+Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) : _rnd("kyraSprites") {
_vm = vm;
_res = vm->resource();
_screen = vm->screen();
@@ -43,7 +39,6 @@ Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) {
_spriteDefStart = 0;
memset(_drawLayerTable, 0, sizeof(_drawLayerTable));
_sceneAnimatorBeaconFlag = 0;
- g_eventRec.registerRandomSource(_rnd, "kyraSprites");
}
Sprites::~Sprites() {
diff --git a/engines/kyra/sprites.h b/engines/kyra/sprites.h
index f6c53e6d04..6a4241f13e 100644
--- a/engines/kyra/sprites.h
+++ b/engines/kyra/sprites.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_SPRITES_H
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index 6245ecdd1f..a77fda043c 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index f83546e0dd..499cc6f301 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/resource.h"
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index 3287ee37d6..cf75a317e1 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/resource.h"
diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp
index e0114cda29..2e3acffeb9 100644
--- a/engines/kyra/text.cpp
+++ b/engines/kyra/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/text.h"
diff --git a/engines/kyra/text.h b/engines/kyra/text.h
index c53f2d1d2f..a95c2c4abc 100644
--- a/engines/kyra/text.h
+++ b/engines/kyra/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_TEXT_H
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index c961d2bf49..393fa8d11f 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/text_hof.h"
diff --git a/engines/kyra/text_hof.h b/engines/kyra/text_hof.h
index 8e88918fa4..f371fb1898 100644
--- a/engines/kyra/text_hof.h
+++ b/engines/kyra/text_hof.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_TEXT_HOF_H
diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp
index cca8e5aaf5..0ee3574903 100644
--- a/engines/kyra/text_lok.cpp
+++ b/engines/kyra/text_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/text.h"
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index c9a77be1b2..346d5100b8 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/text_lol.h b/engines/kyra/text_lol.h
index edac131106..020d4b5e89 100644
--- a/engines/kyra/text_lol.h
+++ b/engines/kyra/text_lol.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp
index 5679dc1ee6..2cb752fdb3 100644
--- a/engines/kyra/text_mr.cpp
+++ b/engines/kyra/text_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/text_mr.h"
diff --git a/engines/kyra/text_mr.h b/engines/kyra/text_mr.h
index 5803bd0c31..957415490f 100644
--- a/engines/kyra/text_mr.h
+++ b/engines/kyra/text_mr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_TEXT_MR_H
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index 475f17cadc..9834646a45 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/timer.h"
diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h
index d85a48cfa4..e9cb8b2b0c 100644
--- a/engines/kyra/timer.h
+++ b/engines/kyra/timer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_TIMER_H
diff --git a/engines/kyra/timer_hof.cpp b/engines/kyra/timer_hof.cpp
index d8f86e30a2..96b14c28f5 100644
--- a/engines/kyra/timer_hof.cpp
+++ b/engines/kyra/timer_hof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_hof.h"
diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp
index 3a312c22c6..e1825d027d 100644
--- a/engines/kyra/timer_lok.cpp
+++ b/engines/kyra/timer_lok.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_lok.h"
diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp
index a3dab365c7..4f450f570f 100644
--- a/engines/kyra/timer_lol.cpp
+++ b/engines/kyra/timer_lol.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_LOL
diff --git a/engines/kyra/timer_mr.cpp b/engines/kyra/timer_mr.cpp
index 97ce7c166d..7d8325cd05 100644
--- a/engines/kyra/timer_mr.cpp
+++ b/engines/kyra/timer_mr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/kyra_mr.h"
diff --git a/engines/kyra/util.cpp b/engines/kyra/util.cpp
index 8fd7d4d069..3776bdc705 100644
--- a/engines/kyra/util.cpp
+++ b/engines/kyra/util.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/util.h"
diff --git a/engines/kyra/util.h b/engines/kyra/util.h
index 43a861907b..042da74cd9 100644
--- a/engines/kyra/util.h
+++ b/engines/kyra/util.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_UTIL_H
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 28071bc171..04455ae307 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Player for Kyrandia 3 VQA movies, based on the information found at
diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h
index b618b2f044..839bf5ac48 100644
--- a/engines/kyra/vqa.h
+++ b/engines/kyra/vqa.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_VQA_H
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index db324d48d4..37102744a8 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "kyra/wsamovie.h"
diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h
index f755cdd557..0d8bfdc869 100644
--- a/engines/kyra/wsamovie.h
+++ b/engines/kyra/wsamovie.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KYRA_WSAMOVIE_H
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index 2bf9bd4999..8ce73993c3 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Based on Deniz Oezmen's code: http://oezmen.eu/
diff --git a/engines/lastexpress/data/animation.h b/engines/lastexpress/data/animation.h
index 9bc2ba99cb..293511b266 100644
--- a/engines/lastexpress/data/animation.h
+++ b/engines/lastexpress/data/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ANIMATION_H
diff --git a/engines/lastexpress/data/archive.cpp b/engines/lastexpress/data/archive.cpp
index ab95c28b1e..3aa5584ca4 100644
--- a/engines/lastexpress/data/archive.cpp
+++ b/engines/lastexpress/data/archive.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Based on the Xentax Wiki documentation:
diff --git a/engines/lastexpress/data/archive.h b/engines/lastexpress/data/archive.h
index 17b1d661fa..8e0c46f183 100644
--- a/engines/lastexpress/data/archive.h
+++ b/engines/lastexpress/data/archive.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_HPFARCHIVE_H
diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp
index e8236bca86..de6fd7eeae 100644
--- a/engines/lastexpress/data/background.cpp
+++ b/engines/lastexpress/data/background.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Based on Deniz Oezmen's code and Xentax Wiki documentation
diff --git a/engines/lastexpress/data/background.h b/engines/lastexpress/data/background.h
index 994b216ff9..74dad541aa 100644
--- a/engines/lastexpress/data/background.h
+++ b/engines/lastexpress/data/background.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_BACKGROUND_H
diff --git a/engines/lastexpress/data/cursor.cpp b/engines/lastexpress/data/cursor.cpp
index fca9ed5d45..86a66b49d9 100644
--- a/engines/lastexpress/data/cursor.cpp
+++ b/engines/lastexpress/data/cursor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/data/cursor.h"
diff --git a/engines/lastexpress/data/cursor.h b/engines/lastexpress/data/cursor.h
index d23aa86a95..0e11ec04b8 100644
--- a/engines/lastexpress/data/cursor.h
+++ b/engines/lastexpress/data/cursor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_CURSOR_H
diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp
index d9acbb8382..9a60b88a25 100644
--- a/engines/lastexpress/data/font.cpp
+++ b/engines/lastexpress/data/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/data/font.h"
diff --git a/engines/lastexpress/data/font.h b/engines/lastexpress/data/font.h
index 7bcf03ed7d..7696829b3b 100644
--- a/engines/lastexpress/data/font.h
+++ b/engines/lastexpress/data/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_FONT_H
diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp
index e893d641a5..2ec8e6935d 100644
--- a/engines/lastexpress/data/scene.cpp
+++ b/engines/lastexpress/data/scene.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/data/scene.h"
diff --git a/engines/lastexpress/data/scene.h b/engines/lastexpress/data/scene.h
index 9ec1899402..0c0d12b9c0 100644
--- a/engines/lastexpress/data/scene.h
+++ b/engines/lastexpress/data/scene.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SCENE_H
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index b986a33d5c..a27c27de2e 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Based on Deniz Oezmen's code: http://oezmen.eu/
diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h
index cd16f26ab2..9987eae48e 100644
--- a/engines/lastexpress/data/sequence.h
+++ b/engines/lastexpress/data/sequence.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SEQUENCE_H
diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp
index a50fa7be08..3ffe3ca14b 100644
--- a/engines/lastexpress/data/snd.cpp
+++ b/engines/lastexpress/data/snd.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Based on the Xentax Wiki documentation:
diff --git a/engines/lastexpress/data/snd.h b/engines/lastexpress/data/snd.h
index 61d1c0951a..95a136ee1c 100644
--- a/engines/lastexpress/data/snd.h
+++ b/engines/lastexpress/data/snd.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SND_H
diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp
index 2bc5d3c5ad..c3a7397b66 100644
--- a/engines/lastexpress/data/subtitle.cpp
+++ b/engines/lastexpress/data/subtitle.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Based on the Xentax Wiki documentation:
diff --git a/engines/lastexpress/data/subtitle.h b/engines/lastexpress/data/subtitle.h
index 6d8e7535cb..435408e4bd 100644
--- a/engines/lastexpress/data/subtitle.h
+++ b/engines/lastexpress/data/subtitle.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SUBTITLE_H
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 520b4cfee3..e1bd9494a9 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/debug.h"
diff --git a/engines/lastexpress/debug.h b/engines/lastexpress/debug.h
index e935b35fc0..d9ba6f47a1 100644
--- a/engines/lastexpress/debug.h
+++ b/engines/lastexpress/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_DEBUG_H
diff --git a/engines/lastexpress/detection.cpp b/engines/lastexpress/detection.cpp
index 1cf51106c6..7c7c6b0a36 100644
--- a/engines/lastexpress/detection.cpp
+++ b/engines/lastexpress/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/lastexpress.h"
@@ -210,7 +207,7 @@ public:
LastExpressMetaEngine() : AdvancedMetaEngine(detectionParams) {}
const char *getName() const {
- return "LastExpress Engine";
+ return "Lastexpress";
}
const char *getOriginalCopyright() const {
diff --git a/engines/lastexpress/drawable.h b/engines/lastexpress/drawable.h
index e273876362..5e77b0343a 100644
--- a/engines/lastexpress/drawable.h
+++ b/engines/lastexpress/drawable.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_DRAWABLE_H
diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp
index 717bd8af9b..29bb31b248 100644
--- a/engines/lastexpress/entities/abbot.cpp
+++ b/engines/lastexpress/entities/abbot.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/abbot.h"
diff --git a/engines/lastexpress/entities/abbot.h b/engines/lastexpress/entities/abbot.h
index 7e7b78b3be..462f5a491e 100644
--- a/engines/lastexpress/entities/abbot.h
+++ b/engines/lastexpress/entities/abbot.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ABBOT_H
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index 0df76652f9..d723a5607c 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/alexei.h"
diff --git a/engines/lastexpress/entities/alexei.h b/engines/lastexpress/entities/alexei.h
index 420e6e87fc..262826ae42 100644
--- a/engines/lastexpress/entities/alexei.h
+++ b/engines/lastexpress/entities/alexei.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ALEXEI_H
diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp
index e0a082a100..715622aaab 100644
--- a/engines/lastexpress/entities/alouan.cpp
+++ b/engines/lastexpress/entities/alouan.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/alouan.h"
diff --git a/engines/lastexpress/entities/alouan.h b/engines/lastexpress/entities/alouan.h
index 33d5e2f23d..c6a6beddd9 100644
--- a/engines/lastexpress/entities/alouan.h
+++ b/engines/lastexpress/entities/alouan.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ALOUAN_H
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index 3071c3d0d7..0bedda41e8 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/anna.h"
diff --git a/engines/lastexpress/entities/anna.h b/engines/lastexpress/entities/anna.h
index 5297d6f745..72c6db4bd9 100644
--- a/engines/lastexpress/entities/anna.h
+++ b/engines/lastexpress/entities/anna.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ANNA_H
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index 27f989d7df..f7e7390b90 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/august.h"
diff --git a/engines/lastexpress/entities/august.h b/engines/lastexpress/entities/august.h
index 1a883a0ed5..2cbb31b968 100644
--- a/engines/lastexpress/entities/august.h
+++ b/engines/lastexpress/entities/august.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_AUGUST_H
diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp
index e306019f32..0b2040897c 100644
--- a/engines/lastexpress/entities/boutarel.cpp
+++ b/engines/lastexpress/entities/boutarel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/boutarel.h"
diff --git a/engines/lastexpress/entities/boutarel.h b/engines/lastexpress/entities/boutarel.h
index 0ac051df77..5eb264631c 100644
--- a/engines/lastexpress/entities/boutarel.h
+++ b/engines/lastexpress/entities/boutarel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_BOUTAREL_H
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index c2ae52a99e..1252a62d8d 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/chapters.h"
diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h
index 6a31727c23..353d3a6b5b 100644
--- a/engines/lastexpress/entities/chapters.h
+++ b/engines/lastexpress/entities/chapters.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_CHAPTERS_H
diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp
index 558401ecfd..336f911800 100644
--- a/engines/lastexpress/entities/cooks.cpp
+++ b/engines/lastexpress/entities/cooks.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/cooks.h"
diff --git a/engines/lastexpress/entities/cooks.h b/engines/lastexpress/entities/cooks.h
index fc3a0cb78c..3ab7d35161 100644
--- a/engines/lastexpress/entities/cooks.h
+++ b/engines/lastexpress/entities/cooks.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_COOKS_H
diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp
index 17adce6d58..e74471ebca 100644
--- a/engines/lastexpress/entities/coudert.cpp
+++ b/engines/lastexpress/entities/coudert.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/coudert.h"
diff --git a/engines/lastexpress/entities/coudert.h b/engines/lastexpress/entities/coudert.h
index 13dad6f122..45d13ce9bb 100644
--- a/engines/lastexpress/entities/coudert.h
+++ b/engines/lastexpress/entities/coudert.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_COUDERT_H
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index 38b3dec09f..22750989fb 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/entity.h"
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index 8c6cc2bafc..01cf17f791 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ENTITY_H
diff --git a/engines/lastexpress/entities/entity39.cpp b/engines/lastexpress/entities/entity39.cpp
index d2f7ab0d64..e786d153a0 100644
--- a/engines/lastexpress/entities/entity39.cpp
+++ b/engines/lastexpress/entities/entity39.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/entity39.h"
diff --git a/engines/lastexpress/entities/entity39.h b/engines/lastexpress/entities/entity39.h
index 344cf5b494..4335a9566e 100644
--- a/engines/lastexpress/entities/entity39.h
+++ b/engines/lastexpress/entities/entity39.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ENTITY39_H
diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h
index d196989f1d..43d7f702c9 100644
--- a/engines/lastexpress/entities/entity_intern.h
+++ b/engines/lastexpress/entities/entity_intern.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ENTITY_INTERN_H
diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp
index 088996c449..86b6820499 100644
--- a/engines/lastexpress/entities/francois.cpp
+++ b/engines/lastexpress/entities/francois.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/francois.h"
diff --git a/engines/lastexpress/entities/francois.h b/engines/lastexpress/entities/francois.h
index c924cf677b..19eca6fb50 100644
--- a/engines/lastexpress/entities/francois.h
+++ b/engines/lastexpress/entities/francois.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_FRANCOIS_H
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index 761ba0740e..f5ae191f9d 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/gendarmes.h"
diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h
index 095a74fa44..e8f9cb2c38 100644
--- a/engines/lastexpress/entities/gendarmes.h
+++ b/engines/lastexpress/entities/gendarmes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_GENDARMES_H
diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp
index 6ed93a239c..ce2c9718db 100644
--- a/engines/lastexpress/entities/hadija.cpp
+++ b/engines/lastexpress/entities/hadija.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/hadija.h"
diff --git a/engines/lastexpress/entities/hadija.h b/engines/lastexpress/entities/hadija.h
index bd37a205d9..d2495955e0 100644
--- a/engines/lastexpress/entities/hadija.h
+++ b/engines/lastexpress/entities/hadija.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_HADIJA_H
diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp
index ef6bbd32d2..35f4ccfb8c 100644
--- a/engines/lastexpress/entities/ivo.cpp
+++ b/engines/lastexpress/entities/ivo.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/ivo.h"
diff --git a/engines/lastexpress/entities/ivo.h b/engines/lastexpress/entities/ivo.h
index e726c95af0..cd5cb7b6be 100644
--- a/engines/lastexpress/entities/ivo.h
+++ b/engines/lastexpress/entities/ivo.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_IVO_H
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index b882688853..6472ce0533 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/kahina.h"
diff --git a/engines/lastexpress/entities/kahina.h b/engines/lastexpress/entities/kahina.h
index 4be9d9fb27..b25053e339 100644
--- a/engines/lastexpress/entities/kahina.h
+++ b/engines/lastexpress/entities/kahina.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_KAHINA_H
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index 66ae8be752..925b0967b7 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/kronos.h"
diff --git a/engines/lastexpress/entities/kronos.h b/engines/lastexpress/entities/kronos.h
index f73c245347..4c61b98620 100644
--- a/engines/lastexpress/entities/kronos.h
+++ b/engines/lastexpress/entities/kronos.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_KRONOS_H
diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp
index 9aa042c1ec..7d30d31a84 100644
--- a/engines/lastexpress/entities/mahmud.cpp
+++ b/engines/lastexpress/entities/mahmud.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/data/scene.h"
diff --git a/engines/lastexpress/entities/mahmud.h b/engines/lastexpress/entities/mahmud.h
index 647d48b8ed..5feb95cba5 100644
--- a/engines/lastexpress/entities/mahmud.h
+++ b/engines/lastexpress/entities/mahmud.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_MAHMUD_H
diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp
index 1aa391bda0..7e5931322d 100644
--- a/engines/lastexpress/entities/max.cpp
+++ b/engines/lastexpress/entities/max.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/max.h"
diff --git a/engines/lastexpress/entities/max.h b/engines/lastexpress/entities/max.h
index 93eb165a0f..17b58475aa 100644
--- a/engines/lastexpress/entities/max.h
+++ b/engines/lastexpress/entities/max.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_MAX_H
diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp
index de844db3e9..91082f487e 100644
--- a/engines/lastexpress/entities/mertens.cpp
+++ b/engines/lastexpress/entities/mertens.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/mertens.h"
diff --git a/engines/lastexpress/entities/mertens.h b/engines/lastexpress/entities/mertens.h
index ccce17795c..31b7a97dcd 100644
--- a/engines/lastexpress/entities/mertens.h
+++ b/engines/lastexpress/entities/mertens.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_MERTENS_H
diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp
index 01f9362f43..587c43cade 100644
--- a/engines/lastexpress/entities/milos.cpp
+++ b/engines/lastexpress/entities/milos.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/milos.h"
diff --git a/engines/lastexpress/entities/milos.h b/engines/lastexpress/entities/milos.h
index 6d44d1c4d9..d58d717f8a 100644
--- a/engines/lastexpress/entities/milos.h
+++ b/engines/lastexpress/entities/milos.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_MILOS_H
diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp
index 46f7cf40d1..78f2d2fb4b 100644
--- a/engines/lastexpress/entities/mmeboutarel.cpp
+++ b/engines/lastexpress/entities/mmeboutarel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/mmeboutarel.h"
diff --git a/engines/lastexpress/entities/mmeboutarel.h b/engines/lastexpress/entities/mmeboutarel.h
index 1f1d762dd9..772451ba15 100644
--- a/engines/lastexpress/entities/mmeboutarel.h
+++ b/engines/lastexpress/entities/mmeboutarel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_MMEBOUTAREL_H
diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp
index a75c76e0ca..7cf7f7766e 100644
--- a/engines/lastexpress/entities/pascale.cpp
+++ b/engines/lastexpress/entities/pascale.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/pascale.h"
diff --git a/engines/lastexpress/entities/pascale.h b/engines/lastexpress/entities/pascale.h
index d0098dcf0b..333ebcae3e 100644
--- a/engines/lastexpress/entities/pascale.h
+++ b/engines/lastexpress/entities/pascale.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_PASCALE_H
diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp
index a1a8b29329..1cb895d8d6 100644
--- a/engines/lastexpress/entities/rebecca.cpp
+++ b/engines/lastexpress/entities/rebecca.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/rebecca.h"
diff --git a/engines/lastexpress/entities/rebecca.h b/engines/lastexpress/entities/rebecca.h
index bdc9fe1d3b..e91ee30d4d 100644
--- a/engines/lastexpress/entities/rebecca.h
+++ b/engines/lastexpress/entities/rebecca.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_REBECCA_H
diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp
index c6be25df7d..4d510bb9bf 100644
--- a/engines/lastexpress/entities/salko.cpp
+++ b/engines/lastexpress/entities/salko.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/salko.h"
diff --git a/engines/lastexpress/entities/salko.h b/engines/lastexpress/entities/salko.h
index f21724d88a..6308211053 100644
--- a/engines/lastexpress/entities/salko.h
+++ b/engines/lastexpress/entities/salko.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SALKO_H
diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp
index 57fa4da189..1fec775659 100644
--- a/engines/lastexpress/entities/servers0.cpp
+++ b/engines/lastexpress/entities/servers0.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/servers0.h"
diff --git a/engines/lastexpress/entities/servers0.h b/engines/lastexpress/entities/servers0.h
index 3e1bd21e0d..2e9165a410 100644
--- a/engines/lastexpress/entities/servers0.h
+++ b/engines/lastexpress/entities/servers0.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SERVERS0_H
diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp
index bb3566802d..cd0a162755 100644
--- a/engines/lastexpress/entities/servers1.cpp
+++ b/engines/lastexpress/entities/servers1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/servers1.h"
diff --git a/engines/lastexpress/entities/servers1.h b/engines/lastexpress/entities/servers1.h
index 14a6bf09a6..13b30696f0 100644
--- a/engines/lastexpress/entities/servers1.h
+++ b/engines/lastexpress/entities/servers1.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SERVERS1_H
diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp
index 692c112d62..e0c63f7297 100644
--- a/engines/lastexpress/entities/sophie.cpp
+++ b/engines/lastexpress/entities/sophie.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/sophie.h"
diff --git a/engines/lastexpress/entities/sophie.h b/engines/lastexpress/entities/sophie.h
index 24a70188da..c2ca348027 100644
--- a/engines/lastexpress/entities/sophie.h
+++ b/engines/lastexpress/entities/sophie.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SOPHIE_H
diff --git a/engines/lastexpress/entities/tables.cpp b/engines/lastexpress/entities/tables.cpp
index 616188d253..c372663c40 100644
--- a/engines/lastexpress/entities/tables.cpp
+++ b/engines/lastexpress/entities/tables.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/tables.h"
diff --git a/engines/lastexpress/entities/tables.h b/engines/lastexpress/entities/tables.h
index e5fe28128b..7fcfc0499e 100644
--- a/engines/lastexpress/entities/tables.h
+++ b/engines/lastexpress/entities/tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_TABLES_H
diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp
index d9c9e8350e..6e25d8c5c7 100644
--- a/engines/lastexpress/entities/tatiana.cpp
+++ b/engines/lastexpress/entities/tatiana.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/tatiana.h"
diff --git a/engines/lastexpress/entities/tatiana.h b/engines/lastexpress/entities/tatiana.h
index 171f7d62d3..c457d49b1e 100644
--- a/engines/lastexpress/entities/tatiana.h
+++ b/engines/lastexpress/entities/tatiana.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_TATIANA_H
diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp
index 0241931bac..19c6fe279c 100644
--- a/engines/lastexpress/entities/train.cpp
+++ b/engines/lastexpress/entities/train.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/train.h"
diff --git a/engines/lastexpress/entities/train.h b/engines/lastexpress/entities/train.h
index 95cb0f28bd..ea9e1d7a07 100644
--- a/engines/lastexpress/entities/train.h
+++ b/engines/lastexpress/entities/train.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_TRAIN_H
diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp
index c203015d13..09fb5b1223 100644
--- a/engines/lastexpress/entities/vassili.cpp
+++ b/engines/lastexpress/entities/vassili.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/vassili.h"
diff --git a/engines/lastexpress/entities/vassili.h b/engines/lastexpress/entities/vassili.h
index 1862069e25..843a065174 100644
--- a/engines/lastexpress/entities/vassili.h
+++ b/engines/lastexpress/entities/vassili.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_VASSILI_H
diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp
index 9d5cf6af85..bc35a105b1 100644
--- a/engines/lastexpress/entities/verges.cpp
+++ b/engines/lastexpress/entities/verges.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/verges.h"
diff --git a/engines/lastexpress/entities/verges.h b/engines/lastexpress/entities/verges.h
index 40a43eac9d..17a3c8ac40 100644
--- a/engines/lastexpress/entities/verges.h
+++ b/engines/lastexpress/entities/verges.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_VERGES_H
diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp
index 87742e78a4..8e09dbf7b0 100644
--- a/engines/lastexpress/entities/vesna.cpp
+++ b/engines/lastexpress/entities/vesna.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/vesna.h"
diff --git a/engines/lastexpress/entities/vesna.h b/engines/lastexpress/entities/vesna.h
index 55a9a989c5..a09664096d 100644
--- a/engines/lastexpress/entities/vesna.h
+++ b/engines/lastexpress/entities/vesna.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_VESNA_H
diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp
index 2eb5c13862..7e8b2f7348 100644
--- a/engines/lastexpress/entities/yasmin.cpp
+++ b/engines/lastexpress/entities/yasmin.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/entities/yasmin.h"
diff --git a/engines/lastexpress/entities/yasmin.h b/engines/lastexpress/entities/yasmin.h
index b35c713f8b..e943a8b158 100644
--- a/engines/lastexpress/entities/yasmin.h
+++ b/engines/lastexpress/entities/yasmin.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_YASMIN_H
diff --git a/engines/lastexpress/eventhandler.h b/engines/lastexpress/eventhandler.h
index 6f28984d2c..c561d57541 100644
--- a/engines/lastexpress/eventhandler.h
+++ b/engines/lastexpress/eventhandler.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_EVENTHANDLER_H
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index d14e295cb3..7540d18ed8 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/action.h"
diff --git a/engines/lastexpress/game/action.h b/engines/lastexpress/game/action.h
index 6a2e3eb597..e1a4a53224 100644
--- a/engines/lastexpress/game/action.h
+++ b/engines/lastexpress/game/action.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ACTION_H
diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp
index 665edb79a5..cb6f0a3306 100644
--- a/engines/lastexpress/game/beetle.cpp
+++ b/engines/lastexpress/game/beetle.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/beetle.h"
diff --git a/engines/lastexpress/game/beetle.h b/engines/lastexpress/game/beetle.h
index 661618a251..d3c47f39e5 100644
--- a/engines/lastexpress/game/beetle.h
+++ b/engines/lastexpress/game/beetle.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_BEETLE_H
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index d124d8cb23..513ad114b0 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/entities.h"
diff --git a/engines/lastexpress/game/entities.h b/engines/lastexpress/game/entities.h
index 8cc2072c42..eb5eae461f 100644
--- a/engines/lastexpress/game/entities.h
+++ b/engines/lastexpress/game/entities.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_ENTITIES_H
diff --git a/engines/lastexpress/game/fight.cpp b/engines/lastexpress/game/fight.cpp
index 5777ef470b..ecc43bed2b 100644
--- a/engines/lastexpress/game/fight.cpp
+++ b/engines/lastexpress/game/fight.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/fight.h"
diff --git a/engines/lastexpress/game/fight.h b/engines/lastexpress/game/fight.h
index 4484017184..a33cc93a29 100644
--- a/engines/lastexpress/game/fight.h
+++ b/engines/lastexpress/game/fight.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_FIGHT_H
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index c4d43d53d7..adf6ff772e 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/inventory.h"
@@ -127,11 +124,6 @@ void Inventory::init() {
_selectedItem = kItemNone;
}
-// FIXME we need to draw cursors with full background opacity so that whatever is in the background is erased
-// this saved us clearing some part of the background when switching between states
-
-// TODO if we draw inventory objects on screen, we need to load a new scene.
-// Signal that the inventory has taken over the screen and stop processing mouse events after we have been called
void Inventory::handleMouseEvent(const Common::Event &ev) {
_useMagnifier = false;
@@ -180,13 +172,39 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
// Selected item
if (ev.mouse.x >= 32) {
if (_isOpened) {
- // If clicked
- if (ev.type == Common::EVENT_LBUTTONDOWN) {
- if (_highlightedItemIndex != 0) {
- error("[Inventory::handleMouseEvent] Click on highlighted item not implemented");
- }
+ // If we are currently inside inventory with the mouse pressed
+ if (getFlags()->mouseLeftPressed) {
+ if (_highlightedItemIndex)
+ drawHighlight(_highlightedItemIndex, true);
} else {
- warning("[Inventory::handleMouseEvent] Default handling of open menu not implemented");
+ // The user released the mouse button, we need to update the inventory state (clear hightlight and items)
+ drawItem((CursorStyle)getProgress().portrait, 0, 0, 1);
+ _engine->getGraphicsManager()->clear(GraphicsManager::kBackgroundInventory, Common::Rect(0, 44, 32, (int16)(40 * _itemsShown + 40)));
+ _isOpened = false;
+ askForRedraw();
+
+ drawSelectedItem();
+
+ // Load backup scene
+ if (getState()->sceneUseBackup) {
+ SceneIndex scene = kSceneNone;
+ if (getState()->sceneBackup2) {
+ scene = getState()->sceneBackup2;
+ getState()->sceneBackup2 = kSceneNone;
+
+ // Load our scene
+ getScenes()->loadScene(scene);
+ } else if (!getEvent(kEventKronosBringFirebird) && !getProgress().isEggOpen) {
+ getState()->sceneUseBackup = false;
+ scene = getState()->sceneBackup;
+
+ if (getEntities()->getPosition(getScenes()->get(scene)->car, getScenes()->get(scene)->position))
+ scene = getScenes()->processIndex(getState()->sceneBackup);
+
+ // Load our scene
+ getScenes()->loadScene(scene);
+ }
+ }
}
} else {
if (_portraitHighlighted) {
@@ -195,10 +213,30 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
_portraitHighlighted = false;
}
+ // Magnifier
if (_selectedItem != kItemNone
&& get(_selectedItem)->scene != kSceneNone
&& _selectedItemRect.contains(ev.mouse)) {
- error("[Inventory::handleMouseEvent] Default handling of selected item not implemented");
+
+ if (!getState()->sceneUseBackup || (getState()->sceneBackup2 && getFirstExaminableItem() == _selectedItem))
+ _useMagnifier = true;
+
+ if (getFlags()->mouseLeftPressed) {
+ if (getState()->sceneUseBackup) {
+ if (getState()->sceneBackup2
+ && getFirstExaminableItem() == _selectedItem) {
+ SceneIndex sceneIndex = getState()->sceneBackup2;
+ getState()->sceneBackup2 = kSceneNone;
+
+ getScenes()->loadScene(sceneIndex);
+ }
+ } else {
+ getState()->sceneBackup = getState()->scene;
+ getState()->sceneUseBackup = true;
+
+ getScenes()->loadScene(get(_selectedItem)->scene);
+ }
+ }
}
}
@@ -237,6 +275,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
// Reset items and portrait
drawItem((CursorStyle)getProgress().portrait, 0, 0, 1);
_engine->getGraphicsManager()->clear(GraphicsManager::kBackgroundInventory, Common::Rect(0, 44, 32, (int16)(40 * _itemsShown + 40)));
+ askForRedraw();
_highlightedItemIndex = 0;
_itemsShown = 0;
@@ -257,11 +296,10 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
getScenes()->loadScene(entry.scene);
}
- if (entry.field_2) {
+ if (entry.field_2)
selectItem((InventoryItem)index);
- } else {
+ else
drawSelectedItem();
- }
// Set inventory as closed (will cause a cleanup on next call)
_isOpened = false;
diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h
index 9a885438eb..b1995adce3 100644
--- a/engines/lastexpress/game/inventory.h
+++ b/engines/lastexpress/game/inventory.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_INVENTORY_H
diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp
index 83e067f67c..0911c60de0 100644
--- a/engines/lastexpress/game/logic.cpp
+++ b/engines/lastexpress/game/logic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/logic.h"
diff --git a/engines/lastexpress/game/logic.h b/engines/lastexpress/game/logic.h
index fc867d7680..8b7dcef942 100644
--- a/engines/lastexpress/game/logic.h
+++ b/engines/lastexpress/game/logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_LOGIC_H
diff --git a/engines/lastexpress/game/menu.cpp b/engines/lastexpress/game/menu.cpp
index 65b9cd9a91..f9eef26326 100644
--- a/engines/lastexpress/game/menu.cpp
+++ b/engines/lastexpress/game/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/menu.h"
diff --git a/engines/lastexpress/game/menu.h b/engines/lastexpress/game/menu.h
index 765a611c41..4b84c065cb 100644
--- a/engines/lastexpress/game/menu.h
+++ b/engines/lastexpress/game/menu.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_MENU_H
diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp
index 4f296debcb..a600075953 100644
--- a/engines/lastexpress/game/object.cpp
+++ b/engines/lastexpress/game/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/object.h"
diff --git a/engines/lastexpress/game/object.h b/engines/lastexpress/game/object.h
index 96af4f07a6..87c9d7d407 100644
--- a/engines/lastexpress/game/object.h
+++ b/engines/lastexpress/game/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_OBJECT_H
diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp
index ba9e172b2b..5d06ecab13 100644
--- a/engines/lastexpress/game/savegame.cpp
+++ b/engines/lastexpress/game/savegame.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/savegame.h"
diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h
index 5c0e0e9890..6f0408487f 100644
--- a/engines/lastexpress/game/savegame.h
+++ b/engines/lastexpress/game/savegame.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SAVELOAD_H
diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp
index 30467f8368..7ec7c241e9 100644
--- a/engines/lastexpress/game/savepoint.cpp
+++ b/engines/lastexpress/game/savepoint.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/savepoint.h"
diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h
index ca507ab8ab..a3303b4b8a 100644
--- a/engines/lastexpress/game/savepoint.h
+++ b/engines/lastexpress/game/savepoint.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SAVEPOINT_H
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index 15fe0617d8..e830b1d128 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/scenes.h"
diff --git a/engines/lastexpress/game/scenes.h b/engines/lastexpress/game/scenes.h
index b70526839f..172dde2683 100644
--- a/engines/lastexpress/game/scenes.h
+++ b/engines/lastexpress/game/scenes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SCENEMANAGER_H
diff --git a/engines/lastexpress/game/sound.cpp b/engines/lastexpress/game/sound.cpp
index 5638f75d00..81ed97481c 100644
--- a/engines/lastexpress/game/sound.cpp
+++ b/engines/lastexpress/game/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/sound.h"
@@ -39,6 +36,9 @@
namespace LastExpress {
+#define SOUNDCACHE_ENTRY_SIZE 92160
+#define SOUNDCACHE_MAX_SIZE 6
+
// Letters & messages
const char *messages[24] = {
"",
@@ -112,14 +112,20 @@ SoundManager::SoundManager(LastExpressEngine *engine) : _engine(engine), _state(
memset(&_buffer, 0, sizeof(_buffer));
memset(&_lastWarning, 0, sizeof(_lastWarning));
+ // Sound cache
+ _soundCacheData = malloc(6 * SOUNDCACHE_ENTRY_SIZE);
+
_drawSubtitles = 0;
_currentSubtitle = NULL;
}
SoundManager::~SoundManager() {
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i)
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
SAFE_DELETE(*i);
- _cache.clear();
+ _soundList.clear();
+
+ // Entries in the cache are just pointers to sound list entries
+ _soundCache.clear();
for (Common::List<SubtitleEntry *>::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i)
SAFE_DELETE(*i);
@@ -127,6 +133,8 @@ SoundManager::~SoundManager() {
_currentSubtitle = NULL;
+ free(_soundCacheData);
+
// Zero passed pointers
_engine = NULL;
}
@@ -137,11 +145,11 @@ SoundManager::~SoundManager() {
void SoundManager::handleTimer() {
Common::StackLock locker(_mutex);
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
SoundEntry *entry = (*i);
if (entry->stream == NULL) {
SAFE_DELETE(*i);
- i = _cache.reverse_erase(i);
+ i = _soundList.reverse_erase(i);
continue;
} else if (!entry->soundStream) {
entry->soundStream = new StreamedSound();
@@ -157,7 +165,7 @@ void SoundManager::handleTimer() {
//////////////////////////////////////////////////////////////////////////
void SoundManager::updateQueue() {
// TODO add mutex lock!
- //warning("Sound::unknownFunction1: not implemented!");
+ warning("Sound::updateQueue: not implemented!");
}
void SoundManager::resetQueue(SoundType type1, SoundType type2) {
@@ -166,7 +174,7 @@ void SoundManager::resetQueue(SoundType type1, SoundType type2) {
Common::StackLock locker(_mutex);
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
if ((*i)->type != type1 && (*i)->type != type2)
resetEntry(*i);
}
@@ -200,14 +208,14 @@ void SoundManager::clearQueue() {
Common::StackLock locker(_mutex);
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
SoundEntry *entry = (*i);
// Delete entry
removeEntry(entry);
SAFE_DELETE(entry);
- i = _cache.reverse_erase(i);
+ i = _soundList.reverse_erase(i);
}
updateSubtitles();
@@ -241,10 +249,11 @@ void SoundManager::setupEntry(SoundEntry *entry, Common::String name, FlagType f
setEntryType(entry, flag);
setEntryStatus(entry, flag);
- // Add entry to cache
- _cache.push_back(entry);
+ // Add entry to sound list
+ _soundList.push_back(entry);
- setupCache(entry);
+ // TODO Add entry to cache and load sound data
+ //setupCache(entry);
loadSoundData(entry, name);
}
@@ -331,15 +340,69 @@ void SoundManager::setEntryStatus(SoundEntry *entry, FlagType flag) const {
entry->status.status = (status | kSoundStatusClear4);
}
+void SoundManager::setInCache(SoundEntry *entry) {
+ entry->status.status |= kSoundStatusClear2;
+}
+
bool SoundManager::setupCache(SoundEntry *entry) {
- warning("Sound::setupCache: not implemented!");
+ if (entry->soundData)
+ return true;
+
+ if (_soundCache.size() >= SOUNDCACHE_MAX_SIZE) {
+
+ SoundEntry *cacheEntry = NULL;
+ uint32 size = 1000;
+
+ for (Common::List<SoundEntry *>::iterator i = _soundCache.begin(); i != _soundCache.end(); ++i) {
+ if (!((*i)->status.status & kSoundStatus_180)) {
+ uint32 newSize = (*i)->field_4C + ((*i)->status.status & kSoundStatusClear1);
+
+ if (newSize < size) {
+ cacheEntry = (*i);
+ size = newSize;
+ }
+ }
+ }
+
+ if (entry->field_4C <= size)
+ return false;
+
+ if (cacheEntry)
+ setInCache(cacheEntry);
+
+ // TODO: Wait until the cache entry is ready to be removed
+ while (!(cacheEntry->status.status1 & 1))
+ ;
+
+ if (cacheEntry->soundData)
+ removeFromCache(cacheEntry);
+
+ _soundCache.push_back(entry);
+ entry->soundData = (char *)_soundCacheData + SOUNDCACHE_ENTRY_SIZE * (_soundCache.size() - 1);
+ } else {
+ _soundCache.push_back(entry);
+ entry->soundData = (char *)_soundCacheData + SOUNDCACHE_ENTRY_SIZE * (_soundCache.size() - 1);
+ }
+
return true;
}
+void SoundManager::removeFromCache(SoundEntry *entry) {
+ for (Common::List<SoundEntry *>::iterator i = _soundCache.begin(); i != _soundCache.end(); ++i) {
+ if ((*i) == entry) {
+ // Remove sound buffer
+ entry->soundData = NULL;
+
+ // Remove entry from sound cache
+ i = _soundCache.reverse_erase(i);
+ }
+ }
+}
+
void SoundManager::clearStatus() {
Common::StackLock locker(_mutex);
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i)
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
(*i)->status.status |= kSoundStatusClear3;
}
@@ -502,7 +565,7 @@ void SoundManager::unknownFunction4() {
// Entry search
//////////////////////////////////////////////////////////////////////////
SoundManager::SoundEntry *SoundManager::getEntry(EntityIndex index) {
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
if ((*i)->entity == index)
return *i;
}
@@ -514,7 +577,7 @@ SoundManager::SoundEntry *SoundManager::getEntry(Common::String name) {
if (!name.contains('.'))
name += ".SND";
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
if ((*i)->name2 == name)
return *i;
}
@@ -523,7 +586,7 @@ SoundManager::SoundEntry *SoundManager::getEntry(Common::String name) {
}
SoundManager::SoundEntry *SoundManager::getEntry(SoundType type) {
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
if ((*i)->type == type)
return *i;
}
@@ -546,7 +609,7 @@ void SoundManager::saveLoadWithSerializer(Common::Serializer &s) {
// Save or load each entry data
if (s.isSaving()) {
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
SoundEntry *entry = *i;
if (entry->name2.matchString("NISSND?") && (entry->status.status & kFlagType7) != kFlag3) {
s.syncAsUint32LE(entry->status.status); // status;
@@ -587,7 +650,7 @@ uint32 SoundManager::count() {
Common::StackLock locker(_mutex);
uint32 numEntries = 0;
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i)
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
if ((*i)->name2.matchString("NISSND?"))
++numEntries;
@@ -1889,7 +1952,7 @@ void SoundManager::playLoopingSound() {
void SoundManager::stopAllSound() {
Common::StackLock locker(_mutex);
- for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i)
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
(*i)->soundStream->stop();
}
diff --git a/engines/lastexpress/game/sound.h b/engines/lastexpress/game/sound.h
index a2c69eb827..ddafc21829 100644
--- a/engines/lastexpress/game/sound.h
+++ b/engines/lastexpress/game/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SOUND_H
@@ -209,6 +206,7 @@ private:
enum SoundStatus {
kSoundStatus_20 = 0x20,
kSoundStatus_40 = 0x40,
+ kSoundStatus_180 = 0x180,
kSoundStatusRemoved = 0x200,
kSoundStatus_400 = 0x400,
@@ -250,8 +248,8 @@ private:
SoundType type; // int
//int field_8;
//int field_C;
- //int field_10;
- //int fileData;
+ int processedFrameCount;
+ void *soundData;
//int field_18;
int field_1C;
uint32 time;
@@ -265,7 +263,7 @@ private:
int field_40;
EntityIndex entity;
int field_48;
- int field_4C;
+ uint32 field_4C;
Common::String name1; //char[16];
Common::String name2; //char[16];
//int next; // offset to the next structure in the list (not used)
@@ -278,6 +276,9 @@ private:
status.status = 0;
type = kSoundTypeNone;
+ processedFrameCount = 0;
+ soundData = NULL;
+
field_1C = 0;
time = 0;
@@ -346,8 +347,10 @@ private:
// Looping sound
void playLoopingSound();
- // Sound cache
- Common::List<SoundEntry *> _cache;
+ // Sound entries
+ Common::List<SoundEntry *> _soundList; ///< List of all sound entries
+ Common::List<SoundEntry *> _soundCache; ///< List of entries with a data buffer
+ void *_soundCacheData;
SoundEntry *getEntry(EntityIndex index);
SoundEntry *getEntry(Common::String name);
@@ -356,7 +359,9 @@ private:
void setupEntry(SoundEntry *entry, Common::String name, FlagType flag, int a4);
void setEntryType(SoundEntry *entry, FlagType flag);
void setEntryStatus(SoundEntry *entry, FlagType flag) const;
+ void setInCache(SoundEntry *entry);
bool setupCache(SoundEntry *entry);
+ void removeFromCache(SoundEntry *entry);
void loadSoundData(SoundEntry *entry, Common::String name);
void updateEntry(SoundEntry *entry, uint value) const;
diff --git a/engines/lastexpress/game/state.cpp b/engines/lastexpress/game/state.cpp
index 45cb2c58ab..0cf2ddba40 100644
--- a/engines/lastexpress/game/state.cpp
+++ b/engines/lastexpress/game/state.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/game/state.h"
diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h
index 663550acc2..8f71e7d424 100644
--- a/engines/lastexpress/game/state.h
+++ b/engines/lastexpress/game/state.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_STATE_H
diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index c45baba808..abbdf2b766 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/graphics.h"
diff --git a/engines/lastexpress/graphics.h b/engines/lastexpress/graphics.h
index 5231d00f6f..7db7e88989 100644
--- a/engines/lastexpress/graphics.h
+++ b/engines/lastexpress/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_GRAPHICS_H
diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h
index f9e61b6fe6..594c8b0400 100644
--- a/engines/lastexpress/helpers.h
+++ b/engines/lastexpress/helpers.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_HELPERS_H
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index 535f5e86b7..d195fcfad3 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/lastexpress.h"
@@ -40,7 +37,6 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
#include "engines/util.h"
@@ -52,10 +48,16 @@ const char *g_entityNames[] = { "Player", "Anna", "August", "Mertens", "Coudert"
namespace LastExpress {
LastExpressEngine::LastExpressEngine(OSystem *syst, const ADGameDescription *gd) :
- Engine(syst), _gameDescription(gd), _debugger(NULL), _cursor(NULL),
- _font(NULL), _logic(NULL), _menu(NULL), _frameCounter(0), _lastFrameCount(0),
- _graphicsMan(NULL), _resMan(NULL), _sceneMan(NULL), _soundMan(NULL),
- _eventMouse(NULL), _eventTick(NULL), _eventMouseBackup(NULL), _eventTickBackup(NULL) {
+ Engine(syst), _gameDescription(gd),
+ _debugger(NULL), _cursor(NULL),
+ _font(NULL), _logic(NULL), _menu(NULL),
+ _frameCounter(0), _lastFrameCount(0),
+ _graphicsMan(NULL), _resMan(NULL),
+ _sceneMan(NULL), _soundMan(NULL),
+ _eventMouse(NULL), _eventTick(NULL),
+ _eventMouseBackup(NULL), _eventTickBackup(NULL),
+ _random("lastexpress")
+ {
// Setup mixer
syncSoundSettings();
@@ -74,8 +76,6 @@ LastExpressEngine::LastExpressEngine(OSystem *syst, const ADGameDescription *gd)
DebugMan.addDebugChannel(kLastExpressDebugLogic, "Logic", "Debug logic");
DebugMan.addDebugChannel(kLastExpressDebugScenes, "Scenes", "Debug scenes & hotspots");
DebugMan.addDebugChannel(kLastExpressDebugUnknown, "Unknown", "Debug unknown data");
-
- g_eventRec.registerRandomSource(_random, "lastexpress");
}
LastExpressEngine::~LastExpressEngine() {
diff --git a/engines/lastexpress/lastexpress.h b/engines/lastexpress/lastexpress.h
index a602e4956b..270ab655a1 100644
--- a/engines/lastexpress/lastexpress.h
+++ b/engines/lastexpress/lastexpress.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_H
diff --git a/engines/lastexpress/resource.cpp b/engines/lastexpress/resource.cpp
index dff686a503..f376a3a299 100644
--- a/engines/lastexpress/resource.cpp
+++ b/engines/lastexpress/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lastexpress/resource.h"
diff --git a/engines/lastexpress/resource.h b/engines/lastexpress/resource.h
index ea6508edc3..7dc909ab34 100644
--- a/engines/lastexpress/resource.h
+++ b/engines/lastexpress/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_RESOURCE_H
diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h
index 80e227e6a7..8cebe16d87 100644
--- a/engines/lastexpress/shared.h
+++ b/engines/lastexpress/shared.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LASTEXPRESS_SHARED_H
diff --git a/engines/lure/animseq.cpp b/engines/lure/animseq.cpp
index 9c18cb33aa..8037563677 100644
--- a/engines/lure/animseq.cpp
+++ b/engines/lure/animseq.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/animseq.h"
diff --git a/engines/lure/animseq.h b/engines/lure/animseq.h
index 3609837dba..fde1fab921 100644
--- a/engines/lure/animseq.h
+++ b/engines/lure/animseq.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_ANIMSEQ_H
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index fc2029c6c4..68410875f7 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -537,7 +534,7 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
}
// Bottle object is used as a handy hotspot holder that doesn't have any
- // tick proc behaviour that we need to worry about
+ // tick proc behavior that we need to worry about
Hotspot *hotspot = res.activateHotspot(BOTTLE_HOTSPOT_ID);
hotspot->setLayer(0xfe);
hotspot->setSize(width, height);
diff --git a/engines/lure/debugger.h b/engines/lure/debugger.h
index dd1d8b5fc6..a4d4d689c4 100644
--- a/engines/lure/debugger.h
+++ b/engines/lure/debugger.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_DEBUGGER_H
diff --git a/engines/lure/decode.cpp b/engines/lure/decode.cpp
index 5ffdcf1884..59390e6e91 100644
--- a/engines/lure/decode.cpp
+++ b/engines/lure/decode.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/decode.h"
@@ -134,7 +131,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
READ_BIT_DX
if (!bitFlag) {
- // Get the favourite color
+ // Get the favorite color
v = popTable[tableOffset];
} else {
@@ -146,7 +143,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
READ_BIT_DX
if (bitFlag) {
- // We have no favourite. Could this be a repeat?
+ // We have no favorite. Could this be a repeat?
al = dx >> 11;
READ_BITS(5);
@@ -187,7 +184,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
}
} else {
- // Fourth favourite
+ // Fourth favorite
v = popTable[tableOffset + 96];
}
@@ -196,10 +193,10 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
READ_BIT_DX
if (bitFlag) {
- // Third favourite
+ // Third favorite
v = popTable[tableOffset + 64];
} else {
- // Second favourite
+ // Second favorite
v = popTable[tableOffset + 32];
}
}
diff --git a/engines/lure/decode.h b/engines/lure/decode.h
index 9cc594df64..93f617af7e 100644
--- a/engines/lure/decode.h
+++ b/engines/lure/decode.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_DECODE_H
diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp
index dd2a702e2a..4d03148e31 100644
--- a/engines/lure/detection.cpp
+++ b/engines/lure/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -208,7 +205,7 @@ public:
LureMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Lure of the Temptress Engine";
+ return "Lure";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/lure/disk.cpp b/engines/lure/disk.cpp
index f1838e3d67..9212508be0 100644
--- a/engines/lure/disk.cpp
+++ b/engines/lure/disk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/lure/disk.h b/engines/lure/disk.h
index 79aaf80bbc..1872fbd055 100644
--- a/engines/lure/disk.h
+++ b/engines/lure/disk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_DISK_H
diff --git a/engines/lure/events.cpp b/engines/lure/events.cpp
index f56a57ca34..fe60b56658 100644
--- a/engines/lure/events.cpp
+++ b/engines/lure/events.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/lure/events.h b/engines/lure/events.h
index f04072aa0f..dd3f82fe19 100644
--- a/engines/lure/events.h
+++ b/engines/lure/events.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_EVENTS_H
diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp
index 983033281a..ab5d992bdb 100644
--- a/engines/lure/fights.cpp
+++ b/engines/lure/fights.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/fights.h"
diff --git a/engines/lure/fights.h b/engines/lure/fights.h
index 0aa44030d2..89f49d8c6d 100644
--- a/engines/lure/fights.h
+++ b/engines/lure/fights.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_FIGHT_H
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 7e13cff032..9542c35785 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/game.h"
diff --git a/engines/lure/game.h b/engines/lure/game.h
index 123ac0dca7..42818e404b 100644
--- a/engines/lure/game.h
+++ b/engines/lure/game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_GAME_H
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index 5644ef798c..97fbaa72ae 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/hotspots.h"
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h
index e9f5d56edd..a58a34456e 100644
--- a/engines/lure/hotspots.h
+++ b/engines/lure/hotspots.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_HOTSPOTS_H
diff --git a/engines/lure/intro.cpp b/engines/lure/intro.cpp
index e054408a49..ce330be7c4 100644
--- a/engines/lure/intro.cpp
+++ b/engines/lure/intro.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/lure.h"
diff --git a/engines/lure/intro.h b/engines/lure/intro.h
index f4713c562a..ad442f1564 100644
--- a/engines/lure/intro.h
+++ b/engines/lure/intro.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_INTRO_H
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index b0968c1956..3217cf039d 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/system.h"
#include "common/savefile.h"
-#include "common/EventRecorder.h"
#include "engines/util.h"
@@ -42,8 +38,8 @@ namespace Lure {
static LureEngine *int_engine = NULL;
-LureEngine::LureEngine(OSystem *system, const LureGameDescription *gameDesc): Engine(system), _gameDescription(gameDesc) {
- g_eventRec.registerRandomSource(_rnd, "lure");
+LureEngine::LureEngine(OSystem *system, const LureGameDescription *gameDesc)
+ : Engine(system), _gameDescription(gameDesc), _rnd("lure") {
DebugMan.addDebugChannel(kLureDebugScripts, "scripts", "Scripts debugging");
DebugMan.addDebugChannel(kLureDebugAnimations, "animations", "Animations debugging");
@@ -55,7 +51,7 @@ LureEngine::LureEngine(OSystem *system, const LureGameDescription *gameDesc): En
Common::Error LureEngine::init() {
int_engine = this;
- _initialised = false;
+ _initialized = false;
_saveLoadAllowed = false;
initGraphics(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT, false);
@@ -89,12 +85,12 @@ Common::Error LureEngine::init() {
_mouse = new Mouse();
_events = new Events();
_menu = new Menu();
- Surface::initialise();
+ Surface::initialize();
_room = new Room();
_fights = new FightsManager();
_gameToLoad = -1;
- _initialised = true;
+ _initialized = true;
// Setup mixer
syncSoundSettings();
@@ -106,9 +102,9 @@ LureEngine::~LureEngine() {
// Remove all of our debug levels here
DebugMan.clearAllDebugChannels();
- if (_initialised) {
- // Delete and deinitialise subsystems
- Surface::deinitialise();
+ if (_initialized) {
+ // Delete and deinitialize subsystems
+ Surface::deinitialize();
Sound.destroy();
delete _fights;
delete _room;
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index 52b785a09a..7a67c8b855 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_H
@@ -68,7 +65,7 @@ struct LureGameDescription;
class LureEngine : public Engine {
private:
- bool _initialised;
+ bool _initialized;
int _gameToLoad;
uint8 _saveVersion;
Disk *_disk;
diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h
index 0ef7a73b7e..91fb650af3 100644
--- a/engines/lure/luredefs.h
+++ b/engines/lure/luredefs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LUREDEFS_H
diff --git a/engines/lure/memory.cpp b/engines/lure/memory.cpp
index d3d5067cce..c5c28fa8bc 100644
--- a/engines/lure/memory.cpp
+++ b/engines/lure/memory.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/memory.h"
diff --git a/engines/lure/memory.h b/engines/lure/memory.h
index f51c4fc49e..05bf23a9ab 100644
--- a/engines/lure/memory.h
+++ b/engines/lure/memory.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_MEMORY_H
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index f9a78d8fc8..9919471c76 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/menu.h"
diff --git a/engines/lure/menu.h b/engines/lure/menu.h
index fcc6308375..b3016f0560 100644
--- a/engines/lure/menu.h
+++ b/engines/lure/menu.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_MENU_H
diff --git a/engines/lure/palette.cpp b/engines/lure/palette.cpp
index b08ca64dfb..3975561749 100644
--- a/engines/lure/palette.cpp
+++ b/engines/lure/palette.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/lure.h"
diff --git a/engines/lure/palette.h b/engines/lure/palette.h
index 9420079346..2af1f55973 100644
--- a/engines/lure/palette.h
+++ b/engines/lure/palette.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_PALETTE_H
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 01b0bd0d4a..fbf9f33b87 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/res.h"
@@ -348,7 +345,7 @@ void Resources::reloadData() {
}
delete mb;
- // Initialise delay list
+ // Initialize delay list
_delayList.clear(true);
// Load miscellaneous data
diff --git a/engines/lure/res.h b/engines/lure/res.h
index cd6fcde201..a0a908f53d 100644
--- a/engines/lure/res.h
+++ b/engines/lure/res.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_RES_H
@@ -117,7 +114,7 @@ public:
MemoryBlock *messagesData() { return _messagesData; }
uint16 getHotspotScript(uint16 index);
HotspotList &activeHotspots() { return _activeHotspots; }
- uint16 random() { return _rnd.getRandomNumber(65536) & 0xffff; }
+ uint16 getRandom() { return _rnd.getRandomNumber(0xffff); }
HotspotData *getHotspot(uint16 hotspotId);
Hotspot *getActiveHotspot(uint16 hotspotId);
HotspotOverrideData *getHotspotOverride(uint16 hotspotId);
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index 39beb2729e..222f55b5dc 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/disk.h"
@@ -418,7 +415,7 @@ HotspotData::HotspotData(HotspotResource *rec) {
flags2 = READ_LE_UINT16(&rec->flags2);
headerFlags = READ_LE_UINT16(&rec->hdrFlags);
- // Initialise runtime fields
+ // Initialize runtime fields
actionCtr = 0;
blockedState = BS_NONE;
blockedFlag = false;
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index 58ee3f4c02..49b6ef78ba 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_RESSTRUCT_H
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 4cefe1fabb..2cb871d73f 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/room.h"
diff --git a/engines/lure/room.h b/engines/lure/room.h
index f24136ac42..deafa28a66 100644
--- a/engines/lure/room.h
+++ b/engines/lure/room.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_ROOM_H
diff --git a/engines/lure/screen.cpp b/engines/lure/screen.cpp
index e02f492ef2..4eb6fd46a3 100644
--- a/engines/lure/screen.cpp
+++ b/engines/lure/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/screen.h"
diff --git a/engines/lure/screen.h b/engines/lure/screen.h
index 94bbab932e..2a2fa6b2f2 100644
--- a/engines/lure/screen.h
+++ b/engines/lure/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_SCREEN_H
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 20cbd328ce..22656dd3fe 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/animseq.h"
@@ -34,7 +31,6 @@
#include "lure/sound.h"
#include "common/stack.h"
#include "common/endian.h"
-#include "common/EventRecorder.h"
namespace Lure {
@@ -1131,7 +1127,7 @@ uint16 Script::execute(uint16 startOffset) {
break;
case S_OPCODE_RANDOM:
- param = r.random() >> 8; // make number between 0 to 255
+ param = r.getRandom() >> 8; // make number between 0 to 255
break;
case S_OPCODE_END:
diff --git a/engines/lure/scripts.h b/engines/lure/scripts.h
index b5b6140872..7bc8f8c950 100644
--- a/engines/lure/scripts.h
+++ b/engines/lure/scripts.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_SCRIPTS_H
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index da9e136ec3..cf28e0bb74 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/sound.h"
diff --git a/engines/lure/sound.h b/engines/lure/sound.h
index 7a894d814d..9fa9a91260 100644
--- a/engines/lure/sound.h
+++ b/engines/lure/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_SOUND_H
@@ -156,7 +153,7 @@ public:
uint sfxVolume() const { return _sfxVolume; }
// The following methods implement the external sound player module
- void musicInterface_Initialise();
+ void musicInterface_Initialize();
void musicInterface_Play(uint8 soundNumber, uint8 channelNumber, uint8 numChannels = 4);
void musicInterface_Stop(uint8 soundNumber);
bool musicInterface_CheckPlaying(uint8 soundNumber);
diff --git a/engines/lure/strings.cpp b/engines/lure/strings.cpp
index 7c3f358080..0c9f4b5352 100644
--- a/engines/lure/strings.cpp
+++ b/engines/lure/strings.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/strings.h"
diff --git a/engines/lure/strings.h b/engines/lure/strings.h
index 8dbca70813..e32921ddb6 100644
--- a/engines/lure/strings.h
+++ b/engines/lure/strings.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_STRINGS_H
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index 783401fde2..bfada8fde6 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "lure/decode.h"
@@ -36,8 +33,8 @@
namespace Lure {
-// These variables hold resources commonly used by the Surfaces, and must be initialised and freed
-// by the static Surface methods initialise and deinitailse
+// These variables hold resources commonly used by the Surfaces, and must be initialized and freed
+// by the static Surface methods initialize and deinitailse
static MemoryBlock *int_font = NULL;
static MemoryBlock *int_dialog_frame = NULL;
@@ -48,7 +45,7 @@ static const byte char8A[8] = {0x40, 0x20, 0x00, 0x90, 0x90, 0x90, 0x68, 0x00};
static const byte char8D[8] = {0x80, 0x40, 0x00, 0xc0, 0x40, 0x40, 0x60, 0x00}; // accented `i
static const byte char95[8] = {0x40, 0x20, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00}; // accented `o
-void Surface::initialise() {
+void Surface::initialize() {
Disk &disk = Disk::getReference();
int_font = disk.getEntry(FONT_RESOURCE_ID);
int_dialog_frame = disk.getEntry(DIALOG_RESOURCE_ID);
@@ -83,7 +80,7 @@ void Surface::initialise() {
}
}
-void Surface::deinitialise() {
+void Surface::deinitialize() {
delete int_font;
delete int_dialog_frame;
}
diff --git a/engines/lure/surface.h b/engines/lure/surface.h
index 9a677cf749..d56e37632b 100644
--- a/engines/lure/surface.h
+++ b/engines/lure/surface.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef LURE_SURFACE_H
@@ -52,8 +49,8 @@ public:
static void getDialogBounds(Common::Point &size, int charWidth, int numLines,
bool squashedLines = true);
- static void initialise();
- static void deinitialise();
+ static void initialize();
+ static void deinitialize();
uint16 width() { return _width; }
uint16 height() { return _height; }
diff --git a/engines/m4/actor.cpp b/engines/m4/actor.cpp
index c61c6fe7d8..80a3624475 100644
--- a/engines/m4/actor.cpp
+++ b/engines/m4/actor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/m4/actor.h b/engines/m4/actor.h
index 96299ab629..e28c522df8 100644
--- a/engines/m4/actor.h
+++ b/engines/m4/actor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_ACTOR_H
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp
index 3fe050e604..39a3f175cd 100644
--- a/engines/m4/animation.cpp
+++ b/engines/m4/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -64,9 +61,9 @@ MadsAnimation::~MadsAnimation() {
#define FILENAME_SIZE 13
/**
- * Initialises and loads the data of an animation
+ * Initializes and loads the data of an animation
*/
-void MadsAnimation::initialise(const Common::String &filename, uint16 flags, M4Surface *surface, M4Surface *depthSurface) {
+void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4Surface *surface, M4Surface *depthSurface) {
MadsPack anim(filename.c_str(), _vm);
bool madsRes = filename[0] == '*';
char buffer[20];
@@ -134,7 +131,7 @@ void MadsAnimation::initialise(const Common::String &filename, uint16 flags, M4S
if (flags & 0x100)
loadInterface(surface, depthSurface);
- // Initialise the reference list
+ // Initialize the reference list
for (int i = 0; i < spriteListCount; ++i)
_spriteListIndexes.push_back(-1);
@@ -269,7 +266,7 @@ void MadsAnimation::initialise(const Common::String &filename, uint16 flags, M4S
* Loads an animation file for display
*/
void MadsAnimation::load(const Common::String &filename, int abortTimers) {
- initialise(filename, 0, NULL, NULL);
+ initialize(filename, 0, NULL, NULL);
_messageCtr = 0;
_skipLoad = true;
@@ -282,7 +279,7 @@ void MadsAnimation::load(const Common::String &filename, int abortTimers) {
}
*/
- // Initialise miscellaneous fields
+ // Initialize miscellaneous fields
_currentFrame = 0;
_oldFrameEntry = 0;
_nextFrameTimer = _madsVm->_currentTimer;
@@ -292,7 +289,7 @@ void MadsAnimation::load(const Common::String &filename, int abortTimers) {
if (_madsVm->_scene)
_actionNouns = _madsVm->scene()->_action._action;
- // Initialise kernel message list
+ // Initialize kernel message list
for (uint i = 0; i < _messages.size(); ++i)
_messages[i].kernelMsgIndex = -1;
}
diff --git a/engines/m4/animation.h b/engines/m4/animation.h
index a7a6b57c32..68a2883241 100644
--- a/engines/m4/animation.h
+++ b/engines/m4/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_ANIMATION_H
@@ -114,7 +111,7 @@ public:
MadsAnimation(MadsM4Engine *vm, MadsView *view);
virtual ~MadsAnimation();
- virtual void initialise(const Common::String &filename, uint16 flags, M4Surface *surface, M4Surface *depthSurface);
+ virtual void initialize(const Common::String &filename, uint16 flags, M4Surface *surface, M4Surface *depthSurface);
virtual void load(const Common::String &filename, int abortTimers);
virtual void update();
virtual void setCurrentFrame(int frameNumber);
diff --git a/engines/m4/assets.cpp b/engines/m4/assets.cpp
index c4113e00d0..8ffdeb53e0 100644
--- a/engines/m4/assets.cpp
+++ b/engines/m4/assets.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/assets.h"
diff --git a/engines/m4/assets.h b/engines/m4/assets.h
index 940646b5f2..90670dde53 100644
--- a/engines/m4/assets.h
+++ b/engines/m4/assets.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_ASSETS_H
#define M4_ASSETS_H
diff --git a/engines/m4/burger_data.h b/engines/m4/burger_data.h
index c053268705..d30e546023 100644
--- a/engines/m4/burger_data.h
+++ b/engines/m4/burger_data.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_BURGER_DATA_H
diff --git a/engines/m4/compression.cpp b/engines/m4/compression.cpp
index 8fe4fbf1eb..65a25c14e3 100644
--- a/engines/m4/compression.cpp
+++ b/engines/m4/compression.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/compression.h"
@@ -47,16 +44,16 @@ bool MadsPack::isCompressed(Common::SeekableReadStream *stream) {
}
MadsPack::MadsPack(Common::SeekableReadStream *stream) {
- initialise(stream);
+ initialize(stream);
}
MadsPack::MadsPack(const char *resourceName, MadsM4Engine* vm) {
Common::SeekableReadStream *stream = vm->_resourceManager->get(resourceName);
- initialise(stream);
+ initialize(stream);
vm->_resourceManager->toss(resourceName);
}
-void MadsPack::initialise(Common::SeekableReadStream *stream) {
+void MadsPack::initialize(Common::SeekableReadStream *stream) {
if (!MadsPack::isCompressed(stream))
error("Attempted to decompress a resource that was not MadsPacked");
@@ -124,7 +121,7 @@ void FabDecompressor::decompress(const byte *srcData, int srcSize, byte *destDat
copyOfs = 0xFFFF0000;
destP = destData;
- // Initialise data fields
+ // Initialize data fields
_srcData = srcData;
_srcP = _srcData + 6;
_srcSize = srcSize;
diff --git a/engines/m4/compression.h b/engines/m4/compression.h
index 93c7d9af9e..cb0ef74eb7 100644
--- a/engines/m4/compression.h
+++ b/engines/m4/compression.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_COMPRESSION_H
@@ -48,7 +45,7 @@ private:
int _count;
int _dataOffset;
- void initialise(Common::SeekableReadStream *stream);
+ void initialize(Common::SeekableReadStream *stream);
public:
static bool isCompressed(Common::SeekableReadStream *stream);
MadsPack(Common::SeekableReadStream *stream);
diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp
index cbcaa04669..fa4ca6d121 100644
--- a/engines/m4/console.cpp
+++ b/engines/m4/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -150,12 +147,12 @@ bool Console::cmdDumpFile(int argc, const char **argv) {
DebugPrintf("If uncompress is 1, the file is uncompressed (for MADS games)\n");
} else {
if (argc == 2) {
- _vm->dumpFile(strdup(argv[1]));
+ _vm->dumpFile(argv[1], false);
} else {
if (argc == 3 && atoi(argv[2]) == 1)
- _vm->dumpFile(strdup(argv[1]), true);
+ _vm->dumpFile(argv[1], true);
else
- _vm->dumpFile(strdup(argv[1]));
+ _vm->dumpFile(argv[1], false);
}
}
return true;
@@ -270,7 +267,7 @@ bool MadsConsole::cmdObject(int argc, const char **argv) {
DebugPrintf("%2d - ", objStart);
for (uint objId = objStart; objId < MIN<uint>(_vm->globals()->getObjectsSize(), objStart + 5); ++objId) {
if (objId != objStart) DebugPrintf(", ");
- uint16 descId = _vm->globals()->getObject(objId)->descId;
+ uint16 descId = _vm->globals()->getObject(objId)->_descId;
DebugPrintf("%s", _vm->globals()->getVocab(descId));
}
@@ -300,15 +297,15 @@ bool MadsConsole::cmdObject(int argc, const char **argv) {
else {
const MadsObject *obj = _vm->globals()->getObject(objNum);
- DebugPrintf("Object #%d (%s) room=%d article=%d/%s vocabs=%d", objNum, _vm->globals()->getVocab(obj->descId),
- obj->roomNumber, (int)obj->article, englishMADSArticleList[obj->article], obj->vocabCount);
+ DebugPrintf("Object #%d (%s) room=%d article=%d/%s vocabs=%d", objNum, _vm->globals()->getVocab(obj->_descId),
+ obj->_roomNumber, (int)obj->_article, englishMADSArticleList[obj->_article], obj->_vocabCount);
- if (obj->vocabCount > 0) {
+ if (obj->_vocabCount > 0) {
DebugPrintf(" - ");
- for (int i = 0; i < obj->vocabCount; ++i) {
+ for (int i = 0; i < obj->_vocabCount; ++i) {
if (i != 0) DebugPrintf(", ");
- DebugPrintf("%s (%d)/%d,%d", _vm->globals()->getVocab(obj->vocabList[i].vocabId),
- obj->vocabList[i].vocabId, obj->vocabList[i].flags1, obj->vocabList[i].flags2);
+ DebugPrintf("%s (%d)/%d,%d", _vm->globals()->getVocab(obj->_vocabList[i].vocabId),
+ obj->_vocabList[i].vocabId, obj->_vocabList[i].flags1, obj->_vocabList[i].flags2);
}
}
DebugPrintf("\n");
diff --git a/engines/m4/console.h b/engines/m4/console.h
index 53a47dada9..fc473b6464 100644
--- a/engines/m4/console.h
+++ b/engines/m4/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_CONSOLE_H
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp
index 46c4b35b79..4630d2e2d6 100644
--- a/engines/m4/converse.cpp
+++ b/engines/m4/converse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/array.h"
diff --git a/engines/m4/converse.h b/engines/m4/converse.h
index 67ecf20424..b47e8d2a6b 100644
--- a/engines/m4/converse.h
+++ b/engines/m4/converse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_CONVERSE_H
diff --git a/engines/m4/detection.cpp b/engines/m4/detection.cpp
index e0983e3327..1aefe3d02d 100644
--- a/engines/m4/detection.cpp
+++ b/engines/m4/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -417,7 +414,7 @@ public:
M4MetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "MADS/M4 engine";
+ return "MADS/M4";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp
index bc6228658d..afe2692753 100644
--- a/engines/m4/dialogs.cpp
+++ b/engines/m4/dialogs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/dialogs.h"
diff --git a/engines/m4/dialogs.h b/engines/m4/dialogs.h
index 192ba5c23c..ea3519c9e3 100644
--- a/engines/m4/dialogs.h
+++ b/engines/m4/dialogs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_DIALOGS_H
diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp
index a9641eb542..f8225fba3e 100644
--- a/engines/m4/events.cpp
+++ b/engines/m4/events.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// TODO: There is a 'please_hyperwalk' variable that gets accessed that is meant to be global, but
diff --git a/engines/m4/events.h b/engines/m4/events.h
index 1c1418d5f8..6e7cf68555 100644
--- a/engines/m4/events.h
+++ b/engines/m4/events.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_EVENTS_H
diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp
index 582fbaebc7..d4ba714d73 100644
--- a/engines/m4/font.cpp
+++ b/engines/m4/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/font.h"
diff --git a/engines/m4/font.h b/engines/m4/font.h
index 64e54f35b5..b00a393811 100644
--- a/engines/m4/font.h
+++ b/engines/m4/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_FONT_H
diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp
index 3db9934cec..8787f89d04 100644
--- a/engines/m4/globals.cpp
+++ b/engines/m4/globals.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -526,19 +523,23 @@ void MadsObject::load(Common::SeekableReadStream *stream) {
stream->read(obj, 0x30);
// Extract object data fields
- descId = READ_LE_UINT16(&obj[0]);
- roomNumber = READ_LE_UINT16(&obj[2]);
- article = (MADSArticles)obj[4];
- vocabCount = obj[5] & 0x7f;
+ _descId = READ_LE_UINT16(&obj[0]);
+ _roomNumber = READ_LE_UINT16(&obj[2]);
+ _article = (MADSArticles)obj[4];
+ _vocabCount = obj[5] & 0x7f;
// Phantom / Dragon
- if (vocabCount > 3)
- warning("MadsObject::load(), vocab cound > 3 (it's %d)", vocabCount);
+ if (_vocabCount > 3)
+ warning("MadsObject::load(), vocab cound > 3 (it's %d)", _vocabCount);
- for (int i = 0; i < vocabCount; ++i) {
- vocabList[i].flags1 = obj[6 + i * 4];
- vocabList[i].flags2 = obj[7 + i * 4];
- vocabList[i].vocabId = READ_LE_UINT16(&obj[8 + i * 4]);
+ for (int i = 0; i < _vocabCount; ++i) {
+ _vocabList[i].flags1 = obj[6 + i * 4];
+ _vocabList[i].flags2 = obj[7 + i * 4];
+ _vocabList[i].vocabId = READ_LE_UINT16(&obj[8 + i * 4]);
}
}
+void MadsObject::setRoom(int roomNumber) {
+
+}
+
} // End of namespace M4
diff --git a/engines/m4/globals.h b/engines/m4/globals.h
index 2d90b7ba77..ae2941c169 100644
--- a/engines/m4/globals.h
+++ b/engines/m4/globals.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_GLOBALS_H
@@ -180,13 +177,14 @@ public:
MadsObject() {}
MadsObject(Common::SeekableReadStream *stream);
void load(Common::SeekableReadStream *stream);
- bool isInInventory() const { return roomNumber == PLAYER_INVENTORY; }
-
- uint16 descId;
- uint16 roomNumber;
- MADSArticles article;
- uint8 vocabCount;
- VocabEntry vocabList[3];
+ bool isInInventory() const { return _roomNumber == PLAYER_INVENTORY; }
+ void setRoom(int roomNumber);
+
+ uint16 _descId;
+ uint16 _roomNumber;
+ MADSArticles _article;
+ uint8 _vocabCount;
+ VocabEntry _vocabList[3];
};
typedef Common::Array<Common::SharedPtr<MadsObject> > MadsObjectArray;
@@ -243,63 +241,6 @@ union DataMapEntry {
typedef Common::HashMap<uint16, uint16> DataMapHash;
-enum DataMapType {BOOL, UINT16, INT, INT_FN};
-
-class DataMapWrapper {
- friend class DataMap;
-private:
- DataMapEntry _value;
- DataMapType _type;
-public:
- DataMapWrapper(bool *v) { _value.boolValue = v; _type = BOOL; }
- DataMapWrapper(uint16 *v) { _value.uint16Value = v; _type = UINT16; }
- DataMapWrapper(int16 *v) { _value.uint16Value = (uint16 *)v; _type = UINT16; }
- DataMapWrapper(int *v) { _value.intValue = v; _type = INT; }
- DataMapWrapper(IntFunctionPtr v) { _value.fnPtr = v; _type = INT_FN; }
-
- uint16 getIntValue() {
- if (_type == BOOL) return *_value.boolValue ? 0xffff : 0;
- else if (_type == UINT16) return *_value.uint16Value;
- else if (_type == INT) return *_value.intValue;
- else return _value.fnPtr();
- }
- void setIntValue(uint16 v) {
- if (_type == BOOL) *_value.boolValue = v != 0;
- else if (_type == UINT16) *_value.uint16Value = v;
- else if (_type == INT) *_value.intValue = v;
- }
-};
-
-#define MAP_DATA(V) _madsVm->globals()->_dataMap.addMapping(new DataMapWrapper(V))
-
-class DataMap {
-private:
- DataMapHash _data;
- Common::Array<DataMapWrapper *> _mapList;
-public:
- DataMap() {
- _mapList.push_back(NULL);
- }
- ~DataMap() {
- for (uint i = 1; i < _mapList.size(); ++i)
- delete _mapList[i];
- }
-
- void addMapping(DataMapWrapper *v) { _mapList.push_back(v); }
- uint16 get(uint16 index) {
- if (index < _mapList.size())
- return _mapList[index]->getIntValue();
-
- return _data[index];
- }
- void set(uint16 index, uint16 v) {
- if (index < _mapList.size())
- _mapList[index]->setIntValue(v);
- else
- _data[index] = v;
- }
-};
-
class MadsGlobals : public Globals {
private:
struct MessageItem {
@@ -328,7 +269,7 @@ public:
int previousScene;
int16 _nextSceneId;
uint16 actionNouns[3];
- DataMap _dataMap;
+ DataMapHash _dataMap;
int _difficultyLevel;
void loadMadsVocab();
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index 689a6ab8b4..786c975850 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h
index 96e81f746e..242857ba1a 100644
--- a/engines/m4/graphics.h
+++ b/engines/m4/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_GRAPHICS_H
diff --git a/engines/m4/gui.cpp b/engines/m4/gui.cpp
index 56cf96b589..6bedfa7e9b 100644
--- a/engines/m4/gui.cpp
+++ b/engines/m4/gui.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
diff --git a/engines/m4/gui.h b/engines/m4/gui.h
index 7e1c8bf070..2b673d624c 100644
--- a/engines/m4/gui.h
+++ b/engines/m4/gui.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_GUI_H
@@ -446,7 +443,7 @@ public:
GameInterfaceView(MadsM4Engine *vm, const Common::Rect &rect): View(vm, rect) {}
~GameInterfaceView() {}
- virtual void initialise() {}
+ virtual void initialize() {}
virtual void setSelectedObject(int objectNumber) {}
virtual void addObjectToInventory(int objectNumber) {}
};
diff --git a/engines/m4/hotspot.cpp b/engines/m4/hotspot.cpp
index 500464dc09..a585a9af3d 100644
--- a/engines/m4/hotspot.cpp
+++ b/engines/m4/hotspot.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/m4.h"
diff --git a/engines/m4/hotspot.h b/engines/m4/hotspot.h
index f650d5ff54..86fe21bcab 100644
--- a/engines/m4/hotspot.h
+++ b/engines/m4/hotspot.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_HOTSPOT_H
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index e88140cd26..93f5ab4cba 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
//#define SCRIPT_TEST
@@ -52,7 +49,6 @@
#include "common/error.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/EventRecorder.h"
#include "common/system.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
@@ -180,8 +176,7 @@ Common::Error MadsM4Engine::run() {
_script = new ScriptInterpreter(this);
_ws = new WoodScript(this);
//_callbacks = new Callbacks(this);
- _random = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_random, "m4");
+ _random = new Common::RandomSource("m4");
return Common::kNoError;
}
@@ -260,7 +255,7 @@ void MadsM4Engine::loadMenu(MenuType menuType, bool loadSaveFromHotkey, bool cal
#define DUMP_BUFFER_SIZE 1024
-void MadsM4Engine::dumpFile(const char* filename, bool uncompress) {
+void MadsM4Engine::dumpFile(const char *filename, bool uncompress) {
Common::DumpFile f;
byte buffer[DUMP_BUFFER_SIZE];
Common::SeekableReadStream *fileS = res()->get(filename);
@@ -535,7 +530,7 @@ Common::Error MadsEngine::run() {
//debugCN(kDebugCore, "%s\n----------\n", _globals->loadMessage(i));
if (getGameType() == GType_RexNebular) {
- MadsGameLogic::initialiseGlobals();
+ MadsGameLogic::initializeGlobals();
_scene = NULL;
loadMenu(MAIN_MENU);
diff --git a/engines/m4/m4.h b/engines/m4/m4.h
index a43f3e1387..18c3936db8 100644
--- a/engines/m4/m4.h
+++ b/engines/m4/m4.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_H
@@ -168,7 +165,7 @@ public:
ResourceManager *res() const { return _resourceManager; }
MidiPlayer *midi() { return _midi; }
Common::SaveFileManager *saveManager() { return _saveFileMan; }
- void dumpFile(const char* filename, bool uncompress = false);
+ void dumpFile(const char *filename, bool uncompress);
void eventHandler();
bool delay(int duration, bool keyAborts = true, bool clickAborts = true);
void loadMenu(MenuType menuType, bool loadSaveFromHotkey = false,
@@ -226,7 +223,7 @@ public:
void startScene(int sceneNum) {
if (!_scene) {
_scene = new MadsScene(this);
- ((MadsScene *)_scene)->initialise();
+ ((MadsScene *)_scene)->initialize();
}
_scene->show();
_scene->loadScene(101);
diff --git a/engines/m4/m4_menus.cpp b/engines/m4/m4_menus.cpp
index a20bb2660b..787d8666f6 100644
--- a/engines/m4/m4_menus.cpp
+++ b/engines/m4/m4_menus.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/algorithm.h" // for find()
diff --git a/engines/m4/m4_menus.h b/engines/m4/m4_menus.h
index ecfd778c95..9abf71e9db 100644
--- a/engines/m4/m4_menus.h
+++ b/engines/m4/m4_menus.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_M4_MENUS_H
diff --git a/engines/m4/m4_scene.cpp b/engines/m4/m4_scene.cpp
index a0d8a503ab..1a2e00e50d 100644
--- a/engines/m4/m4_scene.cpp
+++ b/engines/m4/m4_scene.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/m4/m4_scene.h b/engines/m4/m4_scene.h
index 9c2edbc06c..a0ba497cf7 100644
--- a/engines/m4/m4_scene.h
+++ b/engines/m4/m4_scene.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_M4_SCENE_H
diff --git a/engines/m4/m4_views.cpp b/engines/m4/m4_views.cpp
index 83f23edd3d..4eb84a7488 100644
--- a/engines/m4/m4_views.cpp
+++ b/engines/m4/m4_views.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/m4/m4_views.h b/engines/m4/m4_views.h
index e390904aae..4ca2a74593 100644
--- a/engines/m4/m4_views.h
+++ b/engines/m4/m4_views.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_M4_VIEWS_H
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index e7ca9cb14d..d35b31943a 100644
--- a/engines/m4/mads_anim.cpp
+++ b/engines/m4/mads_anim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -606,7 +603,7 @@ static bool tempFlag = true;//****DEBUG - Temporarily allow me to skip several i
flags |= 0x100;
_activeAnimation = new MadsAnimation(_vm, this);
- _activeAnimation->initialise(_currentLine, flags, &_backgroundSurface, &_codeSurface);
+ _activeAnimation->initialize(_currentLine, flags, &_backgroundSurface, &_codeSurface);
if (_startFrame != -1)
_activeAnimation->setCurrentFrame(_startFrame);
diff --git a/engines/m4/mads_anim.h b/engines/m4/mads_anim.h
index b33ea24071..411d575d59 100644
--- a/engines/m4/mads_anim.h
+++ b/engines/m4/mads_anim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_MADS_ANIM_H
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index 98a0d06412..b1e57bd7f3 100644
--- a/engines/m4/mads_logic.cpp
+++ b/engines/m4/mads_logic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -34,7 +31,7 @@
namespace M4 {
-void MadsGameLogic::initialiseGlobals() {
+void MadsGameLogic::initializeGlobals() {
// Clear the entire globals list
Common::set_to(&_madsVm->globals()->_globals[0], &_madsVm->globals()->_globals[TOTAL_NUM_VARIABLES], 0);
@@ -172,25 +169,81 @@ const char *MadsSceneLogic::_opcodeStrings[] = {
* This method sets up the data map with pointers to all the common game objects. This allows the script engine to
* convert game specific offsets for various fields in the original game's data segment into a generic data index
* that will be common across all the MADS games
- */
-void MadsSceneLogic::initialiseDataMap() {
+
+void MadsSceneLogic::initializeDataMap() {
// The unique order of these items must be maintained
- MAP_DATA((uint16 *)&_madsVm->scene()->_abortTimersMode2);
- MAP_DATA(&_madsVm->scene()->_abortTimers);
- MAP_DATA(&_madsVm->_player._stepEnabled);
- MAP_DATA(&_madsVm->scene()->_nextScene);
- MAP_DATA(&_madsVm->scene()->_previousScene);
- MAP_DATA(&_madsVm->_player._playerPos.x);
- MAP_DATA(&_madsVm->_player._playerPos.y);
- MAP_DATA(&_madsVm->_player._direction);
- MAP_DATA(&_madsVm->_player._visible);
- MAP_DATA(&getActiveAnimationBool);
- MAP_DATA(&getAnimationCurrentFrame);
+}
+*/
+uint32 MadsSceneLogic::getDataValue(int dataId) {
+ switch (dataId) {
+ case 1:
+ return _madsVm->scene()->_abortTimersMode2;
+ case 2:
+ return _madsVm->scene()->_abortTimers;
+ case 3:
+ return _madsVm->_player._stepEnabled ? 0xffff : 0;
+ case 4:
+ return _madsVm->scene()->_nextScene;
+ case 5:
+ return _madsVm->scene()->_previousScene;
+ case 6:
+ return _madsVm->_player._playerPos.x;
+ case 7:
+ return _madsVm->_player._playerPos.y;
+ case 8:
+ return _madsVm->_player._direction;
+ case 9:
+ return _madsVm->_player._visible ? 0xffff : 0;
+ case 10:
+ return getActiveAnimationBool();
+ case 11:
+ return getAnimationCurrentFrame();
+ default:
+ // All other data variables get stored in the hash table
+ return _madsVm->globals()->_dataMap[dataId];
+ break;
+ }
}
-DataMap &MadsSceneLogic::dataMap() {
- return _madsVm->globals()->_dataMap;
+void MadsSceneLogic::setDataValue(int dataId, uint16 dataValue) {
+ switch (dataId) {
+ case 1:
+ _madsVm->scene()->_abortTimersMode2 = (AbortTimerMode)dataValue;
+ break;
+ case 2:
+ _madsVm->scene()->_abortTimers = dataValue;
+ break;
+ case 3:
+ _madsVm->_player._stepEnabled = dataValue != 0;
+ break;
+ case 4:
+ _madsVm->scene()->_nextScene = dataValue;
+ break;
+ case 5:
+ _madsVm->scene()->_previousScene = dataValue;
+ break;
+ case 6:
+ _madsVm->_player._playerPos.x = dataValue;
+ break;
+ case 7:
+ _madsVm->_player._playerPos.y = dataValue;
+ break;
+ case 8:
+ _madsVm->_player._direction = dataValue;
+ break;
+ case 9:
+ _madsVm->_player._visible = dataValue != 0;
+ break;
+ case 10:
+ case 11:
+ error("Tried to set read only data field %d", dataId);
+ break;
+ default:
+ // All other data variables get stored in the hash table
+ _madsVm->globals()->_dataMap[dataId] = dataValue;
+ break;
+ }
}
const char *MadsSceneLogic::formAnimName(char sepChar, int16 suffixNum) {
@@ -329,7 +382,7 @@ void MadsSceneLogic::getPlayerSpritesPrefix2() {
/**
* Loads the MADS.DAT file and loads the script data for the correct game/language
*/
-void MadsSceneLogic::initialiseScripts() {
+void MadsSceneLogic::initializeScripts() {
Common::File f;
if (!f.open("mads.dat")) {
warning("Could not locate mads.dat file");
@@ -534,7 +587,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_DLOAD: { // Gets data variable
param = getParam(scriptOffset, opcode);
- uint16 v = dataMap().get(param);
+ uint16 v = getDataValue(param);
stack.push(ScriptVar(v));
break;
}
@@ -542,7 +595,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_DSTORE: { // Stores data variable
param = getParam(scriptOffset, opcode);
ScriptVar v = stack.pop();
- dataMap().set(param, v.isInt() ? v.get() : 0);
+ setDataValue(param, v.isInt() ? v.get() : 0);
break;
}
@@ -898,7 +951,7 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
// object_is_present
EXTRACT_PARAMS(1);
const MadsObject *obj = _madsVm->globals()->getObject(p[0]);
- stack.push(ScriptVar((obj->roomNumber == _madsVm->scene()->_currentScene)));
+ stack.push(ScriptVar((obj->_roomNumber == _madsVm->scene()->_currentScene)));
break;
}
@@ -925,6 +978,14 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
break;
}
+ case 26: {
+ // object_set_room
+ EXTRACT_PARAMS(2);
+ MadsObject *obj = _madsVm->globals()->getObject(p[0]);
+ obj->setRoom(p[1]);
+ break;
+ }
+
default:
error("Unknown subroutine %d called", subIndex);
break;
diff --git a/engines/m4/mads_logic.h b/engines/m4/mads_logic.h
index adafe6f93d..3132094252 100644
--- a/engines/m4/mads_logic.h
+++ b/engines/m4/mads_logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* The MADS game logic is all hard-coded into the games, although for Rex at least
* it seems to use only a fairly basic set of instructions and function calls, so it should be
* possible
@@ -88,14 +85,14 @@ private:
void getSceneSpriteSet();
void getAnimName();
- DataMap &dataMap();
+ uint32 getDataValue(int dataId);
+ void setDataValue(int dataId, uint16 dataValue);
void getCallParameters(int numParams, Common::Stack<ScriptVar> &stack, ScriptVar *callParams);
public:
MadsSceneLogic() { _scriptsData = NULL; }
~MadsSceneLogic() { delete _scriptsData; }
- void initialiseScripts();
- void initialiseDataMap();
+ void initializeScripts();
void selectScene(int sceneNum);
void setupScene();
@@ -112,7 +109,7 @@ public:
class MadsGameLogic {
public:
- static void initialiseGlobals();
+ static void initializeGlobals();
};
}
diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp
index 437e9d2a6b..fa65329d76 100644
--- a/engines/m4/mads_menus.cpp
+++ b/engines/m4/mads_menus.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -599,18 +596,18 @@ RexDialogView::RexDialogView(): View(_madsVm, Common::Rect(0, 0, _madsVm->_scree
MadsView(this) {
_screenType = VIEWID_MENU;
- // Initialise class variables
+ // Initialize class variables
_priorSceneId = _madsVm->_scene->getCurrentScene();
_dialogType = DIALOG_NONE;
// Load necessary quotes
_madsVm->globals()->loadQuoteRange(1, 48);
- initialiseLines();
- initialiseGraphics();
+ initializeLines();
+ initializeGraphics();
}
-void RexDialogView::initialiseLines() {
+void RexDialogView::initializeLines() {
// Set up a list of blank entries for use in the various dialogs
for (int i = 0; i < DIALOG_LINES_SIZE; ++i) {
DialogTextEntry rec;
@@ -625,7 +622,7 @@ void RexDialogView::initialiseLines() {
_spriteSlots[0].seqIndex = -1;
}
-void RexDialogView::initialiseGraphics() {
+void RexDialogView::initializeGraphics() {
// Set needed palette entries
_madsVm->_palette->blockRange(0, 16);
_madsVm->_palette->setEntry(10, 0, 255, 0);
diff --git a/engines/m4/mads_menus.h b/engines/m4/mads_menus.h
index a0fc6fb3bc..4d3ea5da39 100644
--- a/engines/m4/mads_menus.h
+++ b/engines/m4/mads_menus.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_MADS_MENUS_H
@@ -120,8 +117,8 @@ class RexDialogView : public View, public MadsView {
private:
int _priorSceneId;
- void initialiseLines();
- void initialiseGraphics();
+ void initializeLines();
+ void initializeGraphics();
void loadBackground();
void loadMenuSprites();
protected:
diff --git a/engines/m4/mads_player.cpp b/engines/m4/mads_player.cpp
index de09e97640..0b83b54ff5 100644
--- a/engines/m4/mads_player.cpp
+++ b/engines/m4/mads_player.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/m4.h"
diff --git a/engines/m4/mads_player.h b/engines/m4/mads_player.h
index 6a9b7b4ca1..bbeefaf3d5 100644
--- a/engines/m4/mads_player.h
+++ b/engines/m4/mads_player.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_MADS_PLAYER_H
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index 7b82480ee2..a0acbdd69d 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
@@ -97,12 +94,12 @@ void MadsScene::loadScene2(const char *aaName, int sceneNumber) {
// Load scene walk paths
loadSceneCodes(_currentScene);
- // Initialise the scene animation
+ // Initialize the scene animation
uint16 flags = 0x4100;
if (_madsVm->globals()->_config.textWindowStill)
flags |= 0x200;
- _sceneAnimation->initialise(aaName, flags, _interfaceSurface, NULL);
+ _sceneAnimation->initialize(aaName, flags, _interfaceSurface, NULL);
}
/**
@@ -116,7 +113,7 @@ void MadsScene::loadSceneTemporary() {
{0x00<<2, 0x10<<2, 0x16<<2}};
_vm->_palette->setPalette(&sysColors[0], 4, 3);
- _interfaceSurface->initialise();
+ _interfaceSurface->initialize();
loadSceneHotspots(_currentScene);
@@ -431,7 +428,29 @@ void MadsScene::doSceneStep() {
}
void MadsScene::doAction() {
- warning("TODO MadsScene::doAction");
+ AbortTimerMode mode = ABORTMODE_0;
+ _abortTimersMode2 = mode;
+
+ if ((_action._inProgress || (_abortTimers != 0)) && !_action._v8453A) {
+ _sceneLogic.doAction();
+ mode = _action._inProgress ? ABORTMODE_0 : ABORTMODE_1;
+ }
+
+ if (_screenObjects._v832EC)
+ _action._inProgress = false;
+ else {
+ if ((_action._inProgress || (_abortTimers != 0)) && (mode == ABORTMODE_0) && (_action._v8453A == mode)) {
+ // TODO: sound_fn_p();
+ mode = _action._inProgress ? ABORTMODE_0 : ABORTMODE_1;
+
+ }
+
+ if ((_action._inProgress || (_abortTimers != 0)) && (mode == ABORTMODE_0) && (_action._v8453A == mode)) {
+ // Perform a core scene-indepedant action on an object
+ // object_do_action
+ }
+ }
+
}
@@ -599,7 +618,7 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su
char buffer1[80];
const char *sceneName;
- // TODO: Initialise spriteSet / xp_list
+ // TODO: Initialize spriteSet / xp_list
if (sceneNumber > 0) {
sceneName = MADSResourceManager::getResourceName(RESPREFIX_RM, sceneNumber, ".DAT");
@@ -671,7 +690,7 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su
delete stream;
- // Initialise a copy of the surfaces if they weren't provided
+ // Initialize a copy of the surfaces if they weren't provided
bool dsFlag = false, ssFlag = false;
if (!surface) {
surface = new M4Surface(_width, _height);
@@ -867,13 +886,13 @@ void MadsInterfaceView::setFontMode(InterfaceFontMode newMode) {
}
}
-void MadsInterfaceView::initialise() {
+void MadsInterfaceView::initialize() {
// Build up the inventory list
_inventoryList.clear();
for (uint i = 0; i < _madsVm->globals()->getObjectsSize(); ++i) {
MadsObject *obj = _madsVm->globals()->getObject(i);
- if (obj->roomNumber == PLAYER_INVENTORY)
+ if (obj->_roomNumber == PLAYER_INVENTORY)
_inventoryList.push_back(i);
}
@@ -922,7 +941,7 @@ void MadsInterfaceView::setSelectedObject(int objectNumber) {
void MadsInterfaceView::addObjectToInventory(int objectNumber) {
if (_inventoryList.indexOf(objectNumber) == -1) {
- _madsVm->globals()->getObject(objectNumber)->roomNumber = PLAYER_INVENTORY;
+ _madsVm->globals()->getObject(objectNumber)->_roomNumber = PLAYER_INVENTORY;
_inventoryList.push_back(objectNumber);
}
@@ -975,7 +994,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) {
break;
const char *descStr = _madsVm->globals()->getVocab(_madsVm->globals()->getObject(
- _inventoryList[_topIndex + i])->descId);
+ _inventoryList[_topIndex + i])->_descId);
strcpy(buffer, descStr);
if ((buffer[0] >= 'a') && (buffer[0] <= 'z')) buffer[0] -= 'a' - 'A';
@@ -1005,13 +1024,13 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) {
// List the vocab actions for the currently selected object
MadsObject *obj = _madsVm->globals()->getObject(_selectedObject);
- int yIndex = MIN(_highlightedElement - VOCAB_START, obj->vocabCount - 1);
+ int yIndex = MIN(_highlightedElement - VOCAB_START, obj->_vocabCount - 1);
- for (int i = 0; i < obj->vocabCount; ++i) {
+ for (int i = 0; i < obj->_vocabCount; ++i) {
const Common::Rect r(_screenObjects[VOCAB_START + i]);
// Get the vocab description and capitalise it
- const char *descStr = _madsVm->globals()->getVocab(obj->vocabList[i].vocabId);
+ const char *descStr = _madsVm->globals()->getVocab(obj->_vocabList[i].vocabId);
strcpy(buffer, descStr);
if ((buffer[0] >= 'a') && (buffer[0] <= 'z')) buffer[0] -= 'a' - 'A';
@@ -1063,12 +1082,12 @@ bool MadsInterfaceView::onEvent(M4EventType eventType, int32 param1, int x, int
} else if ((_highlightedElement >= VOCAB_START) && (_highlightedElement < (VOCAB_START + 5))) {
// A vocab action was selected
MadsObject *obj = _madsVm->globals()->getObject(_selectedObject);
- int vocabIndex = MIN(_highlightedElement - VOCAB_START, obj->vocabCount - 1);
+ int vocabIndex = MIN(_highlightedElement - VOCAB_START, obj->_vocabCount - 1);
if (vocabIndex >= 0) {
act._actionMode = ACTMODE_OBJECT;
act._actionMode2 = ACTMODE2_2;
- act._flags1 = obj->vocabList[1].flags1;
- act._flags2 = obj->vocabList[1].flags2;
+ act._flags1 = obj->_vocabList[1].flags1;
+ act._flags2 = obj->_vocabList[1].flags2;
act._action.verbId = _selectedObject;
act._articleNumber = act._flags2;
diff --git a/engines/m4/mads_scene.h b/engines/m4/mads_scene.h
index 743719d954..9835de4daf 100644
--- a/engines/m4/mads_scene.h
+++ b/engines/m4/mads_scene.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_MADS_SCENE_H
@@ -111,9 +108,8 @@ public:
public:
MadsScene(MadsEngine *vm);
virtual ~MadsScene();
- void initialise() {
- _sceneLogic.initialiseScripts();
- _sceneLogic.initialiseDataMap();
+ void initialize() {
+ _sceneLogic.initializeScripts();
}
// Methods that differ between engines
@@ -181,7 +177,7 @@ public:
MadsInterfaceView(MadsM4Engine *vm);
~MadsInterfaceView();
- virtual void initialise();
+ virtual void initialize();
virtual void setSelectedObject(int objectNumber);
virtual void addObjectToInventory(int objectNumber);
int getSelectedObject() { return _selectedObject; }
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index 33c679c9bd..b66591a207 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/m4_views.h"
@@ -103,8 +100,8 @@ void MadsAction::set() {
int selectedObject = _madsVm->scene()->getInterface()->getSelectedObject();
MadsObject *objEntry = _madsVm->globals()->getObject(selectedObject);
- _action.objectNameId = objEntry->descId;
- _currentAction = objEntry->vocabList[_selectedRow].vocabId;
+ _action.objectNameId = objEntry->_descId;
+ _currentAction = objEntry->_vocabList[_selectedRow].vocabId;
// Set up the status text stirng
strcpy(_statusText, useStr);
@@ -122,7 +119,7 @@ void MadsAction::set() {
int selectedObject = _madsVm->scene()->getInterface()->getSelectedObject();
MadsObject *objEntry = _madsVm->globals()->getObject(selectedObject);
- _currentAction = objEntry->vocabList[_selectedRow].vocabId;
+ _currentAction = objEntry->_vocabList[_selectedRow].vocabId;
}
appendVocab(_currentAction, true);
@@ -168,7 +165,7 @@ void MadsAction::set() {
if ((_actionMode2 == ACTMODE2_2) || (_actionMode2 == ACTMODE2_5)) {
// Get name from given inventory object
int objectId = _madsVm->scene()->getInterface()->getInventoryObject(_hotspotId);
- _action.objectNameId = _madsVm->globals()->getObject(objectId)->descId;
+ _action.objectNameId = _madsVm->globals()->getObject(objectId)->_descId;
} else if (_hotspotId < hotspotCount) {
// Get name from scene hotspot
_action.objectNameId = (*_madsVm->scene()->getSceneResources().hotspots)[_hotspotId].getVocabID();
@@ -187,7 +184,7 @@ void MadsAction::set() {
if ((_v86F42 == 2) || (_v86F42 == 5)) {
int objectId = _madsVm->scene()->getInterface()->getInventoryObject(_hotspotId);
- articleNum = _madsVm->globals()->getObject(objectId)->article;
+ articleNum = _madsVm->globals()->getObject(objectId)->_article;
} else if (_v86F3A < hotspotCount) {
articleNum = (*_madsVm->scene()->getSceneResources().hotspots)[_hotspotId].getArticle();
} else {
@@ -259,7 +256,7 @@ void MadsAction::startAction() {
_madsVm->_player.moveComplete();
_inProgress = true;
- _v8453A = 0;
+ _v8453A = ABORTMODE_0;
_savedFields.selectedRow = _selectedRow;
_savedFields.articleNumber = _articleNumber;
_savedFields.actionMode = _actionMode;
@@ -274,7 +271,7 @@ void MadsAction::startAction() {
strcpy(_dialogTitle, _statusText);
if ((_savedFields.actionMode2 == ACTMODE2_4) && (savedV86F42 == 0))
- _v8453A = true;
+ _v8453A = ABORTMODE_1;
_startWalkFlag = false;
int hotspotId = -1;
diff --git a/engines/m4/mads_views.h b/engines/m4/mads_views.h
index ce5ba9c4e5..6be2283a32 100644
--- a/engines/m4/mads_views.h
+++ b/engines/m4/mads_views.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_MADS_VIEWS_H
@@ -37,7 +34,8 @@ namespace M4 {
class MadsView;
enum MadsActionMode {ACTMODE_NONE = 0, ACTMODE_VERB = 1, ACTMODE_OBJECT = 3, ACTMODE_TALK = 6};
-enum MAdsActionMode2 {ACTMODE2_0 = 0, ACTMODE2_2 = 2, ACTMODE2_4 = 4, ACTMODE2_5 = 5};
+enum MadsActionMode2 {ACTMODE2_0 = 0, ACTMODE2_2 = 2, ACTMODE2_4 = 4, ACTMODE2_5 = 5};
+enum AbortTimerMode {ABORTMODE_0 = 0, ABORTMODE_1 = 1, ABORTMODE_2 = 2};
struct ActionDetails {
int verbId;
@@ -65,7 +63,7 @@ public:
int _currentAction;
int8 _flags1, _flags2;
MadsActionMode _actionMode;
- MAdsActionMode2 _actionMode2;
+ MadsActionMode2 _actionMode2;
int _articleNumber;
bool _lookFlag;
int _selectedRow;
@@ -85,7 +83,7 @@ public:
int16 _v86F4C;
int _v83338;
bool _inProgress;
- bool _v8453A;
+ AbortTimerMode _v8453A;
public:
MadsAction(MadsView &owner);
@@ -99,8 +97,6 @@ public:
bool isAction(int verbId, int objectNameId = 0, int indirectObjectId = 0);
};
-enum AbortTimerMode {ABORTMODE_0 = 0, ABORTMODE_1 = 1, ABORTMODE_2 = 2};
-
class SpriteSlotSubset {
public:
int spriteListIndex;
@@ -450,7 +446,7 @@ protected:
public:
Animation(MadsM4Engine *vm);
virtual ~Animation();
- virtual void initialise(const Common::String &filename, uint16 flags, M4Surface *surface, M4Surface *depthSurface) = 0;
+ virtual void initialize(const Common::String &filename, uint16 flags, M4Surface *surface, M4Surface *depthSurface) = 0;
virtual void load(const Common::String &filename, int v0) = 0;
virtual void update() = 0;
virtual void setCurrentFrame(int frameNumber) = 0;
diff --git a/engines/m4/midi.cpp b/engines/m4/midi.cpp
index 24ac60c22e..bfe77828da 100644
--- a/engines/m4/midi.cpp
+++ b/engines/m4/midi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// FIXME: This is cribbed together from the SAGA music player. It needs cleanup
diff --git a/engines/m4/midi.h b/engines/m4/midi.h
index a544fb72aa..6eef907ce3 100644
--- a/engines/m4/midi.h
+++ b/engines/m4/midi.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Music class
diff --git a/engines/m4/rails.cpp b/engines/m4/rails.cpp
index 39cba9ab84..f51d81c8f4 100644
--- a/engines/m4/rails.cpp
+++ b/engines/m4/rails.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -64,9 +61,7 @@ void Rails::clearRails() {
delete tempNode;
}
- for (i = 0; i < _edges.size(); i++) {
- _edges.remove_at(i);
- }
+ _edges.clear();
for (j = _noWalkRects.begin(); j != _noWalkRects.end(); ++j)
delete (*j);
@@ -249,7 +244,7 @@ void Rails::createEdge(int32 node1, int32 node2) {
} else {
distance = SqrtF16(FixedMul(deltaX, deltaX) + FixedMul(deltaY, deltaY)) << 8;
}
- _edges.insert_at(index, (int16*)(distance >> 16));
+ _edges.insert_at(index, distance >> 16);
}
debugCN(kDebugCore, "node1 = %d, node2 = %d, valid = %d\n", node1, node2, valid);
@@ -315,7 +310,7 @@ int16 Rails::getEdgeLength(int32 node1, int32 node2) {
// Find the table entry i.e. tableWidth * node1 + node2 and then subtract
// n(n+1)/2, since only the upper triangle of the table is stored
index = (MAXRAILNODES-1)*node1 + node2 - 1 - (node1*(node1+1)>>1);
- return *_edges[index];
+ return _edges[index];
}
void Rails::disposePath(RailNode *pathStart) {
diff --git a/engines/m4/rails.h b/engines/m4/rails.h
index e3183c243f..80bb55e9de 100644
--- a/engines/m4/rails.h
+++ b/engines/m4/rails.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_RAILS_H
@@ -76,7 +73,7 @@ public:
private:
Common::Array<RailNode *> _nodes;
- Common::Array<int16 *> _edges;
+ Common::Array<int16> _edges;
Common::List<NoWalkRect *> _noWalkRects;
M4Surface *_walkCodes;
diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp
index 1946797f75..2ae29ca0bb 100644
--- a/engines/m4/resource.cpp
+++ b/engines/m4/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/m4.h"
diff --git a/engines/m4/resource.h b/engines/m4/resource.h
index eed6e6dcd9..00c54a3680 100644
--- a/engines/m4/resource.h
+++ b/engines/m4/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_RESOURCE_H
diff --git a/engines/m4/saveload.cpp b/engines/m4/saveload.cpp
index 85f0ee9947..aa35385bfe 100644
--- a/engines/m4/saveload.cpp
+++ b/engines/m4/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/m4/saveload.h b/engines/m4/saveload.h
index 132cb93f00..9b76054e65 100644
--- a/engines/m4/saveload.h
+++ b/engines/m4/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_SAVELOAD_H
diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp
index c0cbd879b2..a38be20086 100644
--- a/engines/m4/scene.cpp
+++ b/engines/m4/scene.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/m4/scene.h b/engines/m4/scene.h
index e0b28e6454..5086cc0db0 100644
--- a/engines/m4/scene.h
+++ b/engines/m4/scene.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_SCENE_H
diff --git a/engines/m4/script.cpp b/engines/m4/script.cpp
index cc60ec310d..026c025f45 100644
--- a/engines/m4/script.cpp
+++ b/engines/m4/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/m4/script.h b/engines/m4/script.h
index 32b5701419..22f07fd062 100644
--- a/engines/m4/script.h
+++ b/engines/m4/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_SCRIPT_H
diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp
index fb90cea5cc..d10dea5cad 100644
--- a/engines/m4/sound.cpp
+++ b/engines/m4/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/m4.h"
diff --git a/engines/m4/sound.h b/engines/m4/sound.h
index 8962e67dfd..99a2292d83 100644
--- a/engines/m4/sound.h
+++ b/engines/m4/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Sound class
diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp
index cef9917381..1a3228d1bb 100644
--- a/engines/m4/sprite.cpp
+++ b/engines/m4/sprite.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/rect.h"
diff --git a/engines/m4/sprite.h b/engines/m4/sprite.h
index d4e5502efd..af49d8cbaf 100644
--- a/engines/m4/sprite.h
+++ b/engines/m4/sprite.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_SPRITE_H
diff --git a/engines/m4/staticres.cpp b/engines/m4/staticres.cpp
index fc49998adb..520c0ad58e 100644
--- a/engines/m4/staticres.cpp
+++ b/engines/m4/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/staticres.h"
diff --git a/engines/m4/staticres.h b/engines/m4/staticres.h
index 80fc69fc80..e3ead3398b 100644
--- a/engines/m4/staticres.h
+++ b/engines/m4/staticres.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_STATICRES_H
diff --git a/engines/m4/viewmgr.cpp b/engines/m4/viewmgr.cpp
index 46b4b5af9d..8eb40f0f17 100644
--- a/engines/m4/viewmgr.cpp
+++ b/engines/m4/viewmgr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// TODO: Views have a _coords rect, so I'm not sure if x/y is needed in the onRefresh
diff --git a/engines/m4/viewmgr.h b/engines/m4/viewmgr.h
index 211e6087f4..bb4f76cfaa 100644
--- a/engines/m4/viewmgr.h
+++ b/engines/m4/viewmgr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_VIEWMGR_H
diff --git a/engines/m4/woodscript.cpp b/engines/m4/woodscript.cpp
index dc24548f84..42f4fbce98 100644
--- a/engines/m4/woodscript.cpp
+++ b/engines/m4/woodscript.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/woodscript.h"
diff --git a/engines/m4/woodscript.h b/engines/m4/woodscript.h
index a9a884a4b0..95033b9179 100644
--- a/engines/m4/woodscript.h
+++ b/engines/m4/woodscript.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef M4_WOODSCRIPT_H
diff --git a/engines/m4/ws_machine.cpp b/engines/m4/ws_machine.cpp
index 3a25e3c622..18a8af76a8 100644
--- a/engines/m4/ws_machine.cpp
+++ b/engines/m4/ws_machine.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/woodscript.h"
diff --git a/engines/m4/ws_sequence.cpp b/engines/m4/ws_sequence.cpp
index 3ee496da0d..01776ef6ec 100644
--- a/engines/m4/ws_sequence.cpp
+++ b/engines/m4/ws_sequence.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "m4/woodscript.h"
diff --git a/engines/made/console.cpp b/engines/made/console.cpp
index abf849d560..c835988788 100644
--- a/engines/made/console.cpp
+++ b/engines/made/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "made/console.h"
diff --git a/engines/made/console.h b/engines/made/console.h
index 6dc7541f53..8b8484cb5c 100644
--- a/engines/made/console.h
+++ b/engines/made/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_CONSOLE_H
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 4e7a0467b1..6e5a3228f3 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/made/database.h b/engines/made/database.h
index a71ba925c1..94acef98cd 100644
--- a/engines/made/database.h
+++ b/engines/made/database.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_DATABASE_H
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index 6a6a70cb30..4576e2b5ce 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -558,7 +555,7 @@ public:
MadeMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "MADE Engine";
+ return "MADE";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp
index 388ff60aa8..3ac73617c1 100644
--- a/engines/made/graphics.cpp
+++ b/engines/made/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/made/graphics.h b/engines/made/graphics.h
index bf5ec288ff..691f1127c2 100644
--- a/engines/made/graphics.h
+++ b/engines/made/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_GRAPHICS_H
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index c791b657e7..a9c4587b4c 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -18,13 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/config-manager.h"
#include "common/stream.h"
@@ -75,8 +71,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
if (!scumm_stricmp(g->gameid, gameid))
_gameId = g->id;
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "made");
+ _rnd = new Common::RandomSource("made");
_console = new MadeConsole(this);
diff --git a/engines/made/made.h b/engines/made/made.h
index 780f59e442..e9673eed3c 100644
--- a/engines/made/made.h
+++ b/engines/made/made.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_H
diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index e5bbbc3b42..146d8d6371 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// FIXME: This code is taken from SAGA and needs more work (e.g. setVolume).
diff --git a/engines/made/music.h b/engines/made/music.h
index f8f70cdad6..1a5bae3040 100644
--- a/engines/made/music.h
+++ b/engines/made/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Music class
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp
index 5ab24c1984..386d618273 100644
--- a/engines/made/pmvplayer.cpp
+++ b/engines/made/pmvplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "made/pmvplayer.h"
diff --git a/engines/made/pmvplayer.h b/engines/made/pmvplayer.h
index 8014a5a0f1..58b6eafd2b 100644
--- a/engines/made/pmvplayer.h
+++ b/engines/made/pmvplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_PMVPLAYER_H
diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp
index 2fcd7f43da..a18c719110 100644
--- a/engines/made/redreader.cpp
+++ b/engines/made/redreader.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "made/redreader.h"
diff --git a/engines/made/redreader.h b/engines/made/redreader.h
index a6e72c4e00..84181fb722 100644
--- a/engines/made/redreader.h
+++ b/engines/made/redreader.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_REDREADER_H
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index 403520bec3..246241561c 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/made/resource.h b/engines/made/resource.h
index f1aeb7a87c..8ffebfef50 100644
--- a/engines/made/resource.h
+++ b/engines/made/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_RESOURCE_H
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index 4a73ba8e38..7a8b4603dc 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "made/made.h"
diff --git a/engines/made/screen.h b/engines/made/screen.h
index e9292240a1..8485c1c4d7 100644
--- a/engines/made/screen.h
+++ b/engines/made/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_SCREEN_H
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index 7d1c3ed0a7..bdc36c87d7 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "made/made.h"
diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h
index 912eb8e0f7..793fcba2d6 100644
--- a/engines/made/screenfx.h
+++ b/engines/made/screenfx.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_SCREENFX_H
diff --git a/engines/made/script.cpp b/engines/made/script.cpp
index de196f30e0..85e1a6ec6b 100644
--- a/engines/made/script.cpp
+++ b/engines/made/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/made/script.h b/engines/made/script.h
index be719eba5f..0a7cf8e974 100644
--- a/engines/made/script.h
+++ b/engines/made/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_SCRIPT_H
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index c0a723438e..98cfb647ac 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h
index b8b2a87d19..481c131248 100644
--- a/engines/made/scriptfuncs.h
+++ b/engines/made/scriptfuncs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_SCRIPTFUNCS_H
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index 5ff1f73b05..54333eb3d4 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/made/sound.h b/engines/made/sound.h
index 0766c1040c..8358d279cf 100644
--- a/engines/made/sound.h
+++ b/engines/made/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MADE_SOUND_H
diff --git a/engines/metaengine.h b/engines/metaengine.h
index ef34506991..8eb8044b34 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef ENGINES_METAENGINE_H
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index 02548d58fc..d54e2dac6b 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/bitmap.h"
diff --git a/engines/mohawk/bitmap.h b/engines/mohawk/bitmap.h
index ea8a130dfc..74218882e8 100644
--- a/engines/mohawk/bitmap.h
+++ b/engines/mohawk/bitmap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_BITMAP_H
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 93cbe87e55..4e5b7186ff 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/console.h"
diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h
index cb0e8501cd..cdb4e1bedf 100644
--- a/engines/mohawk/console.h
+++ b/engines/mohawk/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CONSOLE_H
diff --git a/engines/mohawk/cstime.cpp b/engines/mohawk/cstime.cpp
index 46faae08f5..59bc5ad661 100644
--- a/engines/mohawk/cstime.cpp
+++ b/engines/mohawk/cstime.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cstime.h"
@@ -35,15 +32,14 @@
#include "common/config-manager.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/fs.h"
#include "common/textconsole.h"
+#include "common/system.h"
namespace Mohawk {
MohawkEngine_CSTime::MohawkEngine_CSTime(OSystem *syst, const MohawkGameDescription *gamedesc) : MohawkEngine(syst, gamedesc) {
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "cstime");
+ _rnd = new Common::RandomSource("cstime");
// If the user just copied the CD contents, the fonts are in a subdirectory.
const Common::FSNode gameDataDir(ConfMan.get("path"));
diff --git a/engines/mohawk/cstime.h b/engines/mohawk/cstime.h
index 40293916db..3a1de6a137 100644
--- a/engines/mohawk/cstime.h
+++ b/engines/mohawk/cstime.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CSTIME_H
diff --git a/engines/mohawk/cstime_cases.cpp b/engines/mohawk/cstime_cases.cpp
index c4801f822c..c0a8dfc0e3 100644
--- a/engines/mohawk/cstime_cases.cpp
+++ b/engines/mohawk/cstime_cases.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cstime_cases.h"
diff --git a/engines/mohawk/cstime_cases.h b/engines/mohawk/cstime_cases.h
index 6f7630648e..1ac9abf87e 100644
--- a/engines/mohawk/cstime_cases.h
+++ b/engines/mohawk/cstime_cases.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CSTIME_CASES_H
diff --git a/engines/mohawk/cstime_game.cpp b/engines/mohawk/cstime_game.cpp
index 66dce1da92..2e21111025 100644
--- a/engines/mohawk/cstime_game.cpp
+++ b/engines/mohawk/cstime_game.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cstime_game.h"
diff --git a/engines/mohawk/cstime_game.h b/engines/mohawk/cstime_game.h
index 661fdbaa41..88e813c999 100644
--- a/engines/mohawk/cstime_game.h
+++ b/engines/mohawk/cstime_game.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CSTIME_GAME_H
diff --git a/engines/mohawk/cstime_ui.cpp b/engines/mohawk/cstime_ui.cpp
index 106f7ea319..de7d5bde80 100644
--- a/engines/mohawk/cstime_ui.cpp
+++ b/engines/mohawk/cstime_ui.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cstime_game.h"
@@ -646,7 +643,7 @@ void CSTimeInterface::startDragging(uint16 id) {
_vm->getView()->dragFeature((NewFeature *)invObj->feature, _grabPoint, 4, dragFlags, NULL);
if (_vm->getCase()->getId() == 1 && id == 2) {
- // Hardcoded behaviour for the torch in the first case.
+ // Hardcoded behavior for the torch in the first case.
if (_vm->getCase()->getCurrScene()->getId() == 4) {
// This is the dark tomb.
// FIXME: apply torch hack
@@ -813,7 +810,7 @@ void CSTimeInterface::stopDragging() {
}
if (_vm->getCase()->getId() == 1 && _vm->getCase()->getCurrScene()->getId() == 4) {
- // Hardcoded behaviour for torches in the dark tomb, in the first case.
+ // Hardcoded behavior for torches in the dark tomb, in the first case.
if (_draggedItem == 1 && foundInvObjHotspot == 0xffff) {
// Trying to drag an unlit torch around?
_vm->addEvent(CSTimeEvent(kCSTimeEventCharStartFlapping, 0, 16352));
diff --git a/engines/mohawk/cstime_ui.h b/engines/mohawk/cstime_ui.h
index 3ec38492d7..27df7cac3e 100644
--- a/engines/mohawk/cstime_ui.h
+++ b/engines/mohawk/cstime_ui.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CSTIME_UI_H
diff --git a/engines/mohawk/cstime_view.cpp b/engines/mohawk/cstime_view.cpp
index 12d641a9ff..37c418f416 100644
--- a/engines/mohawk/cstime_view.cpp
+++ b/engines/mohawk/cstime_view.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cstime_game.h" // debugging..
diff --git a/engines/mohawk/cstime_view.h b/engines/mohawk/cstime_view.h
index 8db8794ce5..ae3283771d 100644
--- a/engines/mohawk/cstime_view.h
+++ b/engines/mohawk/cstime_view.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CSTIME_VIEW_H
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index 3327860913..f95084de8e 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
@@ -130,6 +127,13 @@ void MystCursorManager::hideCursor() {
}
void MystCursorManager::setCursor(uint16 id) {
+ // Zero means empty cursor
+ if (id == 0) {
+ static const byte emptyCursor = 0;
+ CursorMan.replaceCursor(&emptyCursor, 1, 1, 0, 0, 0);
+ return;
+ }
+
// Both Myst and Myst ME use the "MystBitmap" format for cursor images.
MohawkSurface *mhkSurface = _bmpDecoder->decodeImage(_vm->getResource(ID_WDIB, id));
Graphics::Surface *surface = mhkSurface->getSurface();
diff --git a/engines/mohawk/cursors.h b/engines/mohawk/cursors.h
index ba9700c9f9..d92b6b4285 100644
--- a/engines/mohawk/cursors.h
+++ b/engines/mohawk/cursors.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_CURSORS_H
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index c14d3327d0..6a73b28246 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -191,7 +188,7 @@ public:
MohawkMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Mohawk Engine";
+ return "Mohawk";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 36dbcbde7b..5510643d04 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Mohawk {
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 4c7e52f02f..6cb455917e 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/mohawk.h"
@@ -82,7 +79,9 @@ void PauseDialog::handleKeyDown(Common::KeyState state) {
enum {
kZipCmd = 'ZIPM',
kTransCmd = 'TRAN',
- kWaterCmd = 'WATR'
+ kWaterCmd = 'WATR',
+ kDropCmd = 'DROP',
+ kMapCmd = 'SMAP'
};
#ifdef ENABLE_MYST
@@ -90,6 +89,13 @@ enum {
MystOptionsDialog::MystOptionsDialog(MohawkEngine_Myst* vm) : GUI::OptionsDialog("", 120, 120, 360, 200), _vm(vm) {
_zipModeCheckbox = new GUI::CheckboxWidget(this, 15, 10, 300, 15, _("~Z~ip Mode Activated"), 0, kZipCmd);
_transitionsCheckbox = new GUI::CheckboxWidget(this, 15, 30, 300, 15, _("~T~ransitions Enabled"), 0, kTransCmd);
+ _dropPageButton = new GUI::ButtonWidget(this, 15, 60, 100, 25, _("~D~rop Page"), 0, kDropCmd);
+
+ // Myst ME only has maps
+ if (_vm->getFeatures() & GF_ME)
+ _showMapButton = new GUI::ButtonWidget(this, 15, 95, 100, 25, _("~S~how Map"), 0, kMapCmd);
+ else
+ _showMapButton = 0;
new GUI::ButtonWidget(this, 95, 160, 120, 25, _("~O~K"), 0, GUI::kOKCmd);
new GUI::ButtonWidget(this, 225, 160, 120, 25, _("~C~ancel"), 0, GUI::kCloseCmd);
@@ -101,6 +107,12 @@ MystOptionsDialog::~MystOptionsDialog() {
void MystOptionsDialog::open() {
Dialog::open();
+ _dropPageButton->setEnabled(_vm->_gameState->_globals.heldPage != 0);
+
+ if (_showMapButton)
+ _showMapButton->setEnabled(_vm->_scriptParser &&
+ _vm->_scriptParser->getMap());
+
_zipModeCheckbox->setState(_vm->_gameState->_globals.zipMode);
_transitionsCheckbox->setState(_vm->_gameState->_globals.transitions);
}
@@ -113,6 +125,14 @@ void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, ui
case kTransCmd:
_vm->_gameState->_globals.transitions = _transitionsCheckbox->getState();
break;
+ case kDropCmd:
+ _vm->_needsPageDrop = true;
+ close();
+ break;
+ case kMapCmd:
+ _vm->_needsShowMap = true;
+ close();
+ break;
case GUI::kCloseCmd:
close();
break;
diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h
index 106a1566fc..853ff30813 100644
--- a/engines/mohawk/dialogs.h
+++ b/engines/mohawk/dialogs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_DIALOGS_H
@@ -84,6 +81,8 @@ private:
MohawkEngine_Myst *_vm;
GUI::CheckboxWidget *_zipModeCheckbox;
GUI::CheckboxWidget *_transitionsCheckbox;
+ GUI::ButtonWidget *_dropPageButton;
+ GUI::ButtonWidget *_showMapButton;
};
#endif
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index a1bcb55f7b..b3653b1fdf 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/resource.h"
@@ -296,6 +293,9 @@ MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : GraphicsManager(), _vm(vm) {
// Initialize our buffer
_backBuffer = new Graphics::Surface();
_backBuffer->create(_vm->_system->getWidth(), _vm->_system->getHeight(), _pixelFormat);
+
+ _nextAllowedDrawTime = _vm->_system->getMillis();
+ _enableDrawingTimeSimulation = 0;
}
MystGraphics::~MystGraphics() {
@@ -447,6 +447,8 @@ void MystGraphics::copyImageSectionToScreen(uint16 image, Common::Rect src, Comm
debug(3, "\twidth: %d", width);
debug(3, "\theight: %d", height);
+ simulatePreviousDrawDelay(dest);
+
_vm->_system->copyRectToScreen((byte *)surface->getBasePtr(src.left, top), surface->pitch, dest.left, dest.top, width, height);
}
@@ -502,10 +504,18 @@ void MystGraphics::copyImageToBackBuffer(uint16 image, Common::Rect dest) {
void MystGraphics::copyBackBufferToScreen(Common::Rect r) {
r.clip(_viewport);
+
+ simulatePreviousDrawDelay(r);
+
_vm->_system->copyRectToScreen((byte *)_backBuffer->getBasePtr(r.left, r.top), _backBuffer->pitch, r.left, r.top, r.width(), r.height());
}
void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, uint16 delay) {
+
+ // Do not artificially delay during transitions
+ int oldEnableDrawingTimeSimulation = _enableDrawingTimeSimulation;
+ _enableDrawingTimeSimulation = 0;
+
switch (type) {
case 0: {
debugC(kDebugScript, "Left to Right");
@@ -607,6 +617,8 @@ void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, u
_vm->_system->updateScreen();
break;
}
+
+ _enableDrawingTimeSimulation = oldEnableDrawingTimeSimulation;
}
void MystGraphics::drawRect(Common::Rect rect, RectState state) {
@@ -632,6 +644,34 @@ void MystGraphics::drawLine(const Common::Point &p1, const Common::Point &p2, ui
_backBuffer->drawLine(p1.x, p1.y, p2.x, p2.y, color);
}
+void MystGraphics::enableDrawingTimeSimulation(bool enable) {
+ if (enable)
+ _enableDrawingTimeSimulation++;
+ else
+ _enableDrawingTimeSimulation--;
+
+ if (_enableDrawingTimeSimulation < 0)
+ _enableDrawingTimeSimulation = 0;
+}
+
+void MystGraphics::simulatePreviousDrawDelay(const Common::Rect &dest) {
+ uint32 time = 0;
+
+ if (_enableDrawingTimeSimulation) {
+ time = _vm->_system->getMillis();
+
+ // Do not draw anything new too quickly after the previous draw call
+ // so that images stay at least a little while on screen
+ // This is enabled only for scripted draw calls
+ if (time < _nextAllowedDrawTime)
+ _vm->_system->delayMillis(_nextAllowedDrawTime - time);
+ }
+
+ // Next draw call allowed at DELAY + AERA * COEFF milliseconds from now
+ time = _vm->_system->getMillis();
+ _nextAllowedDrawTime = time + _constantDrawDelay + dest.height() * dest.width() / _proportionalDrawDelay;
+}
+
#endif // ENABLE_MYST
#ifdef ENABLE_RIVEN
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index c7e9b98d49..d7057f48cf 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_GRAPHICS_H
@@ -131,10 +128,12 @@ public:
void runTransition(uint16 type, Common::Rect rect, uint16 steps, uint16 delay);
void drawRect(Common::Rect rect, RectState state);
void drawLine(const Common::Point &p1, const Common::Point &p2, uint32 color);
+ void enableDrawingTimeSimulation(bool enable);
protected:
MohawkSurface *decodeImage(uint16 id);
MohawkEngine *getVM() { return (MohawkEngine *)_vm; }
+ void simulatePreviousDrawDelay(const Common::Rect &dest);
private:
MohawkEngine_Myst *_vm;
@@ -159,6 +158,11 @@ private:
Graphics::Surface *_backBuffer;
Graphics::PixelFormat _pixelFormat;
Common::Rect _viewport;
+
+ int _enableDrawingTimeSimulation;
+ uint32 _nextAllowedDrawTime;
+ static const uint _constantDrawDelay = 10; // ms
+ static const uint _proportionalDrawDelay = 500; // pixels per ms
};
#endif // ENABLE_MYST
diff --git a/engines/mohawk/installer_archive.cpp b/engines/mohawk/installer_archive.cpp
index 5079375896..83796158a6 100644
--- a/engines/mohawk/installer_archive.cpp
+++ b/engines/mohawk/installer_archive.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/installer_archive.h"
diff --git a/engines/mohawk/installer_archive.h b/engines/mohawk/installer_archive.h
index d33fbe5bcd..27877d69f9 100644
--- a/engines/mohawk/installer_archive.h
+++ b/engines/mohawk/installer_archive.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 2475965812..375806cda4 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/livingbooks.h"
@@ -31,10 +28,10 @@
#include "common/config-manager.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/fs.h"
#include "common/archive.h"
#include "common/textconsole.h"
+#include "common/system.h"
#include "graphics/palette.h"
@@ -128,8 +125,7 @@ MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGa
_alreadyShowedIntro = false;
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "livingbooks");
+ _rnd = new Common::RandomSource("livingbooks");
_page = NULL;
@@ -293,6 +289,15 @@ void MohawkEngine_LivingBooks::loadBookInfo(const Common::String &filename) {
// - fUse254ColorPalette (always true?)
// - nKBRequired (4096, RAM requirement?)
// - fDebugWindow (always 0?)
+
+ if (_bookInfoFile.hasSection("Globals")) {
+ const Common::ConfigFile::SectionKeyList globals = _bookInfoFile.getKeys("Globals");
+ for (Common::ConfigFile::SectionKeyList::const_iterator i = globals.begin(); i != globals.end(); i++) {
+ Common::String command = Common::String::format("%s = %s", i->key.c_str(), i->value.c_str());
+ debug("global: %s", command.c_str());
+ // TODO: run command
+ }
+ }
}
Common::String MohawkEngine_LivingBooks::stringForMode(LBMode mode) {
@@ -746,6 +751,9 @@ void LBPage::loadBITL(uint16 resourceId) {
case kLBMiniGameItem:
res = new LBMiniGameItem(_vm, this, rect);
break;
+ case kLBProxyItem:
+ res = new LBProxyItem(_vm, this, rect);
+ break;
default:
warning("Unknown item type %04x", type);
case 3: // often used for buttons
@@ -2700,10 +2708,20 @@ int LBItem::runScriptEntry(LBScriptEntry *entry) {
break;
case kLBOpLoad:
+ // FIXME
+ warning("ignoring kLBOpLoad (event 0x%04x, param 0x%04x, target '%s')",
+ entry->event, entry->param, target->_desc.c_str());
+ break;
+
case kLBOpPreload:
+ // FIXME
+ warning("ignoring kLBOpPreload (event 0x%04x, param 0x%04x, target '%s')",
+ entry->event, entry->param, target->_desc.c_str());
+ break;
+
case kLBOpUnload:
// FIXME
- warning("ignoring kLBOpLoad/Preload/Unload (event 0x%04x, param 0x%04x, target '%s')",
+ warning("ignoring kLBOpUnload (event 0x%04x, param 0x%04x, target '%s')",
entry->event, entry->param, target->_desc.c_str());
break;
@@ -3748,4 +3766,35 @@ bool LBMiniGameItem::togglePlaying(bool playing, bool restart) {
return false;
}
+LBProxyItem::LBProxyItem(MohawkEngine_LivingBooks *vm, LBPage *page, Common::Rect rect) : LBItem(vm, page, rect) {
+ debug(3, "new LBProxyItem");
+
+ _page = NULL;
+}
+
+LBProxyItem::~LBProxyItem() {
+ delete _page;
+}
+
+void LBProxyItem::init() {
+ Common::String leftover;
+ Common::String filename = _vm->getFileNameFromConfig("Proxies", _desc.c_str(), leftover);
+ if (!leftover.empty())
+ error("LBProxyItem tried loading proxy '%s' but got leftover '%s'", _desc.c_str(), leftover.c_str());
+ uint16 baseId = 0;
+ for (uint i = 0; i < filename.size(); i++) {
+ if (filename[i] == ';') {
+ baseId = atoi(filename.c_str() + i + 1);
+ filename = Common::String(filename.c_str(), i);
+ }
+ }
+
+ debug(1, "LBProxyItem loading archive '%s' with id %d", filename.c_str(), baseId);
+ MohawkArchive *pageArchive = _vm->createMohawkArchive();
+ if (!pageArchive->open(filename))
+ error("failed to open archive '%s' (for proxy '%s')", filename.c_str(), _desc.c_str());
+ _page = new LBPage(_vm);
+ _page->open(pageArchive, baseId);
+}
+
} // End of namespace Mohawk
diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h
index cd3b206d57..de84b0f13f 100644
--- a/engines/mohawk/livingbooks.h
+++ b/engines/mohawk/livingbooks.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_LIVINGBOOKS_H
@@ -574,6 +571,17 @@ public:
bool togglePlaying(bool playing, bool restart);
};
+class LBProxyItem : public LBItem {
+public:
+ LBProxyItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
+ ~LBProxyItem();
+
+ void init();
+
+protected:
+ class LBPage *_page;
+};
+
struct NotifyEvent {
NotifyEvent(uint t, uint p) : type(t), param(p), newUnknown(0), newMode(0), newPage(0), newSubpage(0) { }
uint type;
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index 4237c712d9..165ca4a328 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/livingbooks.h"
@@ -609,7 +606,7 @@ CodeCommandInfo generalCommandInfo[NUM_GENERAL_COMMANDS] = {
{ "move", 0 },
{ 0, 0 },
{ 0, 0 },
- { "setDragParams", 0 },
+ { "setDragParams", &LBCode::cmdSetDragParams },
{ "resetDragParams", 0 },
{ "enableRollover", &LBCode::cmdUnimplemented /* FIXME */ },
{ "setCursor", 0 },
@@ -804,6 +801,10 @@ void LBCode::cmdRight(const Common::Array<LBValue> &params) {
_stack.push(rect.right);
}
+void LBCode::cmdSetDragParams(const Common::Array<LBValue> &params) {
+ warning("ignoring setDragParams");
+}
+
void LBCode::cmdSetPlayParams(const Common::Array<LBValue> &params) {
if (params.size() > 8)
error("too many parameters (%d) to setPlayParams", params.size());
@@ -878,7 +879,7 @@ CodeCommandInfo itemCommandInfo[NUM_ITEM_COMMANDS] = {
{ "isLoaded", 0 },
{ "isDragging", 0 },
{ "load", 0 },
- { "moveTo", 0 },
+ { "moveTo", &LBCode::itemMoveTo },
{ "mute", 0 },
{ "play", 0 },
{ "seek", 0 },
@@ -913,6 +914,10 @@ void LBCode::itemIsPlaying(const Common::Array<LBValue> &params) {
_stack.push(0);
}
+void LBCode::itemMoveTo(const Common::Array<LBValue> &params) {
+ warning("ignoring moveTo");
+}
+
void LBCode::itemSetParent(const Common::Array<LBValue> &params) {
if (params.size() > 2)
error("incorrect number of parameters (%d) to setParent", params.size());
diff --git a/engines/mohawk/livingbooks_code.h b/engines/mohawk/livingbooks_code.h
index cd9ac1004a..9602e2d22d 100644
--- a/engines/mohawk/livingbooks_code.h
+++ b/engines/mohawk/livingbooks_code.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_LIVINGBOOKS_CODE_H
@@ -225,12 +222,14 @@ public:
void cmdLeft(const Common::Array<LBValue> &params);
void cmdBottom(const Common::Array<LBValue> &params);
void cmdRight(const Common::Array<LBValue> &params);
+ void cmdSetDragParams(const Common::Array<LBValue> &params);
void cmdSetPlayParams(const Common::Array<LBValue> &params);
void cmdSetKeyEvent(const Common::Array<LBValue> &params);
void cmdSetHitTest(const Common::Array<LBValue> &params);
void cmdKey(const Common::Array<LBValue> &params);
void itemSetParent(const Common::Array<LBValue> &params);
+ void itemMoveTo(const Common::Array<LBValue> &params);
void itemIsPlaying(const Common::Array<LBValue> &params);
};
diff --git a/engines/mohawk/mohawk.cpp b/engines/mohawk/mohawk.cpp
index f63645f1ac..faf52595b7 100644
--- a/engines/mohawk/mohawk.cpp
+++ b/engines/mohawk/mohawk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
diff --git a/engines/mohawk/mohawk.h b/engines/mohawk/mohawk.h
index 8a853d151e..b189f82040 100644
--- a/engines/mohawk/mohawk.h
+++ b/engines/mohawk/mohawk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_H
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 655a38b578..4f9c3a893e 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -74,7 +71,8 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription
// original, including bugs, missing bits etc. :)
_tweaksEnabled = true;
- _currentCursor = _mainCursor = kDefaultMystCursor;
+ _currentCursor = 0;
+ _mainCursor = kDefaultMystCursor;
_showResourceRects = false;
_curCard = 0;
_needsUpdate = false;
@@ -258,7 +256,10 @@ Common::Error MohawkEngine_Myst::run() {
_loadDialog->setSaveMode(false);
_optionsDialog = new MystOptionsDialog(this);
_cursor = new MystCursorManager(this);
- _rnd = new Common::RandomSource();
+ _rnd = new Common::RandomSource("myst");
+
+ // Cursor is visible by default
+ _cursor->showCursor();
// Load game from launcher/command line if requested
if (ConfMan.hasKey("save_slot") && canLoadGameStateCurrently()) {
@@ -288,9 +289,6 @@ Common::Error MohawkEngine_Myst::run() {
// Test Load Function...
loadHelp(10000);
- // Set the cursor
- _cursor->setCursor(_currentCursor);
-
Common::Event event;
while (!shouldQuit()) {
// Update any background videos
@@ -343,7 +341,20 @@ Common::Error MohawkEngine_Myst::run() {
drawResourceRects();
break;
case Common::KEYCODE_F5:
+ _needsPageDrop = false;
+ _needsShowMap = false;
+
runDialog(*_optionsDialog);
+
+ if (_needsPageDrop) {
+ dropPage();
+ _needsPageDrop = false;
+ }
+
+ if (_needsShowMap) {
+ _scriptParser->showMap();
+ _needsShowMap = false;
+ }
break;
default:
break;
@@ -405,6 +416,11 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS
_curStack = stack;
+ // Fill screen with black and empty cursor
+ _cursor->setCursor(0);
+ _system->fillScreen(_system->getScreenFormat().RGBToColor(0, 0, 0));
+ _system->updateScreen();
+
_sound->stopSound();
_sound->stopBackgroundMyst();
if (linkSrcSound)
@@ -553,7 +569,7 @@ uint16 MohawkEngine_Myst::getCardBackgroundId() {
}
void MohawkEngine_Myst::drawCardBackground() {
- _gfx->copyImageToBackBuffer(getCardBackgroundId(), Common::Rect(0, 0, 544, 333));
+ _gfx->copyImageToBackBuffer(getCardBackgroundId(), Common::Rect(0, 0, 544, 332));
}
void MohawkEngine_Myst::changeToCard(uint16 card, bool updateScreen) {
@@ -631,18 +647,18 @@ void MohawkEngine_Myst::changeToCard(uint16 card, bool updateScreen) {
// TODO: Handle Script Resources
- // Make sure we have the right cursor showing
- _dragResource = 0;
- _hoverResource = 0;
- _curResource = -1;
- checkCurrentResource();
-
// Make sure the screen is updated
if (updateScreen) {
_gfx->copyBackBufferToScreen(Common::Rect(544, 333));
_system->updateScreen();
}
+ // Make sure we have the right cursor showing
+ _dragResource = 0;
+ _hoverResource = 0;
+ _curResource = -1;
+ checkCurrentResource();
+
// Debug: Show resource rects
if (_showResourceRects)
drawResourceRects();
@@ -1181,4 +1197,42 @@ bool MohawkEngine_Myst::canSaveGameStateCurrently() {
return false;
}
+void MohawkEngine_Myst::dropPage() {
+ uint16 page = _gameState->_globals.heldPage;
+ bool whitePage = page == 13;
+ bool bluePage = page - 1 < 6;
+ bool redPage = page - 7 < 6;
+
+ // Play drop page sound
+ _sound->replaceSoundMyst(800);
+
+ // Drop page
+ _gameState->_globals.heldPage = 0;
+
+ // Redraw page area
+ if (whitePage && _gameState->_globals.currentAge == 2) {
+ redrawArea(41);
+ } else if (bluePage) {
+ if (page == 6) {
+ if (_gameState->_globals.currentAge == 2)
+ redrawArea(24);
+ } else {
+ redrawArea(103);
+ }
+ } else if (redPage) {
+ if (page == 12) {
+ if (_gameState->_globals.currentAge == 2)
+ redrawArea(25);
+ } else if (page == 10) {
+ if (_gameState->_globals.currentAge == 1)
+ redrawArea(35);
+ } else {
+ redrawArea(102);
+ }
+ }
+
+ setMainCursor(kDefaultMystCursor);
+ checkCursorHints();
+}
+
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 47e8a6562c..5edf774ed0 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_MYST_H
@@ -168,6 +165,8 @@ public:
bool _tweaksEnabled;
bool _needsUpdate;
+ bool _needsPageDrop;
+ bool _needsShowMap;
MystView _view;
MystGraphics *_gfx;
@@ -210,6 +209,8 @@ private:
bool _runExitScript;
+ void dropPage();
+
void loadCard();
void unloadCard();
void runInitScript();
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index dc00bff923..294fcea2f1 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/graphics.h"
diff --git a/engines/mohawk/myst_areas.h b/engines/mohawk/myst_areas.h
index aa06d1a5b4..136356ea4f 100644
--- a/engines/mohawk/myst_areas.h
+++ b/engines/mohawk/myst_areas.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index 71c408ed37..be5b7e1c76 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
@@ -148,6 +145,7 @@ void MystScriptParser::setupCommonOpcodes() {
OPCODE(44, o_restoreMainCursor);
// Opcode 45 Not Present
OPCODE(46, o_soundWaitStop);
+ OPCODE(51, o_exitMap);
// Opcodes 47 to 99 Not Present
OPCODE(0xFFFF, NOP);
@@ -157,6 +155,11 @@ void MystScriptParser::setupCommonOpcodes() {
void MystScriptParser::runScript(MystScript script, MystResource *invokingResource) {
debugC(kDebugScript, "Script Size: %d", script->size());
+
+ // Scripted drawing takes more time to simulate older hardware
+ // This way opcodes can't overwrite what the previous ones drew too quickly
+ _vm->_gfx->enableDrawingTimeSimulation(true);
+
for (uint16 i = 0; i < script->size(); i++) {
MystScriptEntry &entry = script->operator[](i);
debugC(kDebugScript, "\tOpcode %d: %d", i, entry.opcode);
@@ -168,6 +171,8 @@ void MystScriptParser::runScript(MystScript script, MystResource *invokingResour
runOpcode(entry.opcode, entry.var, entry.argc, entry.argv);
}
+
+ _vm->_gfx->enableDrawingTimeSimulation(false);
}
void MystScriptParser::runOpcode(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -918,4 +923,15 @@ void MystScriptParser::o_quit(uint16 op, uint16 var, uint16 argc, uint16 *argv)
_vm->quitGame();
}
+void MystScriptParser::showMap() {
+ if (_vm->getCurCard() != getMap()) {
+ _savedMapCardId = _vm->getCurCard();
+ _vm->changeToCard(getMap(), true);
+ }
+}
+
+void MystScriptParser::o_exitMap(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ _vm->changeToCard(_savedMapCardId, true);
+}
+
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst_scripts.h b/engines/mohawk/myst_scripts.h
index e4f4cc3cfe..18f5b27a6d 100644
--- a/engines/mohawk/myst_scripts.h
+++ b/engines/mohawk/myst_scripts.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_H
@@ -79,6 +76,9 @@ public:
virtual void toggleVar(uint16 var);
virtual bool setVarValue(uint16 var, uint16 value);
+ virtual uint16 getMap() { return 0; }
+ void showMap();
+
void animatedUpdate(uint16 argc, uint16 *argv, uint16 delay);
DECLARE_OPCODE(unknown);
@@ -122,6 +122,7 @@ public:
DECLARE_OPCODE(o_saveMainCursor);
DECLARE_OPCODE(o_restoreMainCursor);
DECLARE_OPCODE(o_soundWaitStop);
+ DECLARE_OPCODE(o_exitMap);
// Used in multiple stacks
DECLARE_OPCODE(o_quit);
@@ -147,6 +148,7 @@ protected:
MystResource *_invokingResource;
uint16 _savedCardId;
+ uint16 _savedMapCardId;
uint16 _savedCursorId;
int16 _tempVar; // Generic temp var used by the scripts
uint32 _startTime; // Generic start time used by the scripts
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index cba2583a50..0dd69a673a 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
@@ -333,7 +330,7 @@ void Channelwood::o_drawImageChangeCardAndVolume(uint16 op, uint16 var, uint16 a
_vm->_gfx->copyImageToScreen(imageId, Common::Rect(0, 0, 544, 333));
_vm->_system->updateScreen();
- _vm->_system->delayMillis(10);
+
_vm->changeToCard(cardId, true);
if (argc == 3) {
@@ -351,7 +348,6 @@ void Channelwood::o_waterTankValveOpen(uint16 op, uint16 var, uint16 argc, uint1
for (uint16 imageId = 3601; imageId >= 3595; imageId--) {
_vm->_gfx->copyImageToScreen(imageId, rect);
_vm->_system->updateScreen();
- _vm->_system->delayMillis(5);
}
pipeChangeValve(true, 0x80);
@@ -666,7 +662,6 @@ void Channelwood::o_waterTankValveClose(uint16 op, uint16 var, uint16 argc, uint
for (uint16 imageId = 3595; imageId <= 3601; imageId++) {
_vm->_gfx->copyImageToScreen(imageId, rect);
_vm->_system->updateScreen();
- _vm->_system->delayMillis(5);
}
pipeChangeValve(false, 0x80);
diff --git a/engines/mohawk/myst_stacks/channelwood.h b/engines/mohawk/myst_stacks/channelwood.h
index 5eeaa63e23..a3ea406003 100644
--- a/engines/mohawk/myst_stacks/channelwood.h
+++ b/engines/mohawk/myst_stacks/channelwood.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_CHANNELWOOD_H
@@ -52,6 +49,8 @@ private:
void toggleVar(uint16 var);
bool setVarValue(uint16 var, uint16 value);
+ virtual uint16 getMap() { return 9932; }
+
DECLARE_OPCODE(o_bridgeToggle);
DECLARE_OPCODE(o_pipeExtend);
DECLARE_OPCODE(o_drawImageChangeCardAndVolume);
diff --git a/engines/mohawk/myst_stacks/credits.cpp b/engines/mohawk/myst_stacks/credits.cpp
index bb8397fd09..ad593e3542 100644
--- a/engines/mohawk/myst_stacks/credits.cpp
+++ b/engines/mohawk/myst_stacks/credits.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/credits.h b/engines/mohawk/myst_stacks/credits.h
index 4f9eaa2944..a1f8b0a7d8 100644
--- a/engines/mohawk/myst_stacks/credits.h
+++ b/engines/mohawk/myst_stacks/credits.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_CREDITS_H
diff --git a/engines/mohawk/myst_stacks/demo.cpp b/engines/mohawk/myst_stacks/demo.cpp
index a2dd148b22..53d946dd66 100644
--- a/engines/mohawk/myst_stacks/demo.cpp
+++ b/engines/mohawk/myst_stacks/demo.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/demo.h b/engines/mohawk/myst_stacks/demo.h
index 054dc7befe..4f8d68759b 100644
--- a/engines/mohawk/myst_stacks/demo.h
+++ b/engines/mohawk/myst_stacks/demo.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_DEMO_H
diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp
index e2a11eb94f..cf28945c71 100644
--- a/engines/mohawk/myst_stacks/dni.cpp
+++ b/engines/mohawk/myst_stacks/dni.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/dni.h b/engines/mohawk/myst_stacks/dni.h
index b50f018d3e..7f04287082 100644
--- a/engines/mohawk/myst_stacks/dni.h
+++ b/engines/mohawk/myst_stacks/dni.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_DNI_H
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
index 0d8f67a85b..7d3179fa24 100644
--- a/engines/mohawk/myst_stacks/intro.cpp
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/intro.h b/engines/mohawk/myst_stacks/intro.h
index 0ecd9e6883..9fe3920e53 100644
--- a/engines/mohawk/myst_stacks/intro.h
+++ b/engines/mohawk/myst_stacks/intro.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_INTRO_H
diff --git a/engines/mohawk/myst_stacks/makingof.cpp b/engines/mohawk/myst_stacks/makingof.cpp
index e639092ed4..b5ad647381 100644
--- a/engines/mohawk/myst_stacks/makingof.cpp
+++ b/engines/mohawk/myst_stacks/makingof.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/makingof.h b/engines/mohawk/myst_stacks/makingof.h
index 3033bb851e..d4bc0fd9f2 100644
--- a/engines/mohawk/myst_stacks/makingof.h
+++ b/engines/mohawk/myst_stacks/makingof.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_MAKINGOF_H
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index c5c11026f5..d6dd1b5407 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
@@ -54,11 +51,26 @@ Mechanical::~Mechanical() {
void Mechanical::setupOpcodes() {
// "Stack-Specific" Opcodes
OPCODE(100, o_throneEnablePassage);
+ OPCODE(101, o_birdCrankStart);
+ OPCODE(102, NOP);
+ OPCODE(103, o_birdCrankStop);
OPCODE(104, o_snakeBoxTrigger);
OPCODE(105, o_fortressStaircaseMovie);
OPCODE(106, o_elevatorRotationStart);
OPCODE(107, o_elevatorRotationMove);
OPCODE(108, o_elevatorRotationStop);
+ OPCODE(109, o_fortressRotationSpeedStart);
+ OPCODE(110, o_fortressRotationSpeedMove);
+ OPCODE(111, o_fortressRotationSpeedStop);
+ OPCODE(112, o_fortressRotationBrakeStart);
+ OPCODE(113, o_fortressRotationBrakeMove);
+ OPCODE(114, o_fortressRotationBrakeStop);
+ OPCODE(115, o_fortressSimulationSpeedStart);
+ OPCODE(116, o_fortressSimulationSpeedMove);
+ OPCODE(117, o_fortressSimulationSpeedStop);
+ OPCODE(118, o_fortressSimulationBrakeStart);
+ OPCODE(119, o_fortressSimulationBrakeMove);
+ OPCODE(120, o_fortressSimulationBrakeStop);
OPCODE(121, o_elevatorWindowMovie);
OPCODE(122, o_elevatorGoMiddle);
OPCODE(123, o_elevatorTopMovie);
@@ -75,12 +87,12 @@ void Mechanical::setupOpcodes() {
// "Init" Opcodes
OPCODE(200, o_throne_init);
OPCODE(201, o_fortressStaircase_init);
- OPCODE(202, opcode_202);
+ OPCODE(202, o_bird_init);
OPCODE(203, o_snakeBox_init);
OPCODE(204, o_elevatorRotation_init);
- OPCODE(205, opcode_205);
- OPCODE(206, opcode_206);
- OPCODE(209, opcode_209);
+ OPCODE(205, o_fortressRotation_init);
+ OPCODE(206, o_fortressSimulation_init);
+ OPCODE(209, o_fortressSimulationStartup_init);
// "Exit" Opcodes
OPCODE(300, NOP);
@@ -89,15 +101,15 @@ void Mechanical::setupOpcodes() {
#undef OPCODE
void Mechanical::disablePersistentScripts() {
- opcode_202_disable();
- opcode_205_disable();
- opcode_206_disable();
- opcode_209_disable();
+ _fortressSimulationRunning = false;
_elevatorGoingMiddle = false;
+ _birdSinging = false;
+ _fortressRotationRunning = false;
}
void Mechanical::runPersistentScripts() {
- opcode_202_run();
+ if (_birdSinging)
+ birdSing_run();
if (_elevatorRotationLeverMoving)
elevatorRotation_run();
@@ -105,9 +117,11 @@ void Mechanical::runPersistentScripts() {
if (_elevatorGoingMiddle)
elevatorGoMiddle_run();
- opcode_205_run();
- opcode_206_run();
- opcode_209_run();
+ if (_fortressRotationRunning)
+ fortressRotation_run();
+
+ if (_fortressSimulationRunning)
+ fortressSimulation_run();
}
uint16 Mechanical::getVar(uint16 var) {
@@ -245,6 +259,38 @@ void Mechanical::o_throneEnablePassage(uint16 op, uint16 var, uint16 argc, uint1
_vm->_resources[argv[0]]->setEnabled(getVar(var));
}
+void Mechanical::o_birdCrankStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Mechanical bird crank start", op);
+
+ MystResourceType11 *crank = static_cast<MystResourceType11 *>(_invokingResource);
+
+ uint16 crankSoundId = crank->getList2(0);
+ _vm->_sound->replaceSoundMyst(crankSoundId, Audio::Mixer::kMaxChannelVolume, true);
+
+ _birdSingEndTime = 0;
+ _birdCrankStartTime = _vm->_system->getMillis();
+
+ MystResourceType6 *crankMovie = static_cast<MystResourceType6 *>(crank->getSubResource(0));
+ crankMovie->playMovie();
+}
+
+void Mechanical::o_birdCrankStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Mechanical bird crank stop", op);
+
+ MystResourceType11 *crank = static_cast<MystResourceType11 *>(_invokingResource);
+
+ MystResourceType6 *crankMovie = static_cast<MystResourceType6 *>(crank->getSubResource(0));
+ crankMovie->pauseMovie(true);
+
+ uint16 crankSoundId = crank->getList2(1);
+ _vm->_sound->replaceSoundMyst(crankSoundId);
+
+ _birdSingEndTime = 2 * _vm->_system->getMillis() - _birdCrankStartTime;
+ _birdSinging = true;
+
+ _bird->playMovie();
+}
+
void Mechanical::o_snakeBoxTrigger(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Trigger Playing Of Snake Movie", op);
@@ -346,6 +392,164 @@ void Mechanical::o_elevatorRotationStop(uint16 op, uint16 var, uint16 argc, uint
_vm->checkCursorHints();
}
+void Mechanical::o_fortressRotationSpeedStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation speed lever start", op);
+
+ _vm->_cursor->setCursor(700);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ lever->drawFrame(0);
+}
+
+void Mechanical::o_fortressRotationSpeedMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation speed lever move", op);
+
+ const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+
+ // Make the handle follow the mouse
+ int16 maxStep = lever->getNumFrames() - 1;
+ Common::Rect rect = lever->getRect();
+ int16 step = ((rect.top + 65 - mouse.y) * lever->getNumFrames()) / 65;
+ step = CLIP<int16>(step, 0, maxStep);
+
+ _fortressRotationSpeed = step;
+
+ // Draw current frame
+ lever->drawFrame(step);
+}
+
+void Mechanical::o_fortressRotationSpeedStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation speed lever stop", op);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+
+ // Release lever
+ for (int i = _fortressRotationSpeed; i >= 0; i--) {
+ lever->drawFrame(i);
+ _vm->_system->delayMillis(10);
+ }
+
+ _fortressRotationSpeed = 0;
+
+ _vm->checkCursorHints();
+}
+
+void Mechanical::o_fortressRotationBrakeStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation brake lever start", op);
+
+ _vm->_cursor->setCursor(700);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ lever->drawFrame(_fortressRotationBrake);
+}
+
+void Mechanical::o_fortressRotationBrakeMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation brake lever move", op);
+
+ const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+
+ // Make the handle follow the mouse
+ int16 maxStep = lever->getNumFrames() - 1;
+ Common::Rect rect = lever->getRect();
+ int16 step = ((rect.top + 65 - mouse.y) * lever->getNumFrames()) / 65;
+ step = CLIP<int16>(step, 0, maxStep);
+
+ _fortressRotationBrake = step;
+
+ // Draw current frame
+ lever->drawFrame(step);
+}
+
+void Mechanical::o_fortressRotationBrakeStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation brake lever stop", op);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ lever->drawFrame(_fortressRotationBrake);
+
+ _vm->checkCursorHints();
+}
+
+void Mechanical::o_fortressSimulationSpeedStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation simulator speed lever start", op);
+
+ _vm->_cursor->setCursor(700);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ lever->drawFrame(0);
+}
+
+void Mechanical::o_fortressSimulationSpeedMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation simulator speed lever move", op);
+
+ const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+
+ // Make the handle follow the mouse
+ int16 maxStep = lever->getNumFrames() - 1;
+ Common::Rect rect = lever->getRect();
+ int16 step = ((rect.bottom - mouse.y) * lever->getNumFrames()) / rect.height();
+ step = CLIP<int16>(step, 0, maxStep);
+
+ _fortressSimulationSpeed = step;
+
+ // Draw current frame
+ lever->drawFrame(step);
+}
+
+void Mechanical::o_fortressSimulationSpeedStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation simulator speed lever stop", op);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+
+ // Release lever
+ for (int i = _fortressSimulationSpeed; i >= 0; i--) {
+ lever->drawFrame(i);
+ _vm->_system->delayMillis(10);
+ }
+
+ _fortressSimulationSpeed = 0;
+
+ _vm->checkCursorHints();
+}
+
+void Mechanical::o_fortressSimulationBrakeStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation simulator brake lever start", op);
+
+ _vm->_cursor->setCursor(700);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ lever->drawFrame(_fortressSimulationBrake);
+}
+
+void Mechanical::o_fortressSimulationBrakeMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation simulator brake lever move", op);
+
+ const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+
+ // Make the handle follow the mouse
+ int16 maxStep = lever->getNumFrames() - 1;
+ Common::Rect rect = lever->getRect();
+ int16 step = ((rect.bottom - mouse.y) * lever->getNumFrames()) / rect.height();
+ step = CLIP<int16>(step, 0, maxStep);
+
+ _fortressSimulationBrake = step;
+
+ // Draw current frame
+ lever->drawFrame(step);
+}
+
+void Mechanical::o_fortressSimulationBrakeStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d Fortress rotation simulator brake lever stop", op);
+
+ MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ lever->drawFrame(_fortressSimulationBrake);
+
+ _vm->checkCursorHints();
+}
+
void Mechanical::o_elevatorWindowMovie(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
uint16 startTime = argv[0];
uint16 endTime = argv[1];
@@ -515,25 +719,21 @@ void Mechanical::o_fortressStaircase_init(uint16 op, uint16 var, uint16 argc, ui
_vm->_resources[argv[2]]->setEnabled(_state.staircaseState);
}
-static struct {
- bool enabled;
-} g_opcode202Parameters;
-
-void Mechanical::opcode_202_run() {
+void Mechanical::birdSing_run() {
// Used for Card 6220 (Sirrus' Mechanical Bird)
- // TODO: Fill in Function
+ uint32 time = _vm->_system->getMillis();
+ if (_birdSingEndTime < time) {
+ _bird->pauseMovie(true);
+ _birdSinging = false;
+ }
}
-void Mechanical::opcode_202_disable() {
- g_opcode202Parameters.enabled = false;
-}
+void Mechanical::o_bird_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Mechanical bird init", op);
-void Mechanical::opcode_202(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- // Used for Card 6220 (Sirrus' Mechanical Bird)
- if (argc == 0)
- g_opcode202Parameters.enabled = true;
- else
- unknown(op, var, argc, argv);
+ _birdSinging = false;
+ _birdSingEndTime = 0;
+ _bird = static_cast<MystResourceType6 *>(_invokingResource);
}
void Mechanical::o_snakeBox_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -567,101 +767,53 @@ void Mechanical::o_elevatorRotation_init(uint16 op, uint16 var, uint16 argc, uin
_elevatorRotationLeverMoving = false;
}
-static struct {
- uint16 soundIdPosition[4];
-
- bool enabled;
-} g_opcode205Parameters;
-
-void Mechanical::opcode_205_run() {
+void Mechanical::fortressRotation_run() {
// Used for Card 6156 (Fortress Rotation Controls)
// TODO: Fill in function...
- // g_opcode205Parameters.soundIdPosition[4]
-}
-
-void Mechanical::opcode_205_disable() {
- g_opcode205Parameters.enabled = false;
-}
-
-void Mechanical::opcode_205(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
- // Used for Card 6156 (Fortress Rotation Controls)
-
- if (argc == 4) {
- g_opcode205Parameters.soundIdPosition[0] = argv[0];
- g_opcode205Parameters.soundIdPosition[1] = argv[1];
- g_opcode205Parameters.soundIdPosition[2] = argv[2];
- g_opcode205Parameters.soundIdPosition[3] = argv[3];
-
- g_opcode205Parameters.enabled = true;
- } else
- unknown(op, var, argc, argv);
}
-static struct {
- uint16 soundIdStart[2];
- uint16 soundIdPosition[4];
+void Mechanical::o_fortressRotation_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Fortress rotation init", op);
- bool enabled;
-} g_opcode206Parameters;
+ _fortressRotationGears = static_cast<MystResourceType6 *>(_invokingResource);
-void Mechanical::opcode_206_run() {
- if (g_opcode206Parameters.enabled) {
- // Used for Card 6044 (Fortress Rotation Simulator)
+ _fortressRotationSounds[0] = argv[0];
+ _fortressRotationSounds[1] = argv[1];
+ _fortressRotationSounds[2] = argv[2];
+ _fortressRotationSounds[3] = argv[3];
- // g_opcode206Parameters.soundIdStart[2]
- // g_opcode206Parameters.soundIdPosition[4]
+ _fortressRotationBrake = 0;
- // TODO: Fill in function...
- }
+ _fortressRotationRunning = true;
}
-void Mechanical::opcode_206_disable() {
- g_opcode206Parameters.enabled = false;
-}
-
-void Mechanical::opcode_206(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
+void Mechanical::fortressSimulation_run() {
// Used for Card 6044 (Fortress Rotation Simulator)
- if (argc == 6) {
- g_opcode206Parameters.soundIdStart[0] = argv[0];
- g_opcode206Parameters.soundIdStart[1] = argv[1];
- g_opcode206Parameters.soundIdPosition[0] = argv[2];
- g_opcode206Parameters.soundIdPosition[1] = argv[3];
- g_opcode206Parameters.soundIdPosition[2] = argv[4];
- g_opcode206Parameters.soundIdPosition[3] = argv[5];
-
- g_opcode206Parameters.enabled = true;
- } else
- unknown(op, var, argc, argv);
+ // TODO: Fill in function...
}
+void Mechanical::o_fortressSimulation_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Fortress rotation simulator init", op);
-static struct {
- bool enabled;
-} g_opcode209Parameters;
+ _fortressSimulationHolo = static_cast<MystResourceType6 *>(_invokingResource);
-void Mechanical::opcode_209_run() {
- // Used for Card 6044 (Fortress Rotation Simulator)
+ _fortressSimulationStartSound1 = argv[0];
+ _fortressSimulationStartSound2 = argv[1];
- // TODO: Implement Function For Secret Panel State as
- // per Opcode 200 function (Mechanical)
-}
+ _fortressRotationSounds[0] = argv[2];
+ _fortressRotationSounds[1] = argv[3];
+ _fortressRotationSounds[2] = argv[4];
+ _fortressRotationSounds[3] = argv[5];
+
+ _fortressSimulationBrake = 0;
-void Mechanical::opcode_209_disable() {
- g_opcode209Parameters.enabled = false;
+ _fortressSimulationRunning = true;
}
-void Mechanical::opcode_209(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
+void Mechanical::o_fortressSimulationStartup_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Fortress rotation simulator startup init", op);
- // Used for Card 6044 (Fortress Rotation Simulator)
- if (argc == 0)
- g_opcode209Parameters.enabled = true;
- else
- unknown(op, var, argc, argv);
+ _fortressSimulationStartup = static_cast<MystResourceType6 *>(_invokingResource);
}
} // End of namespace MystStacks
diff --git a/engines/mohawk/myst_stacks/mechanical.h b/engines/mohawk/myst_stacks/mechanical.h
index 6a0aa30f5c..3bd7f2d71b 100644
--- a/engines/mohawk/myst_stacks/mechanical.h
+++ b/engines/mohawk/myst_stacks/mechanical.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_MECHANICAL_H
@@ -52,23 +49,34 @@ private:
void toggleVar(uint16 var);
bool setVarValue(uint16 var, uint16 value);
- void opcode_202_run();
- void opcode_202_disable();
+ virtual uint16 getMap() { return 9931; }
+
+ void birdSing_run();
void elevatorRotation_run();
void elevatorGoMiddle_run();
- void opcode_205_run();
- void opcode_205_disable();
- void opcode_206_run();
- void opcode_206_disable();
- void opcode_209_run();
- void opcode_209_disable();
+ void fortressRotation_run();
+ void fortressSimulation_run();
DECLARE_OPCODE(o_throneEnablePassage);
+ DECLARE_OPCODE(o_birdCrankStart);
+ DECLARE_OPCODE(o_birdCrankStop);
DECLARE_OPCODE(o_snakeBoxTrigger);
DECLARE_OPCODE(o_fortressStaircaseMovie);
DECLARE_OPCODE(o_elevatorRotationStart);
DECLARE_OPCODE(o_elevatorRotationMove);
DECLARE_OPCODE(o_elevatorRotationStop);
+ DECLARE_OPCODE(o_fortressRotationSpeedStart);
+ DECLARE_OPCODE(o_fortressRotationSpeedMove);
+ DECLARE_OPCODE(o_fortressRotationSpeedStop);
+ DECLARE_OPCODE(o_fortressRotationBrakeStart);
+ DECLARE_OPCODE(o_fortressRotationBrakeMove);
+ DECLARE_OPCODE(o_fortressRotationBrakeStop);
+ DECLARE_OPCODE(o_fortressSimulationSpeedStart);
+ DECLARE_OPCODE(o_fortressSimulationSpeedMove);
+ DECLARE_OPCODE(o_fortressSimulationSpeedStop);
+ DECLARE_OPCODE(o_fortressSimulationBrakeStart);
+ DECLARE_OPCODE(o_fortressSimulationBrakeMove);
+ DECLARE_OPCODE(o_fortressSimulationBrakeStop);
DECLARE_OPCODE(o_elevatorWindowMovie);
DECLARE_OPCODE(o_elevatorGoMiddle);
DECLARE_OPCODE(o_elevatorTopMovie);
@@ -84,18 +92,31 @@ private:
DECLARE_OPCODE(o_throne_init);
DECLARE_OPCODE(o_fortressStaircase_init);
- DECLARE_OPCODE(opcode_202);
+ DECLARE_OPCODE(o_bird_init);
DECLARE_OPCODE(o_snakeBox_init);
DECLARE_OPCODE(o_elevatorRotation_init);
- DECLARE_OPCODE(opcode_205);
- DECLARE_OPCODE(opcode_206);
- DECLARE_OPCODE(opcode_209);
+ DECLARE_OPCODE(o_fortressRotation_init);
+ DECLARE_OPCODE(o_fortressSimulation_init);
+ DECLARE_OPCODE(o_fortressSimulationStartup_init);
MystGameState::Mechanical &_state;
bool _mystStaircaseState; // 76
+ bool _fortressRotationRunning;
+ uint16 _fortressRotationSpeed; // 78
+ uint16 _fortressRotationBrake; // 80
uint16 _fortressPosition; // 82
+ uint16 _fortressRotationSounds[4]; // 86 to 92
+ MystResourceType6 *_fortressRotationGears; // 172
+
+ bool _fortressSimulationRunning;
+ uint16 _fortressSimulationSpeed; // 96
+ uint16 _fortressSimulationBrake; // 98
+ uint16 _fortressSimulationStartSound1; // 102
+ uint16 _fortressSimulationStartSound2; // 100
+ MystResourceType6 *_fortressSimulationHolo; // 160
+ MystResourceType6 *_fortressSimulationStartup; // 164
uint16 _elevatorGoingDown; // 112
@@ -113,6 +134,12 @@ private:
uint16 _crystalLit; // 130
+ bool _birdSinging; // 144
+ uint32 _birdCrankStartTime; // 136
+ uint32 _birdSingEndTime; // 140
+ MystResourceType6 *_bird; // 152
+
+
MystResourceType6 *_snakeBox; // 156
};
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 2b8ef94442..70abf0ccd3 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
@@ -862,7 +859,6 @@ void Myst::o_fireplaceToggleButton(uint16 op, uint16 var, uint16 argc, uint16 *a
for (uint i = 4795; i >= 4779; i--) {
_vm->_gfx->copyImageToScreen(i, _invokingResource->getRect());
_vm->_system->updateScreen();
- _vm->_system->delayMillis(1);
}
_fireplaceLines[var - 17] &= ~bitmask;
} else {
@@ -870,7 +866,6 @@ void Myst::o_fireplaceToggleButton(uint16 op, uint16 var, uint16 argc, uint16 *a
for (uint i = 4779; i <= 4795; i++) {
_vm->_gfx->copyImageToScreen(i, _invokingResource->getRect());
_vm->_system->updateScreen();
- _vm->_system->delayMillis(1);
}
_fireplaceLines[var - 17] |= bitmask;
}
@@ -2844,11 +2839,17 @@ void Myst::clockGearForwardOneStep(uint16 gear) {
}
void Myst::clockWeightDownOneStep() {
+ // The Myst ME version of this video is encoded faster than the original
+ // The weight goes on the floor one step too early. Original ME engine also has this behavior.
+ bool updateVideo = !(_vm->getFeatures() & GF_ME) || _clockWeightPosition < (2214 - 246);
+
// Set video bounds
- _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
- _vm->_video->setVideoBounds(_clockWeightVideo,
- Audio::Timestamp(0, _clockWeightPosition, 600),
- Audio::Timestamp(0, _clockWeightPosition + 246, 600));
+ if (updateVideo) {
+ _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
+ _vm->_video->setVideoBounds(_clockWeightVideo,
+ Audio::Timestamp(0, _clockWeightPosition, 600),
+ Audio::Timestamp(0, _clockWeightPosition + 246, 600));
+ }
// Increment value by one step
_clockWeightPosition += 246;
diff --git a/engines/mohawk/myst_stacks/myst.h b/engines/mohawk/myst_stacks/myst.h
index 51dffd0abe..9510d371d7 100644
--- a/engines/mohawk/myst_stacks/myst.h
+++ b/engines/mohawk/myst_stacks/myst.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_MYST_H
@@ -52,6 +49,8 @@ private:
void toggleVar(uint16 var);
bool setVarValue(uint16 var, uint16 value);
+ virtual uint16 getMap() { return 9934; }
+
void towerRotationMap_run();
void libraryBookcaseTransform_run();
void generatorControlRoom_run();
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index fddf6290fb..37b749f100 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/preview.h b/engines/mohawk/myst_stacks/preview.h
index 870e4b9272..7e4e418eef 100644
--- a/engines/mohawk/myst_stacks/preview.h
+++ b/engines/mohawk/myst_stacks/preview.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_PREVIEW_H
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index c670cb6a48..1473742259 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
diff --git a/engines/mohawk/myst_stacks/selenitic.h b/engines/mohawk/myst_stacks/selenitic.h
index 4ec92b9869..d314c4d810 100644
--- a/engines/mohawk/myst_stacks/selenitic.h
+++ b/engines/mohawk/myst_stacks/selenitic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_SELENITIC_H
@@ -53,6 +50,8 @@ private:
void toggleVar(uint16 var);
bool setVarValue(uint16 var, uint16 value);
+ virtual uint16 getMap() { return 9930; }
+
DECLARE_OPCODE(o_mazeRunnerMove);
DECLARE_OPCODE(o_mazeRunnerSoundRepeat);
DECLARE_OPCODE(o_soundReceiverSigma);
diff --git a/engines/mohawk/myst_stacks/slides.cpp b/engines/mohawk/myst_stacks/slides.cpp
index 4057edd9c9..72b299ee6d 100644
--- a/engines/mohawk/myst_stacks/slides.cpp
+++ b/engines/mohawk/myst_stacks/slides.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/myst.h"
diff --git a/engines/mohawk/myst_stacks/slides.h b/engines/mohawk/myst_stacks/slides.h
index 1e0504a665..8bc61d0e24 100644
--- a/engines/mohawk/myst_stacks/slides.h
+++ b/engines/mohawk/myst_stacks/slides.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_SLIDES_H
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index 07701c273e..e0c374a926 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
diff --git a/engines/mohawk/myst_stacks/stoneship.h b/engines/mohawk/myst_stacks/stoneship.h
index 091fdcd169..4125412b4d 100644
--- a/engines/mohawk/myst_stacks/stoneship.h
+++ b/engines/mohawk/myst_stacks/stoneship.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SCRIPTS_STONESHIP_H
@@ -52,6 +49,8 @@ private:
void toggleVar(uint16 var);
bool setVarValue(uint16 var, uint16 value);
+ virtual uint16 getMap() { return 9933; }
+
DECLARE_OPCODE(o_pumpTurnOff);
DECLARE_OPCODE(o_brotherDoorOpen);
DECLARE_OPCODE(o_cabinBookMovie);
diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp
index de71dcf382..bab4b8dd51 100644
--- a/engines/mohawk/myst_state.cpp
+++ b/engines/mohawk/myst_state.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
@@ -103,6 +100,9 @@ bool MystGameState::load(const Common::String &filename) {
syncGameState(s, size == 664);
delete loadFile;
+ // Switch us back to the intro stack, to the linking book
+ _vm->changeToStack(kIntroStack, 5, 0, 0);
+
// Set our default cursor
if (_globals.heldPage == 0 || _globals.heldPage > 13)
_vm->setMainCursor(kDefaultMystCursor);
@@ -113,9 +113,6 @@ bool MystGameState::load(const Common::String &filename) {
else // if (globals.heldPage == 13)
_vm->setMainCursor(kWhitePageCursor);
- // Switch us back to the intro stack, to the linking book
- _vm->changeToStack(kIntroStack, 5, 0, 0);
-
return true;
}
diff --git a/engines/mohawk/myst_state.h b/engines/mohawk/myst_state.h
index 074c3e5f10..c7a6c0b4ac 100644
--- a/engines/mohawk/myst_state.h
+++ b/engines/mohawk/myst_state.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MYST_SAVELOAD_H
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index 62250b75f2..3a95b83199 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/resource.h"
diff --git a/engines/mohawk/resource.h b/engines/mohawk/resource.h
index 07c727951c..cabce04e38 100644
--- a/engines/mohawk/resource.h
+++ b/engines/mohawk/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
diff --git a/engines/mohawk/resource_cache.cpp b/engines/mohawk/resource_cache.cpp
index 75f608f5fd..e73d8c43d3 100644
--- a/engines/mohawk/resource_cache.cpp
+++ b/engines/mohawk/resource_cache.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/mohawk/resource_cache.h b/engines/mohawk/resource_cache.h
index 32e345cf4b..b7eac9ebd7 100644
--- a/engines/mohawk/resource_cache.h
+++ b/engines/mohawk/resource_cache.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef RESOURCE_CACHE_H
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 3d496d0f38..f407e650f6 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -18,16 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/translation.h"
+#include "common/system.h"
#include "mohawk/cursors.h"
#include "mohawk/graphics.h"
@@ -121,8 +118,7 @@ Common::Error MohawkEngine_Riven::run() {
_optionsDialog = new RivenOptionsDialog(this);
_scriptMan = new RivenScriptManager(this);
- _rnd = new Common::RandomSource();
- g_eventRec.registerRandomSource(*_rnd, "riven");
+ _rnd = new Common::RandomSource("riven");
// Create the cursor manager
if (Common::File::exists("rivendmo.exe"))
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index 3aba5643db..e01e03895c 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_RIVEN_H
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index dc0d66f19b..8ad05ded13 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
diff --git a/engines/mohawk/riven_external.h b/engines/mohawk/riven_external.h
index 034cd662f6..5f5d0cb0b2 100644
--- a/engines/mohawk/riven_external.h
+++ b/engines/mohawk/riven_external.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef RIVEN_EXTERNAL_H
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index 35ce7aad84..35d82d4aa0 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/resource.h"
diff --git a/engines/mohawk/riven_saveload.h b/engines/mohawk/riven_saveload.h
index fbd9f7cb36..c1b3fc639e 100644
--- a/engines/mohawk/riven_saveload.h
+++ b/engines/mohawk/riven_saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_SAVELOAD_H
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index b8f86f993a..b3d5369a84 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/cursors.h"
diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h
index 2ac805c366..75d4592e55 100644
--- a/engines/mohawk/riven_scripts.h
+++ b/engines/mohawk/riven_scripts.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef RIVEN_SCRIPTS_H
diff --git a/engines/mohawk/riven_vars.cpp b/engines/mohawk/riven_vars.cpp
index 7f06a67a1d..946e2e0496 100644
--- a/engines/mohawk/riven_vars.cpp
+++ b/engines/mohawk/riven_vars.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index fba87808d2..6144c89e21 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/sound.h"
@@ -619,9 +616,16 @@ Audio::SoundHandle *Sound::replaceBackgroundMyst(uint16 id, uint16 volume) {
Common::String name = _vm->getResourceName(ID_MSND, convertMystID(id));
+ // Only the first eight characters need to be the same to have a match
+ Common::String prefix;
+ if (name.size() >= 8)
+ prefix = Common::String(name.c_str(), name.c_str() + 8);
+ else
+ prefix = name;
+
// Check if sound is already playing
if (_mystBackgroundSound.type == kUsedHandle && _vm->_mixer->isSoundHandleActive(_mystBackgroundSound.handle)
- && name.equals(_vm->getResourceName(ID_MSND, convertMystID(_mystBackgroundSound.id))))
+ && _vm->getResourceName(ID_MSND, convertMystID(_mystBackgroundSound.id)).hasPrefix(prefix))
return &_mystBackgroundSound.handle;
// Stop old background sound
diff --git a/engines/mohawk/sound.h b/engines/mohawk/sound.h
index 702c6f61f3..593f2fcd0b 100644
--- a/engines/mohawk/sound.h
+++ b/engines/mohawk/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_SOUND_H
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index 8f57d61cc4..0a74d058c9 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/mohawk.h"
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index e65629a1ec..efa81edfbd 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_VIDEO_H
diff --git a/engines/mohawk/view.cpp b/engines/mohawk/view.cpp
index e5a44122ea..36e8f8466e 100644
--- a/engines/mohawk/view.cpp
+++ b/engines/mohawk/view.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "mohawk/view.h"
diff --git a/engines/mohawk/view.h b/engines/mohawk/view.h
index 14a47eebe4..06ffe605a3 100644
--- a/engines/mohawk/view.h
+++ b/engines/mohawk/view.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef MOHAWK_VIEW_H
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp
index 2cf6eebf2a..f74eef18e1 100644
--- a/engines/parallaction/balloons.cpp
+++ b/engines/parallaction/balloons.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/graphics.h"
diff --git a/engines/parallaction/callables_br.cpp b/engines/parallaction/callables_br.cpp
index 0bc6f6762c..ac5ff88560 100644
--- a/engines/parallaction/callables_br.cpp
+++ b/engines/parallaction/callables_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/parallaction.h"
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp
index cfe6ad8954..77f54fcc98 100644
--- a/engines/parallaction/callables_ns.cpp
+++ b/engines/parallaction/callables_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index bebbab968b..72f26cb6b9 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index 8e3c2cbeb8..c3719bcd51 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -253,7 +250,7 @@ public:
ParallactionMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Parallaction engine";
+ return "Parallaction";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 944d9f4b55..880d41a8a3 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index d996b72e90..61172d0896 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/iff_container.h"
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h
index 9af189af68..d1171c3179 100644
--- a/engines/parallaction/disk.h
+++ b/engines/parallaction/disk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_DISK_H
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index cea4091ee9..f9e368ab39 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "graphics/iff.h"
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index e695fa8798..05ea60f510 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/parallaction/exec.cpp b/engines/parallaction/exec.cpp
index 434c4f6ae6..8594d02641 100644
--- a/engines/parallaction/exec.cpp
+++ b/engines/parallaction/exec.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/exec.h"
diff --git a/engines/parallaction/exec.h b/engines/parallaction/exec.h
index df642e0fed..4ca3947514 100644
--- a/engines/parallaction/exec.h
+++ b/engines/parallaction/exec.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp
index c879745f65..0ec1675c48 100644
--- a/engines/parallaction/exec_br.cpp
+++ b/engines/parallaction/exec_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/exec.h"
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp
index ee357576d2..d8fbdea971 100644
--- a/engines/parallaction/exec_ns.cpp
+++ b/engines/parallaction/exec_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/exec.h"
diff --git a/engines/parallaction/font.cpp b/engines/parallaction/font.cpp
index a459e6a600..cc7f320e1c 100644
--- a/engines/parallaction/font.cpp
+++ b/engines/parallaction/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index ca99624ecd..24544f46dd 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index d33e733677..cf0cf13333 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -19,9 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index d6732e6fe4..2f86f3693b 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_GRAPHICS_H
diff --git a/engines/parallaction/gui.cpp b/engines/parallaction/gui.cpp
index db70ebb432..aa9c29ac57 100644
--- a/engines/parallaction/gui.cpp
+++ b/engines/parallaction/gui.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/parallaction/gui.h b/engines/parallaction/gui.h
index dc6d1bc71b..95c5653220 100644
--- a/engines/parallaction/gui.h
+++ b/engines/parallaction/gui.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_GUI_H
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index 41e3082464..c520ad4f25 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp
index 6b863cc808..ef1a8a6e7e 100644
--- a/engines/parallaction/gui_ns.cpp
+++ b/engines/parallaction/gui_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index 3a47b14deb..453bf9849d 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
diff --git a/engines/parallaction/input.h b/engines/parallaction/input.h
index 77adf7e74e..a815469ec3 100644
--- a/engines/parallaction/input.h
+++ b/engines/parallaction/input.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_INPUT_H
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index 2412cc6445..8fd9f56802 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/input.h"
diff --git a/engines/parallaction/inventory.h b/engines/parallaction/inventory.h
index e4bb935672..91c06d1e93 100644
--- a/engines/parallaction/inventory.h
+++ b/engines/parallaction/inventory.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_INVENTORY_H
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index e1306dc956..3750602076 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h
index 5260dcbfe8..387e7af088 100644
--- a/engines/parallaction/objects.h
+++ b/engines/parallaction/objects.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_ZONE_H
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 516d465671..9bbc7d0c57 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -18,13 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
#include "common/system.h"
#include "common/textconsole.h"
@@ -48,7 +44,7 @@ uint32 _globalFlags = 0;
Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gameDesc) :
Engine(syst), _gameDescription(gameDesc), _location(getGameType()),
- _dialogueMan(0) {
+ _dialogueMan(0), _rnd("parallaction") {
// Setup mixer
syncSoundSettings();
@@ -63,8 +59,6 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam
DebugMan.addDebugChannel(kDebugAudio, "audio", "Audio debug level");
DebugMan.addDebugChannel(kDebugMenu, "menu", "Menu debug level");
DebugMan.addDebugChannel(kDebugInventory, "inventory", "Inventory debug level");
-
- g_eventRec.registerRandomSource(_rnd, "parallaction");
}
Parallaction::~Parallaction() {
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index b0b1145d2e..5554eff3c5 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_H
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index ca344792cf..44a8899304 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index ffc0412b1d..64cf1b437d 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp
index a7b926e485..5d61c2988c 100644
--- a/engines/parallaction/parser.cpp
+++ b/engines/parallaction/parser.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h
index 812cf6f7c3..1cf8e2f7ff 100644
--- a/engines/parallaction/parser.h
+++ b/engines/parallaction/parser.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_PARSER_H
diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp
index f8818def9a..e4be53022e 100644
--- a/engines/parallaction/parser_br.cpp
+++ b/engines/parallaction/parser_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index 6c9afe3d85..69763affc8 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index 4c77aa3e02..673c613485 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/savefile.h"
diff --git a/engines/parallaction/saveload.h b/engines/parallaction/saveload.h
index a8f1697a9d..3976ee1290 100644
--- a/engines/parallaction/saveload.h
+++ b/engines/parallaction/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_SAVELOAD_H
diff --git a/engines/parallaction/sound.h b/engines/parallaction/sound.h
index 455189d1fc..baca5a7213 100644
--- a/engines/parallaction/sound.h
+++ b/engines/parallaction/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_MUSIC_H
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index abfaa4bf5d..16ffd24a82 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stream.h"
diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp
index 5123695ebc..917d310738 100644
--- a/engines/parallaction/sound_ns.cpp
+++ b/engines/parallaction/sound_ns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp
index 84db3af9a4..73e78cae3c 100644
--- a/engines/parallaction/staticres.cpp
+++ b/engines/parallaction/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp
index 3084707ba8..21ee5ee5d9 100644
--- a/engines/parallaction/walk.cpp
+++ b/engines/parallaction/walk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "parallaction/exec.h"
diff --git a/engines/parallaction/walk.h b/engines/parallaction/walk.h
index 655c476106..6796991f9d 100644
--- a/engines/parallaction/walk.h
+++ b/engines/parallaction/walk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef PARALLACTION_WALK_H
diff --git a/engines/queen/bankman.cpp b/engines/queen/bankman.cpp
index 69329efa51..ea823773dc 100644
--- a/engines/queen/bankman.cpp
+++ b/engines/queen/bankman.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/bankman.h b/engines/queen/bankman.h
index ad9610e93b..9e1e726fbf 100644
--- a/engines/queen/bankman.h
+++ b/engines/queen/bankman.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_BANKMAN_H
diff --git a/engines/queen/command.cpp b/engines/queen/command.cpp
index 87b24735a8..7876dbfae9 100644
--- a/engines/queen/command.cpp
+++ b/engines/queen/command.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -1084,10 +1081,10 @@ void Command::setAreas(uint16 command) {
Area *area = _vm->grid()->area(cmdArea->room, areaNum);
if (cmdArea->area > 0) {
// turn on area
- area->mapNeighbours = ABS(area->mapNeighbours);
+ area->mapNeighbors = ABS(area->mapNeighbors);
} else {
// turn off area
- area->mapNeighbours = -ABS(area->mapNeighbours);
+ area->mapNeighbors = -ABS(area->mapNeighbors);
}
}
}
diff --git a/engines/queen/command.h b/engines/queen/command.h
index 5d2f91d9a9..aa72537a9f 100644
--- a/engines/queen/command.h
+++ b/engines/queen/command.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_COMMAND_H
@@ -100,7 +97,7 @@ public:
Command(QueenEngine *vm);
~Command();
- //! initialise command construction
+ //! initialize command construction
void clear(bool clearTexts);
//! execute last constructed command
diff --git a/engines/queen/credits.cpp b/engines/queen/credits.cpp
index 029ed7d0a8..d503562601 100644
--- a/engines/queen/credits.cpp
+++ b/engines/queen/credits.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/credits.h b/engines/queen/credits.h
index 059c651ca7..b89d029a59 100644
--- a/engines/queen/credits.h
+++ b/engines/queen/credits.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_CREDITS_H
diff --git a/engines/queen/cutaway.cpp b/engines/queen/cutaway.cpp
index 6fb48c7fb0..de54b7e33c 100644
--- a/engines/queen/cutaway.cpp
+++ b/engines/queen/cutaway.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -1155,10 +1152,10 @@ void Cutaway::updateGameState() {
if (areaSubIndex > 0) {
Area *area = _vm->grid()->area(areaIndex, areaSubIndex);
- area->mapNeighbours = ABS(area->mapNeighbours);
+ area->mapNeighbors = ABS(area->mapNeighbors);
} else {
Area *area = _vm->grid()->area(areaIndex, ABS(areaSubIndex));
- area->mapNeighbours = -ABS(area->mapNeighbours);
+ area->mapNeighbors = -ABS(area->mapNeighbors);
}
}
diff --git a/engines/queen/cutaway.h b/engines/queen/cutaway.h
index c395aa4fa2..a7e3646a59 100644
--- a/engines/queen/cutaway.h
+++ b/engines/queen/cutaway.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_CUTAWAY_H
diff --git a/engines/queen/debug.cpp b/engines/queen/debug.cpp
index a7cf70fbb2..d09c5d4469 100644
--- a/engines/queen/debug.cpp
+++ b/engines/queen/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
diff --git a/engines/queen/debug.h b/engines/queen/debug.h
index 9b08ce83e8..01da4a35d6 100644
--- a/engines/queen/debug.h
+++ b/engines/queen/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_DEBUG_H
diff --git a/engines/queen/defs.h b/engines/queen/defs.h
index 5b3475d400..3d06485ef5 100644
--- a/engines/queen/defs.h
+++ b/engines/queen/defs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_DEFS_H
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index c78fd8ebcc..83dc1a9f60 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -18,14 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
-#include "common/EventRecorder.h"
#include "common/events.h"
#include "graphics/cursorman.h"
@@ -41,7 +37,7 @@ namespace Queen {
Display::Display(QueenEngine *vm, OSystem *system)
: _fullscreen(true), _horizontalScroll(0), _bdWidth(0), _bdHeight(0),
- _system(system), _vm(vm) {
+ _system(system), _vm(vm), _rnd("queenDisplay") {
initFont();
@@ -76,7 +72,6 @@ Display::Display(QueenEngine *vm, OSystem *system)
memset(&_dynalum, 0, sizeof(_dynalum));
setupInkColors();
- g_eventRec.registerRandomSource(_rnd, "queenDisplay");
}
Display::~Display() {
diff --git a/engines/queen/display.h b/engines/queen/display.h
index e7a2ecd4a1..4256b19d72 100644
--- a/engines/queen/display.h
+++ b/engines/queen/display.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_DISPLAY_H
@@ -47,7 +44,7 @@ public:
Display(QueenEngine *vm, OSystem *system);
~Display();
- //! initialise dynalum for the specified room
+ //! initialize dynalum for the specified room
void dynalumInit(const char *roomName, uint16 roomNum);
//! update dynalum for the current room
@@ -141,7 +138,7 @@ public:
//! show/hide mouse cursor
void showMouseCursor(bool show);
- //! initialise font, compute justification sizes
+ //! initialize font, compute justification sizes
void initFont();
//! add the specified text to the texts list
diff --git a/engines/queen/graphics.cpp b/engines/queen/graphics.cpp
index c86f679765..d9a8a10d70 100644
--- a/engines/queen/graphics.cpp
+++ b/engines/queen/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/graphics.h b/engines/queen/graphics.h
index ad9a728cfe..9c719ba22c 100644
--- a/engines/queen/graphics.h
+++ b/engines/queen/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_GRAPHICS_H
diff --git a/engines/queen/grid.cpp b/engines/queen/grid.cpp
index 306b32bc8b..82b98c0150 100644
--- a/engines/queen/grid.cpp
+++ b/engines/queen/grid.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/grid.h b/engines/queen/grid.h
index 7003311a98..f905e3f4fe 100644
--- a/engines/queen/grid.h
+++ b/engines/queen/grid.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_GRID_H
diff --git a/engines/queen/input.cpp b/engines/queen/input.cpp
index eac855a0cd..5a04b0f8a4 100644
--- a/engines/queen/input.cpp
+++ b/engines/queen/input.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/input.h b/engines/queen/input.h
index 43a57729c6..93e2bde638 100644
--- a/engines/queen/input.h
+++ b/engines/queen/input.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_INPUT_H
diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp
index 4200168f07..704019641b 100644
--- a/engines/queen/journal.cpp
+++ b/engines/queen/journal.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/journal.h b/engines/queen/journal.h
index 123299c6e9..a9b9ccb2b8 100644
--- a/engines/queen/journal.h
+++ b/engines/queen/journal.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_JOURNAL_H
diff --git a/engines/queen/logic.cpp b/engines/queen/logic.cpp
index e99a739726..f60ac59ff1 100644
--- a/engines/queen/logic.cpp
+++ b/engines/queen/logic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -1629,7 +1626,7 @@ void Logic::asmSetLightsOn() {
void Logic::asmSetManequinAreaOn() {
Area *a = _vm->grid()->area(ROOM_FLODA_FRONTDESK, 7);
- a->mapNeighbours = ABS(a->mapNeighbours);
+ a->mapNeighbors = ABS(a->mapNeighbors);
}
void Logic::asmPanToJoe() {
diff --git a/engines/queen/logic.h b/engines/queen/logic.h
index e6924b3e41..608c19e71e 100644
--- a/engines/queen/logic.h
+++ b/engines/queen/logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_LOGIC_H
diff --git a/engines/queen/midiadlib.cpp b/engines/queen/midiadlib.cpp
index af52f7ed2b..83853cba92 100644
--- a/engines/queen/midiadlib.cpp
+++ b/engines/queen/midiadlib.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index 5d1a06ccb2..858692703c 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -18,14 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "queen/music.h"
#include "queen/queen.h"
@@ -40,7 +36,9 @@ namespace Queen {
extern MidiDriver *C_Player_CreateAdLibMidiDriver(Audio::Mixer *);
MidiMusic::MidiMusic(QueenEngine *vm)
- : _isPlaying(false), _isLooping(false), _randomLoop(false), _masterVolume(192), _buf(0) {
+ : _isPlaying(false), _isLooping(false),
+ _randomLoop(false), _masterVolume(192),
+ _buf(0), _rnd("queenMusic") {
memset(_channelsTable, 0, sizeof(_channelsTable));
_queuePos = _lastSong = _currentSong = 0;
@@ -92,8 +90,6 @@ MidiMusic::MidiMusic(QueenEngine *vm)
_parser = MidiParser::createParser_SMF();
_parser->setMidiDriver(this);
_parser->setTimerRate(_driver->getBaseTempo());
-
- g_eventRec.registerRandomSource(_rnd, "queenMusic");
}
MidiMusic::~MidiMusic() {
diff --git a/engines/queen/music.h b/engines/queen/music.h
index 3e8fc585ca..ea6affcbe5 100644
--- a/engines/queen/music.h
+++ b/engines/queen/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_MUSIC_H
diff --git a/engines/queen/musicdata.cpp b/engines/queen/musicdata.cpp
index 865f4cd21d..d3974dcdbf 100644
--- a/engines/queen/musicdata.cpp
+++ b/engines/queen/musicdata.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -496,7 +493,7 @@ const SongData Sound::_song[] = {
/* 124 - Dino Horn */
{ { 127, 0 }, 128, 128, 128, 0, 1 },
- /* 125 - Tyre Screech */
+ /* 125 - Tire Screech */
{ { 128, 0 }, 128, 128, 128, 0, 1 },
/* 126 - Oil Splat */
@@ -1241,7 +1238,7 @@ const TuneData Sound::_tune[] = {
/* 127 - Dino Horn */
{ { 0, 0 }, { 67, 0 }, 2, 0 },
- /* 128 - Tyre Screech */
+ /* 128 - Tire Screech */
{ { 0, 0 }, { 68, 0 }, 2, 0 },
/* 129 - Oil Splat */
@@ -1700,7 +1697,7 @@ const char *Sound::_sfxName[] = {
/* 67 - Dino Horn */
"103sssss",
- /* 68 - Tyre Screech */
+ /* 68 - Tire Screech */
"125sssss",
/* 69 - Chicken */
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 0dde5c7b42..3c1826cd69 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -31,7 +28,6 @@
#include "common/savefile.h"
#include "common/system.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/textconsole.h"
#include "engines/util.h"
@@ -73,7 +69,7 @@ public:
};
const char *QueenMetaEngine::getName() const {
- return "Flight of the Amazon Queen";
+ return "Queen";
}
const char *QueenMetaEngine::getOriginalCopyright() const {
@@ -196,8 +192,7 @@ Common::Error QueenMetaEngine::createInstance(OSystem *syst, Engine **engine) co
namespace Queen {
QueenEngine::QueenEngine(OSystem *syst)
- : Engine(syst), _debugger(0) {
- g_eventRec.registerRandomSource(randomizer, "queen");
+ : Engine(syst), _debugger(0), randomizer("queen") {
}
QueenEngine::~QueenEngine() {
diff --git a/engines/queen/queen.h b/engines/queen/queen.h
index 6098a9f5c2..5affe8e01a 100644
--- a/engines/queen/queen.h
+++ b/engines/queen/queen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_H
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp
index 62b13e290c..d837a63cb5 100644
--- a/engines/queen/resource.cpp
+++ b/engines/queen/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/queen/resource.h b/engines/queen/resource.h
index 63720a0755..5c6746e92f 100644
--- a/engines/queen/resource.h
+++ b/engines/queen/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_RESOURCE_H
diff --git a/engines/queen/restables.cpp b/engines/queen/restables.cpp
index d4c30c7bea..bc828164b0 100644
--- a/engines/queen/restables.cpp
+++ b/engines/queen/restables.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "queen/resource.h"
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index afb77f3969..ac58dda728 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/sound.h b/engines/queen/sound.h
index a89e345791..2aabb0d73b 100644
--- a/engines/queen/sound.h
+++ b/engines/queen/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_SOUND_H
diff --git a/engines/queen/state.cpp b/engines/queen/state.cpp
index 4dcf7a8cd1..a07e68045b 100644
--- a/engines/queen/state.cpp
+++ b/engines/queen/state.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/state.h b/engines/queen/state.h
index bdf5e6da51..1a6725c800 100644
--- a/engines/queen/state.h
+++ b/engines/queen/state.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_STATE_H
diff --git a/engines/queen/structs.h b/engines/queen/structs.h
index 6b852aaa9c..6dd98fa1f5 100644
--- a/engines/queen/structs.h
+++ b/engines/queen/structs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_STRUCTS_H
@@ -80,7 +77,7 @@ struct Box {
struct Area {
//! bitmask of connected areas
- int16 mapNeighbours;
+ int16 mapNeighbors;
//! coordinates defining area limits
Box box;
//! scaling factors for bobs actors
@@ -89,7 +86,7 @@ struct Area {
uint16 object;
void readFromBE(byte *&ptr) {
- mapNeighbours = (int16)READ_BE_UINT16(ptr); ptr += 2;
+ mapNeighbors = (int16)READ_BE_UINT16(ptr); ptr += 2;
box.readFromBE(ptr);
bottomScaleFactor = READ_BE_UINT16(ptr); ptr += 2;
topScaleFactor = READ_BE_UINT16(ptr); ptr += 2;
@@ -97,7 +94,7 @@ struct Area {
}
void writeToBE(byte *&ptr) {
- WRITE_BE_UINT16(ptr, mapNeighbours); ptr += 2;
+ WRITE_BE_UINT16(ptr, mapNeighbors); ptr += 2;
box.writeToBE(ptr);
WRITE_BE_UINT16(ptr, bottomScaleFactor); ptr += 2;
WRITE_BE_UINT16(ptr, topScaleFactor); ptr += 2;
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index 18c712b799..b83bf60435 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/queen/talk.h b/engines/queen/talk.h
index 036dfadbcd..68196784b1 100644
--- a/engines/queen/talk.h
+++ b/engines/queen/talk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_TALK_H
diff --git a/engines/queen/walk.cpp b/engines/queen/walk.cpp
index a778ea5b05..b5c9b97ce0 100644
--- a/engines/queen/walk.cpp
+++ b/engines/queen/walk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/textconsole.h"
@@ -114,7 +111,7 @@ void Walk::animateJoe() {
WalkData *pwd = &_walkData[i];
// area has been turned off, see if we should execute a cutaway
- if (pwd->area->mapNeighbours < 0) {
+ if (pwd->area->mapNeighbors < 0) {
// queen.c l.2838-2911
_vm->logic()->handleSpecialArea(pwd->anim.facing, pwd->areaNum, i);
_joeMoveBlock = true;
@@ -485,7 +482,7 @@ int16 Walk::findAreaPosition(int16 *x, int16 *y, bool recalibrate) {
uint16 Walk::findFreeArea(uint16 area) const {
uint16 testArea;
uint16 freeArea = 0;
- uint16 map = ABS(_roomArea[area].mapNeighbours);
+ uint16 map = ABS(_roomArea[area].mapNeighbors);
for (testArea = 1; testArea <= _roomAreaCount; ++testArea) {
int b = _roomAreaCount - testArea;
if (map & (1 << b)) {
diff --git a/engines/queen/walk.h b/engines/queen/walk.h
index 0f746213ab..e5257b7afa 100644
--- a/engines/queen/walk.h
+++ b/engines/queen/walk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef QUEEN_WALK_H
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 8e2ce4fcc6..86606855e3 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "saga/saga.h"
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index 01feacb75b..451497986d 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Actor management module header file
diff --git a/engines/saga/actor_path.cpp b/engines/saga/actor_path.cpp
index df117841f3..3e10aba6b6 100644
--- a/engines/saga/actor_path.cpp
+++ b/engines/saga/actor_path.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "saga/saga.h"
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index 6aabf27311..5607fcdd66 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "saga/saga.h"
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index 4aee111aa7..7ec4a59398 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Background animation management module
diff --git a/engines/saga/animation.h b/engines/saga/animation.h
index c27909115e..2c42cb7253 100644
--- a/engines/saga/animation.h
+++ b/engines/saga/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Background animation management module private header
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index 228febfe9c..771925a321 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Console module
diff --git a/engines/saga/console.h b/engines/saga/console.h
index c2e563e019..b93638467b 100644
--- a/engines/saga/console.h
+++ b/engines/saga/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Console module header file
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index b1bcc99295..b23baf4cc3 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Game detection, general game parameters
@@ -134,7 +131,7 @@ public:
SagaMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Saga engine ["
+ return "SAGA ["
#if defined(ENABLE_IHNM) && defined(ENABLE_SAGA2)
"all games"
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index e5796e813b..f63efd206b 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Game detection information and MD5s
diff --git a/engines/saga/displayinfo.h b/engines/saga/displayinfo.h
index b29f709323..70c36bafd5 100644
--- a/engines/saga/displayinfo.h
+++ b/engines/saga/displayinfo.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Interface widget display information
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index cf27ad7559..35f41e30ab 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Event management module
diff --git a/engines/saga/events.h b/engines/saga/events.h
index 135c0beb55..581abe17b0 100644
--- a/engines/saga/events.h
+++ b/engines/saga/events.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Event management module header file
diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp
index 2434f7aad8..a5363909ff 100644
--- a/engines/saga/font.cpp
+++ b/engines/saga/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Font management and font drawing module
diff --git a/engines/saga/font.h b/engines/saga/font.h
index 6f66545756..75d5fa95b9 100644
--- a/engines/saga/font.h
+++ b/engines/saga/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Font management and font drawing header file
diff --git a/engines/saga/font_map.cpp b/engines/saga/font_map.cpp
index 6abaeea151..936c8e779c 100644
--- a/engines/saga/font_map.cpp
+++ b/engines/saga/font_map.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Font module character mapping table ( MS CP-850 to ISO 8859-1 )
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index 4930718b67..ab0c0f3e4c 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Misc. graphics routines
diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h
index 56d9104371..c677b76324 100644
--- a/engines/saga/gfx.h
+++ b/engines/saga/gfx.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Graphics maniuplation routines - private header file
diff --git a/engines/saga/image.cpp b/engines/saga/image.cpp
index ac9fe94f2f..3434d46b42 100644
--- a/engines/saga/image.cpp
+++ b/engines/saga/image.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// SAGA Image resource management routines
diff --git a/engines/saga/input.cpp b/engines/saga/input.cpp
index e3a3b49396..69a353da9f 100644
--- a/engines/saga/input.cpp
+++ b/engines/saga/input.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "saga/saga.h"
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index c3773b2cb2..08c5ddc6f9 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Game interface module
diff --git a/engines/saga/interface.h b/engines/saga/interface.h
index 09631bf0e8..84533705fe 100644
--- a/engines/saga/interface.h
+++ b/engines/saga/interface.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Game interface module private header file
diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp
index 2053c7158f..364c4cf306 100644
--- a/engines/saga/introproc_ihnm.cpp
+++ b/engines/saga/introproc_ihnm.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_IHNM
diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp
index ae7dedefa5..87fd48e2d2 100644
--- a/engines/saga/introproc_ite.cpp
+++ b/engines/saga/introproc_ite.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Intro sequence scene procedures
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index 7f04474c61..80d53a2794 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_SAGA2
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index 6450af268a..adea59ca9a 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Isometric level module
diff --git a/engines/saga/isomap.h b/engines/saga/isomap.h
index 7dc7dff8cd..b35f79b1af 100644
--- a/engines/saga/isomap.h
+++ b/engines/saga/isomap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Isometric level module - private header
diff --git a/engines/saga/itedata.cpp b/engines/saga/itedata.cpp
index ab0aa12d18..44aa48ccee 100644
--- a/engines/saga/itedata.cpp
+++ b/engines/saga/itedata.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Actor and Object data tables
diff --git a/engines/saga/itedata.h b/engines/saga/itedata.h
index f0f626a51a..73f0a2aa21 100644
--- a/engines/saga/itedata.h
+++ b/engines/saga/itedata.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Actor data table header file
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index eb0a911555..21f3cc489e 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// MIDI and digital music class
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 465d61e366..5a4e662af4 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Music class
diff --git a/engines/saga/objectmap.cpp b/engines/saga/objectmap.cpp
index 9799edc34a..b9594625e1 100644
--- a/engines/saga/objectmap.cpp
+++ b/engines/saga/objectmap.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Object map / Object click-area module
diff --git a/engines/saga/objectmap.h b/engines/saga/objectmap.h
index 9e7c004fc0..3f71c8f95d 100644
--- a/engines/saga/objectmap.h
+++ b/engines/saga/objectmap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Object map / Object click-area module header file
diff --git a/engines/saga/palanim.cpp b/engines/saga/palanim.cpp
index b0b76fc947..1fefad93ab 100644
--- a/engines/saga/palanim.cpp
+++ b/engines/saga/palanim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Palette animation module
diff --git a/engines/saga/palanim.h b/engines/saga/palanim.h
index 2d2c3f1399..9959d08e2f 100644
--- a/engines/saga/palanim.h
+++ b/engines/saga/palanim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Palette animation module header file
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 0e08c84e43..d5d83c706f 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "saga/saga.h"
diff --git a/engines/saga/puzzle.h b/engines/saga/puzzle.h
index 312f0d71b1..0f9bd8aeff 100644
--- a/engines/saga/puzzle.h
+++ b/engines/saga/puzzle.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// ITE puzzle scene
diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp
index 837a9e5879..757374a3a3 100644
--- a/engines/saga/render.cpp
+++ b/engines/saga/render.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Main rendering loop
diff --git a/engines/saga/render.h b/engines/saga/render.h
index f0241e8ecf..5694bacb35 100644
--- a/engines/saga/render.h
+++ b/engines/saga/render.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Main rendering loop - private header
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 578ce2d5ab..72b021309c 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// RSC Resource file management module
diff --git a/engines/saga/resource.h b/engines/saga/resource.h
index a21f636f25..2124f3e29f 100644
--- a/engines/saga/resource.h
+++ b/engines/saga/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// RSC Resource file management header file
diff --git a/engines/saga/resource_hrs.cpp b/engines/saga/resource_hrs.cpp
index 21cf0ef4c1..ac16e21c12 100644
--- a/engines/saga/resource_hrs.cpp
+++ b/engines/saga/resource_hrs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_SAGA2
diff --git a/engines/saga/resource_res.cpp b/engines/saga/resource_res.cpp
index 2cc12747af..4fec9da662 100644
--- a/engines/saga/resource_res.cpp
+++ b/engines/saga/resource_res.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// RSC Resource file management module (SAGA 1, used in IHNM)
diff --git a/engines/saga/resource_rsc.cpp b/engines/saga/resource_rsc.cpp
index 089757ca27..bc66e9e30a 100644
--- a/engines/saga/resource_rsc.cpp
+++ b/engines/saga/resource_rsc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// RSC Resource file management module (SAGA 1, used in ITE)
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 62493f5eac..15bd2aff72 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
@@ -28,7 +25,6 @@
#include "common/config-manager.h"
#include "common/system.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "audio/mixer.h"
@@ -59,7 +55,7 @@ namespace Saga {
#define MAX_TIME_DELTA 100
SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
- : Engine(syst), _gameDescription(gameDesc) {
+ : Engine(syst), _gameDescription(gameDesc), _rnd("saga") {
_framesEsc = 0;
@@ -136,7 +132,6 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
SearchMan.addSubDirectoryMatching(gameDataDir, "video");
_displayClip.left = _displayClip.top = 0;
- g_eventRec.registerRandomSource(_rnd, "saga");
}
SagaEngine::~SagaEngine() {
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 4df44a2e18..6d33979028 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SAGA_H
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 27300377e9..8d7b718c09 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/savefile.h"
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 8e9e4463ba..66ee8f4504 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Scene management module
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index 156705986d..adac3b622a 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Scene management module private header file
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index bd1d6e5d84..9502631f37 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Scripting module: Script resource handling functions
diff --git a/engines/saga/script.h b/engines/saga/script.h
index fba71edfba..227b58a298 100644
--- a/engines/saga/script.h
+++ b/engines/saga/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Scripting module private header
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 1e34362dc4..70f987a129 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Scripting module script function component
diff --git a/engines/saga/sfuncs_ihnm.cpp b/engines/saga/sfuncs_ihnm.cpp
index dd6bbbe6f8..1a73677846 100644
--- a/engines/saga/sfuncs_ihnm.cpp
+++ b/engines/saga/sfuncs_ihnm.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_IHNM
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 8f0baa9d53..39af7aa3db 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
diff --git a/engines/saga/shorten.h b/engines/saga/shorten.h
index f320e1dcc5..f2114bedeb 100644
--- a/engines/saga/shorten.h
+++ b/engines/saga/shorten.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// The code in this file is currently only used in SAGA2.
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index 46b13727a0..2433c93e93 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Sound resource management class
diff --git a/engines/saga/sndres.h b/engines/saga/sndres.h
index e4bae1b143..9b0eebc834 100644
--- a/engines/saga/sndres.h
+++ b/engines/saga/sndres.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Sound resource class header
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 8ffce4e6cd..3408125f73 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/saga/sound.h b/engines/saga/sound.h
index 15003b515c..15624a9da5 100644
--- a/engines/saga/sound.h
+++ b/engines/saga/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Sound class
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp
index bc3646e898..81893c7480 100644
--- a/engines/saga/sprite.cpp
+++ b/engines/saga/sprite.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Sprite management module
diff --git a/engines/saga/sprite.h b/engines/saga/sprite.h
index 2ffb940ccc..0375d8c63f 100644
--- a/engines/saga/sprite.h
+++ b/engines/saga/sprite.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Sprite management module private header file
diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp
index 0b59f3ba17..ec81d8d733 100644
--- a/engines/saga/sthread.cpp
+++ b/engines/saga/sthread.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Scripting module thread management component
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index bed19ba3e5..9ed8356d3b 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/savestate.h"
diff --git a/engines/savestate.h b/engines/savestate.h
index 9b64a96aee..ce78bc4ba3 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef ENGINES_SAVESTATE_H
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 419f5e1415..af945247ba 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Console module
@@ -77,6 +74,9 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV
Console::Console(SciEngine *engine) : GUI::Debugger(),
_engine(engine), _debugState(engine->_debugState) {
+ assert(_engine);
+ assert(_engine->_gamestate);
+
// Variables
DVar_Register("sleeptime_factor", &g_debug_sleeptime_factor, DVAR_INT, 0);
DVar_Register("gc_interval", &engine->_gamestate->scriptGCInterval, DVAR_INT, 0);
@@ -3362,20 +3362,22 @@ bool Console::cmdSfx01Track(int argc, const char **argv) {
bool Console::cmdQuit(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("%s game - exit gracefully\n", argv[0]);
- DebugPrintf("%s now - exit ungracefully\n", argv[0]);
- return true;
}
- if (!scumm_stricmp(argv[1], "game")) {
+ if (argc == 2 && !scumm_stricmp(argv[1], "now")) {
+ // Quit ungracefully
+ g_system->quit();
+ } else if (argc == 1 || (argc == 2 && !scumm_stricmp(argv[1], "game"))) {
+
// Quit gracefully
_engine->_gamestate->abortScriptProcessing = kAbortQuitGame; // Terminate VM
_debugState.seeking = kDebugSeekNothing;
_debugState.runningStep = 0;
- } else if (!scumm_stricmp(argv[1], "now")) {
- // Quit ungracefully
- exit(0);
+ } else {
+ DebugPrintf("%s [game] - exit gracefully\n", argv[0]);
+ DebugPrintf("%s now - exit ungracefully\n", argv[0]);
+ return true;
}
return Cmd_Exit(0, 0);
@@ -3775,7 +3777,7 @@ int Console::printObject(reg_t pos) {
DebugPrintf(" -- member variables:\n");
for (i = 0; (uint)i < obj->getVarCount(); i++) {
DebugPrintf(" ");
- if (i < var_container->getVarCount()) {
+ if (var_container && i < var_container->getVarCount()) {
uint16 varSelector = var_container->getVarSelector(i);
DebugPrintf("[%03x] %s = ", varSelector, _engine->getKernel()->getSelectorName(varSelector).c_str());
} else
diff --git a/engines/sci/console.h b/engines/sci/console.h
index 93ccc45503..1e2ebe4ba2 100644
--- a/engines/sci/console.h
+++ b/engines/sci/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Console module header file
diff --git a/engines/sci/debug.h b/engines/sci/debug.h
index 8ddbbd0d45..765ceca07d 100644
--- a/engines/sci/debug.h
+++ b/engines/sci/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_DEBUG_H
diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp
index c122fceeb0..03a06d240d 100644
--- a/engines/sci/decompressor.cpp
+++ b/engines/sci/decompressor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Resource library
diff --git a/engines/sci/decompressor.h b/engines/sci/decompressor.h
index 8b6f955ddb..37a5b5d7cb 100644
--- a/engines/sci/decompressor.h
+++ b/engines/sci/decompressor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_DECOMPRESSOR_H
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 6db6cf8353..61e6cc9d09 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/advancedDetector.h"
@@ -405,7 +402,7 @@ public:
SciMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "SCI Engine [SCI0, SCI01, SCI10, SCI11"
+ return "SCI [SCI0, SCI01, SCI10, SCI11"
#ifdef ENABLE_SCI32
", SCI32"
#endif
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 829831d3a6..d56d8f03cd 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Sci {
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 964097f57d..a5c1b970f1 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/features.h"
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 8237d43714..07ba626d15 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_INCLUDE_FEATURES_H
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp
index e395eeab94..2d71878bda 100644
--- a/engines/sci/engine/gc.cpp
+++ b/engines/sci/engine/gc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/gc.h"
diff --git a/engines/sci/engine/gc.h b/engines/sci/engine/gc.h
index 48e1c6b482..97aa6513b6 100644
--- a/engines/sci/engine/gc.h
+++ b/engines/sci/engine/gc.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index ea6fa31d05..8fb6322f55 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 9a55ef630b..68b1601580 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_KERNEL_H
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 16d56d10a8..31ef64d109 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_KERNEL_TABLES_H
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 725b78341b..2cd6b198de 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 0e2f64257a..ee88d8af15 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
@@ -466,7 +463,7 @@ static int findSavegame(Common::Array<SavegameDesc> &saves, int16 savegameId) {
// The scripts get IDs ranging from 100->199, because the scripts require us to assign unique ids THAT EVEN STAY BETWEEN
// SAVES and the scripts also use "saves-count + 1" to create a new savedgame slot.
// SCI1.1 actually recycles ids, in that case we will currently get "0".
-// This behaviour is required especially for LSL6. In this game, it's possible to quick save. The scripts will use
+// This behavior is required especially for LSL6. In this game, it's possible to quick save. The scripts will use
// the last-used id for that feature. If we don't assign sticky ids, the feature will overwrite different saves all the
// time. And sadly we can't just use the actual filename ids directly, because of the creation method for new slots.
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index c7a2a26c3d..6c96266922 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
@@ -363,10 +360,29 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) {
} else
#endif
g_sci->_gfxText16->kernelTextSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight);
-
+
+ // One of the game texts in LB2 German contains loads of spaces in
+ // its end. We trim the text here, otherwise the graphics code will
+ // attempt to draw a very large window (larger than the screen) to
+ // show the text, and crash.
+ // Fixes bug #3306417.
+ if (textWidth >= g_sci->_gfxScreen->getDisplayWidth() ||
+ textHeight >= g_sci->_gfxScreen->getDisplayHeight()) {
+ // TODO: Is this needed for SCI32 as well?
+ if (g_sci->_gfxText16) {
+ warning("kTextSize: string would be too big to fit on screen. Trimming it");
+ text.trim();
+ // Copy over the trimmed string...
+ s->_segMan->strcpy(argv[1], text.c_str());
+ // ...and recalculate bounding box dimensions
+ g_sci->_gfxText16->kernelTextSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight);
+ }
+ }
+
debugC(kDebugLevelStrings, "GetTextSize '%s' -> %dx%d", text.c_str(), textWidth, textHeight);
dest[2] = make_reg(0, textHeight);
dest[3] = make_reg(0, textWidth);
+
return s->r_acc;
}
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 38cd6ef023..68469f5c9a 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/features.h"
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 9baf9f5a54..ef795d7e2f 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/state.h"
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp
index 3986966a71..02aa1d3ece 100644
--- a/engines/sci/engine/kmenu.cpp
+++ b/engines/sci/engine/kmenu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 80425224bf..daed248db1 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index f4392df8f2..31715f19d3 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp
index 09cf7744b2..59694cb6ee 100644
--- a/engines/sci/engine/kparse.cpp
+++ b/engines/sci/engine/kparse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* String and parser handling */
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 7786f9b093..8904a48978 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -37,6 +34,8 @@
namespace Sci {
+// TODO: Code cleanup
+
#define AVOIDPATH_DYNMEM_STRING "AvoidPath polyline"
#define POLY_LAST_POINT 0x7777
@@ -1177,7 +1176,6 @@ static void change_polygons_opt_0(PathfindingState *s) {
static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Common::Point start, Common::Point end, int width, int height, int opt) {
SegManager *segMan = s->_segMan;
Polygon *polygon;
- int err;
int count = 0;
PathfindingState *pf_s = new PathfindingState(width, height);
@@ -1200,50 +1198,53 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
}
}
- if (opt == 0) {
- Common::Point intersection;
-
- // Keyboard support
- // FIXME: We don't need to dijkstra for keyboard support as we currently do
+ if (opt == 0)
change_polygons_opt_0(pf_s);
- // Find nearest intersection
- err = nearest_intersection(pf_s, start, end, &intersection);
-
- if (err == PF_FATAL) {
- warning("AvoidPath: fatal error finding nearest intersection");
- delete pf_s;
- return NULL;
- }
-
- if (err == PF_OK) {
- // Intersection was found, prepend original start position after pathfinding
- pf_s->_prependPoint = new Common::Point(start);
- // Merge new start point into polygon set
- pf_s->vertex_start = merge_point(pf_s, intersection);
- } else {
- // Otherwise we proceed with the original start point
- pf_s->vertex_start = merge_point(pf_s, start);
- }
- // Merge end point into polygon set
- pf_s->vertex_end = merge_point(pf_s, end);
- } else {
- Common::Point *new_start = fixup_start_point(pf_s, start);
+ Common::Point *new_start = fixup_start_point(pf_s, start);
+
+ if (!new_start) {
+ warning("AvoidPath: Couldn't fixup start position for pathfinding");
+ delete pf_s;
+ return NULL;
+ }
- if (!new_start) {
- warning("AvoidPath: Couldn't fixup start position for pathfinding");
- delete pf_s;
- return NULL;
- }
+ Common::Point *new_end = fixup_end_point(pf_s, end);
+
+ if (!new_end) {
+ warning("AvoidPath: Couldn't fixup end position for pathfinding");
+ delete new_start;
+ delete pf_s;
+ return NULL;
+ }
- Common::Point *new_end = fixup_end_point(pf_s, end);
+ if (opt == 0) {
+ // Keyboard support. Only the first edge of the path we compute
+ // here matches the path returned by SSCI. This is assumed to be
+ // sufficient as all known use cases only use the first two
+ // vertices of the returned path.
+ // Pharkas uses this mode for a secondary polygon set containing
+ // rectangular polygons used to block an actor's path.
+
+ // If we have a prepended point, we do nothing here as the
+ // actor is in barred territory and should be moved outside of
+ // it ASAP. This matches the behavior of SSCI.
+ if (!pf_s->_prependPoint) {
+ // Actor position is OK, find nearest obstacle.
+ int err = nearest_intersection(pf_s, start, *new_end, new_start);
+
+ if (err == PF_FATAL) {
+ warning("AvoidPath: error finding nearest intersection");
+ delete new_start;
+ delete new_end;
+ delete pf_s;
+ return NULL;
+ }
- if (!new_end) {
- warning("AvoidPath: Couldn't fixup end position for pathfinding");
- delete pf_s;
- return NULL;
+ if (err == PF_OK)
+ pf_s->_prependPoint = new Common::Point(start);
}
-
+ } else {
// WORKAROUND LSL5 room 660. Priority glitch due to us choosing a different path
// than SSCI. Happens when Patti walks to the control room.
if (g_sci->getGameId() == GID_LSL5 && (s->currentRoomNumber() == 660) && (Common::Point(67, 131) == *new_start) && (Common::Point(229, 101) == *new_end)) {
@@ -1251,14 +1252,14 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
pf_s->_prependPoint = new_start;
new_start = new Common::Point(77, 107);
}
+ }
- // Merge start and end points into polygon set
- pf_s->vertex_start = merge_point(pf_s, *new_start);
- pf_s->vertex_end = merge_point(pf_s, *new_end);
+ // Merge start and end points into polygon set
+ pf_s->vertex_start = merge_point(pf_s, *new_start);
+ pf_s->vertex_end = merge_point(pf_s, *new_end);
- delete new_start;
- delete new_end;
- }
+ delete new_start;
+ delete new_end;
// Allocate and build vertex index
pf_s->vertex_index = (Vertex**)malloc(sizeof(Vertex *) * (count + 2));
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index b9baa3540a..d83254b2c4 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -49,7 +46,7 @@ reg_t kLoad(EngineState *s, int argc, reg_t *argv) {
}
// Unloads an arbitrary resource of type 'restype' with resource numbber 'resnr'
-// behaviour of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with
+// behavior of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with
// 1 or 3+ parameters is not right according to sierra sci
reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) {
if (argc >= 2) {
@@ -195,7 +192,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) {
}
// SCI uses this technique to find out, if it's a clone and if it's supposed to get freed
- // At least kq4early relies on this behaviour. The scripts clone "Sound", then set bit 1 manually
+ // At least kq4early relies on this behavior. The scripts clone "Sound", then set bit 1 manually
// and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues
// later, because kIsObject would then return false and Sound object wouldn't get checked.
uint16 infoSelector = object->getInfoSelector().offset;
@@ -262,7 +259,7 @@ reg_t kDisposeScript(EngineState *s, int argc, reg_t *argv) {
SegmentId id = s->_segMan->getScriptSegment(script);
Script *scr = s->_segMan->getScriptIfLoaded(id);
- if (scr) {
+ if (scr && !scr->isMarkedAsDeleted()) {
if (s->_executionStack.back().addr.pc.segment != id)
scr->setLockers(1);
}
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 7fb6ac296e..33bef58e52 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index e79af70158..c3c10bd2a2 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* String and parser handling */
@@ -69,8 +66,9 @@ reg_t kStrCpy(EngineState *s, int argc, reg_t *argv) {
s->_segMan->strncpy(argv[0], argv[1], length);
else
s->_segMan->memcpy(argv[0], argv[1], -length);
- } else
+ } else {
s->_segMan->strcpy(argv[0], argv[1]);
+ }
return argv[0];
}
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index a8d4437148..9a60f39c85 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/util.h"
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index ff2d96e804..f30f4e923e 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index 43ddb29d78..4444ede3bb 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_MESSAGE_H
diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp
index 267ba35e3c..f09f18298a 100644
--- a/engines/sci/engine/object.cpp
+++ b/engines/sci/engine/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -61,14 +58,14 @@ void Object::init(byte *buf, reg_t obj_pos, bool initVariables) {
if (getSciVersion() <= SCI_VERSION_1_LATE) {
_variables.resize(READ_LE_UINT16(data + kOffsetSelectorCounter));
- _baseVars = (uint16 *)(_baseObj + _variables.size() * 2);
+ _baseVars = (const uint16 *)(_baseObj + _variables.size() * 2);
_methodCount = READ_LE_UINT16(data + READ_LE_UINT16(data + kOffsetFunctionArea) - 2);
for (int i = 0; i < _methodCount * 2 + 2; ++i) {
_baseMethod.push_back(READ_SCI11ENDIAN_UINT16(data + READ_LE_UINT16(data + kOffsetFunctionArea) + i * 2));
}
} else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) {
_variables.resize(READ_SCI11ENDIAN_UINT16(data + 2));
- _baseVars = (uint16 *)(buf + READ_SCI11ENDIAN_UINT16(data + 4));
+ _baseVars = (const uint16 *)(buf + READ_SCI11ENDIAN_UINT16(data + 4));
_methodCount = READ_SCI11ENDIAN_UINT16(buf + READ_SCI11ENDIAN_UINT16(data + 6));
for (int i = 0; i < _methodCount * 2 + 3; ++i) {
_baseMethod.push_back(READ_SCI11ENDIAN_UINT16(buf + READ_SCI11ENDIAN_UINT16(data + 6) + i * 2));
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 8ae06f2707..80c8e9e83d 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_OBJECT_H
@@ -239,7 +236,7 @@ private:
void initSelectorsSci3(const byte *buf);
const byte *_baseObj; /**< base + object offset within base */
- uint16 *_baseVars; /**< Pointer to the varselector area for this object */
+ const uint16 *_baseVars; /**< Pointer to the varselector area for this object */
Common::Array<uint16> _baseMethod; /**< Pointer to the method selector area for this object */
uint16 *_propertyOffsetsSci3; /**< This is used to enable relocation of property valuesa in SCI3 */
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 43d00ebc15..65b5e602ff 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stream.h"
diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h
index 778b0bf137..ff5bc5204b 100644
--- a/engines/sci/engine/savegame.h
+++ b/engines/sci/engine/savegame.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SAVEGAME_H
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 25bf91c3ad..a38aa06bc4 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -383,6 +380,7 @@ void Script::relocateSci3(reg_t block) {
}
void Script::incrementLockers() {
+ assert(!_markedAsDeleted);
_lockers++;
}
@@ -396,6 +394,7 @@ int Script::getLockers() const {
}
void Script::setLockers(int lockers) {
+ assert(lockers == 0 || !_markedAsDeleted);
_lockers = lockers;
}
@@ -493,7 +492,7 @@ SegmentRef Script::dereference(reg_t pointer) {
return ret;
}
-void Script::initialiseLocals(SegManager *segMan) {
+void Script::initializeLocals(SegManager *segMan) {
LocalVariables *locals = segMan->allocLocalsSegment(this);
if (locals) {
if (getSciVersion() > SCI_VERSION_0_EARLY) {
@@ -509,7 +508,7 @@ void Script::initialiseLocals(SegManager *segMan) {
}
}
-void Script::initialiseClasses(SegManager *segMan) {
+void Script::initializeClasses(SegManager *segMan) {
const byte *seeker = 0;
uint16 mult = 0;
@@ -581,7 +580,7 @@ void Script::initialiseClasses(SegManager *segMan) {
}
}
-void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjectsSci0(SegManager *segMan, SegmentId segmentId) {
bool oldScriptHeader = (getSciVersion() == SCI_VERSION_0_EARLY);
// We need to make two passes, as the objects in the script might be in the
@@ -633,7 +632,7 @@ void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) {
relocateSci0Sci21(make_reg(segmentId, relocationBlock - getBuf() + 4));
}
-void Script::initialiseObjectsSci11(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjectsSci11(SegManager *segMan, SegmentId segmentId) {
const byte *seeker = _heapStart + 4 + READ_SCI11ENDIAN_UINT16(_heapStart + 2) * 2;
while (READ_SCI11ENDIAN_UINT16(seeker) == SCRIPT_OBJECT_MAGIC_NUMBER) {
@@ -668,7 +667,7 @@ void Script::initialiseObjectsSci11(SegManager *segMan, SegmentId segmentId) {
relocateSci0Sci21(make_reg(segmentId, READ_SCI11ENDIAN_UINT16(_heapStart)));
}
-void Script::initialiseObjectsSci3(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjectsSci3(SegManager *segMan, SegmentId segmentId) {
const byte *seeker = getSci3ObjectsPointer();
while (READ_SCI11ENDIAN_UINT16(seeker) == SCRIPT_OBJECT_MAGIC_NUMBER) {
@@ -682,13 +681,13 @@ void Script::initialiseObjectsSci3(SegManager *segMan, SegmentId segmentId) {
relocateSci3(make_reg(segmentId, 0));
}
-void Script::initialiseObjects(SegManager *segMan, SegmentId segmentId) {
+void Script::initializeObjects(SegManager *segMan, SegmentId segmentId) {
if (getSciVersion() <= SCI_VERSION_1_LATE)
- initialiseObjectsSci0(segMan, segmentId);
+ initializeObjectsSci0(segMan, segmentId);
else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1)
- initialiseObjectsSci11(segMan, segmentId);
+ initializeObjectsSci11(segMan, segmentId);
else if (getSciVersion() == SCI_VERSION_3)
- initialiseObjectsSci3(segMan, segmentId);
+ initializeObjectsSci3(segMan, segmentId);
}
reg_t Script::findCanonicAddress(SegManager *segMan, reg_t addr) const {
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index 18d7157747..ff061e0e36 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SCRIPT_H
@@ -140,20 +137,20 @@ public:
* Initializes the script's local variables
* @param segMan A reference to the segment manager
*/
- void initialiseLocals(SegManager *segMan);
+ void initializeLocals(SegManager *segMan);
/**
* Adds the script's classes to the segment manager's class table
* @param segMan A reference to the segment manager
*/
- void initialiseClasses(SegManager *segMan);
+ void initializeClasses(SegManager *segMan);
/**
* Initializes the script's objects (SCI0)
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjects(SegManager *segMan, SegmentId segmentId);
+ void initializeObjects(SegManager *segMan, SegmentId segmentId);
// script lock operations
@@ -283,21 +280,21 @@ private:
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId);
+ void initializeObjectsSci0(SegManager *segMan, SegmentId segmentId);
/**
* Initializes the script's objects (SCI1.1 - SCI2.1)
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjectsSci11(SegManager *segMan, SegmentId segmentId);
+ void initializeObjectsSci11(SegManager *segMan, SegmentId segmentId);
/**
* Initializes the script's objects (SCI3)
* @param segMan A reference to the segment manager
* @param segmentId The script's segment id
*/
- void initialiseObjectsSci3(SegManager *segMan, SegmentId segmentId);
+ void initializeObjectsSci3(SegManager *segMan, SegmentId segmentId);
};
} // End of namespace Sci
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 06540e6f43..2d3d8f6155 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -865,6 +862,7 @@ const byte qfg3DialogCrash[] = {
0x34, 0xe7, 0x03, // ldi 3e7 (999)
0x22, // lt?
0x33, // jmp [back] ---> BUG! Infinite loop
+ 0
};
const uint16 qfg3PatchDialogCrash[] = {
@@ -874,50 +872,9 @@ const uint16 qfg3PatchDialogCrash[] = {
PATCH_END
};
-// Part of script 47 that handles the barter icon checks for the wrong local.
-// The local is supposed to contain the value returned by a previous kDisplay
-// call, but since the wrong one is checked, it contains junk instead. We
-// remove that check here (this doesn't affect the game at all). This occurs
-// when attempting to purchase something from a vendor and the barter button is
-// available (e.g. when buying the robe or meat from the associated vendors).
-// Fixes bug #3292251.
-const byte qfg3BarterCrash[] = {
- 22,
- 0x83, 0x10, // lal 10 ---> BUG! Wrong local
- 0x30, 0x11, 0x00, // bnt 0011 ---> the accumulator will now contain garbage, so this check fails
- 0x35, 0x00, // ldi 00
- 0xa5, 0x00, // sat 00
- 0x39, 0x03, // pushi 03
- 0x5b, 0x04, 0x00, // lea 04 00
- 0x36, // push
- 0x39, 0x6c, // pushi 6c
- 0x8b, 0x10, // lsl 10 ---> local 10 contains garbage, so the call below will fail
- 0x43, 0x1b, 0x06 // callk Display[1b] 06
-};
-
-// Same as above, but for local 0x11
-const byte qfg3BarterCrash2[] = {
- 18,
- 0x83, 0x11, // lal 11 ---> BUG! Wrong local
- 0x30, 0x0d, 0x00, // bnt 000d ---> the accumulator will now contain garbage, so this check fails
- 0x39, 0x03, // pushi 03
- 0x5b, 0x04, 0x00, // lea 04 00
- 0x36, // push
- 0x39, 0x6c, // pushi 6c
- 0x8b, 0x11, // lsl 11 ---> local 11 contains garbage, so the call below will fail
- 0x43, 0x1b, 0x06 // callk Display[1b] 06
-};
-
-const uint16 qfg3PatchBarterCrash[] = {
- 0x35, 0x00, // ldi 00 ---> the accumulator will always be zero, so the problematic code won't run
- PATCH_END
-};
-
// script, description, magic DWORD, adjust
const SciScriptSignature qfg3Signatures[] = {
{ 23, "dialog crash", 1, PATCH_MAGICDWORD(0xe7, 0x03, 0x22, 0x33), -1, qfg3DialogCrash, qfg3PatchDialogCrash },
- { 47, "barter crash", 1, PATCH_MAGICDWORD(0x83, 0x10, 0x30, 0x11), 0, qfg3BarterCrash, qfg3PatchBarterCrash },
- { 47, "barter crash 2", 1, PATCH_MAGICDWORD(0x83, 0x11, 0x30, 0x0d), 0, qfg3BarterCrash2, qfg3PatchBarterCrash },
{ 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a), -1, qfg3SignatureImportDialog, qfg3PatchImportDialog },
SCI_SIGNATUREENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 596494d61b..16098ab275 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Script debugger functionality. Absolutely not threadsafe.
@@ -34,6 +31,10 @@
namespace Sci {
+// This table is only used for debugging. Don't include it for devices
+// with not enough available memory (e.g. phones), where REDUCE_MEMORY_USAGE
+// is defined
+#ifndef REDUCE_MEMORY_USAGE
const char *opcodeNames[] = {
"bnot", "add", "sub", "mul", "div",
"mod", "shr", "shl", "xor", "and",
@@ -62,6 +63,7 @@ const char *opcodeNames[] = {
"-agi", "-ali", "-ati", "-api", "-sgi",
"-sli", "-sti", "-spi"
};
+#endif // REDUCE_MEMORY_USAGE
// Disassembles one command from the heap, returns address of next command or 0 if a ret was encountered.
reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode) {
@@ -113,7 +115,9 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
if (printBWTag)
debugN("[%c] ", opsize ? 'B' : 'W');
+#ifndef REDUCE_MEMORY_USAGE
debugN("%s", opcodeNames[opcode]);
+#endif
i = 0;
while (g_opcode_formats[opcode][i]) {
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 0dc245a991..ab67da32db 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -1010,9 +1007,9 @@ int SegManager::instantiateScript(int scriptNum) {
scr->init(scriptNum, _resMan);
scr->load(_resMan);
- scr->initialiseLocals(this);
- scr->initialiseClasses(this);
- scr->initialiseObjects(this, segmentId);
+ scr->initializeLocals(this);
+ scr->initializeClasses(this);
+ scr->initializeObjects(this, segmentId);
return segmentId;
}
@@ -1023,7 +1020,7 @@ void SegManager::uninstantiateScript(int script_nr) {
if (!scr || scr->isMarkedAsDeleted()) { // Is it already unloaded?
//warning("unloading script 0x%x requested although not loaded", script_nr);
- // This is perfectly valid SCI behaviour
+ // This is perfectly valid SCI behavior
return;
}
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index d402afbf1a..ab5aeacabf 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SEGMAN_H
@@ -74,7 +71,7 @@ public:
*/
Script *allocateScript(int script_nr, SegmentId *seg_id);
- // The script must then be initialised; see section (1b.), below.
+ // The script must then be initialized; see section (1b.), below.
/**
* Forcefully deallocate a previously allocated script.
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index 2bb77c707a..5d8a81a7f1 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index 947953e8c3..009a2558ce 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SEGMENT_H
@@ -134,7 +131,7 @@ public:
/**
* Iterates over all references reachable from the specified object.
* Used by the garbage collector.
- * @param object object (within the current segment) to analyse
+ * @param object object (within the current segment) to analyze
* @return a list of outgoing references within the object
*
* @note This function may also choose to report numbers (segment 0) as adresses
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 957a836e3e..2edbea9676 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h
index 8a47984204..f13c13e00c 100644
--- a/engines/sci/engine/selector.h
+++ b/engines/sci/engine/selector.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_SELECTOR_H
@@ -47,7 +44,7 @@ struct SelectorCache {
Selector underBits; ///< Used by the graphics subroutines to store backupped BG pic data
Selector nsTop, nsLeft, nsBottom, nsRight; ///< View boundaries ('now seen')
Selector lsTop, lsLeft, lsBottom, lsRight; ///< Used by Animate() subfunctions and scroll list controls
- Selector signal; ///< Used by Animate() to control a view's behaviour
+ Selector signal; ///< Used by Animate() to control a view's behavior
Selector illegalBits; ///< Used by CanBeHere
Selector brTop, brLeft, brBottom, brRight; ///< Bounding Rectangle
// name, key, time
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index f9d6c70389..e094ed3bd7 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index cd6d56500a..dcffe6dbb3 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_INCLUDE_ENGINE_H
diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp
index 23241de330..6526eff2db 100644
--- a/engines/sci/engine/static_selectors.cpp
+++ b/engines/sci/engine/static_selectors.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// We place selector vocab name tables here for any game that doesn't have
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index b441815014..499574957e 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
@@ -117,7 +114,9 @@ static bool validate_variable(reg_t *r, reg_t *stack_base, int type, int max, in
return true;
}
+#ifndef REDUCE_MEMORY_USAGE
extern const char *opcodeNames[]; // from scriptdebug.cpp
+#endif
static reg_t read_var(EngineState *s, int type, int index) {
if (validate_variable(s->variables[type], s->stack_base, type, s->variablesMax[type], index)) {
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 5947579aa3..36eadfa1c2 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_VM_H
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp
index e606fa1f86..71a28a9761 100644
--- a/engines/sci/engine/vm_types.cpp
+++ b/engines/sci/engine/vm_types.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h
index b927df339e..dc87cf758a 100644
--- a/engines/sci/engine/vm_types.h
+++ b/engines/sci/engine/vm_types.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_VM_TYPES_H
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 20d6cd0dd0..fa25b02a8f 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/kernel.h"
@@ -213,7 +210,10 @@ const SciWorkaroundEntry kDisplay_workarounds[] = {
{ GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4ae, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id
{ GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4c1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id (another pq2 version, bug #3043904)
{ GID_QFG1, 11, 11, 0, "battle", "<noname90>", -1, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id
+ { GID_QFG3, -1, 47, 0, "barterWin", "open", 0x1426, 0, { WORKAROUND_IGNORE, 0 } }, // sometimes when talking with a vendor that can be bartered with, the wrong local variable is checked and the variable contents are wrong - bug #3292251
+ { GID_QFG3, -1, 47, 0, "barterIcon", "show", 0x135c, 0, { WORKAROUND_IGNORE, 0 } }, // sometimes when talking with a vendor that can be bartered with, the wrong local variable is checked and the variable contents are wrong - bug #3292251
{ GID_SQ1, -1, 700, 0, "arcadaRegion", "doit", -1, 0, { WORKAROUND_IGNORE, 0 } }, // restoring in some rooms of the arcada (right at the start)
+ { GID_SQ1, 44, 44, 0, "spinDone", "changeState",0x13b0, 0, { WORKAROUND_IGNORE, 0 } }, // restoring a game at the slot machine in Ulence Flats (bug #3308087)
{ GID_SQ4, 397, 0, 0, "", "export 12", -1, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store (bug #3044044)
{ GID_SQ4, 391, 391, 0, "doCatalog", "mode", 0x84, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object
{ GID_SQ4, 391, 391, 0, "choosePlug", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // CD: ordering connector in roboter sale - a parameter is an object
@@ -230,7 +230,7 @@ const SciWorkaroundEntry kDirLoop_workarounds[] = {
const SciWorkaroundEntry kDisposeScript_workarounds[] = {
{ GID_LAURABOW, 777, 777, 0, "myStab", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: after the will is signed, parameter 0 is an object - bug #3034907
{ GID_QFG1, -1, 64, 0, "rm64", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving graveyard, parameter 0 is an object
- { GID_SQ4, 150, 151, 0, "fightScript", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during fight with vohaul, parameter 0 is an object
+ { GID_SQ4, 150, 151, 0, "fightScript", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during fight with Vohaul, parameter 0 is an object
{ GID_SQ4, 150, 152, 0, "driveCloseUp", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when choosing "beam download", parameter 0 is an object
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index c7721aa787..59054ae552 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_ENGINE_WORKAROUNDS_H
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 6b5ea64fc4..74879f6c63 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
@@ -253,7 +250,7 @@ SciEvent EventManager::getScummVMEvent() {
// When Ctrl AND Alt are pressed together with a regular key, Linux will give us control-key, Windows will give
// us the actual key. My opinion is that windows is right, because under DOS the keys worked the same, anyway
// we support the other case as well
- if ((modifiers & Common::KBD_SHIFT) && input.character > 0 && input.character < 27)
+ if ((modifiers & Common::KBD_ALT) && input.character > 0 && input.character < 27)
input.character += 96; // 0x01 -> 'a'
if (getSciVersion() <= SCI_VERSION_1_MIDDLE) {
diff --git a/engines/sci/event.h b/engines/sci/event.h
index be0322f2a4..930001160a 100644
--- a/engines/sci/event.h
+++ b/engines/sci/event.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_EVENT_H
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index d8f3fa09b0..c36ecd112a 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
@@ -233,7 +230,7 @@ void GfxAnimate::adjustInvalidCels(GfxView *view, AnimateList::iterator it) {
// this seems to be completely crazy code
// sierra sci checked signed int16 to be above or equal the counts and reseted to 0 in those cases
// later during view processing those are compared unsigned again and then set to maximum count - 1
- // Games rely on this behaviour. For example laura bow 1 has a knight standing around in room 37
+ // Games rely on this behavior. For example laura bow 1 has a knight standing around in room 37
// which has cel set to 3. This cel does not exist and the actual knight is 0
// In kq5 on the other hand during the intro, when the trunk is opened, cel is set to some real
// high number, which is negative when considered signed. This actually requires to get fixed to
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h
index b2aadcbead..5e2e39ea1a 100644
--- a/engines/sci/graphics/animate.h
+++ b/engines/sci/graphics/animate.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_ANIMATE_H
diff --git a/engines/sci/graphics/cache.cpp b/engines/sci/graphics/cache.cpp
index 25475c727f..d2bd76ac99 100644
--- a/engines/sci/graphics/cache.cpp
+++ b/engines/sci/graphics/cache.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/sci/graphics/cache.h b/engines/sci/graphics/cache.h
index 140c96ecd0..c090cda7d7 100644
--- a/engines/sci/graphics/cache.h
+++ b/engines/sci/graphics/cache.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_CACHE_H
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp
index db926f2962..1dbe279f8a 100644
--- a/engines/sci/graphics/compare.cpp
+++ b/engines/sci/graphics/compare.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/sci/graphics/compare.h b/engines/sci/graphics/compare.h
index 1079f5f98c..83b4f49c08 100644
--- a/engines/sci/graphics/compare.h
+++ b/engines/sci/graphics/compare.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_GFX_H
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index f42946fbea..0289735c0a 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/sci/graphics/controls.h b/engines/sci/graphics/controls.h
index 9beaebe532..17e7c39318 100644
--- a/engines/sci/graphics/controls.h
+++ b/engines/sci/graphics/controls.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_CONTROLS_H
diff --git a/engines/sci/graphics/coordadjuster.cpp b/engines/sci/graphics/coordadjuster.cpp
index bbeade87b5..2952d4da7b 100644
--- a/engines/sci/graphics/coordadjuster.cpp
+++ b/engines/sci/graphics/coordadjuster.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/sci/graphics/coordadjuster.h b/engines/sci/graphics/coordadjuster.h
index 59afd1dcb7..1b8a3e2679 100644
--- a/engines/sci/graphics/coordadjuster.h
+++ b/engines/sci/graphics/coordadjuster.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_COORDADJUSTER_H
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index d4d7dcfd4f..ec49a38814 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -255,10 +252,10 @@ void GfxCursor::setPosition(Common::Point pos) {
// Some games display a new menu, set mouse position somewhere within and
// expect it to be in there. This is fine for a real mouse, but on wii using
// wii-mote or touch interfaces this won't work. In fact on those platforms
- // the menus will close immediately because of that behaviour.
+ // the menus will close immediately because of that behavior.
// We identify those cases and set a reaction-rect. If the mouse it outside
// of that rect, we won't report the position back to the scripts.
- // As soon as the mouse was inside once, we will revert to normal behaviour
+ // As soon as the mouse was inside once, we will revert to normal behavior
// Currently this code is enabled for all platforms, especially because we can't
// differentiate between e.g. Windows used via mouse and Windows used via touchscreen
// The workaround won't hurt real-mouse platforms
diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h
index 271cf507e0..25109b3920 100644
--- a/engines/sci/graphics/cursor.h
+++ b/engines/sci/graphics/cursor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_CURSOR_H
diff --git a/engines/sci/graphics/font.cpp b/engines/sci/graphics/font.cpp
index 760f4158ea..fcdd057509 100644
--- a/engines/sci/graphics/font.cpp
+++ b/engines/sci/graphics/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/graphics/font.h b/engines/sci/graphics/font.h
index 9d2b37c1f2..8e5c980e2c 100644
--- a/engines/sci/graphics/font.h
+++ b/engines/sci/graphics/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_FONT_H
diff --git a/engines/sci/graphics/fontsjis.cpp b/engines/sci/graphics/fontsjis.cpp
index 73229a6e93..ac58c55423 100644
--- a/engines/sci/graphics/fontsjis.cpp
+++ b/engines/sci/graphics/fontsjis.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/graphics/fontsjis.h b/engines/sci/graphics/fontsjis.h
index 5538b5c2c5..c4ae4ab580 100644
--- a/engines/sci/graphics/fontsjis.h
+++ b/engines/sci/graphics/fontsjis.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_FONTSJIS_H
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 7fafe843fd..11948d5d38 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/algorithm.h"
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 347ecb9424..7e5b1a5006 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_FRAMEOUT_H
diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h
index 343f3c7e6e..773f83a00e 100644
--- a/engines/sci/graphics/helpers.h
+++ b/engines/sci/graphics/helpers.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_HELPERS_H
diff --git a/engines/sci/graphics/maciconbar.cpp b/engines/sci/graphics/maciconbar.cpp
index 6cf4f269a7..bff145ad53 100644
--- a/engines/sci/graphics/maciconbar.cpp
+++ b/engines/sci/graphics/maciconbar.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/graphics/maciconbar.h b/engines/sci/graphics/maciconbar.h
index 72609d19ab..43de37a904 100644
--- a/engines/sci/graphics/maciconbar.h
+++ b/engines/sci/graphics/maciconbar.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_MACICONBAR_H
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 50ba77e832..9d4ab3f589 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/sci/graphics/menu.h b/engines/sci/graphics/menu.h
index a6ac4d1d4c..aa3550da4e 100644
--- a/engines/sci/graphics/menu.h
+++ b/engines/sci/graphics/menu.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_MENU_H
diff --git a/engines/sci/graphics/paint.cpp b/engines/sci/graphics/paint.cpp
index 27a0bdfc44..7befa99afe 100644
--- a/engines/sci/graphics/paint.cpp
+++ b/engines/sci/graphics/paint.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "graphics/primitives.h"
diff --git a/engines/sci/graphics/paint.h b/engines/sci/graphics/paint.h
index a79e8993c2..efeaa38875 100644
--- a/engines/sci/graphics/paint.h
+++ b/engines/sci/graphics/paint.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PAINT_H
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index 5172f7cdc0..75fef0a3ec 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/graphics/paint16.h b/engines/sci/graphics/paint16.h
index 69ddf09ea6..31916599ba 100644
--- a/engines/sci/graphics/paint16.h
+++ b/engines/sci/graphics/paint16.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PAINT16_H
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp
index f277436631..a9590c829a 100644
--- a/engines/sci/graphics/paint32.cpp
+++ b/engines/sci/graphics/paint32.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/graphics/paint32.h b/engines/sci/graphics/paint32.h
index e412bdf1c4..dd4246c507 100644
--- a/engines/sci/graphics/paint32.h
+++ b/engines/sci/graphics/paint32.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PAINT32_H
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 42551e9369..899ef10b33 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index d2e5151d6a..9b0c45baf6 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PALETTE_H
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 8cdd46268a..6529a6ae64 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stack.h"
diff --git a/engines/sci/graphics/picture.h b/engines/sci/graphics/picture.h
index 7cd0d71b67..78623d5e09 100644
--- a/engines/sci/graphics/picture.h
+++ b/engines/sci/graphics/picture.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PICTURE_H
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index 3f9ebaa07a..8cd8cdb033 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
diff --git a/engines/sci/graphics/portrait.h b/engines/sci/graphics/portrait.h
index 7da9425c9d..75baa9a56b 100644
--- a/engines/sci/graphics/portrait.h
+++ b/engines/sci/graphics/portrait.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PORTRAITS_H
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index cc206bd5b9..9412976d5b 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h
index 31ed671daf..1818eaddb3 100644
--- a/engines/sci/graphics/ports.h
+++ b/engines/sci/graphics/ports.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_PORTS_H
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 56e6759fac..2446ea545e 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/timer.h"
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index bfe0a50b81..73ea596ba1 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_SCREEN_H
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 6269a58492..c2f71a0e54 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
@@ -469,7 +466,7 @@ void GfxText16::Box(const char *text, bool show, const Common::Rect &rect, TextA
if (doubleByteMode) {
// Kanji is written by pc98 rom to screen directly. Because of
- // GetLongest() behaviour (not cutting off the last char, that causes a
+ // GetLongest() behavior (not cutting off the last char, that causes a
// new line), results in the script thinking that the text would need
// less space. The coordinate adjustment in fontsjis.cpp handles the
// incorrect centering because of that and this code actually shows all
diff --git a/engines/sci/graphics/text16.h b/engines/sci/graphics/text16.h
index 3ed2361497..b33c2c4df0 100644
--- a/engines/sci/graphics/text16.h
+++ b/engines/sci/graphics/text16.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_TEXT16_H
diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp
index dde1be13ab..1256db8969 100644
--- a/engines/sci/graphics/transitions.cpp
+++ b/engines/sci/graphics/transitions.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
diff --git a/engines/sci/graphics/transitions.h b/engines/sci/graphics/transitions.h
index a8f0ca6f07..246f681690 100644
--- a/engines/sci/graphics/transitions.h
+++ b/engines/sci/graphics/transitions.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_TRANSITIONS_H
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index f31cbacb22..5c8e9c3d2e 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/graphics/view.h b/engines/sci/graphics/view.h
index 36914f916c..19ef2e62f8 100644
--- a/engines/sci/graphics/view.h
+++ b/engines/sci/graphics/view.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_GRAPHICS_VIEW_H
diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp
index b330a432e3..6e02eb75e3 100644
--- a/engines/sci/parser/grammar.cpp
+++ b/engines/sci/parser/grammar.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* Functionality to transform the context-free SCI grammar rules into
diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp
index 666a235cf9..827e28073a 100644
--- a/engines/sci/parser/said.cpp
+++ b/engines/sci/parser/said.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/state.h"
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 25043401cc..a5c4686b3b 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Main vocabulary support functions and word lookup
@@ -395,9 +392,11 @@ void Vocabulary::lookupWord(ResultWordList& retval, const char *word, int word_l
// SCI01 was the first version to support
// multiple matches, so no need to look further
// in earlier versions.
- if (getSciVersion() < SCI_VERSION_01)
- return;
+ // In versions that do support multiple matches, it seems
+ // that SSCI also aborts early when it finds an exact match in the
+ // dictionary.
+ return;
}
// Now try all suffixes
diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h
index 6d3e0b301e..e4a7e41b3c 100644
--- a/engines/sci/parser/vocabulary.h
+++ b/engines/sci/parser/vocabulary.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_SCICORE_VOCABULARY_H
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index a48ae0fad7..308bd92ef4 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Resource library
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index e941f666d9..f450f1b397 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_RESOURCE_H
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 1e0b9c0ddf..588ea76ea5 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Resource library
diff --git a/engines/sci/resource_intern.h b/engines/sci/resource_intern.h
index 969e250e62..e8e66503d8 100644
--- a/engines/sci/resource_intern.h
+++ b/engines/sci/resource_intern.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_RESOURCE_INTERN_H
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 8a81ea7240..cc9042ceb7 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -18,16 +18,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
-#include "common/file.h" // for Common::File::exists()
#include "engines/advancedDetector.h"
#include "engines/util.h"
@@ -78,7 +73,7 @@ SciEngine *g_sci = 0;
class GfxDriver;
SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gameId)
- : Engine(syst), _gameDescription(desc), _gameId(gameId) {
+ : Engine(syst), _gameDescription(desc), _gameId(gameId), _rng("sci") {
assert(g_sci == 0);
g_sci = this;
@@ -186,8 +181,6 @@ SciEngine::~SciEngine() {
extern void showScummVMDialog(const Common::String &message);
Common::Error SciEngine::run() {
- g_eventRec.registerRandomSource(_rng, "sci");
-
// Assign default values to the config manager, in case settings are missing
ConfMan.registerDefault("sci_originalsaveload", "false");
ConfMan.registerDefault("native_fb01", "false");
@@ -220,8 +213,6 @@ Common::Error SciEngine::run() {
_gfxScreen = new GfxScreen(_resMan);
_gfxScreen->enableUndithering(ConfMan.getBool("disable_dithering"));
- // Create debugger console. It requires GFX to be initialized
- _console = new Console(this);
_kernel = new Kernel(_resMan, segMan);
_features = new GameFeatures(segMan, _kernel);
@@ -234,6 +225,9 @@ Common::Error SciEngine::run() {
_gamestate = new EngineState(segMan);
_eventMan = new EventManager(_resMan->detectFontExtended());
+ // Create debugger console. It requires GFX and _gamestate to be initialized
+ _console = new Console(this);
+
// The game needs to be initialized before the graphics system is initialized, as
// the graphics code checks parts of the seg manager upon initialization (e.g. for
// the presence of the fastCast object)
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index cd50b2402c..a340447354 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_H
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index 53311b4252..592caa5814 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/resource.h"
diff --git a/engines/sci/sound/audio.h b/engines/sci/sound/audio.h
index 4cc8575a21..e0ba234b12 100644
--- a/engines/sci/sound/audio.h
+++ b/engines/sci/sound/audio.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/* Sound engine */
diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp
index f00c99d5b5..add3d8851f 100644
--- a/engines/sci/sound/drivers/adlib.cpp
+++ b/engines/sci/sound/drivers/adlib.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp
index 7ee8d21f86..158b4b08fb 100644
--- a/engines/sci/sound/drivers/amigamac.cpp
+++ b/engines/sci/sound/drivers/amigamac.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "audio/softsynth/emumidi.h"
diff --git a/engines/sci/sound/drivers/cms.cpp b/engines/sci/sound/drivers/cms.cpp
index 47c59a1e3d..ace96ba499 100644
--- a/engines/sci/sound/drivers/cms.cpp
+++ b/engines/sci/sound/drivers/cms.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sound/drivers/mididriver.h"
diff --git a/engines/sci/sound/drivers/fb01.cpp b/engines/sci/sound/drivers/fb01.cpp
index f217738bb2..9f3945bbec 100644
--- a/engines/sci/sound/drivers/fb01.cpp
+++ b/engines/sci/sound/drivers/fb01.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
diff --git a/engines/sci/sound/drivers/gm_names.h b/engines/sci/sound/drivers/gm_names.h
index b7883494f6..bfe5ff88c7 100644
--- a/engines/sci/sound/drivers/gm_names.h
+++ b/engines/sci/sound/drivers/gm_names.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_SOUND_DRIVERS_GM_NAMES_H
@@ -28,6 +25,11 @@
namespace Sci {
+// These tables are only used for debugging. Don't include them for devices
+// with not enough available memory (e.g. phones), where REDUCE_MEMORY_USAGE
+// is defined
+#ifndef REDUCE_MEMORY_USAGE
+
static const char *GmInstrumentNames[] = {
/*000*/ "Acoustic Grand Piano",
/*001*/ "Bright Acoustic Piano",
@@ -215,6 +217,8 @@ static const char *GmPercussionNames[] = {
/*81*/ "Open Triangle"
};
+#endif // REDUCE_MEMORY_USAGE
+
} // End of namespace Sci
#endif // SCI_SOUND_DRIVERS_GM_NAMES_H
diff --git a/engines/sci/sound/drivers/map-mt32-to-gm.h b/engines/sci/sound/drivers/map-mt32-to-gm.h
index f7a6256ba4..12a36aa51c 100644
--- a/engines/sci/sound/drivers/map-mt32-to-gm.h
+++ b/engines/sci/sound/drivers/map-mt32-to-gm.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_SOUND_DRIVERS_MAP_MT32_TO_GM_H
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index f36aac3a2a..93a2308410 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sci.h"
@@ -819,11 +816,13 @@ void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) {
if (_patchMap[i] == MIDI_UNMAPPED) {
debugC(kDebugLevelSound, "[Unmapped]");
} else {
+#ifndef REDUCE_MEMORY_USAGE
if (_patchMap[i] >= 128) {
debugC(kDebugLevelSound, "%s [Rhythm]", GmPercussionNames[_patchMap[i] - 128]);
} else {
debugC(kDebugLevelSound, "%s", GmInstrumentNames[_patchMap[i]]);
}
+#endif
}
_keyShift[i] = CLIP<uint8>(keyshift, 0, 48) - 24;
@@ -855,10 +854,12 @@ void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) {
}
}
+#ifndef REDUCE_MEMORY_USAGE
if (_percussionMap[ins] == MIDI_UNMAPPED)
debugC(kDebugLevelSound, "[Unmapped]");
else
debugC(kDebugLevelSound, "%s", GmPercussionNames[_percussionMap[ins]]);
+#endif
_percussionVelocityScale[ins] = *(data + pos + 4 * i + 3) * 127 / 100;
}
diff --git a/engines/sci/sound/drivers/mididriver.h b/engines/sci/sound/drivers/mididriver.h
index 2038725dbe..ec66984bd4 100644
--- a/engines/sci/sound/drivers/mididriver.h
+++ b/engines/sci/sound/drivers/mididriver.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_SFX_SOFTSEQ_MIDIDRIVER_H
diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp
index 4b1efb3c87..1d823b643d 100644
--- a/engines/sci/sound/drivers/pcjr.cpp
+++ b/engines/sci/sound/drivers/pcjr.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/sound/drivers/mididriver.h"
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 0b9d7617b8..95b165468d 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sci/engine/kernel.h"
@@ -224,6 +221,7 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
byte command = 0, lastCommand = 0;
int delta = 0;
int midiParamCount = 0;
+ bool containsMidiData = false;
_mixedData = outData;
@@ -250,6 +248,9 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
}
}
if ((1 << curChannel) & channelMask) {
+ if (curChannel != 0xF)
+ containsMidiData = true;
+
if (command != kEndOfTrack) {
// Write delta
while (delta > 240) {
@@ -307,6 +308,11 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
*outData++ = 0x00;
*outData++ = 0x00;
+ // This occurs in the music tracks of LB1 Amiga, when using the MT-32
+ // driver (bug #3297881)
+ if (!containsMidiData)
+ warning("MIDI parser: the requested SCI0 sound has no MIDI note data for the currently selected sound driver");
+
return _mixedData;
}
diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h
index 39de425e18..82f34070a4 100644
--- a/engines/sci/sound/midiparser_sci.h
+++ b/engines/sci/sound/midiparser_sci.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_MIDIPARSER_H
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index c7743ac587..96cbf135ed 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "audio/audiostream.h"
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index dfe5ad1586..8577ed7313 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_MUSIC_H
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index a2b09eab4c..4ea290ff9e 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h
index cae72e2cdb..a542a8b384 100644
--- a/engines/sci/sound/soundcmd.h
+++ b/engines/sci/sound/soundcmd.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_SOUNDCMD_H
diff --git a/engines/sci/util.cpp b/engines/sci/util.cpp
index f346adddeb..4f09bb7a55 100644
--- a/engines/sci/util.cpp
+++ b/engines/sci/util.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/sci/util.h b/engines/sci/util.h
index 7a2abb1873..0da5063a69 100644
--- a/engines/sci/util.h
+++ b/engines/sci/util.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_UTIL_H
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index debc75dffd..d394fd0b2b 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h
index aeb638e019..3f93582418 100644
--- a/engines/sci/video/robot_decoder.h
+++ b/engines/sci/video/robot_decoder.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_VIDEO_ROBOT_DECODER_H
diff --git a/engines/sci/video/seq_decoder.cpp b/engines/sci/video/seq_decoder.cpp
index 7168496893..abd64911a7 100644
--- a/engines/sci/video/seq_decoder.cpp
+++ b/engines/sci/video/seq_decoder.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h
index 70d3985ec5..f5e8ad9b05 100644
--- a/engines/sci/video/seq_decoder.h
+++ b/engines/sci/video/seq_decoder.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCI_VIDEO_SEQ_DECODER_H
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 13581c4b45..e4057d1f13 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h" // for setFocusRectangle/clearFocusRectangle
@@ -177,9 +174,21 @@ void Actor::setBox(int box) {
}
void Actor_v3::setupActorScale() {
- // TODO: The following could probably be removed
- _scalex = 0xFF;
- _scaley = 0xFF;
+ // WORKAROUND bug #1463598: Under certain circumstances, it is possible
+ // for Henry Sr. to reach the front side of Castle Brunwald (following
+ // Indy there). But it seems the game has no small costume for Henry,
+ // hence he is shown as a giant, triple in size compared to Indy.
+ // To workaround this, we override the scale of Henry. Since V3 games
+ // like Indy3 don't use the costume scale otherwise, this works fine.
+ // The scale factor 0x50 was determined by some guess work.
+ if (_number == 2 && _costume == 7 && _vm->_game.id == GID_INDY3 && _vm->_currentRoom == 12) {
+ _scalex = 0x50;
+ _scaley = 0x50;
+ } else {
+ // TODO: The following could probably be removed
+ _scalex = 0xFF;
+ _scaley = 0xFF;
+ }
}
void Actor::setupActorScale() {
@@ -2738,7 +2747,7 @@ void Actor::saveLoadWithSerializer(Serializer *ser) {
if (ser->isLoading()) {
// Not all actor data is saved; so when loading, we first reset
- // the actor, to ensure completely reproducible behaviour (else,
+ // the actor, to ensure completely reproducible behavior (else,
// some not saved value in the actor class can cause odd things)
initActor(-1);
}
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index 8e699b5a49..1584d0a78b 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/actor_he.h b/engines/scumm/actor_he.h
index bb7bbb6487..24b632d00e 100644
--- a/engines/scumm/actor_he.h
+++ b/engines/scumm/actor_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 8acbb8058e..b6acf01050 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm.h"
@@ -30,6 +27,7 @@
#include "scumm/imuse/imuse.h"
#include "scumm/imuse_digi/dimuse.h"
#include "scumm/he/intern_he.h"
+#include "scumm/resource.h"
#include "scumm/scumm_v7.h"
#include "scumm/sound.h"
#include "scumm/util.h"
diff --git a/engines/scumm/akos.h b/engines/scumm/akos.h
index 9f4f09d4dc..bd42aedcbd 100644
--- a/engines/scumm/akos.h
+++ b/engines/scumm/akos.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_AKOS_H
diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp
index 2aecb3dfdd..46c68c81b0 100644
--- a/engines/scumm/base-costume.cpp
+++ b/engines/scumm/base-costume.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h
index d586b211f3..652655c24e 100644
--- a/engines/scumm/base-costume.h
+++ b/engines/scumm/base-costume.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_BASE_COSTUME_H
diff --git a/engines/scumm/bomp.cpp b/engines/scumm/bomp.cpp
index 18db89be1f..845cf70722 100644
--- a/engines/scumm/bomp.cpp
+++ b/engines/scumm/bomp.cpp
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/bomp.h b/engines/scumm/bomp.h
index 8f64b54f7c..b2d042daae 100644
--- a/engines/scumm/bomp.h
+++ b/engines/scumm/bomp.h
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_BOMP_H
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 15d5f04ed5..64d4d7422c 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -18,14 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm.h"
#include "scumm/actor.h"
#include "scumm/boxes.h"
+#include "scumm/resource.h"
#include "scumm/scumm_v0.h"
#include "scumm/scumm_v6.h"
#include "scumm/util.h"
@@ -728,7 +726,7 @@ int ScummEngine::getNextBox(byte from, byte to) {
dest = to;
do {
dest = itineraryMatrix[numOfBoxes * from + dest];
- } while (dest != Actor::kInvalidBox && !areBoxesNeighbours(from, dest));
+ } while (dest != Actor::kInvalidBox && !areBoxesNeighbors(from, dest));
if (dest == Actor::kInvalidBox)
dest = -1;
@@ -964,7 +962,7 @@ void ScummEngine::calcItineraryMatrix(byte *itineraryMatrix, int num) {
// Allocate the adjacent & itinerary matrices
adjacentMatrix = (byte *)malloc(boxSize * boxSize);
- // Initialise the adjacent matrix: each box has distance 0 to itself,
+ // Initialize the adjacent matrix: each box has distance 0 to itself,
// and distance 1 to its direct neighbors. Initially, it has distance
// 255 (= infinity) to all other boxes.
for (i = 0; i < num; i++) {
@@ -972,7 +970,7 @@ void ScummEngine::calcItineraryMatrix(byte *itineraryMatrix, int num) {
if (i == j) {
adjacentMatrix[i * boxSize + j] = 0;
itineraryMatrix[i * boxSize + j] = j;
- } else if (areBoxesNeighbours(i, j)) {
+ } else if (areBoxesNeighbors(i, j)) {
adjacentMatrix[i * boxSize + j] = 1;
itineraryMatrix[i * boxSize + j] = j;
} else {
@@ -1062,8 +1060,8 @@ void ScummEngine::createBoxMatrix() {
free(itineraryMatrix);
}
-/** Check if two boxes are neighbours. */
-bool ScummEngine::areBoxesNeighbours(int box1nr, int box2nr) {
+/** Check if two boxes are neighbors. */
+bool ScummEngine::areBoxesNeighbors(int box1nr, int box2nr) {
Common::Point tmp;
BoxCoords box;
BoxCoords box2;
@@ -1160,7 +1158,7 @@ bool ScummEngine::areBoxesNeighbours(int box1nr, int box2nr) {
return false;
}
-bool ScummEngine_v0::areBoxesNeighbours(int box1nr, int box2nr) {
+bool ScummEngine_v0::areBoxesNeighbors(int box1nr, int box2nr) {
int i;
const int numOfBoxes = getNumBoxes();
const byte *boxm;
diff --git a/engines/scumm/boxes.h b/engines/scumm/boxes.h
index a93c9f4919..e554aea1b5 100644
--- a/engines/scumm/boxes.h
+++ b/engines/scumm/boxes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_BOXES_H
diff --git a/engines/scumm/camera.cpp b/engines/scumm/camera.cpp
index c12c956134..4b48acfbdb 100644
--- a/engines/scumm/camera.cpp
+++ b/engines/scumm/camera.cpp
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm.h"
diff --git a/engines/scumm/charset-fontdata.cpp b/engines/scumm/charset-fontdata.cpp
index 7f2bbd05b4..29465584f8 100644
--- a/engines/scumm/charset-fontdata.cpp
+++ b/engines/scumm/charset-fontdata.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 9fb76d9d63..dce6c9c144 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index 4b2e053c6d..4c657b475e 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_CHARSET_H
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index d0a3ec6e11..75cde5e33a 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/costume.h b/engines/scumm/costume.h
index 367b86839d..3acf2a1f6c 100644
--- a/engines/scumm/costume.h
+++ b/engines/scumm/costume.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_COSTUME_H
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 820605924c..e9b5260eca 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 4c1942b865..9cfdfbccc9 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug-channels.h"
@@ -34,6 +31,7 @@
#include "scumm/debugger.h"
#include "scumm/imuse/imuse.h"
#include "scumm/object.h"
+#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
@@ -376,8 +374,8 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) {
DebugPrintf("Actor[%d]._elevation = %d\n", actnum, a->getElevation());
_vm->_fullRedraw = true;
} else if (!strcmp(argv[2], "costume")) {
- if (value >= _vm->_res->num[rtCostume])
- DebugPrintf("Costume not changed as %d exceeds max of %d\n", value, _vm->_res->num[rtCostume]);
+ if (value >= (int)_vm->_res->_types[rtCostume].size())
+ DebugPrintf("Costume not changed as %d exceeds max of %d\n", value, _vm->_res->_types[rtCostume].size());
else {
a->setActorCostume(value);
_vm->_fullRedraw = true;
@@ -401,14 +399,15 @@ bool ScummDebugger::Cmd_PrintActor(int argc, const char **argv) {
int i;
Actor *a;
- DebugPrintf("+-----------------------------------------------------------+\n");
- DebugPrintf("|# | x | y | w |elev|cos|box|mov| zp|frm|scl|dir| cls |\n");
- DebugPrintf("+--+----+----+---+----+---+---+---+---+---+---+---+---------+\n");
+ DebugPrintf("+---------------------------------------------------------------+\n");
+ DebugPrintf("|# | x | y | w | h |elev|cos|box|mov| zp|frm|scl|dir| cls |\n");
+ DebugPrintf("+--+----+----+---+---+----+---+---+---+---+---+---+---+---------+\n");
for (i = 1; i < _vm->_numActors; i++) {
a = _vm->_actors[i];
if (a->_visible)
- DebugPrintf("|%2d|%4d|%4d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%08x|\n",
- a->_number, a->getRealPos().x, a->getRealPos().y, a->_width, a->getElevation(),
+ DebugPrintf("|%2d|%4d|%4d|%3d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%08x|\n",
+ a->_number, a->getRealPos().x, a->getRealPos().y, a->_width, a->_bottom - a->_top,
+ a->getElevation(),
a->_costume, a->_walkbox, a->_moving, a->_forceClip, a->_frame,
a->_scalex, a->getFacing(), _vm->_classData[a->_number]);
}
diff --git a/engines/scumm/debugger.h b/engines/scumm/debugger.h
index 9a85493bbe..a9b340d691 100644
--- a/engines/scumm/debugger.h
+++ b/engines/scumm/debugger.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_DEBUGGER_H
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 51b46b033c..aecd13db5a 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// FIXME: Avoid using printf
@@ -43,6 +40,7 @@
#include "scumm/scumm_v8.h"
#include "scumm/file.h"
#include "scumm/file_nes.h"
+#include "scumm/resource.h"
#include "engines/metaengine.h"
@@ -70,27 +68,27 @@ static const MD5Table *findInMD5Table(const char *md5) {
}
Common::String ScummEngine::generateFilename(const int room) const {
- const int diskNumber = (room > 0) ? _res->roomno[rtRoom][room] : 0;
- char buf[128];
+ const int diskNumber = (room > 0) ? _res->_types[rtRoom][room]._roomno : 0;
+ Common::String result;
if (_game.version == 4) {
if (room == 0 || room >= 900) {
- snprintf(buf, sizeof(buf), "%03d.lfl", room);
+ result = Common::String::format("%03d.lfl", room);
} else {
- snprintf(buf, sizeof(buf), "disk%02d.lec", diskNumber);
+ result = Common::String::format("disk%02d.lec", diskNumber);
}
} else {
switch (_filenamePattern.genMethod) {
case kGenDiskNum:
- snprintf(buf, sizeof(buf), _filenamePattern.pattern, diskNumber);
+ result = Common::String::format(_filenamePattern.pattern, diskNumber);
break;
case kGenRoomNum:
- snprintf(buf, sizeof(buf), _filenamePattern.pattern, room);
+ result = Common::String::format(_filenamePattern.pattern, room);
break;
case kGenUnchanged:
- strncpy(buf, _filenamePattern.pattern, sizeof(buf));
+ result = _filenamePattern.pattern;
break;
default:
@@ -98,11 +96,11 @@ Common::String ScummEngine::generateFilename(const int room) const {
}
}
- return buf;
+ return result;
}
Common::String ScummEngine_v60he::generateFilename(const int room) const {
- char buf[128];
+ Common::String result;
char id = 0;
switch (_filenamePattern.genMethod) {
@@ -112,21 +110,21 @@ Common::String ScummEngine_v60he::generateFilename(const int room) const {
if (room < 0) {
id = '0' - room;
} else {
- const int diskNumber = (room > 0) ? _res->roomno[rtRoom][room] : 0;
+ const int diskNumber = (room > 0) ? _res->_types[rtRoom][room]._roomno : 0;
id = diskNumber + '0';
}
if (_filenamePattern.genMethod == kGenHEPC) {
- snprintf(buf, sizeof(buf), "%s.he%c", _filenamePattern.pattern, id);
+ result = Common::String::format("%s.he%c", _filenamePattern.pattern, id);
} else {
if (id == '3') { // special case for cursors
// For mac they're stored in game binary
- strncpy(buf, _filenamePattern.pattern, sizeof(buf));
+ result = _filenamePattern.pattern;
} else {
if (_filenamePattern.genMethod == kGenHEMac)
- snprintf(buf, sizeof(buf), "%s (%c)", _filenamePattern.pattern, id);
+ result = Common::String::format("%s (%c)", _filenamePattern.pattern, id);
else
- snprintf(buf, sizeof(buf), "%s %c", _filenamePattern.pattern, id);
+ result = Common::String::format("%s %c", _filenamePattern.pattern, id);
}
}
@@ -137,11 +135,11 @@ Common::String ScummEngine_v60he::generateFilename(const int room) const {
return ScummEngine::generateFilename(room);
}
- return buf;
+ return result;
}
Common::String ScummEngine_v70he::generateFilename(const int room) const {
- char buf[128];
+ Common::String result;
char id = 0;
switch (_filenamePattern.genMethod) {
@@ -158,19 +156,19 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
id = 'b';
// Special cases for Blue's games, which share common (b) files
if (_game.id == GID_BIRTHDAY && !(_game.features & GF_DEMO))
- strcpy(buf, "Blue'sBirthday.(b)");
+ result = "Blue'sBirthday.(b)";
else if (_game.id == GID_TREASUREHUNT)
- strcpy(buf, "Blue'sTreasureHunt.(b)");
+ result = "Blue'sTreasureHunt.(b)";
else
- snprintf(buf, sizeof(buf), "%s.(b)", _filenamePattern.pattern);
+ result = Common::String::format("%s.(b)", _filenamePattern.pattern);
break;
case 1:
id = 'a';
- snprintf(buf, sizeof(buf), "%s.(a)", _filenamePattern.pattern);
+ result = Common::String::format("%s.(a)", _filenamePattern.pattern);
break;
default:
id = '0';
- snprintf(buf, sizeof(buf), "%s.he0", _filenamePattern.pattern);
+ result = Common::String::format("%s.he0", _filenamePattern.pattern);
}
} else if (room < 0) {
id = '0' - room;
@@ -181,16 +179,16 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
if (_filenamePattern.genMethod == kGenHEPC) {
// For HE >= 98, we already called snprintf above.
if (_game.heversion < 98 || room < 0)
- snprintf(buf, sizeof(buf), "%s.he%c", _filenamePattern.pattern, id);
+ result = Common::String::format("%s.he%c", _filenamePattern.pattern, id);
} else {
if (id == '3') { // special case for cursors
// For mac they're stored in game binary
- strncpy(buf, _filenamePattern.pattern, sizeof(buf));
+ result = _filenamePattern.pattern;
} else {
if (_filenamePattern.genMethod == kGenHEMac)
- snprintf(buf, sizeof(buf), "%s (%c)", _filenamePattern.pattern, id);
+ result = Common::String::format("%s (%c)", _filenamePattern.pattern, id);
else
- snprintf(buf, sizeof(buf), "%s %c", _filenamePattern.pattern, id);
+ result = Common::String::format("%s %c", _filenamePattern.pattern, id);
}
}
@@ -201,40 +199,39 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
return ScummEngine_v60he::generateFilename(room);
}
- return buf;
+ return result;
}
static Common::String generateFilenameForDetection(const char *pattern, FilenameGenMethod genMethod) {
- char buf[128];
+ Common::String result;
switch (genMethod) {
case kGenDiskNum:
case kGenRoomNum:
- snprintf(buf, sizeof(buf), pattern, 0);
+ result = Common::String::format(pattern, 0);
break;
case kGenHEPC:
- snprintf(buf, sizeof(buf), "%s.he0", pattern);
+ result = Common::String::format("%s.he0", pattern);
break;
case kGenHEMac:
- snprintf(buf, sizeof(buf), "%s (0)", pattern);
+ result = Common::String::format("%s (0)", pattern);
break;
case kGenHEMacNoParens:
- snprintf(buf, sizeof(buf), "%s 0", pattern);
+ result = Common::String::format("%s 0", pattern);
break;
case kGenUnchanged:
- strncpy(buf, pattern, sizeof(buf));
+ result = pattern;
break;
default:
error("generateFilenameForDetection: Unsupported genMethod");
}
- buf[sizeof(buf) - 1] = 0;
- return buf;
+ return result;
}
struct DetectorDesc {
@@ -1039,6 +1036,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
// Simply use the first match
DetectorResult res(*(results.begin()));
debug(1, "Using gameid %s, variant %s, extra %s", res.game.gameid, res.game.variant, res.extra);
+ debug(1, " SCUMM version %d, HE version %d", res.game.version, res.game.heversion);
// Print the MD5 of the game; either verbose using printf, in case of an
// unknown MD5, or with a medium debug level in case of a known MD5 (for
@@ -1157,7 +1155,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
}
const char *ScummMetaEngine::getName() const {
- return "SCUMM Engine ["
+ return "SCUMM ["
#if defined(ENABLE_SCUMM_7_8) && defined(ENABLE_HE)
"all games"
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index 9b4ff929e2..720c4bb750 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_DETECTION_H
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index 952abdb39a..7eb1e80132 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_DETECTION_TABLES_H
@@ -187,6 +184,8 @@ using Common::GUIO_NOLAUNCHLOAD;
using Common::GUIO_NOMIDI;
using Common::GUIO_NOSPEECH;
using Common::GUIO_MIDITOWNS;
+using Common::GUIO_MIDIADLIB;
+using Common::GUIO_MIDIMT32;
// The following table contains information about variants of our various
// games. We index into it with help of md5table (from scumm-md5.h), to find
@@ -245,11 +244,11 @@ static const GameSettings gameVariantsTable[] = {
{"monkey", "SEGA", 0, GID_MONKEY, 5, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO_NOSPEECH | GUIO_NOMIDI},
{"monkey2", "", 0, GID_MONKEY2, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
- {"monkey2", "FM-TOWNS", 0, GID_MONKEY2, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NOSPEECH},
+ {"monkey2", "FM-TOWNS", 0, GID_MONKEY2, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_MIDITOWNS | GUIO_MIDIADLIB | GUIO_MIDIMT32},
{"atlantis", "", 0, GID_INDY4, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NONE},
{"atlantis", "Floppy", 0, GID_INDY4, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
- {"atlantis", "FM-TOWNS", 0, GID_INDY4, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NONE},
+ {"atlantis", "FM-TOWNS", 0, GID_INDY4, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_MIDITOWNS | GUIO_MIDIADLIB | GUIO_MIDIMT32},
{"tentacle", "", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NONE},
{"tentacle", "Floppy", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NOSPEECH},
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index e396d37e30..f7f0c7d7ec 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 40e549471b..c26aa9f414 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_DIALOGS_H
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index 20050e5d4c..9c161ff1cc 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/file.h"
diff --git a/engines/scumm/file.h b/engines/scumm/file.h
index 8a25277ded..d6dbc06ddc 100644
--- a/engines/scumm/file.h
+++ b/engines/scumm/file.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_FILE_H
diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp
index 47704d6eaf..0e7130973e 100644
--- a/engines/scumm/file_nes.cpp
+++ b/engines/scumm/file_nes.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/file_nes.h"
diff --git a/engines/scumm/file_nes.h b/engines/scumm/file_nes.h
index f2ce3e19fd..2dfb6c54b3 100644
--- a/engines/scumm/file_nes.h
+++ b/engines/scumm/file_nes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_FILE_NES_H
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index e7abd5610e..1b913e16b4 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
@@ -221,6 +218,10 @@ Gdi::Gdi(ScummEngine *vm) : _vm(vm) {
Gdi::~Gdi() {
}
+GdiHE::GdiHE(ScummEngine *vm) : Gdi(vm), _tmskPtr(0) {
+}
+
+
GdiNES::GdiNES(ScummEngine *vm) : Gdi(vm) {
memset(&_NES, 0, sizeof(_NES));
}
@@ -582,7 +583,7 @@ void ScummEngine::updateDirtyScreen(VirtScreenNumber slot) {
vs->tdirty[i] = vs->h;
vs->bdirty[i] = 0;
if (i != (_gdi->_numStrips - 1) && vs->bdirty[i + 1] == bottom && vs->tdirty[i + 1] == top) {
- // Simple optimizations: if two or more neighbouring strips
+ // Simple optimizations: if two or more neighboring strips
// form one bigger rectangle, coalesce them.
w += 8;
continue;
@@ -1503,6 +1504,15 @@ void Gdi::prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
// Do nothing by default
}
+void GdiHE::prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
+ const int x, const int y, const int width, const int height,
+ int stripnr, int numstrip) {
+ if (_vm->_game.heversion >= 72) {
+ _tmskPtr = _vm->findResource(MKTAG('T','M','S','K'), ptr);
+ } else
+ _tmskPtr = 0;
+}
+
void GdiV1::prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
int stripnr, int numstrip) {
@@ -1748,11 +1758,6 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const
numzbuf = getZPlanes(ptr, zplane_list, false);
- const byte *tmsk_ptr = NULL;
- if (_vm->_game.heversion >= 72) {
- tmsk_ptr = _vm->findResource(MKTAG('T','M','S','K'), ptr);
- }
-
if (y + height > vs->h) {
warning("Gdi::drawBitmap, strip drawn to %d below window bottom %d", y + height, vs->h);
}
@@ -1815,7 +1820,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const
clear8Col(frontBuf, vs->pitch, height, vs->format.bytesPerPixel);
}
- decodeMask(x, y, width, height, stripnr, numzbuf, zplane_list, transpStrip, flag, tmsk_ptr);
+ decodeMask(x, y, width, height, stripnr, numzbuf, zplane_list, transpStrip, flag);
#if 0
// HACK: blit mask(s) onto normal screen. Useful to debug masking
@@ -1904,7 +1909,7 @@ bool GdiV2::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int widt
void Gdi::decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr) {
+ bool transpStrip, byte flag) {
int i;
byte *mask_ptr;
const byte *z_plane_ptr;
@@ -1960,10 +1965,7 @@ void Gdi::decodeMask(int x, int y, const int width, const int height,
if (offs) {
z_plane_ptr = zplane_list[i] + offs;
- if (tmsk_ptr) {
- const byte *tmsk = tmsk_ptr + READ_LE_UINT16(tmsk_ptr + stripnr * 2 + 8);
- decompressTMSK(mask_ptr, tmsk, z_plane_ptr, height);
- } else if (transpStrip && (flag & dbAllowMaskOr)) {
+ if (transpStrip && (flag & dbAllowMaskOr)) {
decompressMaskImgOr(mask_ptr, z_plane_ptr, height);
} else {
decompressMaskImg(mask_ptr, z_plane_ptr, height);
@@ -1978,9 +1980,46 @@ void Gdi::decodeMask(int x, int y, const int width, const int height,
}
}
+void GdiHE::decodeMask(int x, int y, const int width, const int height,
+ int stripnr, int numzbuf, const byte *zplane_list[9],
+ bool transpStrip, byte flag) {
+ int i;
+ byte *mask_ptr;
+ const byte *z_plane_ptr;
+
+ for (i = 1; i < numzbuf; i++) {
+ uint32 offs;
+
+ if (!zplane_list[i])
+ continue;
+
+ offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 8);
+
+ mask_ptr = getMaskBuffer(x, y, i);
+
+ if (offs) {
+ z_plane_ptr = zplane_list[i] + offs;
+
+ if (_tmskPtr) {
+ const byte *tmsk = _tmskPtr + READ_LE_UINT16(_tmskPtr + stripnr * 2 + 8);
+ decompressTMSK(mask_ptr, tmsk, z_plane_ptr, height);
+ } else if (transpStrip && (flag & dbAllowMaskOr)) {
+ decompressMaskImgOr(mask_ptr, z_plane_ptr, height);
+ } else {
+ decompressMaskImg(mask_ptr, z_plane_ptr, height);
+ }
+
+ } else {
+ if (!(transpStrip && (flag & dbAllowMaskOr)))
+ for (int h = 0; h < height; h++)
+ mask_ptr[h * _numStrips] = 0;
+ }
+ }
+}
+
void GdiNES::decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr) {
+ bool transpStrip, byte flag) {
byte *mask_ptr = getMaskBuffer(x, y, 1);
drawStripNESMask(mask_ptr, stripnr, y, height);
}
@@ -1988,7 +2027,7 @@ void GdiNES::decodeMask(int x, int y, const int width, const int height,
#ifdef USE_RGB_COLOR
void GdiPCEngine::decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr) {
+ bool transpStrip, byte flag) {
byte *mask_ptr = getMaskBuffer(x, y, 1);
drawStripPCEngineMask(mask_ptr, stripnr, y, height);
}
@@ -1996,14 +2035,14 @@ void GdiPCEngine::decodeMask(int x, int y, const int width, const int height,
void GdiV1::decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr) {
+ bool transpStrip, byte flag) {
byte *mask_ptr = getMaskBuffer(x, y, 1);
drawStripC64Mask(mask_ptr, stripnr, width, height);
}
void GdiV2::decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr) {
+ bool transpStrip, byte flag) {
// Do nothing here for V2 games - zplane was already handled.
}
@@ -2371,7 +2410,7 @@ void Gdi::decompressMaskImg(byte *dst, const byte *src, int height) const {
}
}
-void Gdi::decompressTMSK(byte *dst, const byte *tmsk, const byte *src, int height) const {
+void GdiHE::decompressTMSK(byte *dst, const byte *tmsk, const byte *src, int height) const {
byte srcbits = 0;
byte srcFlag = 0;
byte maskFlag = 0;
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 3f69d75efd..6da07efd18 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_GFX_H
@@ -224,7 +221,6 @@ protected:
virtual void writeRoomColor(byte *dst, byte color) const;
/* Mask decompressors */
- void decompressTMSK(byte *dst, const byte *tmsk, const byte *src, int height) const;
void decompressMaskImgOr(byte *dst, const byte *src, int height) const;
void decompressMaskImg(byte *dst, const byte *src, int height) const;
@@ -237,7 +233,7 @@ protected:
virtual void decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr);
+ bool transpStrip, byte flag);
virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
@@ -273,6 +269,24 @@ public:
};
};
+class GdiHE : public Gdi {
+protected:
+ const byte *_tmskPtr;
+
+protected:
+ void decompressTMSK(byte *dst, const byte *tmsk, const byte *src, int height) const;
+
+ virtual void decodeMask(int x, int y, const int width, const int height,
+ int stripnr, int numzbuf, const byte *zplane_list[9],
+ bool transpStrip, byte flag);
+
+ virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
+ const int x, const int y, const int width, const int height,
+ int stripnr, int numstrip);
+public:
+ GdiHE(ScummEngine *vm);
+};
+
class GdiNES : public Gdi {
protected:
struct {
@@ -296,7 +310,7 @@ protected:
virtual void decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr);
+ bool transpStrip, byte flag);
virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
@@ -339,7 +353,7 @@ protected:
virtual void decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr);
+ bool transpStrip, byte flag);
virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
@@ -376,7 +390,7 @@ protected:
virtual void decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr);
+ bool transpStrip, byte flag);
virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
@@ -402,7 +416,7 @@ protected:
virtual void decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
- bool transpStrip, byte flag, const byte *tmsk_ptr);
+ bool transpStrip, byte flag);
virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s
index 9f7c2949b3..92f8951466 100644
--- a/engines/scumm/gfxARM.s
+++ b/engines/scumm/gfxARM.s
@@ -18,9 +18,6 @@
@ along with this program@ if not, write to the Free Software
@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@
-@ $URL$
-@ $Id$
-@
@ @author Robin Watts (robin@wss.co.uk)
.text
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index 78c7ef23f1..82bb32cdfb 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp
index e3e25c161c..74183c24d3 100644
--- a/engines/scumm/he/animation_he.cpp
+++ b/engines/scumm/he/animation_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h
index f5000bca59..b3405fead0 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_HE_ANIMATION_H) && defined(ENABLE_HE)
diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp
index 5cd75a5c62..84562c12d5 100644
--- a/engines/scumm/he/cup_player_he.cpp
+++ b/engines/scumm/he/cup_player_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/cup_player_he.h b/engines/scumm/he/cup_player_he.h
index 93146fdf85..15bc6b46ba 100644
--- a/engines/scumm/he/cup_player_he.h
+++ b/engines/scumm/he/cup_player_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/he/floodfill_he.cpp b/engines/scumm/he/floodfill_he.cpp
index 026a848828..f9d53c6b12 100644
--- a/engines/scumm/he/floodfill_he.cpp
+++ b/engines/scumm/he/floodfill_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/floodfill_he.h b/engines/scumm/he/floodfill_he.h
index cfc672436c..3f62cc9b81 100644
--- a/engines/scumm/he/floodfill_he.h
+++ b/engines/scumm/he/floodfill_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_HE_FLOODFILL_HE_H) && defined(ENABLE_HE)
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index 830e940322..c49217b650 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_HE_INTERN_HE_H
@@ -132,8 +129,8 @@ public:
protected:
virtual void allocateArrays();
- virtual int readResTypeList(int id);
- virtual uint32 getResourceRoomOffset(int type, int idx);
+ virtual int readResTypeList(ResType type);
+ virtual uint32 getResourceRoomOffset(ResType type, ResId idx);
virtual void setupOpcodes();
virtual void setupScummVars();
@@ -268,7 +265,7 @@ protected:
virtual void resetScummVars();
virtual void readArrayFromIndexFile();
- virtual byte *getStringAddress(int i);
+ virtual byte *getStringAddress(ResId idx);
virtual void readMAXS(int blockSize);
virtual void redrawBGAreas();
@@ -292,7 +289,7 @@ protected:
void copyScriptString(byte *dst, int dstSize);
int findObject(int x, int y, int num, int *args);
- int getSoundResourceSize(int id);
+ int getSoundResourceSize(ResId idx);
virtual bool handleNextCharsetCode(Actor *a, int *c);
virtual int convertMessageToString(const byte *msg, byte *dst, int dstSize);
@@ -557,7 +554,8 @@ protected:
class ScummEngine_v100he : public ScummEngine_v99he {
protected:
- int32 _heResId, _heResType;
+ ResType _heResType;
+ int32 _heResId;
byte _debugInputBuffer[256];
public:
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index 297c2992db..a7d808e316 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h
index d097d37e75..e05a05f310 100644
--- a/engines/scumm/he/logic_he.h
+++ b/engines/scumm/he/logic_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_HE_LOGIC_HE_H) && defined(ENABLE_HE)
diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp
index 49e43a040b..44ba841644 100644
--- a/engines/scumm/he/palette_he.cpp
+++ b/engines/scumm/he/palette_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index 552c420755..6b195bec84 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm.h"
@@ -229,7 +226,7 @@ void ScummEngine_v70he::readRoomsOffsets() {
num = READ_LE_UINT16(_heV7RoomOffsets);
ptr = _heV7RoomOffsets + 2;
for (i = 0; i < num; i++) {
- _res->roomoffs[rtRoom][i] = READ_LE_UINT32(ptr);
+ _res->_types[rtRoom][i]._roomoffs = READ_LE_UINT32(ptr);
ptr += 4;
}
}
@@ -256,8 +253,6 @@ void ScummEngine_v70he::readGlobalObjects() {
#ifdef ENABLE_HE
void ScummEngine_v99he::readMAXS(int blockSize) {
if (blockSize == 52) {
- debug(0, "ScummEngine_v99he readMAXS: MAXS has blocksize %d", blockSize);
-
_numVariables = _fileHandle->readUint16LE();
_fileHandle->readUint16LE();
_numRoomVariables = _fileHandle->readUint16LE();
@@ -290,8 +285,6 @@ void ScummEngine_v99he::readMAXS(int blockSize) {
void ScummEngine_v90he::readMAXS(int blockSize) {
if (blockSize == 46) {
- debug(0, "ScummEngine_v90he readMAXS: MAXS has blocksize %d", blockSize);
-
_numVariables = _fileHandle->readUint16LE();
_fileHandle->readUint16LE();
_numRoomVariables = _fileHandle->readUint16LE();
@@ -324,8 +317,6 @@ void ScummEngine_v90he::readMAXS(int blockSize) {
void ScummEngine_v72he::readMAXS(int blockSize) {
if (blockSize == 40) {
- debug(0, "ScummEngine_v72he readMAXS: MAXS has blocksize %d", blockSize);
-
_numVariables = _fileHandle->readUint16LE();
_fileHandle->readUint16LE();
_numBitVariables = _numRoomVariables = _fileHandle->readUint16LE();
@@ -350,14 +341,14 @@ void ScummEngine_v72he::readMAXS(int blockSize) {
ScummEngine_v6::readMAXS(blockSize);
}
-byte *ScummEngine_v72he::getStringAddress(int i) {
- byte *addr = getResourceAddress(rtString, i);
+byte *ScummEngine_v72he::getStringAddress(ResId idx) {
+ byte *addr = getResourceAddress(rtString, idx);
if (addr == NULL)
return NULL;
return ((ScummEngine_v72he::ArrayHeader *)addr)->data;
}
-int ScummEngine_v72he::getSoundResourceSize(int id) {
+int ScummEngine_v72he::getSoundResourceSize(ResId id) {
const byte *ptr;
int offs, size;
diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h
index 5d7c70db76..9978869ffc 100644
--- a/engines/scumm/he/resource_he.h
+++ b/engines/scumm/he/resource_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_HE_RESOURCE_HE_H
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 69063a1837..e057ab524a 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
@@ -2353,10 +2350,10 @@ void ScummEngine_v100he::o100_debugInput() {
void ScummEngine_v100he::o100_isResourceLoaded() {
// Reports percentage of resource loaded by queue
- int type;
+ ResType type;
byte subOp = fetchScriptByte();
- /* int idx = */ pop();
+ int idx = pop();
switch (subOp) {
case 25:
@@ -2377,13 +2374,15 @@ void ScummEngine_v100he::o100_isResourceLoaded() {
default:
error("o100_isResourceLoaded: default case %d", subOp);
}
+ debug(7, "o100_isResourceLoaded(%d,%d)", type, idx);
push(100);
}
void ScummEngine_v100he::o100_getResourceSize() {
const byte *ptr;
- int size, type;
+ int size;
+ ResType type;
int resid = pop();
byte subOp = fetchScriptByte();
@@ -2402,7 +2401,7 @@ void ScummEngine_v100he::o100_getResourceSize() {
type = rtScript;
break;
case 72:
- push (getSoundResourceSize(resid));
+ push(getSoundResourceSize(resid));
return;
default:
error("o100_getResourceSize: default type %d", subOp);
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 7ecabd55e1..fb070b3e27 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/archive.h"
diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp
index 9b160151b0..adb2fcac2e 100644
--- a/engines/scumm/he/script_v70he.cpp
+++ b/engines/scumm/he/script_v70he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -364,10 +361,10 @@ void ScummEngine_v70he::o70_getStringLen() {
void ScummEngine_v70he::o70_isResourceLoaded() {
// Reports percentage of resource loaded by queue
- int type;
+ ResType type;
byte subOp = fetchScriptByte();
- /* int idx = */ pop();
+ int idx = pop();
switch (subOp) {
case 18:
@@ -388,6 +385,7 @@ void ScummEngine_v70he::o70_isResourceLoaded() {
default:
error("o70_isResourceLoaded: default case %d", subOp);
}
+ debug(7, "o70_isResourceLoaded(%d,%d)", type, idx);
push(100);
}
diff --git a/engines/scumm/he/script_v71he.cpp b/engines/scumm/he/script_v71he.cpp
index a800a7d85c..3ad9220ac5 100644
--- a/engines/scumm/he/script_v71he.cpp
+++ b/engines/scumm/he/script_v71he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 17bd29d826..8f16bf0f3a 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
@@ -624,15 +621,15 @@ void ScummEngine_v72he::o72_getArrayDimSize() {
}
void ScummEngine_v72he::o72_getNumFreeArrays() {
- byte **addr = _res->address[rtString];
+ const ResourceManager::ResTypeData &rtd = _res->_types[rtString];
int i, num = 0;
for (i = 1; i < _numArray; i++) {
- if (!addr[i])
+ if (!rtd[i]._address)
num++;
}
- push (num);
+ push(num);
}
void ScummEngine_v72he::o72_roomOps() {
@@ -1914,7 +1911,8 @@ void ScummEngine_v72he::o72_writeINI() {
void ScummEngine_v72he::o72_getResourceSize() {
const byte *ptr;
- int size, type;
+ int size;
+ ResType type;
int resid = pop();
if (_game.heversion == 72) {
@@ -1926,7 +1924,7 @@ void ScummEngine_v72he::o72_getResourceSize() {
switch (subOp) {
case 13:
- push (getSoundResourceSize(resid));
+ push(getSoundResourceSize(resid));
return;
case 14:
type = rtRoomImage;
diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp
index c225be4b6c..7970d7806f 100644
--- a/engines/scumm/he/script_v80he.cpp
+++ b/engines/scumm/he/script_v80he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index 1a38a99f17..6b632d8ff2 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 4fd7caebf5..5c15a85929 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -18,14 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/actor.h"
#include "scumm/file.h"
#include "scumm/imuse/imuse.h"
+#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/he/sound_he.h"
#include "scumm/he/intern_he.h"
@@ -304,13 +302,13 @@ void SoundHE::setOverrideFreq(int freq) {
}
void SoundHE::setupHEMusicFile() {
- int i, total_size;
+ int i;
Common::File musicFile;
Common::String buf(_vm->generateFilename(-4));
if (musicFile.open(buf) == true) {
musicFile.seek(4, SEEK_SET);
- total_size = musicFile.readUint32BE();
+ /*int total_size =*/ musicFile.readUint32BE();
musicFile.seek(16, SEEK_SET);
_heMusicTracks = musicFile.readUint32LE();
debug(5, "Total music tracks %d", _heMusicTracks);
diff --git a/engines/scumm/he/sound_he.h b/engines/scumm/he/sound_he.h
index f3a881972e..f487acc7da 100644
--- a/engines/scumm/he/sound_he.h
+++ b/engines/scumm/he/sound_he.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_HE_SOUND_HE_H
diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp
index c66eed6ae6..0b37673e4a 100644
--- a/engines/scumm/he/sprite_he.cpp
+++ b/engines/scumm/he/sprite_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/sprite_he.h b/engines/scumm/he/sprite_he.h
index 73a05af579..d28c9f1944 100644
--- a/engines/scumm/he/sprite_he.h
+++ b/engines/scumm/he/sprite_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_HE_SPRITE_HE_H) && defined(ENABLE_HE)
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 16cbadd65b..4107034fe6 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifdef ENABLE_HE
diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h
index c255e27d14..ce3fbc27c6 100644
--- a/engines/scumm/he/wiz_he.h
+++ b/engines/scumm/he/wiz_he.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_HE_WIZ_HE_H) && defined(ENABLE_HE)
diff --git a/engines/scumm/help.cpp b/engines/scumm/help.cpp
index a3bb85ab42..ae7a1ad3bc 100644
--- a/engines/scumm/help.cpp
+++ b/engines/scumm/help.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -110,7 +107,7 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo
ADD_TEXT(_("* Note that using ctrl-f and"));
ADD_TEXT(_(" ctrl-g are not recommended"));
ADD_TEXT(_(" since they may cause crashes"));
- ADD_TEXT(_(" or incorrect game behaviour."));
+ ADD_TEXT(_(" or incorrect game behavior."));
break;
case 3:
if (gameId == GID_LOOM)
diff --git a/engines/scumm/help.h b/engines/scumm/help.h
index 152dc99c3e..9763da8c00 100644
--- a/engines/scumm/help.h
+++ b/engines/scumm/help.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_HELP_H
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 07fd99c809..7d971f5ca4 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -33,6 +30,7 @@
#include "scumm/imuse/imuse.h"
#include "scumm/imuse/imuse_internal.h"
#include "scumm/imuse/instrument.h"
+#include "scumm/resource.h"
#include "scumm/saveload.h"
#include "scumm/scumm.h"
@@ -50,7 +48,6 @@ _enable_gs(false),
_sc55(false),
_midi_adlib(NULL),
_midi_native(NULL),
-_base_sounds(NULL),
_sysex(NULL),
_paused(false),
_initialized(false),
@@ -102,12 +99,11 @@ IMuseInternal::~IMuseInternal() {
}
}
-byte *IMuseInternal::findStartOfSound(int sound) {
- byte *ptr = NULL;
+byte *IMuseInternal::findStartOfSound(int sound, int ct) {
int32 size, pos;
+ static uint32 id[] = { 'MThd', 'FORM', 'MDhd', 'MDpg' };
- if (_base_sounds)
- ptr = _base_sounds[sound];
+ byte *ptr = g_scumm->_res->_types[rtSound][sound]._address;
if (ptr == NULL) {
debug(1, "IMuseInternal::findStartOfSound(): Sound %d doesn't exist", sound);
@@ -115,12 +111,13 @@ byte *IMuseInternal::findStartOfSound(int sound) {
}
// Check for old-style headers first, like 'RO'
- if (ptr[4] == 'R' && ptr[5] == 'O'&& ptr[6] != 'L')
- return ptr + 4;
- if (ptr[8] == 'S' && ptr[9] == 'O')
- return ptr + 8;
+ int trFlag = (kMThd | kFORM);
+ if (ptr[0] == 'R' && ptr[1] == 'O'&& ptr[2] != 'L')
+ return ct == trFlag ? ptr : 0;
+ if (ptr[4] == 'S' && ptr[5] == 'O')
+ return ct == trFlag ? ptr + 4 : 0;
- ptr += 8;
+ ptr += 4;
size = READ_BE_UINT32(ptr);
ptr += 4;
@@ -129,26 +126,25 @@ byte *IMuseInternal::findStartOfSound(int sound) {
size = 48; // Arbitrary; we should find our tag within the first 48 bytes of the resource
pos = 0;
while (pos < size) {
- if (!memcmp(ptr + pos, "MThd", 4) || !memcmp(ptr + pos, "FORM", 4))
- return ptr + pos;
+ for (int i = 0; i < ARRAYSIZE(id); ++i) {
+ if ((ct & (1 << i)) && (READ_BE_UINT32(ptr + pos) == id[i]))
+ return ptr + pos;
+ }
++pos; // We could probably iterate more intelligently
}
- debug(3, "IMuseInternal::findStartOfSound(): Failed to align on sound %d", sound);
+ if (ct == (kMThd | kFORM))
+ debug(3, "IMuseInternal::findStartOfSound(): Failed to align on sound %d", sound);
+
return 0;
}
bool IMuseInternal::isMT32(int sound) {
- byte *ptr = NULL;
- uint32 tag;
-
- if (_base_sounds)
- ptr = _base_sounds[sound];
-
+ byte *ptr = g_scumm->_res->_types[rtSound][sound]._address;
if (ptr == NULL)
return false;
- tag = READ_BE_UINT32(ptr + 4);
+ uint32 tag = READ_BE_UINT32(ptr);
switch (tag) {
case MKTAG('A','D','L',' '):
case MKTAG('A','S','F','X'): // Special AD class for old AdLib sound effects
@@ -167,17 +163,17 @@ bool IMuseInternal::isMT32(int sound) {
case MKTAG('M','I','D','I'): // Occurs in Sam & Max
// HE games use Roland music
- if (ptr[12] == 'H' && ptr[13] == 'S')
+ if (ptr[8] == 'H' && ptr[9] == 'S')
return true;
else
return false;
}
// Old style 'RO' has equivalent properties to 'ROL'
- if (ptr[4] == 'R' && ptr[5] == 'O')
+ if (ptr[0] == 'R' && ptr[1] == 'O')
return true;
// Euphony tracks show as 'SO' and have equivalent properties to 'ADL'
- if (ptr[8] == 'S' && ptr[9] == 'O')
+ if (ptr[4] == 'S' && ptr[5] == 'O')
return false;
error("Unknown music type: '%c%c%c%c'", (char)tag >> 24, (char)tag >> 16, (char)tag >> 8, (char)tag);
@@ -186,16 +182,11 @@ bool IMuseInternal::isMT32(int sound) {
}
bool IMuseInternal::isMIDI(int sound) {
- byte *ptr = NULL;
- uint32 tag;
-
- if (_base_sounds)
- ptr = _base_sounds[sound];
-
+ byte *ptr = g_scumm->_res->_types[rtSound][sound]._address;
if (ptr == NULL)
return false;
- tag = READ_BE_UINT32(ptr + 4);
+ uint32 tag = READ_BE_UINT32(ptr);
switch (tag) {
case MKTAG('A','D','L',' '):
case MKTAG('A','S','F','X'): // Special AD class for old AdLib sound effects
@@ -215,11 +206,11 @@ bool IMuseInternal::isMIDI(int sound) {
}
// Old style 'RO' has equivalent properties to 'ROL'
- if (ptr[4] == 'R' && ptr[5] == 'O')
+ if (ptr[0] == 'R' && ptr[1] == 'O')
return true;
// Euphony tracks show as 'SO' and have equivalent properties to 'ADL'
// FIXME: Right now we're pretending it's GM.
- if (ptr[8] == 'S' && ptr[9] == 'O')
+ if (ptr[4] == 'S' && ptr[5] == 'O')
return true;
error("Unknown music type: '%c%c%c%c'", (char)tag >> 24, (char)tag >> 16, (char)tag >> 8, (char)tag);
@@ -426,11 +417,6 @@ int32 IMuseInternal::doCommand(int numargs, int a[]) {
return doCommand_internal(numargs, a);
}
-void IMuseInternal::setBase(byte **base) {
- Common::StackLock lock(_mutex, "IMuseInternal::setBase()");
- _base_sounds = base;
-}
-
uint32 IMuseInternal::property(int prop, uint32 value) {
Common::StackLock lock(_mutex, "IMuseInternal::property()");
switch (prop) {
@@ -576,7 +562,7 @@ bool IMuseInternal::startSound_internal(int sound, int offset) {
return false;
}
- void *ptr = findStartOfSound(sound);
+ byte *ptr = findStartOfSound(sound);
if (!ptr) {
debug(2, "IMuseInternal::startSound(): Couldn't find sound %d", sound);
return false;
@@ -596,8 +582,11 @@ bool IMuseInternal::startSound_internal(int sound, int offset) {
// Bug #590511 and Patch #607175 (which was reversed to fix
// an FOA regression: Bug #622606).
Player *player = findActivePlayer(sound);
- if (!player)
- player = allocate_player(128);
+ if (!player) {
+ ptr = findStartOfSound(sound, IMuseInternal::kMDhd);
+ player = allocate_player(ptr ? (READ_BE_UINT32(&ptr[4]) && ptr[10] ? ptr[10] : 128) : 128);
+ }
+
if (!player)
return false;
@@ -645,6 +634,7 @@ int IMuseInternal::stopSound_internal(int sound) {
}
int IMuseInternal::stopAllSounds_internal() {
+ clear_queue();
Player *player = _players;
for (int i = ARRAYSIZE(_players); i; i--, player++) {
if (player->isActive())
@@ -945,54 +935,22 @@ void IMuseInternal::sequencer_timers(MidiDriver *midi) {
}
void IMuseInternal::handle_marker(uint id, byte data) {
- uint16 *p = 0;
- uint pos;
-
- if (_queue_adding && _queue_sound == id && data == _queue_marker)
+ if ((_queue_end == _queue_pos) || (_queue_adding && _queue_sound == id && data == _queue_marker))
return;
- // Fix for bug #733401, revised for bug #761637:
- // It would seem that sometimes a marker is in the queue
- // but not at the head position. In the case of our bug,
- // this seems to be the result of commands in the queue
- // for songs that are no longer playing. So we skip
- // ahead to the appropriate marker, effectively chomping
- // anything in the queue before it. This fixes the FOA
- // end credits music, but needs to be tested for inappopriate
- // behavior elsewhere.
- pos = _queue_end;
- while (pos != _queue_pos) {
- p = _cmd_queue[pos].array;
- if (p[0] == TRIGGER_ID && p[1] == id && p[2] == data)
- break;
- pos = (pos + 1) % ARRAYSIZE(_cmd_queue);
- }
-
- if (pos == _queue_pos)
+ uint16 *p = _cmd_queue[_queue_end].array;
+ if (p[0] != TRIGGER_ID || id != p[1] || data != p[2])
return;
- if (pos != _queue_end)
- debug(0, "Skipping entries in iMuse command queue to reach marker");
-
_trigger_count--;
_queue_cleared = false;
- do {
- pos = (pos + 1) % ARRAYSIZE(_cmd_queue);
- if (_queue_pos == pos)
- break;
- p = _cmd_queue[pos].array;
- if (*p++ != COMMAND_ID)
- break;
- _queue_end = pos;
-
- doCommand_internal(p[0], p[1], p[2], p[3], p[4], p[5], p[6], 0);
-
- if (_queue_cleared)
- return;
- pos = _queue_end;
- } while (1);
-
- _queue_end = pos;
+ _queue_end = (_queue_end + 1) % ARRAYSIZE(_cmd_queue);
+
+ while (_queue_end != _queue_pos && _cmd_queue[_queue_end].array[0] == COMMAND_ID && !_queue_cleared) {
+ p = _cmd_queue[_queue_end].array;
+ doCommand_internal(p[1], p[2], p[3], p[4], p[5], p[6], p[7], 0);
+ _queue_end = (_queue_end + 1) % ARRAYSIZE(_cmd_queue);
+ }
}
int IMuseInternal::get_channel_volume(uint a) {
diff --git a/engines/scumm/imuse/imuse.h b/engines/scumm/imuse/imuse.h
index 1e3b0fd756..8014b13409 100644
--- a/engines/scumm/imuse/imuse.h
+++ b/engines/scumm/imuse/imuse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_IMUSE_H
@@ -68,7 +65,6 @@ public:
virtual bool get_sound_active(int sound) const = 0;
virtual int32 doCommand(int numargs, int args[]) = 0;
virtual int clear_queue() = 0;
- virtual void setBase(byte **base) = 0;
virtual uint32 property(int prop, uint32 value) = 0;
virtual void addSysexHandler (byte mfgID, sysexfunc handler) = 0;
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index 7d46650d2e..8808a3655a 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_IMUSE_INTERNAL
@@ -232,6 +229,7 @@ protected:
// Sequencer part
int start_seq_sound(int sound, bool reset_vars = true);
+ void loadStartParameters(int sound);
int query_param(int param);
public:
@@ -397,7 +395,6 @@ protected:
TimerCallbackInfo _timer_info_native;
uint32 _game_id;
- byte **_base_sounds;
// Plug-in SysEx handling. Right now this only supports one
// custom SysEx handler for the hardcoded IMUSE_SYSEX_ID
@@ -449,7 +446,14 @@ protected:
static void midiTimerCallback(void *data);
void on_timer(MidiDriver *midi);
- byte *findStartOfSound(int sound);
+ enum ChunkType {
+ kMThd = 1,
+ kFORM = 2,
+ kMDhd = 4, // Used in MI2 and INDY4. Contain certain start parameters (priority, volume, etc. ) for the player.
+ kMDpg = 8 // These chunks exist in DOTT and SAMNMAX. They don't get processed, however.
+ };
+
+ byte *findStartOfSound(int sound, int ct = (kMThd | kFORM));
bool isMT32(int sound);
bool isMIDI(int sound);
int get_queue_sound_status(int sound) const;
@@ -513,7 +517,6 @@ public:
int save_or_load(Serializer *ser, ScummEngine *scumm);
bool get_sound_active(int sound) const;
int32 doCommand(int numargs, int args[]);
- void setBase(byte **base);
uint32 property(int prop, uint32 value);
virtual void addSysexHandler(byte mfgID, sysexfunc handler);
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 487429c294..5df8407a96 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -140,7 +137,8 @@ void Part::set_pan(int8 pan) {
}
void Part::set_transpose(int8 transpose) {
- _transpose_eff = transpose_clamp((_transpose = transpose) + _player->getTranspose(), -24, 24);
+ _transpose = transpose;
+ _transpose_eff = (_transpose == -128) ? 0 : transpose_clamp(_transpose + _player->getTranspose(), -24, 24);
sendPitchBend();
}
diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp
index 4d185d94d7..0b084f3116 100644
--- a/engines/scumm/imuse/imuse_player.cpp
+++ b/engines/scumm/imuse/imuse_player.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -93,7 +90,7 @@ Player::~Player() {
}
bool Player::startSound(int sound, MidiDriver *midi) {
- void *ptr;
+ byte *ptr;
int i;
// Not sure what the old code was doing,
@@ -111,13 +108,8 @@ bool Player::startSound(int sound, MidiDriver *midi) {
_active = true;
_midi = midi;
_id = sound;
- _priority = 0x80;
- _volume = 0x7F;
- _vol_chan = 0xFFFF;
- _vol_eff = (_se->get_channel_volume(0xFFFF) << 7) >> 7;
- _pan = 0;
- _transpose = 0;
- _detune = 0;
+
+ loadStartParameters(sound);
for (i = 0; i < ARRAYSIZE(_parameterFaders); ++i)
_parameterFaders[i].init();
@@ -128,7 +120,7 @@ bool Player::startSound(int sound, MidiDriver *midi) {
_midi = NULL;
return false;
}
-
+
debugC(DEBUG_IMUSE, "Starting music %d", sound);
return true;
}
@@ -202,11 +194,43 @@ int Player::start_seq_sound(int sound, bool reset_vars) {
_parser->property(MidiParser::mpSmartJump, 1);
_parser->loadMusic(ptr, 0);
_parser->setTrack(_track_index);
- setSpeed(reset_vars ? 128 : _speed);
+
+ ptr = _se->findStartOfSound(sound, IMuseInternal::kMDhd);
+ setSpeed(reset_vars ? (ptr ? (READ_BE_UINT32(&ptr[4]) && ptr[15] ? ptr[15] : 128) : 128) : _speed);
return 0;
}
+void Player::loadStartParameters(int sound) {
+ _priority = 0x80;
+ _volume = 0x7F;
+ _vol_chan = 0xFFFF;
+ _vol_eff = (_se->get_channel_volume(0xFFFF) << 7) >> 7;
+ _pan = 0;
+ _transpose = 0;
+ _detune = 0;
+
+ byte *ptr = _se->findStartOfSound(sound, IMuseInternal::kMDhd);
+ uint32 size = 0;
+
+ if (ptr) {
+ ptr += 4;
+ size = READ_BE_UINT32(ptr);
+ ptr += 4;
+
+ // MDhd chunks don't get used in MI1 and contain only zeroes.
+ // We check for volume, priority and speed settings of zero here.
+ if (size && (ptr[2] | ptr[3] | ptr[7])) {
+ _priority = ptr[2];
+ _volume = ptr[3];
+ _pan = ptr[4];
+ _transpose = ptr[5];
+ _detune = ptr[6];
+ setSpeed(ptr[7]);
+ }
+ }
+}
+
void Player::uninit_parts() {
assert(!_parts || _parts->_player == this);
diff --git a/engines/scumm/imuse/instrument.cpp b/engines/scumm/imuse/instrument.cpp
index 02996c53d3..955700fc2b 100644
--- a/engines/scumm/imuse/instrument.cpp
+++ b/engines/scumm/imuse/instrument.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/imuse/instrument.h b/engines/scumm/imuse/instrument.h
index f6108daf16..3555d319e6 100644
--- a/engines/scumm/imuse/instrument.h
+++ b/engines/scumm/imuse/instrument.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_IMUSE_INSTRUMENT_H
diff --git a/engines/scumm/imuse/sysex.h b/engines/scumm/imuse/sysex.h
index bff80de9e7..7dd38e785e 100644
--- a/engines/scumm/imuse/sysex.h
+++ b/engines/scumm/imuse/sysex.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_IMUSE_SYSEX_H
diff --git a/engines/scumm/imuse/sysex_samnmax.cpp b/engines/scumm/imuse/sysex_samnmax.cpp
index cdae767abf..4c4219e7bb 100644
--- a/engines/scumm/imuse/sysex_samnmax.cpp
+++ b/engines/scumm/imuse/sysex_samnmax.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp
index 78028c6056..4eb3bee93c 100644
--- a/engines/scumm/imuse/sysex_scumm.cpp
+++ b/engines/scumm/imuse/sysex_scumm.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -67,6 +64,11 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
// BYTE 14: Pitchbend range(lower 4 bits) [bug #1088045]
// BYTE 15: Program(upper 4 bits)
// BYTE 16: Program(lower 4 bits)
+
+ // athrxx (05-21-2011):
+ // BYTE 9, 10: Transpose (if set to 0x80, this means that part->_transpose_eff will be 0 (also ignoring player->_transpose)
+ // BYTE 11, 12: Detune
+
part = player->getPart(p[0] & 0x0F);
if (part) {
part->set_onoff(p[2] & 0x01);
@@ -74,7 +76,9 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
part->set_pri(p[4]);
part->volume((p[5] & 0x0F) << 4 |(p[6] & 0x0F));
part->set_pan((p[7] & 0x0F) << 4 | (p[8] & 0x0F));
- part->_percussion = player->_isMIDI ? ((p[9] & 0x08) > 0) : false;
+ part->_percussion = player->_isMIDI ? ((p[9] & 0x08) > 0) : false;
+ part->set_transpose((p[9] & 0x0F) << 4 | (p[10] & 0x0F));
+ part->set_detune((p[11] & 0x0F) << 4 | (p[12] & 0x0F));
part->pitchBendFactor((p[13] & 0x0F) << 4 | (p[14] & 0x0F));
if (part->_percussion) {
if (part->_mc) {
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index 3831689def..23f57a01b9 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/system.h"
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index 1e96aa8827..d940b6897f 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#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 cb894d77cc..d6e07bd0ec 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.h b/engines/scumm/imuse_digi/dimuse_bndmgr.h
index bed1ac6549..21d3110f8b 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.h
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef 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 c78e313fc2..69cd89320c 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/scummsys.h"
@@ -209,7 +206,7 @@ int32 decompressADPCM(byte *compInput, byte *compOutput, int channels) {
int32 destPos;
int16 firstWord;
byte initialTablePos[MAX_CHANNELS] = {0, 0};
- int32 initialimcTableEntry[MAX_CHANNELS] = {7, 7};
+ //int32 initialimcTableEntry[MAX_CHANNELS] = {7, 7};
int32 initialOutputWord[MAX_CHANNELS] = {0, 0};
int32 totalBitOffset, curTablePos, outputWord;
byte *dst;
@@ -248,7 +245,7 @@ int32 decompressADPCM(byte *compInput, byte *compOutput, int channels) {
for (i = 0; i < channels; i++) {
initialTablePos[i] = *src;
src += 1;
- initialimcTableEntry[i] = READ_BE_UINT32(src);
+ //initialimcTableEntry[i] = READ_BE_UINT32(src);
src += 4;
initialOutputWord[i] = READ_BE_UINT32(src);
src += 4;
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.h b/engines/scumm/imuse_digi/dimuse_codecs.h
index 71fd24c3ac..a38f7234dd 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.h
+++ b/engines/scumm/imuse_digi/dimuse_codecs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_IMUSE_DIGI_CODECS_H
diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp
index 5c28917756..adf2560142 100644
--- a/engines/scumm/imuse_digi/dimuse_music.cpp
+++ b/engines/scumm/imuse_digi/dimuse_music.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp
index 02395eed4d..bc030cc242 100644
--- a/engines/scumm/imuse_digi/dimuse_script.cpp
+++ b/engines/scumm/imuse_digi/dimuse_script.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 2cd90c4f2b..abd0d68e56 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -31,6 +28,7 @@
#include "audio/decoders/vorbis.h"
#include "audio/decoders/mp3.h"
+#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/util.h"
#include "scumm/imuse_digi/dimuse.h"
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.h b/engines/scumm/imuse_digi/dimuse_sndmgr.h
index 7ae9fdccb0..f869c62eb5 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.h
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_IMUSE_DIGI_SNDMGR_H
diff --git a/engines/scumm/imuse_digi/dimuse_tables.cpp b/engines/scumm/imuse_digi/dimuse_tables.cpp
index a7ee35b0df..c27138b765 100644
--- a/engines/scumm/imuse_digi/dimuse_tables.cpp
+++ b/engines/scumm/imuse_digi/dimuse_tables.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/imuse_digi/dimuse_tables.h b/engines/scumm/imuse_digi/dimuse_tables.h
index 942acd721f..a74941dfea 100644
--- a/engines/scumm/imuse_digi/dimuse_tables.h
+++ b/engines/scumm/imuse_digi/dimuse_tables.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#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 2a08d56163..0896f9af7d 100644
--- a/engines/scumm/imuse_digi/dimuse_track.cpp
+++ b/engines/scumm/imuse_digi/dimuse_track.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h
index 8c6625cad1..420db4bb06 100644
--- a/engines/scumm/imuse_digi/dimuse_track.h
+++ b/engines/scumm/imuse_digi/dimuse_track.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#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 ab5357f1dd..ff85bd0a61 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -38,6 +35,7 @@
#include "scumm/he/intern_he.h"
#include "scumm/he/logic_he.h"
#endif
+#include "scumm/resource.h"
#include "scumm/scumm_v0.h"
#include "scumm/scumm_v6.h"
#include "scumm/scumm_v8.h"
@@ -305,14 +303,14 @@ void ScummEngine::processInput() {
if ((_leftBtnPressed & msClicked) && (_rightBtnPressed & msClicked) && _game.version >= 4) {
// Pressing both mouse buttons is treated as if you pressed
// the cutscene exit key (ESC) in V4+ games. That mimicks
- // the behaviour of the original engine where pressing both
+ // the behavior of the original engine where pressing both
// mouse buttons also skips the current cutscene.
_mouseAndKeyboardStat = 0;
lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
} else if ((_rightBtnPressed & msClicked) && (_game.version <= 3 && _game.id != GID_LOOM)) {
// Pressing right mouse button is treated as if you pressed
// the cutscene exit key (ESC) in V0-V3 games. That mimicks
- // the behaviour of the original engine where pressing right
+ // the behavior of the original engine where pressing right
// mouse button also skips the current cutscene.
_mouseAndKeyboardStat = 0;
lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index a82c0ae408..b8089ff226 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -31,6 +28,7 @@
#include "scumm/actor.h"
#include "scumm/file.h"
+#include "scumm/resource.h"
#include "scumm/scumm_v7.h"
#include "scumm/sound.h"
diff --git a/engines/scumm/insane/insane.h b/engines/scumm/insane/insane.h
index 499eb70a90..12d44c57f4 100644
--- a/engines/scumm/insane/insane.h
+++ b/engines/scumm/insane/insane.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_INSANE_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp
index 05775f1585..48aaab505a 100644
--- a/engines/scumm/insane/insane_ben.cpp
+++ b/engines/scumm/insane/insane_ben.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp
index e8d97d3875..68766ab72c 100644
--- a/engines/scumm/insane/insane_enemy.cpp
+++ b/engines/scumm/insane/insane_enemy.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -91,14 +88,13 @@ int32 Insane::enemyHandler(int num, int32 actor1, int32 actor2, int32 probabilit
}
int32 Insane::enemy0handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act2damage, act1x, act2x, retval;
int32 dist;
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act2damage = _actor[actor2].damage; // ebp
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act2damage = _actor[actor2].damage; // ebp
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // edi
if (!_actor[actor1].defunct) {
if (_enHdlVar[EN_ROTT1][1] > _enHdlVar[EN_ROTT1][2]) {
@@ -255,14 +251,13 @@ int32 Insane::enemy0initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act2damage, act1x, act2x, retval;
int32 dist;
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act2damage = _actor[actor2].damage; // ebp
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act2damage = _actor[actor2].damage; // ebp
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // edi
if (!_actor[actor1].defunct) {
if (_enHdlVar[EN_ROTT2][1] > _enHdlVar[EN_ROTT2][2]) {
@@ -400,14 +395,13 @@ int32 Insane::enemy1initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy2handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act2damage, act1x, act2x, retval;
int32 dist;
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act2damage = _actor[actor2].damage; // ebp
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act2damage = _actor[actor2].damage; // ebp
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // edi
if (!_actor[actor1].defunct) {
if (_enHdlVar[EN_ROTT3][1] > _enHdlVar[EN_ROTT3][2]) {
@@ -549,14 +543,13 @@ int32 Insane::enemy2initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy3handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act2damage, act1x, act2x, retval;
int32 dist;
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act2damage = _actor[actor2].damage; // ebp
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act2damage = _actor[actor2].damage; // ebp
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // edi
if (!_actor[actor1].defunct) {
if (_enHdlVar[EN_VULTF1][1] > _enHdlVar[EN_VULTF1][2]) {
@@ -706,14 +699,13 @@ int32 Insane::enemy3initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy4handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act2damage, act1x, act2x, retval;
int32 dist;
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act2damage = _actor[actor2].damage; // ebp
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act2damage = _actor[actor2].damage; // ebp
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // edi
if (!_actor[actor1].defunct) {
if (_enHdlVar[EN_VULTM1][1] > _enHdlVar[EN_VULTM1][2]) {
@@ -876,15 +868,12 @@ int32 Insane::enemy4initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy5handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act1x, act2x, retval;
- int32 dist;
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // ebp
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // ebp
-
- dist = ABS(act1x - act2x);
+ int32 dist = ABS(act1x - act2x);
if (weaponMaxRange(actor1) >= dist) {
if (!_enHdlVar[EN_VULTF2][2])
@@ -1022,19 +1011,16 @@ int32 Insane::enemy5initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy6handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act2damage, act1x, act2x, retval;
- int32 dist;
-
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx //ebx
- act2damage = _actor[actor2].damage; // ebp // edi
- act1x = _actor[actor1].x; // esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx //ebx
+ //int32 act2damage = _actor[actor2].damage; // ebp // edi
+ int32 act1x = _actor[actor1].x; // esi
+ int32 act2x = _actor[actor2].x; // edi
if (_actor[actor2].weapon == INV_CHAINSAW)
retval = 1;
- dist = ABS(act1x - act2x);
+ int32 dist = ABS(act1x - act2x);
if (_actor[actor1].defunct) {
/* scenePropIdx[18] */
@@ -1163,15 +1149,12 @@ int32 Insane::enemy6initializer(int32 actor1, int32 actor2, int32 probability) {
}
int32 Insane::enemy7handler(int32 actor1, int32 actor2, int32 probability) {
- int32 act1damage, act1x, act2x, retval;
- int32 dist;
-
- retval = 0;
- act1damage = _actor[actor1].damage; // ebx
- act1x = _actor[actor1].x; // ebp, esi
- act2x = _actor[actor2].x; // edi
+ int32 retval = 0;
+ int32 act1damage = _actor[actor1].damage; // ebx
+ int32 act1x = _actor[actor1].x; // ebp, esi
+ int32 act2x = _actor[actor2].x; // edi
- dist = ABS(act1x - act2x);
+ int32 dist = ABS(act1x - act2x);
if (_enHdlVar[EN_CAVEFISH][1] >= 600) {
_enHdlVar[EN_CAVEFISH][2] = 1;
diff --git a/engines/scumm/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp
index 265931ecc2..3592d67c18 100644
--- a/engines/scumm/insane/insane_iact.cpp
+++ b/engines/scumm/insane/insane_iact.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm_v7.h"
diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp
index 36a3f5a8b7..841fedafe2 100644
--- a/engines/scumm/insane/insane_scenes.cpp
+++ b/engines/scumm/insane/insane_scenes.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp
index be77e4fd66..1a31d1ca82 100644
--- a/engines/scumm/midiparser_ro.cpp
+++ b/engines/scumm/midiparser_ro.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/music.h b/engines/scumm/music.h
index 6285412ffd..a527c77b72 100644
--- a/engines/scumm/music.h
+++ b/engines/scumm/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_MUSIC_H
diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp
index 7f250e45e0..048b29d68b 100644
--- a/engines/scumm/nut_renderer.cpp
+++ b/engines/scumm/nut_renderer.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/scumm/nut_renderer.h b/engines/scumm/nut_renderer.h
index 5783646d11..acccf161fa 100644
--- a/engines/scumm/nut_renderer.h
+++ b/engines/scumm/nut_renderer.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#if !defined(SCUMM_NUT_RENDERER_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index c2547f74f4..ae4bbc45a6 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/actor.h"
@@ -104,7 +101,7 @@ void ScummEngine::setOwnerOf(int obj, int owner) {
// In Sam & Max this is necessary, or you won't get your stuff back
// from the Lost and Found tent after riding the Cone of Tragedy. But
// it probably applies to all V6+ games. See bugs #493153 and #907113.
- // FT disassembly is checked, behaviour is correct. [sev]
+ // FT disassembly is checked, behavior is correct. [sev]
int arg = (_game.version >= 6) ? obj : 0;
@@ -195,8 +192,11 @@ void ScummEngine::clearOwnerOf(int obj) {
if (!_inventory[i] && _inventory[i+1]) {
_inventory[i] = _inventory[i+1];
_inventory[i+1] = 0;
- _res->address[rtInventory][i] = _res->address[rtInventory][i + 1];
- _res->address[rtInventory][i + 1] = NULL;
+ // FIXME FIXME FIXME: This is incomplete, as we do not touch flags, status... BUG
+ _res->_types[rtInventory][i]._address = _res->_types[rtInventory][i + 1]._address;
+ _res->_types[rtInventory][i]._size = _res->_types[rtInventory][i + 1]._size;
+ _res->_types[rtInventory][i + 1]._address = NULL;
+ _res->_types[rtInventory][i + 1]._size = 0;
}
}
break;
@@ -1799,7 +1799,7 @@ int ScummEngine::findLocalObjectSlot() {
int ScummEngine::findFlObjectSlot() {
int i;
for (i = 1; i < _numFlObject; i++) {
- if (_res->address[rtFlObject][i] == NULL)
+ if (_res->_types[rtFlObject][i]._address == NULL)
return i;
}
error("findFlObjectSlot: Out of FLObject slots");
diff --git a/engines/scumm/object.h b/engines/scumm/object.h
index 2a817b2b88..cdf8b09e6f 100644
--- a/engines/scumm/object.h
+++ b/engines/scumm/object.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_OBJECT_H
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index b0786c924d..ba13ff46d9 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -17,9 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
@@ -217,7 +214,7 @@ void ScummEngine::resetPalette() {
} else {
if ((_game.platform == Common::kPlatformAmiga) && _game.version == 4) {
// if rendermode is set to EGA we use the full palette from the resources
- // else we initialise and then lock down the first 16 colors.
+ // else we initialize and then lock down the first 16 colors.
if (_renderMode != Common::kRenderEGA)
setPaletteFromTable(tableAmigaMIPalette, sizeof(tableAmigaMIPalette) / 3);
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
@@ -1009,9 +1006,6 @@ void ScummEngine::setPalColor(int idx, int r, int g, int b) {
}
void ScummEngine::setCurrentPalette(int palindex) {
- // TODO: This method could almost be moved to ScummEngin_v6, the only
- // problem is that it is called by ScummEngine::resetRoomSubBlocks().
- // But it should be possible to get rid of that, too (with some care).
const byte *pals;
_curPalIndex = palindex;
diff --git a/engines/scumm/player_mod.cpp b/engines/scumm/player_mod.cpp
index 657595fab1..6411f0a17a 100644
--- a/engines/scumm/player_mod.cpp
+++ b/engines/scumm/player_mod.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/player_mod.h b/engines/scumm/player_mod.h
index 3f97c4cab9..619d83541d 100644
--- a/engines/scumm/player_mod.h
+++ b/engines/scumm/player_mod.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_MOD_H
diff --git a/engines/scumm/player_nes.cpp b/engines/scumm/player_nes.cpp
index 5f792401e0..3f8bcef8b7 100644
--- a/engines/scumm/player_nes.cpp
+++ b/engines/scumm/player_nes.cpp
@@ -18,9 +18,6 @@
* aint32 with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DISABLE_NES_APU
diff --git a/engines/scumm/player_nes.h b/engines/scumm/player_nes.h
index 402eea7bf8..be1617e0f6 100644
--- a/engines/scumm/player_nes.h
+++ b/engines/scumm/player_nes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_NES_H
diff --git a/engines/scumm/player_pce.cpp b/engines/scumm/player_pce.cpp
index 46d976773d..786971c683 100644
--- a/engines/scumm/player_pce.cpp
+++ b/engines/scumm/player_pce.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/scumm/player_pce.h b/engines/scumm/player_pce.h
index 42153e8abc..eb6afd892a 100644
--- a/engines/scumm/player_pce.h
+++ b/engines/scumm/player_pce.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_PCE_H
diff --git a/engines/scumm/player_sid.cpp b/engines/scumm/player_sid.cpp
index 11468f3097..f0f60a3924 100644
--- a/engines/scumm/player_sid.cpp
+++ b/engines/scumm/player_sid.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef DISABLE_SID
diff --git a/engines/scumm/player_sid.h b/engines/scumm/player_sid.h
index 71497cc6f4..baeb7bbef0 100644
--- a/engines/scumm/player_sid.h
+++ b/engines/scumm/player_sid.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_SID_H
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index 8922ff1730..e71a8d0587 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -29,10 +26,8 @@
namespace Scumm {
-Player_Towns::Player_Towns(ScummEngine *vm, bool isVersion2) : _vm(vm), _v2(isVersion2), _numSoundMax(isVersion2 ? 256 : 200) {
+Player_Towns::Player_Towns(ScummEngine *vm, bool isVersion2) : _vm(vm), _v2(isVersion2), _intf(0), _numSoundMax(isVersion2 ? 256 : 200), _unkFlags(0x33) {
memset(_pcmCurrentSound, 0, sizeof(_pcmCurrentSound));
- _unkFlags = 0x33;
- _intf = 0;
}
void Player_Towns::setSfxVolume(int vol) {
@@ -505,15 +500,15 @@ void Player_Towns_v1::playEuphonyTrack(int sound, const uint8 *data) {
const uint8 *trackData = src + 150;
for (int i = 0; i < 32; i++)
- _driver->chanEnable(i, *src++);
+ _driver->configChan_enable(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanMode(i, 0xff);
+ _driver->configChan_setMode(i, 0xff);
for (int i = 0; i < 32; i++)
- _driver->chanOrdr(i, *src++);
+ _driver->configChan_remap(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanVolumeShift(i, *src++);
+ _driver->configChan_adjustVolume(i, *src++);
for (int i = 0; i < 32; i++)
- _driver->chanNoteShift(i, *src++);
+ _driver->configChan_setTranspose(i, *src++);
src += 8;
for (int i = 0; i < 6; i++)
@@ -579,18 +574,18 @@ void Player_Towns_v1::playCdaTrack(int sound, const uint8 *data, bool skipTrackV
_cdaCurrentSound = sound;
}
-Player_Towns_v2::Player_Towns_v2(ScummEngine *vm, IMuse *imuse, Audio::Mixer *mixer, bool disposeIMuse) : Player_Towns(vm, true), _imuse(imuse), _imuseDispose(disposeIMuse) {
+Player_Towns_v2::Player_Towns_v2(ScummEngine *vm, Audio::Mixer *mixer, IMuse *imuse, bool disposeIMuse) : Player_Towns(vm, true), _imuse(imuse), _imuseDispose(disposeIMuse), _sblData(0) {
_soundOverride = new SoundOvrParameters[_numSoundMax];
memset(_soundOverride, 0, _numSoundMax * sizeof(SoundOvrParameters));
- _sblData = 0;
_intf = new TownsAudioInterface(mixer, 0);
}
Player_Towns_v2::~Player_Towns_v2() {
delete _intf;
+ _intf = 0;
if (_imuseDispose)
- delete _imuse;
+ delete _imuse;
delete[] _sblData;
delete[] _soundOverride;
diff --git a/engines/scumm/player_towns.h b/engines/scumm/player_towns.h
index fda8bd4042..470020d621 100644
--- a/engines/scumm/player_towns.h
+++ b/engines/scumm/player_towns.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_TOWNS_H
@@ -29,6 +26,7 @@
#include "scumm/scumm.h"
#include "scumm/imuse/imuse.h"
#include "audio/softsynth/fmtowns_pc98/towns_euphony.h"
+#include "audio/softsynth/fmtowns_pc98/towns_midi.h"
namespace Scumm {
@@ -144,7 +142,7 @@ private:
class Player_Towns_v2 : public Player_Towns {
public:
- Player_Towns_v2(ScummEngine *vm, IMuse *imuse, Audio::Mixer *mixer, bool disposeIMuse);
+ Player_Towns_v2(ScummEngine *vm, Audio::Mixer *mixer, IMuse *imuse, bool disposeIMuse);
~Player_Towns_v2();
bool init();
@@ -172,6 +170,7 @@ private:
SoundOvrParameters *_soundOverride;
uint8 *_sblData;
+
IMuse *_imuse;
const bool _imuseDispose;
};
diff --git a/engines/scumm/player_v1.cpp b/engines/scumm/player_v1.cpp
index f2487c0a57..8afede8c5a 100644
--- a/engines/scumm/player_v1.cpp
+++ b/engines/scumm/player_v1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/player_v1.h b/engines/scumm/player_v1.h
index acba13e475..9e6063adc9 100644
--- a/engines/scumm/player_v1.h
+++ b/engines/scumm/player_v1.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V1_H
diff --git a/engines/scumm/player_v2.cpp b/engines/scumm/player_v2.cpp
index a66e248ecc..6910f5e0db 100644
--- a/engines/scumm/player_v2.cpp
+++ b/engines/scumm/player_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/player_v2.h"
diff --git a/engines/scumm/player_v2.h b/engines/scumm/player_v2.h
index 6a0b3d6d5e..14a0b9c1e0 100644
--- a/engines/scumm/player_v2.h
+++ b/engines/scumm/player_v2.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V2_H
diff --git a/engines/scumm/player_v2a.cpp b/engines/scumm/player_v2a.cpp
index cee77024ca..ed97c4098f 100644
--- a/engines/scumm/player_v2a.cpp
+++ b/engines/scumm/player_v2a.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/engine.h"
diff --git a/engines/scumm/player_v2a.h b/engines/scumm/player_v2a.h
index d60040bd76..719d5491ea 100644
--- a/engines/scumm/player_v2a.h
+++ b/engines/scumm/player_v2a.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V2A_H
diff --git a/engines/scumm/player_v2base.cpp b/engines/scumm/player_v2base.cpp
index 61c91aae85..0d3ad4b1b3 100644
--- a/engines/scumm/player_v2base.cpp
+++ b/engines/scumm/player_v2base.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/player_v2base.h"
diff --git a/engines/scumm/player_v2base.h b/engines/scumm/player_v2base.h
index bd910b8a78..2f048070ad 100644
--- a/engines/scumm/player_v2base.h
+++ b/engines/scumm/player_v2base.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V2BASE_H
diff --git a/engines/scumm/player_v2cms.cpp b/engines/scumm/player_v2cms.cpp
index b081a68428..21e7f193b5 100644
--- a/engines/scumm/player_v2cms.cpp
+++ b/engines/scumm/player_v2cms.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/player_v2cms.h"
diff --git a/engines/scumm/player_v2cms.h b/engines/scumm/player_v2cms.h
index fd939d8505..f7dc0c16b1 100644
--- a/engines/scumm/player_v2cms.h
+++ b/engines/scumm/player_v2cms.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V2CMS_H
diff --git a/engines/scumm/player_v3a.cpp b/engines/scumm/player_v3a.cpp
index cffbd729ea..472cd1252b 100644
--- a/engines/scumm/player_v3a.cpp
+++ b/engines/scumm/player_v3a.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/player_v3a.h b/engines/scumm/player_v3a.h
index d3d1e5eeb5..9449664e9b 100644
--- a/engines/scumm/player_v3a.h
+++ b/engines/scumm/player_v3a.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V3A_H
diff --git a/engines/scumm/player_v4a.cpp b/engines/scumm/player_v4a.cpp
index 53c9e6b93c..e791736f0e 100644
--- a/engines/scumm/player_v4a.cpp
+++ b/engines/scumm/player_v4a.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/engine.h"
diff --git a/engines/scumm/player_v4a.h b/engines/scumm/player_v4a.h
index 458a39b5fe..d01c70f295 100644
--- a/engines/scumm/player_v4a.h
+++ b/engines/scumm/player_v4a.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_PLAYER_V4A_H
@@ -70,7 +67,7 @@ private:
// byte type;
} _sfxSlots[4];
- int8 _initState; // < 0: failed, 0: uninitialised, > 0: initialised
+ int8 _initState; // < 0: failed, 0: uninitialized, > 0: initialized
int getSfxChan(int id) const {
for (int i = 0; i < ARRAYSIZE(_sfxSlots); ++i)
diff --git a/engines/scumm/proc3ARM.s b/engines/scumm/proc3ARM.s
index 5acfa86c29..5833bcf90b 100644
--- a/engines/scumm/proc3ARM.s
+++ b/engines/scumm/proc3ARM.s
@@ -18,9 +18,6 @@
@ along with this program@ if not, write to the Free Software
@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@
-@ $URL$
-@ $Id$
-@
@ @author Robin Watts (robin@wss.co.uk)
.text
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index c872a83d14..0448f60593 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str.h"
@@ -55,7 +52,7 @@ enum {
-extern const char *resTypeFromId(int id);
+extern const char *nameOfResType(ResType type);
static uint16 newTag2Old(uint32 newTag);
static const byte *findResourceSmall(uint32 tag, const byte *searchin);
@@ -86,8 +83,8 @@ void ScummEngine::openRoom(const int room) {
// Load the disk numer / room offs (special case for room 0 exists because
// room 0 contains the data which is used to create the roomno / roomoffs
// tables -- hence obviously we mustn't use those when loading room 0.
- const uint32 diskNumber = room ? _res->roomno[rtRoom][room] : 0;
- const uint32 room_offs = room ? _res->roomoffs[rtRoom][room] : 0;
+ const uint32 diskNumber = room ? _res->_types[rtRoom][room]._roomno : 0;
+ const uint32 room_offs = room ? _res->_types[rtRoom][room]._roomoffs : 0;
// FIXME: Since room_offs is const, clearly the following loop either
// is never entered, or loops forever (if it wasn't for the return/error
@@ -97,7 +94,7 @@ void ScummEngine::openRoom(const int room) {
while (room_offs != RES_INVALID_OFFSET) {
if (room_offs != 0 && room != 0 && _game.heversion < 98) {
- _fileOffset = _res->roomoffs[rtRoom][room];
+ _fileOffset = _res->_types[rtRoom][room]._roomoffs;
return;
}
@@ -125,7 +122,7 @@ void ScummEngine::openRoom(const int room) {
return;
deleteRoomOffsets();
readRoomsOffsets();
- _fileOffset = _res->roomoffs[rtRoom][room];
+ _fileOffset = _res->_types[rtRoom][room]._roomoffs;
if (_fileOffset != 8)
return;
@@ -160,15 +157,13 @@ void ScummEngine::closeRoom() {
/** Delete the currently loaded room offsets. */
void ScummEngine::deleteRoomOffsets() {
for (int i = 0; i < _numRooms; i++) {
- if (_res->roomoffs[rtRoom][i] != RES_INVALID_OFFSET)
- _res->roomoffs[rtRoom][i] = 0;
+ if (_res->_types[rtRoom][i]._roomoffs != RES_INVALID_OFFSET)
+ _res->_types[rtRoom][i]._roomoffs = 0;
}
}
/** Read room offsets */
void ScummEngine::readRoomsOffsets() {
- debug(9, "readRoomOffsets()");
-
if (_game.features & GF_SMALL_HEADER) {
_fileHandle->seek(12, SEEK_SET); // Directly searching for the room offset block would be more generic...
} else {
@@ -179,8 +174,8 @@ void ScummEngine::readRoomsOffsets() {
while (num--) {
int room = _fileHandle->readByte();
int offset = _fileHandle->readUint32LE();
- if (_res->roomoffs[rtRoom][room] != RES_INVALID_OFFSET) {
- _res->roomoffs[rtRoom][room] = offset;
+ if (_res->_types[rtRoom][room]._roomoffs != RES_INVALID_OFFSET) {
+ _res->_types[rtRoom][room]._roomoffs = offset;
}
}
}
@@ -303,6 +298,7 @@ void ScummEngine::readIndexFile() {
break;
numblock++;
+ debug(2, "Reading index block of type '%s', size %d", tag2str(blocktype), itemsize);
readIndexBlock(blocktype, itemsize);
}
@@ -352,7 +348,6 @@ void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {
char *ptr;
switch (blocktype) {
case MKTAG('A','N','A','M'): // Used by: The Dig, FT
- debug(9, "found ANAM block, reading audio names");
num = _fileHandle->readUint16LE();
ptr = (char*)malloc(num * 9);
_fileHandle->read(ptr, num * 9);
@@ -421,7 +416,6 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
break;
case MKTAG('D','O','B','J'):
- debug(9, "found DOBJ block, reading object table");
readGlobalObjects();
break;
@@ -488,73 +482,78 @@ void ScummEngine::readArrayFromIndexFile() {
error("readArrayFromIndexFile() not supported in pre-V6 games");
}
-int ScummEngine::readResTypeList(int id) {
- int num;
- int i;
-
- debug(9, "readResTypeList(%s)", resTypeFromId(id));
+int ScummEngine::readResTypeList(ResType type) {
+ uint num;
+ ResId idx;
if (_game.version == 8)
num = _fileHandle->readUint32LE();
else
num = _fileHandle->readUint16LE();
- if (num != _res->num[id]) {
- error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num);
+ if (num != _res->_types[type].size()) {
+ error("Invalid number of %ss (%d) in directory", nameOfResType(type), num);
}
- for (i = 0; i < num; i++) {
- _res->roomno[id][i] = _fileHandle->readByte();
+ debug(2, " readResTypeList(%s): %d entries", nameOfResType(type), num);
+
+
+ for (idx = 0; idx < num; idx++) {
+ _res->_types[type][idx]._roomno = _fileHandle->readByte();
}
- for (i = 0; i < num; i++) {
- _res->roomoffs[id][i] = _fileHandle->readUint32LE();
+ for (idx = 0; idx < num; idx++) {
+ _res->_types[type][idx]._roomoffs = _fileHandle->readUint32LE();
}
return num;
}
-int ScummEngine_v70he::readResTypeList(int id) {
- int num;
- int i;
+int ScummEngine_v70he::readResTypeList(ResType type) {
+ uint num;
+ ResId idx;
- num = ScummEngine::readResTypeList(id);
+ num = ScummEngine::readResTypeList(type);
- if (id == rtRoom)
- for (i = 0; i < num; i++) {
- _heV7RoomIntOffsets[i] = _res->roomoffs[rtRoom][i];
+ if (type == rtRoom)
+ for (idx = 0; idx < num; idx++) {
+ _heV7RoomIntOffsets[idx] = _res->_types[rtRoom][idx]._roomoffs;
}
- for (i = 0; i < num; i++) {
- _res->globsize[id][i] = _fileHandle->readUint32LE();
+ for (idx = 0; idx < num; idx++) {
+ // The globsize is currently not being used
+ /*_res->_types[type][idx]._globsize =*/ _fileHandle->readUint32LE();
}
return num;
}
-void ResourceManager::allocResTypeData(int id, uint32 tag, int num_, const char *name_, int mode_) {
- debug(9, "allocResTypeData(%s/%s,%s,%d,%d)", resTypeFromId(id), name_, tag2str(TO_BE_32(tag)), num_, mode_);
- assert(id >= 0 && id < (int)(ARRAYSIZE(this->mode)));
+void ResourceManager::allocResTypeData(ResType type, uint32 tag, int num, ResTypeMode mode) {
+ debug(2, "allocResTypeData(%s,%s,%d,%d)", nameOfResType(type), tag2str(TO_BE_32(tag)), num, mode);
+ assert(type >= 0 && type < (int)(ARRAYSIZE(_types)));
- if (num_ >= 8000)
- error("Too many %ss (%d) in directory", name_, num_);
+ if (num >= 8000)
+ error("Too many %s resources (%d) in directory", nameOfResType(type), num);
- mode[id] = mode_;
- num[id] = num_;
- tags[id] = tag;
- name[id] = name_;
- address[id] = (byte **)calloc(num_, sizeof(void *));
- flags[id] = (byte *)calloc(num_, sizeof(byte));
- status[id] = (byte *)calloc(num_, sizeof(byte));
+ _types[type]._mode = mode;
+ _types[type]._tag = tag;
- if (mode_) {
- roomno[id] = (byte *)calloc(num_, sizeof(byte));
- roomoffs[id] = (uint32 *)calloc(num_, sizeof(uint32));
+ // If there was data in there, let's clear it out completely. This is important
+ // in case we are restarting the game.
+ _types[type].clear();
+ _types[type].resize(num);
+
+/*
+ TODO: Use multiple Resource subclasses, one for each res mode; then,
+ given them serializability.
+ if (mode) {
+ _types[type].roomno = (byte *)calloc(num, sizeof(byte));
+ _types[type].roomoffs = (uint32 *)calloc(num, sizeof(uint32));
}
if (_vm->_game.heversion >= 70) {
- globsize[id] = (uint32 *)calloc(num_, sizeof(uint32));
+ _types[type].globsize = (uint32 *)calloc(num, sizeof(uint32));
}
-
+*/
}
void ScummEngine::loadCharset(int no) {
@@ -588,16 +587,14 @@ void ScummEngine::nukeCharset(int i) {
_res->nukeResource(rtCharset, i);
}
-void ScummEngine::ensureResourceLoaded(int type, int i) {
- void *addr = NULL;
-
- debugC(DEBUG_RESOURCE, "ensureResourceLoaded(%s,%d)", resTypeFromId(type), i);
+void ScummEngine::ensureResourceLoaded(ResType type, ResId idx) {
+ debugC(DEBUG_RESOURCE, "ensureResourceLoaded(%s,%d)", nameOfResType(type), idx);
- if ((type == rtRoom) && i > 0x7F && _game.version < 7 && _game.heversion <= 71) {
- i = _resourceMapper[i & 0x7F];
+ if ((type == rtRoom) && idx > 0x7F && _game.version < 7 && _game.heversion <= 71) {
+ idx = _resourceMapper[idx & 0x7F];
}
- // FIXME: This check used to be "i==0". However, that causes
+ // FIXME: This check used to be "idx==0". However, that causes
// problems when using this function to ensure charset 0 is loaded.
// This is done for many games, e.g. Zak256 or Indy3 (EGA and VGA).
// For now we restrict the check to anything which is not a charset.
@@ -608,27 +605,24 @@ void ScummEngine::ensureResourceLoaded(int type, int i) {
// our code base? After all we also have to add special cases for many
// of our script opcodes that check for the (invalid) actor 0... so
// maybe both issues are related...
- if (type != rtCharset && i == 0)
+ if (type != rtCharset && idx == 0)
return;
- if (i <= _res->num[type])
- addr = _res->address[type][i];
-
- if (addr)
+ if (idx <= _res->_types[type].size() && _res->_types[type][idx]._address)
return;
- loadResource(type, i);
+ loadResource(type, idx);
- if (_game.version == 5 && type == rtRoom && i == _roomResource)
+ if (_game.version == 5 && type == rtRoom && (int)idx == _roomResource)
VAR(VAR_ROOM_FLAG) = 1;
}
-int ScummEngine::loadResource(int type, int idx) {
+int ScummEngine::loadResource(ResType type, ResId idx) {
int roomNr;
uint32 fileOffs;
uint32 size, tag;
- debugC(DEBUG_RESOURCE, "loadResource(%s,%d)", resTypeFromId(type), idx);
+ debugC(DEBUG_RESOURCE, "loadResource(%s,%d)", nameOfResType(type), idx);
if (type == rtCharset && (_game.features & GF_SMALL_HEADER)) {
loadCharset(idx);
@@ -637,8 +631,8 @@ int ScummEngine::loadResource(int type, int idx) {
roomNr = getResourceRoomNr(type, idx);
- if (idx >= _res->num[type])
- error("%s %d undefined %d %d", _res->name[type], idx, _res->num[type], roomNr);
+ if (idx >= _res->_types[type].size())
+ error("%s %d undefined %d %d", nameOfResType(type), idx, _res->_types[type].size(), roomNr);
if (roomNr == 0)
roomNr = _roomResource;
@@ -672,11 +666,19 @@ int ScummEngine::loadResource(int type, int idx) {
return readSoundResource(idx);
}
+ // Sanity check: Is this the right tag for this resource type?
+ //
+ // Currently disabled for newer HE games because they use different
+ // tags. For example, for rtRoom, 'ROOM' changed to 'RMDA'; and for
+ // rtImage, 'AWIZ' and 'MULT' can both occur simultaneously.
+ // On the long run, it would be preferable to not turn this check off,
+ // but instead to explicitly support the variations in the HE games.
tag = _fileHandle->readUint32BE();
-
- if (tag != _res->tags[type] && _game.heversion < 70) {
- error("%s %d not in room %d at %d+%d in file %s",
- _res->name[type], idx, roomNr,
+ if (tag != _res->_types[type]._tag && _game.heversion < 70) {
+ error("Unknown res tag '%s' encountered (expected '%s') "
+ "while trying to load res (%s,%d) in room %d at %d+%d in file %s",
+ tag2str(tag), tag2str(_res->_types[type]._tag),
+ nameOfResType(type), idx, roomNr,
_fileOffset, fileOffs, _fileHandle->getName());
}
@@ -697,35 +699,33 @@ int ScummEngine::loadResource(int type, int idx) {
return 1;
}
-int ScummEngine::getResourceRoomNr(int type, int idx) {
+int ScummEngine::getResourceRoomNr(ResType type, ResId idx) {
if (type == rtRoom && _game.heversion < 70)
return idx;
- return _res->roomno[type][idx];
+ return _res->_types[type][idx]._roomno;
}
-uint32 ScummEngine::getResourceRoomOffset(int type, int idx) {
+uint32 ScummEngine::getResourceRoomOffset(ResType type, ResId idx) {
if (type == rtRoom) {
return (_game.version == 8) ? 8 : 0;
}
- return _res->roomoffs[type][idx];
+ return _res->_types[type][idx]._roomoffs;
}
-uint32 ScummEngine_v70he::getResourceRoomOffset(int type, int idx) {
+uint32 ScummEngine_v70he::getResourceRoomOffset(ResType type, ResId idx) {
if (type == rtRoom) {
return _heV7RoomIntOffsets[idx];
}
- return _res->roomoffs[type][idx];
+ return _res->_types[type][idx]._roomoffs;
}
-int ScummEngine::getResourceSize(int type, int idx) {
+int ScummEngine::getResourceSize(ResType type, ResId idx) {
byte *ptr = getResourceAddress(type, idx);
assert(ptr);
- MemBlkHeader *hdr = (MemBlkHeader *)(ptr - sizeof(MemBlkHeader));
-
- return hdr->size;
+ return _res->_types[type][idx]._size;
}
-byte *ScummEngine::getResourceAddress(int type, int idx) {
+byte *ScummEngine::getResourceAddress(ResType type, ResId idx) {
byte *ptr;
if (_game.heversion >= 80 && type == rtString)
@@ -734,33 +734,30 @@ byte *ScummEngine::getResourceAddress(int type, int idx) {
if (!_res->validateResource("getResourceAddress", type, idx))
return NULL;
- if (!_res->address[type]) {
- debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d), _res->address[type] == NULL", resTypeFromId(type), idx);
- return NULL;
- }
-
- if (_res->mode[type] && !_res->address[type][idx]) {
+ // If the resource is missing, but loadable from the game data files, try to do so.
+ if (!_res->_types[type][idx]._address && _res->_types[type]._mode != kDynamicResTypeMode) {
ensureResourceLoaded(type, idx);
}
- if (!(ptr = (byte *)_res->address[type][idx])) {
- debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d) == NULL", resTypeFromId(type), idx);
+ ptr = (byte *)_res->_types[type][idx]._address;
+ if (!ptr) {
+ debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d) == NULL", nameOfResType(type), idx);
return NULL;
}
_res->setResourceCounter(type, idx, 1);
- debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d) == %p", resTypeFromId(type), idx, ptr + sizeof(MemBlkHeader));
- return ptr + sizeof(MemBlkHeader);
+ debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d) == %p", nameOfResType(type), idx, ptr);
+ return ptr;
}
-byte *ScummEngine::getStringAddress(int i) {
- byte *addr = getResourceAddress(rtString, i);
+byte *ScummEngine::getStringAddress(ResId idx) {
+ byte *addr = getResourceAddress(rtString, idx);
return addr;
}
-byte *ScummEngine_v6::getStringAddress(int i) {
- byte *addr = getResourceAddress(rtString, i);
+byte *ScummEngine_v6::getStringAddress(ResId idx) {
+ byte *addr = getResourceAddress(rtString, idx);
if (addr == NULL)
return NULL;
// Skip over the ArrayHeader
@@ -772,35 +769,42 @@ byte *ScummEngine::getStringAddressVar(int i) {
}
void ResourceManager::increaseExpireCounter() {
- if (!(++_expireCounter)) {
- increaseResourceCounter();
+ ++_expireCounter;
+ if (_expireCounter == 0) { // overflow?
+ increaseResourceCounters();
}
}
-void ResourceManager::increaseResourceCounter() {
- int i, j;
- byte counter;
-
- for (i = rtFirst; i <= rtLast; i++) {
- for (j = num[i]; --j >= 0;) {
- counter = flags[i][j] & RF_USAGE;
+void ResourceManager::increaseResourceCounters() {
+ for (ResType type = rtFirst; type <= rtLast; type = ResType(type + 1)) {
+ ResId idx = _types[type].size();
+ while (idx-- > 0) {
+ byte counter = _types[type][idx].getResourceCounter();
if (counter && counter < RF_USAGE_MAX) {
- setResourceCounter(i, j, counter + 1);
+ setResourceCounter(type, idx, counter + 1);
}
}
}
}
-void ResourceManager::setResourceCounter(int type, int idx, byte flag) {
- flags[type][idx] &= ~RF_USAGE;
- flags[type][idx] |= flag;
+void ResourceManager::setResourceCounter(ResType type, ResId idx, byte counter) {
+ _types[type][idx].setResourceCounter(counter);
+}
+
+void ResourceManager::Resource::setResourceCounter(byte counter) {
+ _flags &= RF_LOCK; // Clear lower 7 bits, preserve the lock bit.
+ _flags |= counter; // Update the usage counter
+}
+
+byte ResourceManager::Resource::getResourceCounter() const {
+ return _flags & RF_USAGE;
}
/* 2 bytes safety area to make "precaching" of bytes in the gdi drawer easier */
#define SAFETY_AREA 2
-byte *ResourceManager::createResource(int type, int idx, uint32 size) {
- debugC(DEBUG_RESOURCE, "_res->createResource(%s,%d,%d)", resTypeFromId(type), idx, size);
+byte *ResourceManager::createResource(ResType type, ResId idx, uint32 size) {
+ debugC(DEBUG_RESOURCE, "_res->createResource(%s,%d,%d)", nameOfResType(type), idx, size);
if (!validateResource("allocating", type, idx))
return NULL;
@@ -810,31 +814,62 @@ byte *ResourceManager::createResource(int type, int idx, uint32 size) {
// cases. For instance, Zak tries to reload the intro music
// while it's playing. See bug #1253171.
- if (address[type][idx] && (type == rtSound || type == rtScript || type == rtCostume))
- return address[type][idx] + sizeof(MemBlkHeader);
+ if (_types[type][idx]._address && (type == rtSound || type == rtScript || type == rtCostume))
+ return _types[type][idx]._address;
}
nukeResource(type, idx);
expireResources(size);
- void *ptr = calloc(size + sizeof(MemBlkHeader) + SAFETY_AREA, 1);
+ byte *ptr = (byte *)calloc(size + SAFETY_AREA, 1);
if (ptr == NULL) {
- error("createResource(%s,%d): Out of memory while allocating %d", resTypeFromId(type), idx, size);
+ error("createResource(%s,%d): Out of memory while allocating %d", nameOfResType(type), idx, size);
}
_allocatedSize += size;
- address[type][idx] = (byte *)ptr;
- ((MemBlkHeader *)ptr)->size = size;
+ _types[type][idx]._address = ptr;
+ _types[type][idx]._size = size;
setResourceCounter(type, idx, 1);
- return (byte *)ptr + sizeof(MemBlkHeader); /* skip header */
+ return ptr;
+}
+
+ResourceManager::Resource::Resource() {
+ _address = 0;
+ _size = 0;
+ _flags = 0;
+ _status = 0;
+ _roomno = 0;
+ _roomoffs = 0;
+}
+
+ResourceManager::Resource::~Resource() {
+ delete _address;
+ _address = 0;
}
-ResourceManager::ResourceManager(ScummEngine *vm) {
- memset(this, 0, sizeof(ResourceManager));
- _vm = vm;
-// _allocatedSize = 0;
+void ResourceManager::Resource::nuke() {
+ delete _address;
+ _address = 0;
+ _size = 0;
+ _flags = 0;
+ _status &= ~RS_MODIFIED;
+}
+
+ResourceManager::ResTypeData::ResTypeData() {
+ _mode = kDynamicResTypeMode;
+ _tag = 0;
+}
+
+ResourceManager::ResTypeData::~ResTypeData() {
+}
+
+ResourceManager::ResourceManager(ScummEngine *vm) : _vm(vm) {
+ _allocatedSize = 0;
+ _maxHeapThreshold = 0;
+ _minHeapThreshold = 0;
+ _expireCounter = 0;
}
ResourceManager::~ResourceManager() {
@@ -848,30 +883,20 @@ void ResourceManager::setHeapThreshold(int min, int max) {
_minHeapThreshold = min;
}
-bool ResourceManager::validateResource(const char *str, int type, int idx) const {
- if (type < rtFirst || type > rtLast || (uint) idx >= (uint)num[type]) {
- error("%s Illegal Glob type %s (%d) num %d", str, resTypeFromId(type), type, idx);
+bool ResourceManager::validateResource(const char *str, ResType type, ResId idx) const {
+ if (type < rtFirst || type > rtLast || (uint)idx >= (uint)_types[type].size()) {
+ error("%s Illegal Glob type %s (%d) num %d", str, nameOfResType(type), type, idx);
return false;
}
return true;
}
-void ResourceManager::nukeResource(int type, int idx) {
- byte *ptr;
-
- if (!address[type])
- return;
-
- assert(idx >= 0 && idx < num[type]);
-
- ptr = address[type][idx];
+void ResourceManager::nukeResource(ResType type, ResId idx) {
+ byte *ptr = _types[type][idx]._address;
if (ptr != NULL) {
- debugC(DEBUG_RESOURCE, "nukeResource(%s,%d)", resTypeFromId(type), idx);
- address[type][idx] = 0;
- flags[type][idx] = 0;
- status[type][idx] &= ~RS_MODIFIED;
- _allocatedSize -= ((MemBlkHeader *)ptr)->size;
- free(ptr);
+ debugC(DEBUG_RESOURCE, "nukeResource(%s,%d)", nameOfResType(type), idx);
+ _allocatedSize -= _types[type][idx]._size;
+ _types[type][idx].nuke();
}
}
@@ -900,77 +925,96 @@ int ScummEngine::getResourceDataSize(const byte *ptr) const {
return READ_BE_UINT32(ptr - 4) - _resourceHeaderSize;
}
-void ResourceManager::lock(int type, int i) {
- if (!validateResource("Locking", type, i))
+void ResourceManager::lock(ResType type, ResId idx) {
+ if (!validateResource("Locking", type, idx))
return;
- flags[type][i] |= RF_LOCK;
+ _types[type][idx].lock();
}
-void ResourceManager::unlock(int type, int i) {
- if (!validateResource("Unlocking", type, i))
+void ResourceManager::unlock(ResType type, ResId idx) {
+ if (!validateResource("Unlocking", type, idx))
return;
- flags[type][i] &= ~RF_LOCK;
+ _types[type][idx].unlock();
}
-bool ResourceManager::isLocked(int type, int i) const {
- if (!validateResource("isLocked", type, i))
+bool ResourceManager::isLocked(ResType type, ResId idx) const {
+ if (!validateResource("isLocked", type, idx))
return false;
- return (flags[type][i] & RF_LOCK) != 0;
+ return _types[type][idx].isLocked();
+}
+
+void ResourceManager::Resource::lock() {
+ _flags |= RF_LOCK;
+}
+
+void ResourceManager::Resource::unlock() {
+ _flags &= ~RF_LOCK;
}
-bool ScummEngine::isResourceInUse(int type, int i) const {
- if (!_res->validateResource("isResourceInUse", type, i))
+bool ResourceManager::Resource::isLocked() const {
+ return (_flags & RF_LOCK) != 0;
+}
+
+bool ScummEngine::isResourceInUse(ResType type, ResId idx) const {
+ if (!_res->validateResource("isResourceInUse", type, idx))
return false;
switch (type) {
case rtRoom:
- return _roomResource == (byte)i;
+ return _roomResource == (byte)idx;
case rtRoomImage:
- return _roomResource == (byte)i;
+ return _roomResource == (byte)idx;
case rtRoomScripts:
- return _roomResource == (byte)i;
+ return _roomResource == (byte)idx;
case rtScript:
- return isScriptInUse(i);
+ return isScriptInUse(idx);
case rtCostume:
- return isCostumeInUse(i);
+ return isCostumeInUse(idx);
case rtSound:
// Sound resource 1 is used for queued speech
- if (_game.heversion >= 60 && i == 1)
+ if (_game.heversion >= 60 && idx == 1)
return true;
else
- return _sound->isSoundInUse(i);
+ return _sound->isSoundInUse(idx);
case rtCharset:
- return _charset->getCurID() == i;
+ return _charset->getCurID() == (int)idx;
case rtImage:
- return _res->isModified(type, i) != 0;
+ return _res->isModified(type, idx) != 0;
case rtSpoolBuffer:
- return _sound->isSoundRunning(10000 + i) != 0;
+ return _sound->isSoundRunning(10000 + idx) != 0;
default:
return false;
}
}
-void ResourceManager::setModified(int type, int i) {
- if (!validateResource("Modified", type, i))
+void ResourceManager::setModified(ResType type, ResId idx) {
+ if (!validateResource("Modified", type, idx))
return;
- status[type][i] |= RS_MODIFIED;
+ _types[type][idx].setModified();
}
-bool ResourceManager::isModified(int type, int i) const {
- if (!validateResource("isModified", type, i))
+bool ResourceManager::isModified(ResType type, ResId idx) const {
+ if (!validateResource("isModified", type, idx))
return false;
- return (status[type][i] & RS_MODIFIED) != 0;
+ return _types[type][idx].isModified();
+}
+
+void ResourceManager::Resource::setModified() {
+ _status |= RS_MODIFIED;
+}
+
+bool ResourceManager::Resource::isModified() const {
+ return (_status & RS_MODIFIED) != 0;
}
void ResourceManager::expireResources(uint32 size) {
- int i, j;
- byte flag;
byte best_counter;
- int best_type, best_res = 0;
+ ResType best_type;
+ int best_res = 0;
uint32 oldAllocatedSize;
if (_expireCounter != 0xFF) {
_expireCounter = 0xFF;
- increaseResourceCounter();
+ increaseResourceCounters();
}
if (size + _allocatedSize < _maxHeapThreshold)
@@ -979,60 +1023,58 @@ void ResourceManager::expireResources(uint32 size) {
oldAllocatedSize = _allocatedSize;
do {
- best_type = 0;
+ best_type = rtInvalid;
best_counter = 2;
- for (i = rtFirst; i <= rtLast; i++)
- if (mode[i]) {
- for (j = num[i]; --j >= 0;) {
- flag = flags[i][j];
- if (!(flag & RF_LOCK) && flag >= best_counter && address[i][j] && !_vm->isResourceInUse(i, j)) {
- best_counter = flag;
- best_type = i;
- best_res = j;
+ for (ResType type = rtFirst; type <= rtLast; type = ResType(type + 1)) {
+ if (_types[type]._mode != kDynamicResTypeMode) {
+ // Resources of this type can be reloaded from the data files,
+ // so we can potentially unload them to free memory.
+ ResId idx = _types[type].size();
+ while (idx-- > 0) {
+ Resource &tmp = _types[type][idx];
+ byte counter = tmp.getResourceCounter();
+ if (!tmp.isLocked() && counter >= best_counter && tmp._address && !_vm->isResourceInUse(type, idx)) {
+ best_counter = counter;
+ best_type = type;
+ best_res = idx;
}
}
}
+ }
if (!best_type)
break;
nukeResource(best_type, best_res);
} while (size + _allocatedSize > _minHeapThreshold);
- increaseResourceCounter();
+ increaseResourceCounters();
debugC(DEBUG_RESOURCE, "Expired resources, mem %d -> %d", oldAllocatedSize, _allocatedSize);
}
void ResourceManager::freeResources() {
- int i, j;
- for (i = rtFirst; i <= rtLast; i++) {
- for (j = num[i]; --j >= 0;) {
- if (isResourceLoaded(i, j))
- nukeResource(i, j);
+ for (ResType type = rtFirst; type <= rtLast; type = ResType(type + 1)) {
+ ResId idx = _types[type].size();
+ while (idx-- > 0) {
+ if (isResourceLoaded(type, idx))
+ nukeResource(type, idx);
}
- free(address[i]);
- free(flags[i]);
- free(status[i]);
- free(roomno[i]);
- free(roomoffs[i]);
-
- free(globsize[i]);
+ _types[type].clear();
}
}
-void ScummEngine::loadPtrToResource(int type, int resindex, const byte *source) {
+void ScummEngine::loadPtrToResource(ResType type, ResId idx, const byte *source) {
byte *alloced;
int len;
- _res->nukeResource(type, resindex);
+ _res->nukeResource(type, idx);
len = resStrLen(source) + 1;
-
if (len <= 0)
return;
- alloced = _res->createResource(type, resindex, len);
+ alloced = _res->createResource(type, idx, len);
if (!source) {
// Need to refresh the script pointer, since createResource may
@@ -1045,32 +1087,30 @@ void ScummEngine::loadPtrToResource(int type, int resindex, const byte *source)
}
}
-bool ResourceManager::isResourceLoaded(int type, int idx) const {
+bool ResourceManager::isResourceLoaded(ResType type, ResId idx) const {
if (!validateResource("isResourceLoaded", type, idx))
return false;
- return address[type][idx] != NULL;
+ return _types[type][idx]._address != NULL;
}
void ResourceManager::resourceStats() {
- int i, j;
uint32 lockedSize = 0, lockedNum = 0;
- byte flag;
- for (i = rtFirst; i <= rtLast; i++)
- for (j = num[i]; --j >= 0;) {
- flag = flags[i][j];
- if (flag & RF_LOCK && address[i][j]) {
- lockedSize += ((MemBlkHeader *)address[i][j])->size;
+ for (ResType type = rtFirst; type <= rtLast; type = ResType(type + 1)) {
+ ResId idx = _types[type].size();
+ while (idx-- > 0) {
+ Resource &tmp = _types[type][idx];
+ if (tmp.isLocked() && tmp._address) {
+ lockedSize += tmp._size;
lockedNum++;
}
}
+ }
debug(1, "Total allocated size=%d, locked=%d(%d)", _allocatedSize, lockedSize, lockedNum);
}
void ScummEngine_v5::readMAXS(int blockSize) {
- debug(9, "ScummEngine_v5 readMAXS: MAXS has blocksize %d", blockSize);
-
_numVariables = _fileHandle->readUint16LE(); // 800
_fileHandle->readUint16LE(); // 16
_numBitVariables = _fileHandle->readUint16LE(); // 2048
@@ -1099,8 +1139,6 @@ void ScummEngine_v5::readMAXS(int blockSize) {
#ifdef ENABLE_SCUMM_7_8
void ScummEngine_v8::readMAXS(int blockSize) {
- debug(9, "ScummEngine_v8 readMAXS: MAXS has blocksize %d", blockSize);
-
_fileHandle->seek(50, SEEK_CUR); // Skip over SCUMM engine version
_fileHandle->seek(50, SEEK_CUR); // Skip over data file version
_numVariables = _fileHandle->readUint32LE(); // 1500
@@ -1129,8 +1167,6 @@ void ScummEngine_v8::readMAXS(int blockSize) {
}
void ScummEngine_v7::readMAXS(int blockSize) {
- debug(9, "ScummEngine_v7 readMAXS: MAXS has blocksize %d", blockSize);
-
_fileHandle->seek(50, SEEK_CUR); // Skip over SCUMM engine version
_fileHandle->seek(50, SEEK_CUR); // Skip over data file version
_numVariables = _fileHandle->readUint16LE();
@@ -1164,8 +1200,6 @@ void ScummEngine_v7::readMAXS(int blockSize) {
void ScummEngine_v6::readMAXS(int blockSize) {
if (blockSize == 38) {
- debug(0, "ScummEngine_v6 readMAXS: MAXS has blocksize %d", blockSize);
-
_numVariables = _fileHandle->readUint16LE();
_fileHandle->readUint16LE();
_numBitVariables = _fileHandle->readUint16LE();
@@ -1288,35 +1322,35 @@ void ScummEngine::allocateArrays() {
}
_res->allocResTypeData(rtCostume, (_game.features & GF_NEW_COSTUMES) ? MKTAG('A','K','O','S') : MKTAG('C','O','S','T'),
- _numCostumes, "costume", 1);
- _res->allocResTypeData(rtRoom, MKTAG('R','O','O','M'), _numRooms, "room", 1);
- _res->allocResTypeData(rtRoomImage, MKTAG('R','M','I','M'), _numRooms, "room image", 1);
- _res->allocResTypeData(rtRoomScripts, MKTAG('R','M','S','C'), _numRooms, "room script", 1);
- _res->allocResTypeData(rtSound, MKTAG('S','O','U','N'), _numSounds, "sound", 2);
- _res->allocResTypeData(rtScript, MKTAG('S','C','R','P'), _numScripts, "script", 1);
- _res->allocResTypeData(rtCharset, MKTAG('C','H','A','R'), _numCharsets, "charset", 1);
- _res->allocResTypeData(rtObjectName, 0, _numNewNames, "new name", 0);
- _res->allocResTypeData(rtInventory, 0, _numInventory, "inventory", 0);
- _res->allocResTypeData(rtTemp, 0, 10, "temp", 0);
- _res->allocResTypeData(rtScaleTable, 0, 5, "scale table", 0);
- _res->allocResTypeData(rtActorName, 0, _numActors, "actor name", 0);
- _res->allocResTypeData(rtVerb, 0, _numVerbs, "verb", 0);
- _res->allocResTypeData(rtString, 0, _numArray, "array", 0);
- _res->allocResTypeData(rtFlObject, 0, _numFlObject, "flobject", 0);
- _res->allocResTypeData(rtMatrix, 0, 10, "boxes", 0);
- _res->allocResTypeData(rtImage, MKTAG('A','W','I','Z'), _numImages, "images", 1);
- _res->allocResTypeData(rtTalkie, MKTAG('T','L','K','E'), _numTalkies, "talkie", 1);
+ _numCostumes, kStaticResTypeMode);
+ _res->allocResTypeData(rtRoom, MKTAG('R','O','O','M'), _numRooms, kStaticResTypeMode);
+ _res->allocResTypeData(rtRoomImage, MKTAG('R','M','I','M'), _numRooms, kStaticResTypeMode);
+ _res->allocResTypeData(rtRoomScripts, MKTAG('R','M','S','C'), _numRooms, kStaticResTypeMode);
+ _res->allocResTypeData(rtSound, MKTAG('S','O','U','N'), _numSounds, kSoundResTypeMode);
+ _res->allocResTypeData(rtScript, MKTAG('S','C','R','P'), _numScripts, kStaticResTypeMode);
+ _res->allocResTypeData(rtCharset, MKTAG('C','H','A','R'), _numCharsets, kStaticResTypeMode);
+ _res->allocResTypeData(rtObjectName, 0, _numNewNames, kDynamicResTypeMode);
+ _res->allocResTypeData(rtInventory, 0, _numInventory, kDynamicResTypeMode);
+ _res->allocResTypeData(rtTemp, 0, 10, kDynamicResTypeMode);
+ _res->allocResTypeData(rtScaleTable, 0, 5, kDynamicResTypeMode);
+ _res->allocResTypeData(rtActorName, 0, _numActors, kDynamicResTypeMode);
+ _res->allocResTypeData(rtVerb, 0, _numVerbs, kDynamicResTypeMode);
+ _res->allocResTypeData(rtString, 0, _numArray, kDynamicResTypeMode);
+ _res->allocResTypeData(rtFlObject, 0, _numFlObject, kDynamicResTypeMode);
+ _res->allocResTypeData(rtMatrix, 0, 10, kDynamicResTypeMode);
+ _res->allocResTypeData(rtImage, MKTAG('A','W','I','Z'), _numImages, kStaticResTypeMode);
+ _res->allocResTypeData(rtTalkie, MKTAG('T','L','K','E'), _numTalkies, kStaticResTypeMode);
}
void ScummEngine_v70he::allocateArrays() {
ScummEngine::allocateArrays();
- _res->allocResTypeData(rtSpoolBuffer, 0, 9, "spool buffer", 1);
+ _res->allocResTypeData(rtSpoolBuffer, 0, 9, kStaticResTypeMode);
_heV7RoomIntOffsets = (uint32 *)calloc(_numRooms, sizeof(uint32));
}
-void ScummEngine::dumpResource(const char *tag, int idx, const byte *ptr, int length) {
+void ScummEngine::dumpResource(const char *tag, int id, const byte *ptr, int length) {
char buf[256];
Common::DumpFile out;
@@ -1330,7 +1364,7 @@ void ScummEngine::dumpResource(const char *tag, int idx, const byte *ptr, int le
else
size = READ_BE_UINT32(ptr + 4);
- sprintf(buf, "dumps/%s%d.dmp", tag, idx);
+ sprintf(buf, "dumps/%s%d.dmp", tag, id);
out.open(buf);
if (out.isOpen() == false)
@@ -1499,10 +1533,10 @@ uint16 newTag2Old(uint32 newTag) {
}
}
-const char *resTypeFromId(int id) {
+const char *nameOfResType(ResType type) {
static char buf[100];
- switch (id) {
+ switch (type) {
case rtRoom:
return "Room";
case rtScript:
@@ -1545,10 +1579,8 @@ const char *resTypeFromId(int id) {
return "Talkie";
case rtSpoolBuffer:
return "SpoolBuffer";
- case rtNumTypes:
- return "NumTypes";
default:
- sprintf(buf, "%d", id);
+ sprintf(buf, "rt%d", type);
return buf;
}
}
diff --git a/engines/scumm/resource.h b/engines/scumm/resource.h
index a14b7173a2..e8b0c1eaae 100644
--- a/engines/scumm/resource.h
+++ b/engines/scumm/resource.h
@@ -17,14 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_RESOURCE_H
#define SCUMM_RESOURCE_H
+#include "common/array.h"
+#include "scumm/scumm.h" // for ResType
+
namespace Scumm {
enum {
@@ -44,6 +44,185 @@ public:
const byte *findNext(uint32 tag);
};
+enum {
+ RES_INVALID_OFFSET = 0xFFFFFFFF
+};
+
+class ScummEngine;
+
+/**
+ * The mode of a resource type indicates whether the resource can be restored
+ * from the game data files or not.
+ * This affects for example whether the resource is stored in savestates.
+ *
+ * Note that we treat sound resources somewhat differently: On the one hand,
+ * these behave mostly like a kStaticResTypeMode res type. However, when we
+ * create a savestate, we do save *some* information about them: Namely, which
+ * sound resources are loaded in memory at the time the save is made. And when
+ * loading, we invoke ensureResourceLoaded() for each sound resource that was
+ * marked in this way.
+ */
+enum ResTypeMode {
+ kDynamicResTypeMode = 0, ///!< Resource is generated during runtime and may change
+ kStaticResTypeMode = 1, ///!< Resource comes from data files, does not change
+ kSoundResTypeMode = 2 ///!< Resource comes from data files, but may change
+};
+
+/**
+ * The 'resource manager' class. Currently doesn't really deserve to be called
+ * a 'class', at least until somebody gets around to OOfying this more.
+ */
+class ResourceManager {
+ //friend class ScummDebugger;
+ //friend class ScummEngine;
+protected:
+ ScummEngine *_vm;
+
+public:
+ class Resource {
+ public:
+ /**
+ * Pointer to the data contained in this resource
+ */
+ byte *_address;
+
+ /**
+ * Size of this resource, i.e. of the data contained in it.
+ */
+ uint32 _size;
+
+ protected:
+ /**
+ * The uppermost bit indicates whether the resources is locked.
+ * The lower 7 bits contain a counter. This counter measures roughly
+ * how old the resource is; it starts out with a count of 1 and can go
+ * as high as 127. When memory falls low resp. when the engine decides
+ * that it should throw out some unused stuff, then it begins by
+ * removing the resources with the highest counter (excluding locked
+ * resources and resources that are known to be in use).
+ */
+ byte _flags;
+
+ /**
+ * The status of the resource. Currently only one bit is used, which
+ * indicates whether the resource is modified.
+ */
+ byte _status;
+
+ public:
+ /**
+ * The id of the room (resp. the disk) the resource is contained in.
+ */
+ byte _roomno;
+
+ /**
+ * The offset (in bytes) where the data for this resources can be found
+ * in the game data file(s), relative to the start of the room the
+ * resource is contained in.
+ *
+ * A value of RES_INVALID_OFFSET indicates a resources that is not contained
+ * in the game data files.
+ */
+ uint32 _roomoffs;
+
+ public:
+ Resource();
+ ~Resource();
+
+ void nuke();
+
+ inline void setResourceCounter(byte counter);
+ inline byte getResourceCounter() const;
+
+ void lock();
+ void unlock();
+ bool isLocked() const;
+
+ void setModified();
+ bool isModified() const;
+ };
+
+ /**
+ * This struct represents a resource type and all resource of that type.
+ */
+ class ResTypeData : public Common::Array<Resource> {
+ friend class ResourceManager;
+ public:
+ /**
+ * The mode of this res type.
+ */
+ ResTypeMode _mode;
+
+ /**
+ * The 4-byte tag or chunk type associated to this resource type, if any.
+ * Only applies to resources that are loaded from the game data files.
+ * This value is only used for debugging purposes.
+ */
+ uint32 _tag;
+
+ public:
+ ResTypeData();
+ ~ResTypeData();
+ };
+ ResTypeData _types[rtLast + 1];
+
+protected:
+ uint32 _allocatedSize;
+ uint32 _maxHeapThreshold, _minHeapThreshold;
+ byte _expireCounter;
+
+public:
+ ResourceManager(ScummEngine *vm);
+ ~ResourceManager();
+
+ void setHeapThreshold(int min, int max);
+
+ void allocResTypeData(ResType type, uint32 tag, int num, ResTypeMode mode);
+ void freeResources();
+
+ byte *createResource(ResType type, ResId idx, uint32 size);
+ void nukeResource(ResType type, ResId idx);
+
+// inline Resource &getRes(ResType type, ResId idx) { return _types[type][idx]; }
+// inline const Resource &getRes(ResType type, ResId idx) const { return _types[type][idx]; }
+
+ bool isResourceLoaded(ResType type, ResId idx) const;
+
+ void lock(ResType type, ResId idx);
+ void unlock(ResType type, ResId idx);
+ bool isLocked(ResType type, ResId idx) const;
+
+ void setModified(ResType type, ResId idx);
+ bool isModified(ResType type, ResId idx) const;
+
+ /**
+ * This method increments the _expireCounter, and if it overflows (which happens
+ * after at most 256 calls), it calls increaseResourceCounter.
+ * It is invoked in the engine's main loop ScummEngine::scummLoop().
+ */
+ void increaseExpireCounter();
+
+ /**
+ * Update the specified resource's counter.
+ */
+ void setResourceCounter(ResType type, ResId idx, byte counter);
+
+ /**
+ * Increment the counter of all unlocked loaded resources.
+ * The maximal count is 255.
+ * This is called by increaseExpireCounter and expireResources,
+ * but also by ScummEngine::startScene.
+ */
+ void increaseResourceCounters();
+
+ void resourceStats();
+
+//protected:
+ bool validateResource(const char *str, ResType type, ResId idx) const;
+protected:
+ void expireResources(uint32 size);
+};
+
} // End of namespace Scumm
#endif
diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp
index 3dc3b4d14e..927ee676a5 100644
--- a/engines/scumm/resource_v2.cpp
+++ b/engines/scumm/resource_v2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/file.h"
@@ -87,40 +84,40 @@ void ScummEngine_v2::readClassicIndexFile() {
}
for (i = 0; i < _numRooms; i++) {
- _res->roomno[rtRoom][i] = i;
+ _res->_types[rtRoom][i]._roomno = i;
}
_fileHandle->seek(_numRooms, SEEK_CUR);
for (i = 0; i < _numRooms; i++) {
- _res->roomoffs[rtRoom][i] = _fileHandle->readUint16LE();
- if (_res->roomoffs[rtRoom][i] == 0xFFFF)
- _res->roomoffs[rtRoom][i] = (uint32)RES_INVALID_OFFSET;
+ _res->_types[rtRoom][i]._roomoffs = _fileHandle->readUint16LE();
+ if (_res->_types[rtRoom][i]._roomoffs == 0xFFFF)
+ _res->_types[rtRoom][i]._roomoffs = (uint32)RES_INVALID_OFFSET;
}
for (i = 0; i < _numCostumes; i++) {
- _res->roomno[rtCostume][i] = _fileHandle->readByte();
+ _res->_types[rtCostume][i]._roomno = _fileHandle->readByte();
}
for (i = 0; i < _numCostumes; i++) {
- _res->roomoffs[rtCostume][i] = _fileHandle->readUint16LE();
- if (_res->roomoffs[rtCostume][i] == 0xFFFF)
- _res->roomoffs[rtCostume][i] = (uint32)RES_INVALID_OFFSET;
+ _res->_types[rtCostume][i]._roomoffs = _fileHandle->readUint16LE();
+ if (_res->_types[rtCostume][i]._roomoffs == 0xFFFF)
+ _res->_types[rtCostume][i]._roomoffs = (uint32)RES_INVALID_OFFSET;
}
for (i = 0; i < _numScripts; i++) {
- _res->roomno[rtScript][i] = _fileHandle->readByte();
+ _res->_types[rtScript][i]._roomno = _fileHandle->readByte();
}
for (i = 0; i < _numScripts; i++) {
- _res->roomoffs[rtScript][i] = _fileHandle->readUint16LE();
- if (_res->roomoffs[rtScript][i] == 0xFFFF)
- _res->roomoffs[rtScript][i] = (uint32)RES_INVALID_OFFSET;
+ _res->_types[rtScript][i]._roomoffs = _fileHandle->readUint16LE();
+ if (_res->_types[rtScript][i]._roomoffs == 0xFFFF)
+ _res->_types[rtScript][i]._roomoffs = (uint32)RES_INVALID_OFFSET;
}
for (i = 0; i < _numSounds; i++) {
- _res->roomno[rtSound][i] = _fileHandle->readByte();
+ _res->_types[rtSound][i]._roomno = _fileHandle->readByte();
}
for (i = 0; i < _numSounds; i++) {
- _res->roomoffs[rtSound][i] = _fileHandle->readUint16LE();
- if (_res->roomoffs[rtSound][i] == 0xFFFF)
- _res->roomoffs[rtSound][i] = (uint32)RES_INVALID_OFFSET;
+ _res->_types[rtSound][i]._roomoffs = _fileHandle->readUint16LE();
+ if (_res->_types[rtSound][i]._roomoffs == 0xFFFF)
+ _res->_types[rtSound][i]._roomoffs = (uint32)RES_INVALID_OFFSET;
}
}
diff --git a/engines/scumm/resource_v3.cpp b/engines/scumm/resource_v3.cpp
index 5f23720ce9..55e42e389c 100644
--- a/engines/scumm/resource_v3.cpp
+++ b/engines/scumm/resource_v3.cpp
@@ -18,44 +18,42 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm_v3.h"
#include "scumm/file.h"
+#include "scumm/resource.h"
#include "scumm/util.h"
namespace Scumm {
-extern const char *resTypeFromId(int id);
+extern const char *nameOfResType(ResType type);
-int ScummEngine_v3old::readResTypeList(int id) {
- int num;
- int i;
+int ScummEngine_v3old::readResTypeList(ResType type) {
+ uint num;
+ ResId idx;
- debug(9, "readResTypeList(%s)", resTypeFromId(id));
+ debug(9, "readResTypeList(%s)", nameOfResType(type));
num = _fileHandle->readByte();
if (num >= 0xFF) {
- error("Too many %ss (%d) in directory", resTypeFromId(id), num);
+ error("Too many %ss (%d) in directory", nameOfResType(type), num);
}
- if (id == rtRoom) {
- for (i = 0; i < num; i++)
- _res->roomno[id][i] = i;
+ if (type == rtRoom) {
+ for (idx = 0; idx < num; idx++)
+ _res->_types[type][idx]._roomno = idx;
_fileHandle->seek(num, SEEK_CUR);
} else {
- for (i = 0; i < num; i++)
- _res->roomno[id][i] = _fileHandle->readByte();
+ for (idx = 0; idx < num; idx++)
+ _res->_types[type][idx]._roomno = _fileHandle->readByte();
}
- for (i = 0; i < num; i++) {
- _res->roomoffs[id][i] = _fileHandle->readUint16LE();
- if (_res->roomoffs[id][i] == 0xFFFF)
- _res->roomoffs[id][i] = (uint32)RES_INVALID_OFFSET;
+ for (idx = 0; idx < num; idx++) {
+ _res->_types[type][idx]._roomoffs = _fileHandle->readUint16LE();
+ if (_res->_types[type][idx]._roomoffs == 0xFFFF)
+ _res->_types[type][idx]._roomoffs = (uint32)RES_INVALID_OFFSET;
}
return num;
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp
index b1d98494d4..6215e86b89 100644
--- a/engines/scumm/resource_v4.cpp
+++ b/engines/scumm/resource_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -31,23 +28,22 @@
namespace Scumm {
-extern const char *resTypeFromId(int id);
+extern const char *nameOfResType(ResType type);
-int ScummEngine_v4::readResTypeList(int id) {
- int num;
- int i;
+int ScummEngine_v4::readResTypeList(ResType type) {
+ uint num;
- debug(9, "readResTypeList(%s)", resTypeFromId(id));
+ debug(9, "readResTypeList(%s)", nameOfResType(type));
num = _fileHandle->readUint16LE();
- if (num != _res->num[id]) {
- error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num);
+ if (num != _res->_types[type].size()) {
+ error("Invalid number of %ss (%d) in directory", nameOfResType(type), num);
}
- for (i = 0; i < num; i++) {
- _res->roomno[id][i] = _fileHandle->readByte();
- _res->roomoffs[id][i] = _fileHandle->readUint32LE();
+ for (ResId idx = 0; idx < num; idx++) {
+ _res->_types[type][idx]._roomno = _fileHandle->readByte();
+ _res->_types[type][idx]._roomoffs = _fileHandle->readUint32LE();
}
return num;
diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index 06fa0f2c39..8962a0e971 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -118,7 +115,7 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
VAR(VAR_ROOM) = room;
_fullRedraw = true;
- _res->increaseResourceCounter();
+ _res->increaseResourceCounters();
_currentRoom = room;
VAR(VAR_ROOM) = room;
@@ -468,7 +465,7 @@ void ScummEngine::setupRoomSubBlocks() {
* So it is not appropriate to call it after loading a savegame.
*/
void ScummEngine::resetRoomSubBlocks() {
- int i;
+ ResId i;
const byte *ptr;
byte *roomptr;
@@ -528,14 +525,14 @@ void ScummEngine::resetRoomSubBlocks() {
//
// Load scale data
//
- for (i = 1; i < _res->num[rtScaleTable]; i++)
+ for (i = 1; i < _res->_types[rtScaleTable].size(); i++)
_res->nukeResource(rtScaleTable, i);
ptr = findResourceData(MKTAG('S','C','A','L'), roomptr);
if (ptr) {
int s1, s2, y1, y2;
if (_game.version == 8) {
- for (i = 1; i < _res->num[rtScaleTable]; i++, ptr += 16) {
+ for (i = 1; i < _res->_types[rtScaleTable].size(); i++, ptr += 16) {
s1 = READ_LE_UINT32(ptr);
y1 = READ_LE_UINT32(ptr + 4);
s2 = READ_LE_UINT32(ptr + 8);
@@ -543,7 +540,7 @@ void ScummEngine::resetRoomSubBlocks() {
setScaleSlot(i, 0, y1, s1, 0, y2, s2);
}
} else {
- for (i = 1; i < _res->num[rtScaleTable]; i++, ptr += 8) {
+ for (i = 1; i < _res->_types[rtScaleTable].size(); i++, ptr += 8) {
s1 = READ_LE_UINT16(ptr);
y1 = READ_LE_UINT16(ptr + 2);
s2 = READ_LE_UINT16(ptr + 4);
@@ -715,7 +712,6 @@ void ScummEngine_v3old::setupRoomSubBlocks() {
}
void ScummEngine_v3old::resetRoomSubBlocks() {
- int i;
const byte *ptr;
byte *roomptr;
@@ -772,7 +768,7 @@ void ScummEngine_v3old::resetRoomSubBlocks() {
size = 0;
// Compute matrix size
- for (i = 0; i < numOfBoxes; i++) {
+ for (int i = 0; i < numOfBoxes; i++) {
while (*tmp != 0xFF) {
size++;
tmp++;
@@ -797,8 +793,8 @@ void ScummEngine_v3old::resetRoomSubBlocks() {
//
// No scale data in old bundle games
//
- for (i = 1; i < _res->num[rtScaleTable]; i++)
- _res->nukeResource(rtScaleTable, i);
+ for (ResId id = 1; id < _res->_types[rtScaleTable].size(); id++)
+ _res->nukeResource(rtScaleTable, id);
}
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 3bfe51a77b..f5d219c721 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -314,7 +311,6 @@ static bool loadSaveGameHeader(Common::SeekableReadStream *in, SaveGameHeader &h
bool ScummEngine::loadState(int slot, bool compat) {
Common::String filename;
Common::SeekableReadStream *in;
- int i, j;
SaveGameHeader hdr;
int sb, sh;
@@ -429,10 +425,10 @@ bool ScummEngine::loadState(int slot, bool compat) {
memset(gfxUsageBits, 0, sizeof(gfxUsageBits));
// Nuke all resources
- for (i = rtFirst; i <= rtLast; i++)
- if (i != rtTemp && i != rtBuffer && (i != rtSound || _saveSound || !compat))
- for (j = 0; j < _res->num[i]; j++) {
- _res->nukeResource(i, j);
+ for (ResType type = rtFirst; type <= rtLast; type = ResType(type + 1))
+ if (type != rtTemp && type != rtBuffer && (type != rtSound || _saveSound || !compat))
+ for (ResId idx = 0; idx < _res->_types[type].size(); idx++) {
+ _res->nukeResource(type, idx);
}
resetScummVars();
@@ -520,8 +516,8 @@ bool ScummEngine::loadState(int slot, bool compat) {
// loading such an old save game, try to upgrade the old to new format.
if (hdr.ver < VER(22)) {
// Convert all rtScaleTable resources to matching scale items
- for (i = 1; i < _res->num[rtScaleTable]; i++) {
- convertScaleTableToScaleSlot(i);
+ for (ResId idx = 1; idx < _res->_types[rtScaleTable].size(); idx++) {
+ convertScaleTableToScaleSlot(idx);
}
}
@@ -1119,7 +1115,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
MKEND()
};
- int i, j;
+ int i;
int var120Backup;
int var98Backup;
uint8 md5Backup[16];
@@ -1137,9 +1133,9 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// MD5 Operations: Backup on load, compare, and reset.
if (s->isLoading()) {
char md5str1[32+1], md5str2[32+1];
- for (j = 0; j < 16; j++) {
- sprintf(md5str1 + j*2, "%02x", (int)_gameMD5[j]);
- sprintf(md5str2 + j*2, "%02x", (int)md5Backup[j]);
+ for (i = 0; i < 16; i++) {
+ sprintf(md5str1 + i*2, "%02x", (int)_gameMD5[i]);
+ sprintf(md5str2 + i*2, "%02x", (int)md5Backup[i]);
}
debug(2, "Save version: %d", s->getVersion());
@@ -1239,18 +1235,19 @@ void ScummEngine::saveOrLoad(Serializer *s) {
//
// Save/load resources
//
- int type, idx;
+ ResType type;
+ ResId idx;
if (s->getVersion() >= VER(26)) {
// New, more robust resource save/load system. This stores the type
// and index of each resource. Thus if we increase e.g. the maximum
// number of script resources, savegames won't break.
if (s->isSaving()) {
- for (type = rtFirst; type <= rtLast; type++) {
- if (_res->mode[type] != 1 && type != rtTemp && type != rtBuffer) {
+ for (type = rtFirst; type <= rtLast; type = ResType(type + 1)) {
+ if (_res->_types[type]._mode != kStaticResTypeMode && type != rtTemp && type != rtBuffer) {
s->saveUint16(type); // Save the res type...
- for (idx = 0; idx < _res->num[type]; idx++) {
+ for (idx = 0; idx < _res->_types[type].size(); idx++) {
// Only save resources which actually exist...
- if (_res->address[type][idx]) {
+ if (_res->_types[type][idx]._address) {
s->saveUint16(idx); // Save the index of the resource
saveResource(s, type, idx);
}
@@ -1260,9 +1257,9 @@ void ScummEngine::saveOrLoad(Serializer *s) {
}
s->saveUint16(0xFFFF); // End marker
} else {
- while ((type = s->loadUint16()) != 0xFFFF) {
+ while ((type = (ResType)s->loadUint16()) != 0xFFFF) {
while ((idx = s->loadUint16()) != 0xFFFF) {
- assert(0 <= idx && idx < _res->num[type]);
+ assert(idx < _res->_types[type].size());
loadResource(s, type, idx);
}
}
@@ -1271,15 +1268,15 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// Old, fragile resource save/load system. Doesn't save resources
// with index 0, and breaks whenever we change the limit on a given
// resource type.
- for (type = rtFirst; type <= rtLast; type++)
- if (_res->mode[type] != 1 && type != rtTemp && type != rtBuffer) {
+ for (type = rtFirst; type <= rtLast; type = ResType(type + 1))
+ if (_res->_types[type]._mode != kStaticResTypeMode && type != rtTemp && type != rtBuffer) {
// For V1-V5 games, there used to be no object name resources.
// At some point this changed. But since old savegames rely on
// unchanged resource counts, we have to hard code the following check
if (_game.version < 6 && type == rtObjectName)
continue;
- for (idx = 1; idx < _res->num[type]; idx++)
- saveLoadResource(s, type, idx);
+ for (idx = 1; idx < _res->_types[type].size(); idx++)
+ loadResourceOLD(s, type, idx);
}
}
@@ -1390,18 +1387,18 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// Save/load a list of the locked objects
//
if (s->isSaving()) {
- for (i = rtFirst; i <= rtLast; i++)
- for (j = 1; j < _res->num[i]; j++) {
- if (_res->isLocked(i, j)) {
- s->saveByte(i);
- s->saveUint16(j);
+ for (type = rtFirst; type <= rtLast; type = ResType(type + 1))
+ for (idx = 1; idx < _res->_types[type].size(); idx++) {
+ if (_res->isLocked(type, idx)) {
+ s->saveByte(type);
+ s->saveUint16(idx);
}
}
s->saveByte(0xFF);
} else {
- while ((i = s->loadByte()) != 0xFF) {
- j = s->loadUint16();
- _res->lock(i, j);
+ while ((type = (ResType)s->loadByte()) != 0xFF) {
+ idx = s->loadUint16();
+ _res->lock(type, idx);
}
}
@@ -1636,69 +1633,44 @@ void ScummEngine_v100he::saveOrLoad(Serializer *s) {
}
#endif
-void ScummEngine::saveLoadResource(Serializer *ser, int type, int idx) {
- byte *ptr;
+void ScummEngine::loadResourceOLD(Serializer *ser, ResType type, ResId idx) {
uint32 size;
- if (!_res->mode[type]) {
- if (ser->isSaving()) {
- ptr = _res->address[type][idx];
- if (ptr == NULL) {
- ser->saveUint32(0);
- return;
- }
-
- size = ((MemBlkHeader *)ptr)->size;
-
- ser->saveUint32(size);
- ser->saveBytes(ptr + sizeof(MemBlkHeader), size);
-
+ if (type == rtSound && ser->getVersion() >= VER(23)) {
+ // Save/load only a list of resource numbers that need to be reloaded.
+ if (ser->loadUint16())
+ ensureResourceLoaded(rtSound, idx);
+ } else if (_res->_types[type]._mode == kDynamicResTypeMode) {
+ size = ser->loadUint32();
+ if (size) {
+ _res->createResource(type, idx, size);
+ ser->loadBytes(getResourceAddress(type, idx), size);
if (type == rtInventory) {
- ser->saveUint16(_inventory[idx]);
+ _inventory[idx] = ser->loadUint16();
}
if (type == rtObjectName && ser->getVersion() >= VER(25)) {
- ser->saveUint16(_newNames[idx]);
- }
- } else {
- size = ser->loadUint32();
- if (size) {
- _res->createResource(type, idx, size);
- ser->loadBytes(getResourceAddress(type, idx), size);
- if (type == rtInventory) {
- _inventory[idx] = ser->loadUint16();
- }
- if (type == rtObjectName && ser->getVersion() >= VER(25)) {
- // Paranoia: We increased the possible number of new names
- // to fix bugs #933610 and #936323. The savegame format
- // didn't change, but at least during the transition
- // period there is a slight chance that we try to load
- // more names than we have allocated space for. If so,
- // discard them.
- if (idx < _numNewNames)
- _newNames[idx] = ser->loadUint16();
- }
+ // Paranoia: We increased the possible number of new names
+ // to fix bugs #933610 and #936323. The savegame format
+ // didn't change, but at least during the transition
+ // period there is a slight chance that we try to load
+ // more names than we have allocated space for. If so,
+ // discard them.
+ if (idx < _numNewNames)
+ _newNames[idx] = ser->loadUint16();
}
}
- } else if (_res->mode[type] == 2 && ser->getVersion() >= VER(23)) {
- // Save/load only a list of resource numbers that need to be reloaded.
- if (ser->isSaving()) {
- ser->saveUint16(_res->address[type][idx] ? 1 : 0);
- } else {
- if (ser->loadUint16())
- ensureResourceLoaded(type, idx);
- }
}
}
-void ScummEngine::saveResource(Serializer *ser, int type, int idx) {
- assert(_res->address[type][idx]);
+void ScummEngine::saveResource(Serializer *ser, ResType type, ResId idx) {
+ assert(_res->_types[type][idx]._address);
- if (_res->mode[type] == 0) {
- byte *ptr = _res->address[type][idx];
- uint32 size = ((MemBlkHeader *)ptr)->size;
+ if (_res->_types[type]._mode == kDynamicResTypeMode) {
+ byte *ptr = _res->_types[type][idx]._address;
+ uint32 size = _res->_types[type][idx]._size;
ser->saveUint32(size);
- ser->saveBytes(ptr + sizeof(MemBlkHeader), size);
+ ser->saveBytes(ptr, size);
if (type == rtInventory) {
ser->saveUint16(_inventory[idx]);
@@ -1709,18 +1681,24 @@ void ScummEngine::saveResource(Serializer *ser, int type, int idx) {
}
}
-void ScummEngine::loadResource(Serializer *ser, int type, int idx) {
+void ScummEngine::loadResource(Serializer *ser, ResType type, ResId idx) {
if (_game.heversion >= 60 && ser->getVersion() <= VER(65) &&
((type == rtSound && idx == 1) || (type == rtSpoolBuffer))) {
uint32 size = ser->loadUint32();
assert(size);
_res->createResource(type, idx, size);
ser->loadBytes(getResourceAddress(type, idx), size);
- } else if (_res->mode[type] == 0) {
+ } else if (type == rtSound) {
+ // HE Games use sound resource 1 for speech
+ if (_game.heversion >= 60 && idx == 1)
+ return;
+
+ ensureResourceLoaded(rtSound, idx);
+ } else if (_res->_types[type]._mode == kDynamicResTypeMode) {
uint32 size = ser->loadUint32();
assert(size);
- _res->createResource(type, idx, size);
- ser->loadBytes(getResourceAddress(type, idx), size);
+ byte *ptr = _res->createResource(type, idx, size);
+ ser->loadBytes(ptr, size);
if (type == rtInventory) {
_inventory[idx] = ser->loadUint16();
@@ -1728,12 +1706,6 @@ void ScummEngine::loadResource(Serializer *ser, int type, int idx) {
if (type == rtObjectName) {
_newNames[idx] = ser->loadUint16();
}
- } else if (_res->mode[type] == 2) {
- // HE Games use sound resource 1 for speech
- if (_game.heversion >= 60 && idx == 1)
- return;
-
- ensureResourceLoaded(type, idx);
}
}
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index eead241b90..776f40e12b 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SAVELOAD_H
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 9e02f126cd..cfc4b3c419 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -39,7 +36,7 @@ namespace Scumm {
/* Start executing script 'script' with the given parameters */
void ScummEngine::runScript(int script, bool freezeResistant, bool recursive, int *lvarptr, int cycle) {
ScriptSlot *s;
- byte *scriptPtr;
+ //byte *scriptPtr;
uint32 scriptOffs;
byte scriptType;
int slot;
@@ -51,7 +48,8 @@ void ScummEngine::runScript(int script, bool freezeResistant, bool recursive, in
stopScript(script);
if (script < _numGlobalScripts) {
- scriptPtr = getResourceAddress(rtScript, script);
+ // Call getResourceAddress to ensure the resource is loaded & its usage count reset
+ /*scriptPtr =*/ getResourceAddress(rtScript, script);
scriptOffs = _resourceHeaderSize;
scriptType = WIO_GLOBAL;
@@ -393,26 +391,26 @@ void ScummEngine::getScriptBaseAddress() {
break;
_scriptOrgPointer = getResourceAddress(rtInventory, idx);
assert(idx < _numInventory);
- _lastCodePtr = &_res->address[rtInventory][idx];
+ _lastCodePtr = &_res->_types[rtInventory][idx]._address;
break;
case WIO_LOCAL:
case WIO_ROOM: /* room script */
if (_game.version == 8) {
_scriptOrgPointer = getResourceAddress(rtRoomScripts, _roomResource);
- assert(_roomResource < _res->num[rtRoomScripts]);
- _lastCodePtr = &_res->address[rtRoomScripts][_roomResource];
+ assert(_roomResource < (int)_res->_types[rtRoomScripts].size());
+ _lastCodePtr = &_res->_types[rtRoomScripts][_roomResource]._address;
} else {
_scriptOrgPointer = getResourceAddress(rtRoom, _roomResource);
assert(_roomResource < _numRooms);
- _lastCodePtr = &_res->address[rtRoom][_roomResource];
+ _lastCodePtr = &_res->_types[rtRoom][_roomResource]._address;
}
break;
case WIO_GLOBAL: /* global script */
_scriptOrgPointer = getResourceAddress(rtScript, ss->number);
assert(ss->number < _numScripts);
- _lastCodePtr = &_res->address[rtScript][ss->number];
+ _lastCodePtr = &_res->_types[rtScript][ss->number]._address;
break;
case WIO_FLOBJECT: /* flobject script */
@@ -421,7 +419,7 @@ void ScummEngine::getScriptBaseAddress() {
idx = _objs[idx].fl_object_index;
_scriptOrgPointer = getResourceAddress(rtFlObject, idx);
assert(idx < _numFlObject);
- _lastCodePtr = &_res->address[rtFlObject][idx];
+ _lastCodePtr = &_res->_types[rtFlObject][idx]._address;
break;
default:
error("Bad type while getting base address");
@@ -448,7 +446,7 @@ void ScummEngine::resetScriptPointer() {
* collected by ResourceManager::expireResources.
*/
void ScummEngine::refreshScriptPointer() {
- if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) {
+ if (*_lastCodePtr != _scriptOrgPointer) {
long oldoffs = _scriptPointer - _scriptOrgPointer;
getScriptBaseAddress();
_scriptPointer = _scriptOrgPointer + oldoffs;
@@ -496,7 +494,11 @@ void ScummEngine::executeOpcode(byte i) {
}
const char *ScummEngine::getOpcodeDesc(byte i) {
+#ifndef REDUCE_MEMORY_USAGE
return _opcodes[i].desc;
+#else
+ return "";
+#endif
}
byte ScummEngine::fetchScriptByte() {
@@ -1102,7 +1104,7 @@ void ScummEngine::checkAndRunSentenceScript() {
// For now we assume that if there are more than 460 scripts, then
// the pair 29/104 is used, else the pair 28/103.
- if (_res->num[rtScript] > 460) {
+ if (_res->_types[rtScript].size() > 460) {
if (sentenceScript == 104)
sentenceScript = 29;
} else {
diff --git a/engines/scumm/script.h b/engines/scumm/script.h
index 39d5d802b4..7b2c625144 100644
--- a/engines/scumm/script.h
+++ b/engines/scumm/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_H
@@ -30,14 +27,19 @@
namespace Scumm {
-
typedef Common::Functor0<void> Opcode;
struct OpcodeEntry : Common::NonCopyable {
Opcode *proc;
+#ifndef REDUCE_MEMORY_USAGE
const char *desc;
+#endif
+#ifndef REDUCE_MEMORY_USAGE
OpcodeEntry() : proc(0), desc(0) {}
+#else
+ OpcodeEntry() : proc(0) {}
+#endif
~OpcodeEntry() {
setProc(0, 0);
}
@@ -47,7 +49,9 @@ struct OpcodeEntry : Common::NonCopyable {
delete proc;
proc = p;
}
+#ifndef REDUCE_MEMORY_USAGE
desc = d;
+#endif
}
};
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index 7c3964a326..1ef16d7106 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -18,15 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/actor.h"
#include "scumm/charset.h"
#include "scumm/object.h"
+#include "scumm/resource.h"
#include "scumm/scumm_v0.h"
#include "scumm/verbs.h"
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index d7ff8950f8..7f02e899b4 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -18,14 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/actor.h"
#include "scumm/charset.h"
#include "scumm/object.h"
+#include "scumm/resource.h"
#include "scumm/scumm_v2.h"
#include "scumm/sound.h"
#include "scumm/util.h"
@@ -740,23 +738,23 @@ void ScummEngine_v2::o2_drawObject() {
}
void ScummEngine_v2::o2_resourceRoutines() {
- const ResTypes resTypes[] = {
- rtNumTypes, // Invalid
- rtNumTypes, // Invalid
+ const ResType resTypes[] = {
+ rtInvalid,
+ rtInvalid,
rtCostume,
rtRoom,
- rtNumTypes, // Invalid
+ rtInvalid,
rtScript,
rtSound
};
int resid = getVarOrDirectByte(PARAM_1);
int opcode = fetchScriptByte();
- ResTypes type = rtNumTypes;
+ ResType type = rtInvalid;
if (0 <= (opcode >> 4) && (opcode >> 4) < (int)ARRAYSIZE(resTypes))
type = resTypes[opcode >> 4];
- if ((opcode & 0x0f) == 0 || type == rtNumTypes)
+ if ((opcode & 0x0f) == 0 || type == rtInvalid)
return;
// HACK V2 Maniac Mansion tries to load an invalid sound resource in demo script.
diff --git a/engines/scumm/script_v3.cpp b/engines/scumm/script_v3.cpp
index 176eefdeef..b28d831101 100644
--- a/engines/scumm/script_v3.cpp
+++ b/engines/scumm/script_v3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm_v3.h"
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 98001e6854..1302c8c28d 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/scumm_v4.h"
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index ee790f7876..2c8f65496f 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -18,14 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/actor.h"
#include "scumm/charset.h"
#include "scumm/object.h"
+#include "scumm/resource.h"
#include "scumm/scumm_v3.h"
#include "scumm/scumm_v5.h"
#include "scumm/sound.h"
@@ -1492,7 +1490,7 @@ void ScummEngine_v5::o5_systemOps() {
}
void ScummEngine_v5::o5_resourceRoutines() {
- const ResTypes resType[4] = { rtScript, rtSound, rtCostume, rtRoom };
+ const ResType resType[4] = { rtScript, rtSound, rtCostume, rtRoom };
int resid = 0;
int foo, bar;
@@ -2648,7 +2646,7 @@ void ScummEngine_v5::decodeParseString() {
// In SCUMM V1-V3, there were no 'default' values for the text slot
- // values. Hence to achieve correct behaviour, we have to keep the
+ // values. Hence to achieve correct behavior, we have to keep the
// 'default' values in sync with the active values.
//
// Note: This is needed for Indy3 (Grail Diary). It's also needed
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index b2df1d0baa..decd34222d 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -360,11 +357,11 @@ void ScummEngine_v6::nukeArray(int a) {
}
int ScummEngine_v6::findFreeArrayId() {
- byte **addr = _res->address[rtString];
+ const ResourceManager::ResTypeData &rtd = _res->_types[rtString];
int i;
for (i = 1; i < _numArray; i++) {
- if (!addr[i])
+ if (!rtd[i]._address)
return i;
}
error("Out of array pointers, %d max", _numArray);
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp
index 1250a82d33..c8b92be3c8 100644
--- a/engines/scumm/script_v8.cpp
+++ b/engines/scumm/script_v8.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index f43aed53f7..e8dd6cb548 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/md5.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/system.h"
#include "common/translation.h"
@@ -65,6 +61,7 @@
#include "scumm/player_v2a.h"
#include "scumm/player_v3a.h"
#include "scumm/player_v4a.h"
+#include "scumm/resource.h"
#include "scumm/he/resource_he.h"
#include "scumm/scumm_v0.h"
#include "scumm/scumm_v8.h"
@@ -113,9 +110,13 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_language(dr.language),
_debugger(0),
_currentScript(0xFF), // Let debug() work on init stage
- _messageDialog(0), _pauseDialog(0), _versionDialog(0) {
+ _messageDialog(0), _pauseDialog(0), _versionDialog(0),
+ _rnd("scumm")
+ {
- if (_game.platform == Common::kPlatformNES) {
+ if (_game.heversion > 0) {
+ _gdi = new GdiHE(this);
+ } else if (_game.platform == Common::kPlatformNES) {
_gdi = new GdiNES(this);
#ifdef USE_RGB_COLOR
} else if (_game.features & GF_16BIT_COLOR) {
@@ -574,8 +575,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
assert(!_mainMenuDialog);
_mainMenuDialog = new ScummMenuDialog(this);
#endif
-
- g_eventRec.registerRandomSource(_rnd, "scumm");
}
@@ -1184,10 +1183,6 @@ Common::Error ScummEngine::init() {
resetScumm();
resetScummVars();
- if (_imuse) {
- _imuse->setBase(_res->address[rtSound]);
- }
-
if (_game.version >= 5 && _game.version <= 7)
_sound->setupSound();
@@ -1233,7 +1228,7 @@ void ScummEngine::setupScumm() {
requestLoad(ConfMan.getInt("save_slot"));
}
- _res->allocResTypeData(rtBuffer, 0, 10, "buffer", 0);
+ _res->allocResTypeData(rtBuffer, 0, 10, kDynamicResTypeMode);
setupScummVars();
@@ -1833,22 +1828,22 @@ void ScummEngine::setupMusic(int midi) {
MidiDriver *nativeMidiDriver = 0;
MidiDriver *adlibMidiDriver = 0;
- if (_musicType != MDT_ADLIB)
+ if (_musicType != MDT_ADLIB && _musicType != MDT_TOWNS)
nativeMidiDriver = MidiDriver::createMidi(dev);
if (nativeMidiDriver != NULL && _native_mt32)
nativeMidiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
bool multi_midi = ConfMan.getBool("multi_midi") && _musicType != MDT_NONE && (midi & MDT_ADLIB);
- if (_musicType == MDT_ADLIB || multi_midi) {
- adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(MDT_ADLIB));
+ if (_musicType == MDT_ADLIB || MDT_TOWNS || multi_midi) {
+ adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
}
_imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);
if (_game.platform == Common::kPlatformFMTowns) {
- _musicEngine = _townsPlayer = new Player_Towns_v2(this, _imuse, _mixer, true);
+ _musicEngine = _townsPlayer = new Player_Towns_v2(this, _mixer, _imuse, true);
if (!_townsPlayer->init())
- error("Failed to initialize FM-Towns audio driver");
+ error("ScummEngine::setupMusic(): Failed to initialize FM-Towns audio driver");
} else {
_musicEngine = _imuse;
}
@@ -1860,7 +1855,6 @@ void ScummEngine::setupMusic(int midi) {
_imuse->property(IMuse::PROP_GAME_ID, _game.id);
if (ConfMan.hasKey("tempo"))
_imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
- // YM2162 driver can't handle midi->getPercussionChannel(), NULL shouldn't init MT-32/GM/GS
if (midi != MDT_NONE) {
_imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
if (MidiDriver::getMusicType(dev) != MT_MT32) // MT-32 Emulation shouldn't be GM/GS initialized
@@ -2422,13 +2416,16 @@ void ScummEngine::pauseGame() {
}
void ScummEngine::restart() {
-// TODO: Check this function - we should probably be reinitting a lot more stuff, and I suspect
-// this leaks memory like a sieve
+ // FIXME: This function *leaks memory*, and quite a lot so. For example,
+ // we re-init the resource manager, which causes readMAXS() to be called
+ // again, which allocates some memory. There are many other leaks, though.
+
+ // TODO: We should also probably be reinitting a lot more stuff.
-// Fingolfin seez: An alternate way to implement restarting would be to create
-// a save state right after startup ... to this end we could introduce a SaveFile
-// subclass which is implemented using a memory buffer (i.e. no actual file is
-// created). Then to restart we just have to load that pseudo save state.
+ // Fingolfin seez: An alternate way to implement restarting would be to create
+ // a save state right after startup ... to this end we could introduce a SaveFile
+ // subclass which is implemented using a memory buffer (i.e. no actual file is
+ // created). Then to restart we just have to load that pseudo save state.
int i;
@@ -2448,23 +2445,12 @@ void ScummEngine::restart() {
for (i = 1; i < _numGlobalObjects; i++)
clearOwnerOf(i);
- // Reallocate arrays
- // FIXME: This should already be called by readIndexFile.
- // FIXME: regardless of that, allocateArrays and allocResTypeData leaks
- // heavily, which should be fixed.
- allocateArrays();
-
- // Reread index (reset objectstate etc)
readIndexFile();
// Reinit scumm variables
resetScumm();
resetScummVars();
- if (_imuse) {
- _imuse->setBase(_res->address[rtSound]);
- }
-
// Reinit sound engine
if (_game.version >= 5 && _game.version <= 7)
_sound->setupSound();
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 62c6c70e5a..d1804d323e 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_H
@@ -47,7 +44,7 @@
#ifdef __DS__
/* This disables the dual layer mode which is used in FM-Towns versions
- * of SCUMM games and which emulates the behaviour of the original code.
+ * of SCUMM games and which emulates the behavior of the original code.
* The only purpose is code size reduction for certain backends.
* SCUMM 3 (FM-Towns) games will run in normal (DOS VGA) mode, which should
* work just fine in most situations. Some glitches might occur. SCUMM 5 games
@@ -171,17 +168,6 @@ enum {
DEBUG_SMUSH = 1 << 10 // Track SMUSH
};
-/**
- * Internal header for any memory block allocated by the resource manager.
- *
- * @todo Hide MemBlkHeader; no code outside the resource manager should
- * have to use it, ever. Currently script code needs it to detect whether
- * some scripts have moved (in fetchScriptByte()).
- */
-struct MemBlkHeader {
- uint32 size;
-};
-
struct VerbSlot;
struct ObjectData;
@@ -242,7 +228,7 @@ enum ScummGameId {
GID_TENTACLE,
GID_ZAK,
- GID_HEGAME, // Generic name for all HE games with default behaviour
+ GID_HEGAME, // Generic name for all HE games with default behavior
GID_PUTTDEMO,
GID_FBEAR,
GID_PUTTMOON,
@@ -322,7 +308,8 @@ struct SaveStateMetaInfos {
* WARNING: Do not change the order of these, as the savegame format relies
* on it; any change made here will break savegame compatibility!
*/
-enum ResTypes {
+enum ResType {
+ rtInvalid = 0,
rtFirst = 1,
rtRoom = 1,
rtScript = 2,
@@ -345,75 +332,12 @@ enum ResTypes {
rtImage = 19,
rtTalkie = 20,
rtSpoolBuffer = 21,
- rtLast = 21,
- rtNumTypes = 22
+ rtLast = 21
};
-enum {
- RES_INVALID_OFFSET = 0xFFFFFFFF
-};
-
-/**
- * The 'resource manager' class. Currently doesn't really deserve to be called
- * a 'class', at least until somebody gets around to OOfying this more.
- */
-class ResourceManager {
- //friend class ScummDebugger;
- //friend class ScummEngine;
-protected:
- ScummEngine *_vm;
-
-public:
- byte mode[rtNumTypes];
- uint16 num[rtNumTypes];
- uint32 tags[rtNumTypes];
- const char *name[rtNumTypes];
- byte **address[rtNumTypes];
-protected:
- byte *flags[rtNumTypes];
- byte *status[rtNumTypes];
-public:
- byte *roomno[rtNumTypes];
- uint32 *roomoffs[rtNumTypes];
- uint32 *globsize[rtNumTypes];
-
-protected:
- uint32 _allocatedSize;
- uint32 _maxHeapThreshold, _minHeapThreshold;
- byte _expireCounter;
-
-public:
- ResourceManager(ScummEngine *vm);
- ~ResourceManager();
-
- void setHeapThreshold(int min, int max);
-
- void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode);
- void freeResources();
-
- byte *createResource(int type, int index, uint32 size);
- void nukeResource(int type, int i);
+typedef uint16 ResId;
- bool isResourceLoaded(int type, int index) const;
-
- void lock(int type, int i);
- void unlock(int type, int i);
- bool isLocked(int type, int i) const;
-
- void setModified(int type, int i);
- bool isModified(int type, int i) const;
-
- void increaseExpireCounter();
- void setResourceCounter(int type, int index, byte flag);
- void increaseResourceCounter();
-
- void resourceStats();
-
-//protected:
- bool validateResource(const char *str, int type, int index) const;
-protected:
- void expireResources(uint32 size);
-};
+class ResourceManager;
/**
* Base class for all SCUMM engines.
@@ -654,9 +578,9 @@ protected:
bool saveState(int slot, bool compat);
bool loadState(int slot, bool compat);
virtual void saveOrLoad(Serializer *s);
- void saveLoadResource(Serializer *ser, int type, int index); // "Obsolete"
- void saveResource(Serializer *ser, int type, int index);
- void loadResource(Serializer *ser, int type, int index);
+ void saveResource(Serializer *ser, ResType type, ResId idx);
+ void loadResource(Serializer *ser, ResType type, ResId idx);
+ void loadResourceOLD(Serializer *ser, ResType type, ResId idx); // "Obsolete"
Common::String makeSavegameName(int slot, bool temporary) const {
return makeSavegameName(_targetName, slot, temporary);
@@ -689,9 +613,11 @@ protected:
protected:
/* Script VM - should be in Script class */
uint32 _localScriptOffsets[1024];
- const byte *_scriptPointer, *_scriptOrgPointer;
- byte _opcode, _currentScript;
+ const byte *_scriptPointer;
+ const byte *_scriptOrgPointer;
const byte * const *_lastCodePtr;
+ byte _opcode;
+ byte _currentScript;
int _scummStackPos;
int _vmStack[150];
@@ -787,26 +713,26 @@ protected:
void askForDisk(const char *filename, int disknum); // TODO: Use Common::String
bool openResourceFile(const Common::String &filename, byte encByte); // TODO: Use Common::String
- void loadPtrToResource(int type, int i, const byte *ptr);
- virtual int readResTypeList(int id);
-// void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode);
+ void loadPtrToResource(ResType type, ResId idx, const byte *ptr);
+ virtual int readResTypeList(ResType type);
+// void allocResTypeData(ResType type, uint32 tag, int num, int mode);
// byte *createResource(int type, int index, uint32 size);
- int loadResource(int type, int i);
-// void nukeResource(int type, int i);
- int getResourceRoomNr(int type, int idx);
- virtual uint32 getResourceRoomOffset(int type, int idx);
- int getResourceSize(int type, int idx);
+ int loadResource(ResType type, ResId idx);
+// void nukeResource(ResType type, ResId idx);
+ int getResourceRoomNr(ResType type, ResId idx);
+ virtual uint32 getResourceRoomOffset(ResType type, ResId idx);
+ int getResourceSize(ResType type, ResId idx);
public:
- byte *getResourceAddress(int type, int i);
- virtual byte *getStringAddress(int i);
+ byte *getResourceAddress(ResType type, ResId idx);
+ virtual byte *getStringAddress(ResId idx);
byte *getStringAddressVar(int i);
- void ensureResourceLoaded(int type, int i);
+ void ensureResourceLoaded(ResType type, ResId idx);
protected:
- int readSoundResource(int index);
- int readSoundResourceSmallHeader(int index);
- bool isResourceInUse(int type, int i) const;
+ int readSoundResource(ResId idx);
+ int readSoundResourceSmallHeader(ResId idx);
+ bool isResourceInUse(ResType type, ResId idx) const;
virtual void setupRoomSubBlocks();
virtual void resetRoomSubBlocks();
@@ -1194,7 +1120,7 @@ protected:
void calcItineraryMatrix(byte *itineraryMatrix, int num);
void createBoxMatrix();
- virtual bool areBoxesNeighbours(int i, int j);
+ virtual bool areBoxesNeighbors(int i, int j);
/* String class */
public:
diff --git a/engines/scumm/scumm_v0.h b/engines/scumm/scumm_v0.h
index 9ffb19a959..af481df0e0 100644
--- a/engines/scumm/scumm_v0.h
+++ b/engines/scumm/scumm_v0.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V0_H
@@ -97,7 +94,7 @@ protected:
virtual void resetSentence(bool walking);
- virtual bool areBoxesNeighbours(int box1nr, int box2nr);
+ virtual bool areBoxesNeighbors(int box1nr, int box2nr);
/* Version C64 script opcodes */
void o_stopCurrentScript();
diff --git a/engines/scumm/scumm_v2.h b/engines/scumm/scumm_v2.h
index 687ccd6ab3..47c5fa2626 100644
--- a/engines/scumm/scumm_v2.h
+++ b/engines/scumm/scumm_v2.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V2_H
diff --git a/engines/scumm/scumm_v3.h b/engines/scumm/scumm_v3.h
index 6e8d593a35..f11ca16a50 100644
--- a/engines/scumm/scumm_v3.h
+++ b/engines/scumm/scumm_v3.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V3_H
@@ -62,7 +59,7 @@ public:
ScummEngine_v3old(OSystem *syst, const DetectorResult &dr);
protected:
- virtual int readResTypeList(int id);
+ virtual int readResTypeList(ResType type);
virtual void readIndexFile();
virtual void setupRoomSubBlocks();
virtual void resetRoomSubBlocks();
diff --git a/engines/scumm/scumm_v4.h b/engines/scumm/scumm_v4.h
index 653cfc228e..e21e4b26ae 100644
--- a/engines/scumm/scumm_v4.h
+++ b/engines/scumm/scumm_v4.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V4_H
@@ -59,7 +56,7 @@ protected:
virtual void scummLoop_handleSaveLoad();
- virtual int readResTypeList(int id);
+ virtual int readResTypeList(ResType type);
virtual void readIndexFile();
virtual void loadCharset(int no);
virtual void resetRoomObjects();
diff --git a/engines/scumm/scumm_v5.h b/engines/scumm/scumm_v5.h
index 71222470f4..b8a61c1677 100644
--- a/engines/scumm/scumm_v5.h
+++ b/engines/scumm/scumm_v5.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V5_H
diff --git a/engines/scumm/scumm_v6.h b/engines/scumm/scumm_v6.h
index eb55b83596..c42a49a9f5 100644
--- a/engines/scumm/scumm_v6.h
+++ b/engines/scumm/scumm_v6.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V6_H
@@ -110,7 +107,7 @@ protected:
virtual void decodeParseString(int a, int b);
virtual void readArrayFromIndexFile();
- virtual byte *getStringAddress(int i);
+ virtual byte *getStringAddress(ResId idx);
virtual void readMAXS(int blockSize);
virtual void palManipulateInit(int resID, int start, int end, int time);
diff --git a/engines/scumm/scumm_v7.h b/engines/scumm/scumm_v7.h
index c4bb3525be..81bb25e0b5 100644
--- a/engines/scumm/scumm_v7.h
+++ b/engines/scumm/scumm_v7.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V7_H
diff --git a/engines/scumm/scumm_v8.h b/engines/scumm/scumm_v8.h
index 94619eb7ac..43bfad1fc9 100644
--- a/engines/scumm/scumm_v8.h
+++ b/engines/scumm/scumm_v8.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SCRIPT_V8_H
diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp
index 95b7653262..7f71d0549b 100644
--- a/engines/scumm/smush/channel.cpp
+++ b/engines/scumm/smush/channel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/channel.h b/engines/scumm/smush/channel.h
index 717a294d96..839aeaa970 100644
--- a/engines/scumm/smush/channel.h
+++ b/engines/scumm/smush/channel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SMUSH_CHANNEL_H
diff --git a/engines/scumm/smush/codec1.cpp b/engines/scumm/smush/codec1.cpp
index d0d92fcd79..79d97d2ce3 100644
--- a/engines/scumm/smush/codec1.cpp
+++ b/engines/scumm/smush/codec1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index 9dbbc6816f..dcc8ee3c19 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/codec37.h b/engines/scumm/smush/codec37.h
index 96033ade31..bcb858b0b5 100644
--- a/engines/scumm/smush/codec37.h
+++ b/engines/scumm/smush/codec37.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SMUSH_CODEC37_H
diff --git a/engines/scumm/smush/codec47.cpp b/engines/scumm/smush/codec47.cpp
index 47286ba4fc..4b503a0a38 100644
--- a/engines/scumm/smush/codec47.cpp
+++ b/engines/scumm/smush/codec47.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/codec47.h b/engines/scumm/smush/codec47.h
index cfa467de4e..0e5156db5c 100644
--- a/engines/scumm/smush/codec47.h
+++ b/engines/scumm/smush/codec47.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SMUSH_CODEC_47_H
diff --git a/engines/scumm/smush/codec47ARM.s b/engines/scumm/smush/codec47ARM.s
index 73341c117f..a91f932558 100644
--- a/engines/scumm/smush/codec47ARM.s
+++ b/engines/scumm/smush/codec47ARM.s
@@ -18,9 +18,6 @@
@ along with this program@ if not, write to the Free Software
@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@
-@ $URL$
-@ $Id$
-@
@ @author Robin Watts (robin@wss.co.uk)
@
@ This file, provides an ARM optimised version of sections of codec47.cpp.
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp
index 32fa99a870..f2c4f993e4 100644
--- a/engines/scumm/smush/imuse_channel.cpp
+++ b/engines/scumm/smush/imuse_channel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index f730acf804..2f1ca512f0 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp
index 75abe9a772..7765bf1292 100644
--- a/engines/scumm/smush/smush_font.cpp
+++ b/engines/scumm/smush/smush_font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/smush_font.h b/engines/scumm/smush/smush_font.h
index 312d6dbc78..5de4a725c6 100644
--- a/engines/scumm/smush/smush_font.h
+++ b/engines/scumm/smush/smush_font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SMUSH_FONT_H
diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp
index 4ab0d7c733..d2b4b5a482 100644
--- a/engines/scumm/smush/smush_mixer.cpp
+++ b/engines/scumm/smush/smush_mixer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h
index 3d62fdc722..75a8889242 100644
--- a/engines/scumm/smush/smush_mixer.h
+++ b/engines/scumm/smush/smush_mixer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_SMUSH_MIXER_H
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 2e39558372..66502572de 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/engine.h"
diff --git a/engines/scumm/smush/smush_player.h b/engines/scumm/smush/smush_player.h
index af7942c193..5a2024060e 100644
--- a/engines/scumm/smush/smush_player.h
+++ b/engines/scumm/smush/smush_player.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#if !defined(SCUMM_SMUSH_PLAYER_H) && defined(ENABLE_SCUMM_7_8)
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index a38119584f..c22da8e7c7 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -32,6 +29,7 @@
#include "scumm/imuse/imuse.h"
#include "scumm/imuse_digi/dimuse.h"
#include "scumm/player_towns.h"
+#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
#include "scumm/util.h"
@@ -1066,7 +1064,7 @@ void Sound::saveLoadWithSerializer(Serializer *ser) {
#pragma mark --- Sound resource handling ---
#pragma mark -
-static void convertMac0Resource(ResourceManager *res, int idx, byte *src_ptr, int size);
+static void convertMac0Resource(ResourceManager *res, ResId idx, byte *src_ptr, int size);
/*
@@ -1076,7 +1074,7 @@ static void convertMac0Resource(ResourceManager *res, int idx, byte *src_ptr, in
* could stand a thorough cleanup!
*/
-int ScummEngine::readSoundResource(int idx) {
+int ScummEngine::readSoundResource(ResId idx) {
uint32 pos, total_size, size, tag, basetag, max_total_size;
int pri, best_pri;
uint32 best_size = 0, best_offs = 0;
@@ -1120,7 +1118,7 @@ int ScummEngine::readSoundResource(int idx) {
break;
case MKTAG('A','D','L',' '):
pri = 1;
- if (_musicType == MDT_ADLIB)
+ if (_musicType == MDT_ADLIB || _musicType == MDT_TOWNS)
pri = 10;
break;
case MKTAG('A','M','I',' '):
@@ -1226,7 +1224,7 @@ int ScummEngine::readSoundResource(int idx) {
if (!dmuFile.open(buffer)) {
error("Can't open music file %s", buffer);
- _res->roomoffs[rtSound][idx] = RES_INVALID_OFFSET;
+ _res->_types[rtSound][idx]._roomoffs = RES_INVALID_OFFSET;
return 0;
}
dmuFile.seek(4, SEEK_SET);
@@ -1250,7 +1248,7 @@ int ScummEngine::readSoundResource(int idx) {
}
error("Unrecognized base tag 0x%08x in sound %d", basetag, idx);
}
- _res->roomoffs[rtSound][idx] = RES_INVALID_OFFSET;
+ _res->_types[rtSound][idx]._roomoffs = RES_INVALID_OFFSET;
return 0;
}
@@ -1429,7 +1427,7 @@ static byte Mac0ToGMInstrument(uint32 type, int &transpose) {
}
}
-static void convertMac0Resource(ResourceManager *res, int idx, byte *src_ptr, int size) {
+static void convertMac0Resource(ResourceManager *res, ResId idx, byte *src_ptr, int size) {
/*
From Markus Magnuson (superqult) we got this information:
Mac0
@@ -1620,7 +1618,7 @@ static void convertMac0Resource(ResourceManager *res, int idx, byte *src_ptr, in
#endif
}
-static void convertADResource(ResourceManager *res, const GameSettings& game, int idx, byte *src_ptr, int size) {
+static void convertADResource(ResourceManager *res, const GameSettings& game, ResId idx, byte *src_ptr, int size) {
// We will ignore the PPQN in the original resource, because
// it's invalid anyway. We use a constant PPQN of 480.
const int ppqn = 480;
@@ -2003,7 +2001,7 @@ static void convertADResource(ResourceManager *res, const GameSettings& game, in
}
-int ScummEngine::readSoundResourceSmallHeader(int idx) {
+int ScummEngine::readSoundResourceSmallHeader(ResId idx) {
uint32 pos, total_size, size, tag;
uint32 ad_size = 0, ad_offs = 0;
uint32 ro_size = 0, ro_offs = 0;
@@ -2125,7 +2123,7 @@ int ScummEngine::readSoundResourceSmallHeader(int idx) {
_fileHandle->read(_res->createResource(rtSound, idx, ro_size - 4), ro_size - 4);
return 1;
}
- _res->roomoffs[rtSound][idx] = RES_INVALID_OFFSET;
+ _res->_types[rtSound][idx]._roomoffs = RES_INVALID_OFFSET;
return 0;
}
diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h
index 39b4af805d..03659ceff1 100644
--- a/engines/scumm/sound.h
+++ b/engines/scumm/sound.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_SOUND_H
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 2dfa9da723..4b3207c6bf 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -35,6 +32,7 @@
#ifdef ENABLE_HE
#include "scumm/he/intern_he.h"
#endif
+#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/scumm_v6.h"
#include "scumm/scumm_v8.h"
@@ -354,7 +352,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) {
bool ScummEngine_v72he::handleNextCharsetCode(Actor *a, int *code) {
const int charsetCode = (_game.heversion >= 80) ? 127 : 64;
uint32 talk_sound_a = 0;
- uint32 talk_sound_b = 0;
+ //uint32 talk_sound_b = 0;
int i, c = 0;
char value[32];
bool endLoop = false;
@@ -385,7 +383,7 @@ bool ScummEngine_v72he::handleNextCharsetCode(Actor *a, int *code) {
i++;
}
value[i] = 0;
- talk_sound_b = atoi(value);
+ //talk_sound_b = atoi(value);
((SoundHE *)_sound)->startHETalkSound(talk_sound_a);
break;
case 104:
@@ -408,7 +406,7 @@ bool ScummEngine_v72he::handleNextCharsetCode(Actor *a, int *code) {
}
value[i] = 0;
talk_sound_a = atoi(value);
- talk_sound_b = 0;
+ //talk_sound_b = 0;
((SoundHE *)_sound)->startHETalkSound(talk_sound_a);
break;
case 119:
@@ -1212,7 +1210,8 @@ int ScummEngine::convertVerbMessage(byte *dst, int dstSize, int var) {
num = readVar(var);
if (num) {
for (k = 1; k < _numVerbs; k++) {
- if (num == _verbs[k].verbid && !_verbs[k].type && !_verbs[k].saveid) {
+ // Fix ZAK FM-TOWNS bug #1013617 by emulating exact (inconsistant?) behavior of the original code
+ if (num == _verbs[k].verbid && !_verbs[k].type && (!_verbs[k].saveid || (_game.version == 3 && _game.platform == Common::kPlatformFMTowns))) {
const byte *ptr = getResourceAddress(rtVerb, k);
return convertMessageToString(ptr, dst, dstSize);
}
diff --git a/engines/scumm/usage_bits.cpp b/engines/scumm/usage_bits.cpp
index da262defc9..10645fea10 100644
--- a/engines/scumm/usage_bits.cpp
+++ b/engines/scumm/usage_bits.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/usage_bits.h b/engines/scumm/usage_bits.h
index b3d582f7b9..3da1e791ea 100644
--- a/engines/scumm/usage_bits.h
+++ b/engines/scumm/usage_bits.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_USAGE_BITS_H
diff --git a/engines/scumm/util.cpp b/engines/scumm/util.cpp
index 5c3e4c9d0c..47a6bad6ec 100644
--- a/engines/scumm/util.cpp
+++ b/engines/scumm/util.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/util.h"
diff --git a/engines/scumm/util.h b/engines/scumm/util.h
index 0d33987c31..f8f999624c 100644
--- a/engines/scumm/util.h
+++ b/engines/scumm/util.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SCUMM_UTIL_H
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index 48fe0a20ed..56f8de2ad1 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 6d5eb3fad7..69caceb53a 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "scumm/actor.h"
diff --git a/engines/scumm/verbs.h b/engines/scumm/verbs.h
index 83e924edac..fb4dc969e2 100644
--- a/engines/scumm/verbs.h
+++ b/engines/scumm/verbs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SCUMM_VERBS_H
diff --git a/engines/sky/autoroute.cpp b/engines/sky/autoroute.cpp
index d6974837c6..5273b21807 100644
--- a/engines/sky/autoroute.cpp
+++ b/engines/sky/autoroute.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/autoroute.h b/engines/sky/autoroute.h
index c40cf647d5..2d01be01ec 100644
--- a/engines/sky/autoroute.h
+++ b/engines/sky/autoroute.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_AUTOROUTE_H
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index 672fb38ca9..66ce92f8fc 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/compact.h b/engines/sky/compact.h
index 4861273146..a7b8520539 100644
--- a/engines/sky/compact.h
+++ b/engines/sky/compact.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_COMPACT_H
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index f31f0f6ba9..9efa6ce769 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/control.h b/engines/sky/control.h
index e4428c1876..6aa7a41c62 100644
--- a/engines/sky/control.h
+++ b/engines/sky/control.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_CONTROL_H
diff --git a/engines/sky/debug.cpp b/engines/sky/debug.cpp
index df55966a9a..ebc1ee377d 100644
--- a/engines/sky/debug.cpp
+++ b/engines/sky/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/debug.h b/engines/sky/debug.h
index ff94cbc8ad..71b2083385 100644
--- a/engines/sky/debug.h
+++ b/engines/sky/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_DEBUG_H
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 6871fc9604..6844d2eacb 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sky/control.h"
@@ -82,7 +79,7 @@ public:
};
const char *SkyMetaEngine::getName() const {
- return "Beneath a Steel Sky";
+ return "Sky";
}
const char *SkyMetaEngine::getOriginalCopyright() const {
diff --git a/engines/sky/disk.cpp b/engines/sky/disk.cpp
index 3795c4166d..a06c5c9be8 100644
--- a/engines/sky/disk.cpp
+++ b/engines/sky/disk.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/disk.h b/engines/sky/disk.h
index 0cdcbb4d0f..320c38eebd 100644
--- a/engines/sky/disk.h
+++ b/engines/sky/disk.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_DISK_H
diff --git a/engines/sky/grid.cpp b/engines/sky/grid.cpp
index e2a96ebf1e..6a9dc502a7 100644
--- a/engines/sky/grid.cpp
+++ b/engines/sky/grid.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sky/compact.h"
diff --git a/engines/sky/grid.h b/engines/sky/grid.h
index 823462f8dd..6e0e9aabaa 100644
--- a/engines/sky/grid.h
+++ b/engines/sky/grid.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_GRID_H
diff --git a/engines/sky/hufftext.cpp b/engines/sky/hufftext.cpp
index 677ea4817e..0592f094d9 100644
--- a/engines/sky/hufftext.cpp
+++ b/engines/sky/hufftext.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sky/text.h"
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index 506a6699c1..f1ea4d2df2 100644
--- a/engines/sky/intro.cpp
+++ b/engines/sky/intro.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/intro.h b/engines/sky/intro.h
index d7a55b95bb..98af6e3664 100644
--- a/engines/sky/intro.h
+++ b/engines/sky/intro.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_INTRO_H
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index f9ebd0fb64..616670b0fd 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -18,14 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
#include "common/rect.h"
-#include "common/EventRecorder.h"
#include "common/textconsole.h"
#include "sky/autoroute.h"
@@ -71,8 +67,8 @@ void Logic::setupLogicTable() {
_logicTable = logicTable;
}
-Logic::Logic(SkyCompact *skyCompact, Screen *skyScreen, Disk *skyDisk, Text *skyText, MusicBase *skyMusic, Mouse *skyMouse, Sound *skySound) {
- g_eventRec.registerRandomSource(_rnd, "sky");
+Logic::Logic(SkyCompact *skyCompact, Screen *skyScreen, Disk *skyDisk, Text *skyText, MusicBase *skyMusic, Mouse *skyMouse, Sound *skySound)
+ : _rnd("sky") {
_skyCompact = skyCompact;
_skyScreen = skyScreen;
@@ -1894,7 +1890,7 @@ bool Logic::fnCheckRequest(uint32 a, uint32 b, uint32 c) {
}
bool Logic::fnStartMenu(uint32 firstObject, uint32 b, uint32 c) {
- /// initialise the top menu bar
+ /// initialize the top menu bar
// firstObject is o0 for game menu, k0 for linc
uint i;
@@ -1943,7 +1939,7 @@ bool Logic::fnStartMenu(uint32 firstObject, uint32 b, uint32 c) {
else if (menuLength < _scriptVariables[SCROLL_OFFSET] + 11)
_scriptVariables[SCROLL_OFFSET] = menuLength - 11;
- // (6) AND FINALLY, INITIALISE THE 11 OBJECTS SO THEY APPEAR ON SCREEEN
+ // (6) AND FINALLY, INITIALIZE THE 11 OBJECTS SO THEY APPEAR ON SCREEEN
uint16 rollingX = TOP_LEFT_X + 28;
for (i = 0; i < 11; i++) {
diff --git a/engines/sky/logic.h b/engines/sky/logic.h
index da1d9ed997..9f8df25870 100644
--- a/engines/sky/logic.h
+++ b/engines/sky/logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_LOGIC_H
diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp
index 611010fa46..98f942889e 100644
--- a/engines/sky/mouse.cpp
+++ b/engines/sky/mouse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/mouse.h b/engines/sky/mouse.h
index 6237b9fd29..1ba0167fb5 100644
--- a/engines/sky/mouse.h
+++ b/engines/sky/mouse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MOUSE_H
diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp
index 9b3c4338ab..896b58aa22 100644
--- a/engines/sky/music/adlibchannel.cpp
+++ b/engines/sky/music/adlibchannel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/music/adlibchannel.h b/engines/sky/music/adlibchannel.h
index cbcf722e4e..44ac0d79d0 100644
--- a/engines/sky/music/adlibchannel.h
+++ b/engines/sky/music/adlibchannel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MUSIC_ADLIBCHANNEL_H
diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp
index da46964ef9..1b5518fcb1 100644
--- a/engines/sky/music/adlibmusic.cpp
+++ b/engines/sky/music/adlibmusic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/music/adlibmusic.h b/engines/sky/music/adlibmusic.h
index 848c8eaf29..2782a07be6 100644
--- a/engines/sky/music/adlibmusic.h
+++ b/engines/sky/music/adlibmusic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MUSIC_ADLIBMUSIC_H
diff --git a/engines/sky/music/gmchannel.cpp b/engines/sky/music/gmchannel.cpp
index be0afa8894..215d6490b9 100644
--- a/engines/sky/music/gmchannel.cpp
+++ b/engines/sky/music/gmchannel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gmchannel.h"
diff --git a/engines/sky/music/gmchannel.h b/engines/sky/music/gmchannel.h
index e831b03424..f16de401db 100644
--- a/engines/sky/music/gmchannel.h
+++ b/engines/sky/music/gmchannel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MUSIC_GMCHANNEL_H
diff --git a/engines/sky/music/gmmusic.cpp b/engines/sky/music/gmmusic.cpp
index 6a8529f287..d0ba1505cb 100644
--- a/engines/sky/music/gmmusic.cpp
+++ b/engines/sky/music/gmmusic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sky/music/gmmusic.h"
diff --git a/engines/sky/music/gmmusic.h b/engines/sky/music/gmmusic.h
index baabf2c9ea..0f54a930e4 100644
--- a/engines/sky/music/gmmusic.h
+++ b/engines/sky/music/gmmusic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MUSIC_GMMUSIC_H
diff --git a/engines/sky/music/mt32music.cpp b/engines/sky/music/mt32music.cpp
index 4f47e511c7..d068a221b2 100644
--- a/engines/sky/music/mt32music.cpp
+++ b/engines/sky/music/mt32music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sky/music/mt32music.h"
diff --git a/engines/sky/music/mt32music.h b/engines/sky/music/mt32music.h
index 0b5573ffff..74962daac3 100644
--- a/engines/sky/music/mt32music.h
+++ b/engines/sky/music/mt32music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MUSIC_MT32MUSIC_H
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index 748637f9d0..60d0f352e7 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sky/music/musicbase.h"
diff --git a/engines/sky/music/musicbase.h b/engines/sky/music/musicbase.h
index 1ad78b2cf7..c175876380 100644
--- a/engines/sky/music/musicbase.h
+++ b/engines/sky/music/musicbase.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_MUSIC_MUSICBASE_H
diff --git a/engines/sky/rnc_deco.cpp b/engines/sky/rnc_deco.cpp
index eb8307764d..27fae03514 100644
--- a/engines/sky/rnc_deco.cpp
+++ b/engines/sky/rnc_deco.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/rnc_deco.h b/engines/sky/rnc_deco.h
index 38429383a3..96a75a9750 100644
--- a/engines/sky/rnc_deco.h
+++ b/engines/sky/rnc_deco.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_RNC_DECO_H
diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp
index a209571b37..2797ed2fea 100644
--- a/engines/sky/screen.cpp
+++ b/engines/sky/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/screen.h b/engines/sky/screen.h
index 5e226c49ed..bf8b69a95a 100644
--- a/engines/sky/screen.h
+++ b/engines/sky/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_SCREEN_H
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index f10ec1083a..72abc26f32 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/sky/sky.h b/engines/sky/sky.h
index 58ac3ed26e..0b5f4c5c1c 100644
--- a/engines/sky/sky.h
+++ b/engines/sky/sky.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_H
diff --git a/engines/sky/skydefs.h b/engines/sky/skydefs.h
index e3f3f3101f..070e185d55 100644
--- a/engines/sky/skydefs.h
+++ b/engines/sky/skydefs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_DEFS_H
diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp
index 7191f6cd00..e94a2a61d9 100644
--- a/engines/sky/sound.cpp
+++ b/engines/sky/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -316,7 +313,7 @@ static const Sfx fx_hello_helga = {
}
};
-static const Sfx fx_statue_on_armour = {
+static const Sfx fx_statue_on_armor = {
8,
0,
{
@@ -988,7 +985,7 @@ static const Sfx *musicList[] = {
&fx_null, // 365
&fx_break_crystals, // 366
&fx_disintegrate, // 367
- &fx_statue_on_armour, // 368
+ &fx_statue_on_armor, // 368
&fx_null, // 369
&fx_null, // 360
&fx_ping, // 371
diff --git a/engines/sky/sound.h b/engines/sky/sound.h
index ce060ce689..da0d91911b 100644
--- a/engines/sky/sound.h
+++ b/engines/sky/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_SOUND_H
diff --git a/engines/sky/struc.h b/engines/sky/struc.h
index 987f074ed1..c2ebf1bad0 100644
--- a/engines/sky/struc.h
+++ b/engines/sky/struc.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_STRUC_H
diff --git a/engines/sky/text.cpp b/engines/sky/text.cpp
index 2464d93581..3e119b3b20 100644
--- a/engines/sky/text.cpp
+++ b/engines/sky/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sky/text.h b/engines/sky/text.h
index 06aabf5094..cf0d707ce9 100644
--- a/engines/sky/text.h
+++ b/engines/sky/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SKY_TEXT_H
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 7c17befcff..b66cc6b5a7 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
@@ -129,7 +126,7 @@ bool MoviePlayer::load(uint32 id) {
continue;
}
- _movieTexts.push_back(new MovieText(startFrame, endFrame, ptr));
+ _movieTexts.push_back(MovieText(startFrame, endFrame, ptr));
lastEnd = endFrame;
}
f.close();
@@ -164,8 +161,7 @@ void MoviePlayer::play() {
_textMan->releaseText(2, false);
- while (!_movieTexts.empty())
- delete _movieTexts.remove_at(_movieTexts.size() - 1);
+ _movieTexts.clear();
while (_snd->isSoundHandleActive(*_bgSoundHandle))
_system->delayMillis(100);
@@ -182,8 +178,8 @@ void MoviePlayer::play() {
void MoviePlayer::performPostProcessing(byte *screen) {
if (!_movieTexts.empty()) {
- if (_decoder->getCurFrame() == _movieTexts[0]->_startFrame) {
- _textMan->makeTextSprite(2, (uint8 *)_movieTexts[0]->_text, 600, LETTER_COL);
+ if (_decoder->getCurFrame() == _movieTexts.front()._startFrame) {
+ _textMan->makeTextSprite(2, (const uint8 *)_movieTexts.front()._text.c_str(), 600, LETTER_COL);
FrameHeader *frame = _textMan->giveSpriteData(2);
_textWidth = frame->width;
@@ -191,9 +187,9 @@ void MoviePlayer::performPostProcessing(byte *screen) {
_textX = 320 - _textWidth / 2;
_textY = 420 - _textHeight;
}
- if (_decoder->getCurFrame() == _movieTexts[0]->_endFrame) {
+ if (_decoder->getCurFrame() == _movieTexts.front()._endFrame) {
_textMan->releaseText(2, false);
- delete _movieTexts.remove_at(0);
+ _movieTexts.pop_front();
}
}
diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h
index 7bfd839826..fc3061bbf9 100644
--- a/engines/sword1/animation.h
+++ b/engines/sword1/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_ANIMATION_H
@@ -30,7 +27,7 @@
#include "video/smk_decoder.h"
#include "video/video_decoder.h"
-#include "common/array.h"
+#include "common/list.h"
#include "audio/audiostream.h"
@@ -48,14 +45,11 @@ class MovieText {
public:
uint16 _startFrame;
uint16 _endFrame;
- char *_text;
- MovieText(int startFrame, int endFrame, const char *text) {
+ Common::String _text;
+ MovieText(int startFrame, int endFrame, const Common::String &text) {
_startFrame = startFrame;
_endFrame = endFrame;
- _text = strdup(text);
- }
- ~MovieText() {
- free(_text);
+ _text = text;
}
};
@@ -83,7 +77,7 @@ protected:
Text *_textMan;
Audio::Mixer *_snd;
OSystem *_system;
- Common::Array<MovieText *> _movieTexts;
+ Common::List<MovieText> _movieTexts;
int _textX, _textY, _textWidth, _textHeight;
byte _white, _black;
DecoderType _decoderType;
diff --git a/engines/sword1/collision.h b/engines/sword1/collision.h
index 4079136da1..9a9eeec429 100644
--- a/engines/sword1/collision.h
+++ b/engines/sword1/collision.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_COLLISION_H
diff --git a/engines/sword1/console.cpp b/engines/sword1/console.cpp
index 79792c2208..603efd308e 100644
--- a/engines/sword1/console.cpp
+++ b/engines/sword1/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sword1/console.h"
diff --git a/engines/sword1/console.h b/engines/sword1/console.h
index 7ee8d2935f..260fe95d52 100644
--- a/engines/sword1/console.h
+++ b/engines/sword1/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_CONSOLE_H
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index d8ddd53e2e..86947db8ae 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/sword1/control.h b/engines/sword1/control.h
index db910f521f..6c0cf8b1ef 100644
--- a/engines/sword1/control.h
+++ b/engines/sword1/control.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_CONTROL_H
diff --git a/engines/sword1/debug.cpp b/engines/sword1/debug.cpp
index 39f280748c..6f82d0f49a 100644
--- a/engines/sword1/debug.cpp
+++ b/engines/sword1/debug.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/sword1/debug.h b/engines/sword1/debug.h
index 444d68b399..e4f004dc63 100644
--- a/engines/sword1/debug.h
+++ b/engines/sword1/debug.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_DEBUG_H
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index fa8277033c..8ffd96d308 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sword1/sword1.h"
@@ -82,7 +79,7 @@ static const char *g_filesToCheck[NUM_FILES_TO_CHECK] = { // these files have to
class SwordMetaEngine : public MetaEngine {
public:
virtual const char *getName() const {
- return "Broken Sword";
+ return "Sword1";
}
virtual const char *getOriginalCopyright() const {
return "Broken Sword Games (C) Revolution";
diff --git a/engines/sword1/eventman.cpp b/engines/sword1/eventman.cpp
index 9200e6a229..d95adebd86 100644
--- a/engines/sword1/eventman.cpp
+++ b/engines/sword1/eventman.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/eventman.h b/engines/sword1/eventman.h
index 7a50b9a297..25cb886a34 100644
--- a/engines/sword1/eventman.h
+++ b/engines/sword1/eventman.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_EVENTMAN_H
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index 3da3c457d0..00f7112c05 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -18,14 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
#include "common/util.h"
-#include "common/EventRecorder.h"
#include "common/textconsole.h"
#include "sword1/logic.h"
@@ -53,8 +49,8 @@ namespace Sword1 {
uint32 Logic::_scriptVars[NUM_SCRIPT_VARS];
-Logic::Logic(SwordEngine *vm, ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, Audio::Mixer *mixer) {
- g_eventRec.registerRandomSource(_rnd, "sword1");
+Logic::Logic(SwordEngine *vm, ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, Audio::Mixer *mixer)
+ : _rnd("sword1") {
_vm = vm;
_objMan = pObjMan;
diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h
index 989b852e77..13ddbc989b 100644
--- a/engines/sword1/logic.h
+++ b/engines/sword1/logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_LOGIC_H
@@ -33,6 +30,8 @@
#include "common/random.h"
#include "audio/mixer.h"
+class OSystem;
+
namespace Sword1 {
#define NON_ZERO_SCRIPT_VARS 95
diff --git a/engines/sword1/memman.cpp b/engines/sword1/memman.cpp
index f315895eb0..9fd763084a 100644
--- a/engines/sword1/memman.cpp
+++ b/engines/sword1/memman.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/memman.h b/engines/sword1/memman.h
index b489eae2f9..3f822189eb 100644
--- a/engines/sword1/memman.h
+++ b/engines/sword1/memman.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_MEMMAN_H
diff --git a/engines/sword1/menu.cpp b/engines/sword1/menu.cpp
index 582bea82f8..3a99602fec 100644
--- a/engines/sword1/menu.cpp
+++ b/engines/sword1/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/menu.h b/engines/sword1/menu.h
index f45f59a1e0..ea062f1a49 100644
--- a/engines/sword1/menu.h
+++ b/engines/sword1/menu.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_MENU_H
diff --git a/engines/sword1/mouse.cpp b/engines/sword1/mouse.cpp
index 87e476e504..cbf951aebc 100644
--- a/engines/sword1/mouse.cpp
+++ b/engines/sword1/mouse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/sword1/mouse.h b/engines/sword1/mouse.h
index 3a7ea747fb..44a6f76ad7 100644
--- a/engines/sword1/mouse.h
+++ b/engines/sword1/mouse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_MOUSE_H
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 49f9f7271b..a291d80f85 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/music.h b/engines/sword1/music.h
index 7a3d1e5de6..104bc1c536 100644
--- a/engines/sword1/music.h
+++ b/engines/sword1/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_MUSIC_H
diff --git a/engines/sword1/object.h b/engines/sword1/object.h
index 58aefc2775..5a6fd49c0b 100644
--- a/engines/sword1/object.h
+++ b/engines/sword1/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_OBJECT_H
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp
index dde1498591..8de29615d5 100644
--- a/engines/sword1/objectman.cpp
+++ b/engines/sword1/objectman.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h
index f4b8fe8906..23047c14ea 100644
--- a/engines/sword1/objectman.h
+++ b/engines/sword1/objectman.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// this is the object manager. our equivalent to protocol.c and coredata.c
diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp
index f7b9eb8908..807679a40e 100644
--- a/engines/sword1/resman.cpp
+++ b/engines/sword1/resman.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/resman.h b/engines/sword1/resman.h
index ee1d55cd14..82074e5740 100644
--- a/engines/sword1/resman.h
+++ b/engines/sword1/resman.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_RESMAN_H
diff --git a/engines/sword1/router.cpp b/engines/sword1/router.cpp
index 3694ed2459..aaf475912d 100644
--- a/engines/sword1/router.cpp
+++ b/engines/sword1/router.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
@@ -264,7 +261,7 @@ int32 Router::getRoute() {
// of a line
// scan through the nodes linking each node to its nearest
- // neighbour until no more nodes change
+ // neighbor until no more nodes change
// This is the routine that finds a route using scan()
diff --git a/engines/sword1/router.h b/engines/sword1/router.h
index 97fa42488b..31c4291eed 100644
--- a/engines/sword1/router.h
+++ b/engines/sword1/router.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_ROUTER_H
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index de96f6e7b4..1da89a1091 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/screen.h b/engines/sword1/screen.h
index 88326a730e..ece37b0ecc 100644
--- a/engines/sword1/screen.h
+++ b/engines/sword1/screen.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_SCREEN_H
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index c970e72748..f7ab9ca1de 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
#include "common/util.h"
-#include "common/EventRecorder.h"
#include "common/memstream.h"
#include "common/textconsole.h"
@@ -49,8 +45,8 @@ namespace Sword1 {
#define SOUND_SPEECH_ID 1
#define SPEECH_FLAGS (Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN)
-Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan) {
- g_eventRec.registerRandomSource(_rnd, "sword1sound");
+Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan)
+ : _rnd("sword1sound") {
strcpy(_filePath, searchPath);
_mixer = mixer;
_resMan = pResMan;
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index b6fcd6706f..a6313f85eb 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_SOUND_H
diff --git a/engines/sword1/staticres.cpp b/engines/sword1/staticres.cpp
index 84f1dc9d45..402e349576 100644
--- a/engines/sword1/staticres.cpp
+++ b/engines/sword1/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 3b3eaaf8b9..23dff4dec2 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sword1/sword1.h"
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index dbb683cd74..c83cb76461 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_H
diff --git a/engines/sword1/sworddefs.h b/engines/sword1/sworddefs.h
index 26c155dc4c..15736dcae0 100644
--- a/engines/sword1/sworddefs.h
+++ b/engines/sword1/sworddefs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_SWORDDEFS_H
@@ -502,7 +499,7 @@ enum ScriptVariableNames {
CASE_2_LOCKED_FLAG,
CASE_3_LOCKED_FLAG,
CASE_4_LOCKED_FLAG,
- SEEN_ARMOUR_28_FLAG,
+ SEEN_ARMOR_28_FLAG,
CLOSED_WINDOW_28_FLAG,
WINDOW_28_FLAG,
WINDOW_DRAUGHT_FLAG,
@@ -1408,7 +1405,7 @@ enum ScriptVariableNames {
SEEN_STATUE_FLAG,
SYRIA_DEAD_FLAG,
SYRIA_NICHE_FLAG,
- ARMOUR_HIDE_FLAG,
+ ARMOR_HIDE_FLAG,
CANDLE59_FLAG,
CANDLE_BURNT,
CHALICE_FLAG,
diff --git a/engines/sword1/swordres.h b/engines/sword1/swordres.h
index 7f6a6352ad..384c240283 100644
--- a/engines/sword1/swordres.h
+++ b/engines/sword1/swordres.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_SWORDRES_H
diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp
index 7c65533067..2d4b07020f 100644
--- a/engines/sword1/text.cpp
+++ b/engines/sword1/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
@@ -76,7 +73,7 @@ uint32 Text::lowTextManager(uint8 *ascii, int32 width, uint8 pen) {
return textObjId;
}
-void Text::makeTextSprite(uint8 slot, uint8 *text, uint16 maxWidth, uint8 pen) {
+void Text::makeTextSprite(uint8 slot, const uint8 *text, uint16 maxWidth, uint8 pen) {
LineInfo lines[MAX_LINES];
uint16 numLines = analyzeSentence(text, maxWidth, lines);
@@ -118,7 +115,7 @@ uint16 Text::charWidth(uint8 ch) {
return _resMan->getUint16(_resMan->fetchFrame(_font, ch - SPACE)->width);
}
-uint16 Text::analyzeSentence(uint8 *text, uint16 maxWidth, LineInfo *line) {
+uint16 Text::analyzeSentence(const uint8 *text, uint16 maxWidth, LineInfo *line) {
uint16 lineNo = 0;
bool firstWord = true;
diff --git a/engines/sword1/text.h b/engines/sword1/text.h
index 9bfc88fce0..2224fbcac5 100644
--- a/engines/sword1/text.h
+++ b/engines/sword1/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD1_TEXT_H
@@ -52,11 +49,11 @@ public:
~Text();
FrameHeader *giveSpriteData(uint32 textTarget);
uint32 lowTextManager(uint8 *text, int32 width, uint8 pen);
- void makeTextSprite(uint8 slot, uint8 *text, uint16 maxWidth, uint8 pen);
+ void makeTextSprite(uint8 slot, const uint8 *text, uint16 maxWidth, uint8 pen);
void releaseText(uint32 id, bool updateCount = true);
private:
- uint16 analyzeSentence(uint8 *text, uint16 maxWidth, LineInfo *info);
+ uint16 analyzeSentence(const uint8 *text, uint16 maxWidth, LineInfo *info);
uint16 charWidth(uint8 ch);
uint16 copyChar(uint8 ch, uint8 *sprPtr, uint16 sprWidth, uint8 pen);
uint8 *_font;
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index a5a2499b01..5c5ff6c7ee 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/file.h"
diff --git a/engines/sword2/animation.h b/engines/sword2/animation.h
index afe7dfcc68..1f5fced03b 100644
--- a/engines/sword2/animation.h
+++ b/engines/sword2/animation.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_ANIMATION_H
diff --git a/engines/sword2/anims.cpp b/engines/sword2/anims.cpp
index 7fd36fcc86..91a68e0044 100644
--- a/engines/sword2/anims.cpp
+++ b/engines/sword2/anims.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// ---------------------------------------------------------------------------
diff --git a/engines/sword2/console.cpp b/engines/sword2/console.cpp
index bca3cd6184..957b2431e0 100644
--- a/engines/sword2/console.cpp
+++ b/engines/sword2/console.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -782,19 +779,19 @@ bool Debugger::Cmd_Sfx(int argc, const char **argv) {
}
bool Debugger::Cmd_English(int argc, const char **argv) {
- _vm->initialiseFontResourceFlags(DEFAULT_TEXT);
+ _vm->initializeFontResourceFlags(DEFAULT_TEXT);
DebugPrintf("Default fonts selected\n");
return true;
}
bool Debugger::Cmd_Finnish(int argc, const char **argv) {
- _vm->initialiseFontResourceFlags(FINNISH_TEXT);
+ _vm->initializeFontResourceFlags(FINNISH_TEXT);
DebugPrintf("Finnish fonts selected\n");
return true;
}
bool Debugger::Cmd_Polish(int argc, const char **argv) {
- _vm->initialiseFontResourceFlags(POLISH_TEXT);
+ _vm->initializeFontResourceFlags(POLISH_TEXT);
DebugPrintf("Polish fonts selected\n");
return true;
}
diff --git a/engines/sword2/console.h b/engines/sword2/console.h
index 2de8299780..09e456564d 100644
--- a/engines/sword2/console.h
+++ b/engines/sword2/console.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_CONSOLE_H
diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp
index 4332f2811c..6ce447a4cc 100644
--- a/engines/sword2/controls.cpp
+++ b/engines/sword2/controls.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -621,7 +618,7 @@ public:
// The sound mute switches have 0 as their "down" state and 1 as
// their "up" state, so this function is needed to get consistent
- // behaviour.
+ // behavior.
void reverseStates() {
_upState = 1;
diff --git a/engines/sword2/controls.h b/engines/sword2/controls.h
index 043330c178..ca41867462 100644
--- a/engines/sword2/controls.h
+++ b/engines/sword2/controls.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_CONTROL_H
diff --git a/engines/sword2/debug.cpp b/engines/sword2/debug.cpp
index cb3c3b6a30..b3d28e90c2 100644
--- a/engines/sword2/debug.cpp
+++ b/engines/sword2/debug.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/debug.h b/engines/sword2/debug.h
index 768f339dbd..90d9b6b63c 100644
--- a/engines/sword2/debug.h
+++ b/engines/sword2/debug.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_DEBUG_H
diff --git a/engines/sword2/defs.h b/engines/sword2/defs.h
index c729ff0287..dbd4d23d00 100644
--- a/engines/sword2/defs.h
+++ b/engines/sword2/defs.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_DEFS_H
diff --git a/engines/sword2/events.cpp b/engines/sword2/events.cpp
index 24101e271c..1310c04b82 100644
--- a/engines/sword2/events.cpp
+++ b/engines/sword2/events.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp
index e0990ea120..60ee6176a4 100644
--- a/engines/sword2/function.cpp
+++ b/engines/sword2/function.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/header.cpp b/engines/sword2/header.cpp
index 6ab88d159d..9c50db90d4 100644
--- a/engines/sword2/header.cpp
+++ b/engines/sword2/header.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sword2/header.h"
diff --git a/engines/sword2/header.h b/engines/sword2/header.h
index ed63c806bc..ceecdd1a92 100644
--- a/engines/sword2/header.h
+++ b/engines/sword2/header.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_HEADER_H
diff --git a/engines/sword2/icons.cpp b/engines/sword2/icons.cpp
index 8336178ae5..a555e63449 100644
--- a/engines/sword2/icons.cpp
+++ b/engines/sword2/icons.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -150,7 +147,7 @@ void Mouse::buildMenu() {
}
}
- // Initialise the menu from the master list.
+ // Initialize the menu from the master list.
for (i = 0; i < 15; i++) {
uint32 res = _masterMenuList[i].icon_resource;
diff --git a/engines/sword2/interpreter.cpp b/engines/sword2/interpreter.cpp
index a3804366d4..e7fb979d69 100644
--- a/engines/sword2/interpreter.cpp
+++ b/engines/sword2/interpreter.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -267,7 +264,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
// int32_TYPE 1 numberOfScripts
// int32_TYPE numberOfScripts The offsets for each script
- // Initialise some stuff
+ // Initialize some stuff
uint32 ip = 0; // Code pointer
int scriptNumber;
@@ -377,7 +374,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
// sets variable 913 to 1 (probably to stop him from
// turning around every now and then). The script may
// then go on to set the variable to different values
- // to trigger various behaviours in him, but if you
+ // to trigger various behaviors in him, but if you
// have run out of these cases the script won't ever
// set it back to 0 again.
//
@@ -617,7 +614,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
// The scripts do not always call the mcode command
// with as many parameters as it can accept. To keep
- // things predictable, initialise the remaining
+ // things predictable, initialize the remaining
// parameters to 0.
for (i = STACK_SIZE - 1; i >= value; i--) {
diff --git a/engines/sword2/interpreter.h b/engines/sword2/interpreter.h
index 1eb66cfa3c..ec19034962 100644
--- a/engines/sword2/interpreter.h
+++ b/engines/sword2/interpreter.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_INTERPRETER_H
diff --git a/engines/sword2/layers.cpp b/engines/sword2/layers.cpp
index 47cc3ec232..b13006cd70 100644
--- a/engines/sword2/layers.cpp
+++ b/engines/sword2/layers.cpp
@@ -20,12 +20,9 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
-// high level layer initialising
+// high level layer initializing
// the system supports:
// 1 optional background parallax layer
@@ -100,7 +97,7 @@ void Screen::initBackground(int32 res, int32 new_palette) {
debug(2, "layers=%d width=%d depth=%d", screen_head.noLayers, screen_head.width, screen_head.height);
- // initialise the driver back buffer
+ // initialize the driver back buffer
setLocationMetrics(screen_head.width, screen_head.height);
for (i = 0; i < screen_head.noLayers; i++) {
@@ -183,22 +180,22 @@ void Screen::initBackground(int32 res, int32 new_palette) {
for (i = 0; i < 2; i++) {
if (screenLayerTable.bg_parallax[i])
- initialiseBackgroundLayer(_vm->fetchBackgroundParallaxLayer(file, i));
+ initializeBackgroundLayer(_vm->fetchBackgroundParallaxLayer(file, i));
else
- initialiseBackgroundLayer(NULL);
+ initializeBackgroundLayer(NULL);
}
// Normal backround layer
- initialiseBackgroundLayer(_vm->fetchBackgroundLayer(file));
+ initializeBackgroundLayer(_vm->fetchBackgroundLayer(file));
// Foreground parallax layers
for (i = 0; i < 2; i++) {
if (screenLayerTable.fg_parallax[i])
- initialiseBackgroundLayer(_vm->fetchForegroundParallaxLayer(file, i));
+ initializeBackgroundLayer(_vm->fetchForegroundParallaxLayer(file, i));
else
- initialiseBackgroundLayer(NULL);
+ initializeBackgroundLayer(NULL);
}
_vm->_resman->closeResource(_thisScreen.background_layer_id);
@@ -246,7 +243,7 @@ void Screen::initPsxBackground(int32 res, int32 new_palette) {
debug(2, "layers=%d width=%d depth=%d", screen_head.noLayers, screen_head.width, screen_head.height);
- // initialise the driver back buffer
+ // initialize the driver back buffer
setLocationMetrics(screen_head.width, screen_head.height);
for (i = 0; i < screen_head.noLayers; i++) {
@@ -282,15 +279,15 @@ void Screen::initPsxBackground(int32 res, int32 new_palette) {
_thisScreen.feet_y = 340;
// Background parallax layers
- initialisePsxParallaxLayer(_vm->fetchBackgroundParallaxLayer(file, 0));
- initialisePsxParallaxLayer(NULL);
+ initializePsxParallaxLayer(_vm->fetchBackgroundParallaxLayer(file, 0));
+ initializePsxParallaxLayer(NULL);
// Normal backround layer
- initialisePsxBackgroundLayer(_vm->fetchBackgroundLayer(file));
+ initializePsxBackgroundLayer(_vm->fetchBackgroundLayer(file));
// Foreground parallax layers
- initialisePsxParallaxLayer(_vm->fetchForegroundParallaxLayer(file, 1));
- initialisePsxParallaxLayer(NULL);
+ initializePsxParallaxLayer(_vm->fetchForegroundParallaxLayer(file, 1));
+ initializePsxParallaxLayer(NULL);
_vm->_resman->closeResource(_thisScreen.background_layer_id);
diff --git a/engines/sword2/logic.cpp b/engines/sword2/logic.cpp
index c27bd76ff4..f634737d4e 100644
--- a/engines/sword2/logic.cpp
+++ b/engines/sword2/logic.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/logic.h b/engines/sword2/logic.h
index e40a12bba3..87c0395221 100644
--- a/engines/sword2/logic.h
+++ b/engines/sword2/logic.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// logic management
diff --git a/engines/sword2/maketext.cpp b/engines/sword2/maketext.cpp
index fda30981c8..e279284d76 100644
--- a/engines/sword2/maketext.cpp
+++ b/engines/sword2/maketext.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// MAKETEXT - Constructs a single-frame text sprite: returns a handle to a
@@ -115,7 +112,7 @@ byte *FontRenderer::makeTextSprite(byte *sentence, uint16 maxWidth, uint8 pen, u
// Get details of sentence breakdown into array of LineInfo structures
// and get the number of lines involved
- uint16 noOfLines = analyseSentence(sentence, maxWidth, fontRes, (LineInfo *)line);
+ uint16 noOfLines = analyzeSentence(sentence, maxWidth, fontRes, (LineInfo *)line);
// Construct the sprite based on the info gathered - returns floating
// mem block
@@ -126,7 +123,7 @@ byte *FontRenderer::makeTextSprite(byte *sentence, uint16 maxWidth, uint8 pen, u
return textSprite;
}
-uint16 FontRenderer::analyseSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line) {
+uint16 FontRenderer::analyzeSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line) {
// joinWidth = how much extra space is needed to append a word to a
// line. NB. SPACE requires TWICE the '_charSpacing' to join a word
// to line
@@ -202,7 +199,7 @@ uint16 FontRenderer::analyseSentence(byte *sentence, uint16 maxWidth, uint32 fon
* @param sentence pointer to a null-terminated string
* @param fontRes the font resource id
* @param pen the text color, or zero to use the source colors
- * @param line array of LineInfo structures, created by analyseSentence()
+ * @param line array of LineInfo structures, created by analyzeSentence()
* @param noOfLines the number of lines, i.e. the number of elements in 'line'
* @return a handle to a floating memory block containing the text sprite
* @note The sentence must contain no leading, trailing or extra spaces.
@@ -639,7 +636,7 @@ void FontRenderer::killTextBloc(uint32 bloc_number) {
#define SAVE_LINE_NO 1
-void Sword2Engine::initialiseFontResourceFlags() {
+void Sword2Engine::initializeFontResourceFlags() {
byte *textFile = _resman->openResource(TEXT_RES);
// If language is Polish or Finnish it requires alternate fonts.
@@ -652,11 +649,11 @@ void Sword2Engine::initialiseFontResourceFlags() {
char *textLine = (char *)fetchTextLine(textFile, SAVE_LINE_NO) + 2;
if (strcmp(textLine, "tallenna") == 0)
- initialiseFontResourceFlags(FINNISH_TEXT);
+ initializeFontResourceFlags(FINNISH_TEXT);
else if (strcmp(textLine, "zapisz") == 0)
- initialiseFontResourceFlags(POLISH_TEXT);
+ initializeFontResourceFlags(POLISH_TEXT);
else
- initialiseFontResourceFlags(DEFAULT_TEXT);
+ initializeFontResourceFlags(DEFAULT_TEXT);
// Get the game name for the windows application
@@ -680,10 +677,10 @@ void Sword2Engine::initialiseFontResourceFlags() {
}
/**
- * Called from initialiseFontResourceFlags(), and also from console.cpp
+ * Called from initializeFontResourceFlags(), and also from console.cpp
*/
-void Sword2Engine::initialiseFontResourceFlags(uint8 language) {
+void Sword2Engine::initializeFontResourceFlags(uint8 language) {
switch (language) {
case FINNISH_TEXT:
_speechFontId = FINNISH_SPEECH_FONT_ID;
diff --git a/engines/sword2/maketext.h b/engines/sword2/maketext.h
index 52740d9de9..726c23a5f9 100644
--- a/engines/sword2/maketext.h
+++ b/engines/sword2/maketext.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_MAKETEXT_H
@@ -94,7 +91,7 @@ private:
// each line - negative for overlap
uint8 _borderPen; // output pen color of character borders
- uint16 analyseSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line);
+ uint16 analyzeSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line);
byte *buildTextSprite(byte *sentence, uint32 fontRes, uint8 pen, LineInfo *line, uint16 noOfLines);
uint16 charWidth(byte ch, uint32 fontRes);
uint16 charHeight(uint32 fontRes);
diff --git a/engines/sword2/memory.cpp b/engines/sword2/memory.cpp
index 2b3784164e..5fd2d4e78e 100644
--- a/engines/sword2/memory.cpp
+++ b/engines/sword2/memory.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// The new memory manager, now only used by the resource manager. The original
diff --git a/engines/sword2/memory.h b/engines/sword2/memory.h
index e00eacb032..3f511dd5db 100644
--- a/engines/sword2/memory.h
+++ b/engines/sword2/memory.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_MEMORY_H
diff --git a/engines/sword2/menu.cpp b/engines/sword2/menu.cpp
index 921a3c77b5..4d63c4cce8 100644
--- a/engines/sword2/menu.cpp
+++ b/engines/sword2/menu.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/mouse.cpp b/engines/sword2/mouse.cpp
index 3a26ab17b7..c5fed49347 100644
--- a/engines/sword2/mouse.cpp
+++ b/engines/sword2/mouse.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/mouse.h b/engines/sword2/mouse.h
index a45d786088..dc4bd5fc0a 100644
--- a/engines/sword2/mouse.h
+++ b/engines/sword2/mouse.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_MOUSE_H
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp
index ae6e2f1268..63116e954a 100644
--- a/engines/sword2/music.cpp
+++ b/engines/sword2/music.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// One feature still missing is the original's DipMusic() function which, as
diff --git a/engines/sword2/object.h b/engines/sword2/object.h
index 94a968e58d..32d9701e27 100644
--- a/engines/sword2/object.h
+++ b/engines/sword2/object.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_OBJECT_H
diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp
index a52160db25..c3a3d24075 100644
--- a/engines/sword2/palette.cpp
+++ b/engines/sword2/palette.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/protocol.cpp b/engines/sword2/protocol.cpp
index 3d16e4ea4c..caa1a21798 100644
--- a/engines/sword2/protocol.cpp
+++ b/engines/sword2/protocol.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/file.h"
diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp
index a47f8abe0d..1e068d6061 100644
--- a/engines/sword2/render.cpp
+++ b/engines/sword2/render.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -345,10 +342,10 @@ void Screen::renderParallax(byte *ptr, int16 l) {
#define LIMIT_FRAME_RATE
/**
- * Initialises the timers before the render loop is entered.
+ * Initializes the timers before the render loop is entered.
*/
-void Screen::initialiseRenderCycle() {
+void Screen::initializeRenderCycle() {
_initialTime = _vm->_system->getMillis();
_totalTime = _initialTime + (1000 / _vm->getFramesPerSecond());
}
@@ -402,7 +399,7 @@ bool Screen::endRenderCycle() {
renderCountIndex = 0;
if (_renderTooSlow) {
- initialiseRenderCycle();
+ initializeRenderCycle();
return true;
}
@@ -464,13 +461,13 @@ void Screen::resetRenderEngine() {
* or a NULL pointer in order of background parallax to foreground parallax.
*/
-int32 Screen::initialiseBackgroundLayer(byte *parallax) {
+int32 Screen::initializeBackgroundLayer(byte *parallax) {
Parallax p;
uint16 i, j, k;
byte *data;
byte *dst;
- debug(2, "initialiseBackgroundLayer");
+ debug(2, "initializeBackgroundLayer");
assert(_layer < MAXLAYERS);
@@ -591,14 +588,14 @@ int32 Screen::initialiseBackgroundLayer(byte *parallax) {
* ratio correction), while PC backgrounds are in tiles of 64x64.
*/
-int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
+int32 Screen::initializePsxBackgroundLayer(byte *parallax) {
uint16 bgXres, bgYres;
uint16 trueXres, stripeNumber, totStripes;
uint32 baseAddress, stripePos;
uint16 i, j;
byte *dst;
- debug(2, "initialisePsxBackgroundLayer");
+ debug(2, "initializePsxBackgroundLayer");
assert(_layer < MAXLAYERS);
@@ -701,14 +698,14 @@ int32 Screen::initialisePsxBackgroundLayer(byte *parallax) {
* can be understood by renderParallax functions.
*/
-int32 Screen::initialisePsxParallaxLayer(byte *parallax) {
+int32 Screen::initializePsxParallaxLayer(byte *parallax) {
uint16 plxXres, plxYres;
uint16 xTiles, yTiles;
uint16 i, j, k;
byte *data;
byte *dst;
- debug(2, "initialisePsxParallaxLayer");
+ debug(2, "initializePsxParallaxLayer");
assert(_layer < MAXLAYERS);
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index 36280cfda2..a0561641d7 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/resman.h b/engines/sword2/resman.h
index 75748e1568..494e64dae6 100644
--- a/engines/sword2/resman.h
+++ b/engines/sword2/resman.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_RESMAN_H
diff --git a/engines/sword2/router.cpp b/engines/sword2/router.cpp
index c2b4d2e67f..d3f274dd2c 100644
--- a/engines/sword2/router.cpp
+++ b/engines/sword2/router.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
@@ -323,7 +320,7 @@ int32 Router::getRoute() {
// of a line
// scan through the nodes linking each node to its nearest
- // neighbour until no more nodes change
+ // neighbor until no more nodes change
// This is the routine that finds a route using scan()
diff --git a/engines/sword2/router.h b/engines/sword2/router.h
index 1ad3dd74c4..7196ea8df4 100644
--- a/engines/sword2/router.h
+++ b/engines/sword2/router.h
@@ -20,16 +20,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_ROUTER_H
#define SWORD2_ROUTER_H
// This used to be a variable, but it was never set. Actually, it wasn't even
-// initialised!
+// initialized!
//
// Define this to force the use of slidy router (so solid path not used when
// ending walk in ANY direction)
diff --git a/engines/sword2/saveload.cpp b/engines/sword2/saveload.cpp
index 94ef8975b4..870170e378 100644
--- a/engines/sword2/saveload.cpp
+++ b/engines/sword2/saveload.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// ---------------------------------------------------------------------------
diff --git a/engines/sword2/saveload.h b/engines/sword2/saveload.h
index ceaa9712a4..f74b7ba493 100644
--- a/engines/sword2/saveload.h
+++ b/engines/sword2/saveload.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_SAVELOAD_H
diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp
index a83e581fd4..0cb951fdfc 100644
--- a/engines/sword2/screen.cpp
+++ b/engines/sword2/screen.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// ---------------------------------------------------------------------------
@@ -64,11 +61,11 @@ Screen::Screen(Sword2Engine *vm, int16 width, int16 height) {
_dirtyGrid = (byte *)calloc(_gridWide, _gridDeep);
if (!_dirtyGrid)
- error("Could not initialise dirty grid");
+ error("Could not initialize dirty grid");
_buffer = (byte *)malloc(width * height);
if (!_buffer)
- error("Could not initialise display");
+ error("Could not initialize display");
for (int i = 0; i < ARRAYSIZE(_blockSurfaces); i++)
_blockSurfaces[i] = NULL;
@@ -1228,11 +1225,11 @@ void Screen::rollCredits() {
void Screen::splashScreen() {
byte *bgfile = _vm->_resman->openResource(2950);
- initialiseBackgroundLayer(NULL);
- initialiseBackgroundLayer(NULL);
- initialiseBackgroundLayer(_vm->fetchBackgroundLayer(bgfile));
- initialiseBackgroundLayer(NULL);
- initialiseBackgroundLayer(NULL);
+ initializeBackgroundLayer(NULL);
+ initializeBackgroundLayer(NULL);
+ initializeBackgroundLayer(_vm->fetchBackgroundLayer(bgfile));
+ initializeBackgroundLayer(NULL);
+ initializeBackgroundLayer(NULL);
_vm->fetchPalette(bgfile, _palette);
setPalette(0, 256, _palette, RDPAL_FADE);
diff --git a/engines/sword2/screen.h b/engines/sword2/screen.h
index 9ef4f28049..11e323d0a7 100644
--- a/engines/sword2/screen.h
+++ b/engines/sword2/screen.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_SCREEN_H
@@ -393,12 +390,12 @@ public:
void resetRenderLists();
void setLocationMetrics(uint16 w, uint16 h);
- int32 initialiseBackgroundLayer(byte *parallax);
- int32 initialisePsxParallaxLayer(byte *parallax); // These are used to initialize psx backgrounds and
- int32 initialisePsxBackgroundLayer(byte *parallax); // parallaxes, which are different from pc counterparts.
+ int32 initializeBackgroundLayer(byte *parallax);
+ int32 initializePsxParallaxLayer(byte *parallax); // These are used to initialize psx backgrounds and
+ int32 initializePsxBackgroundLayer(byte *parallax); // parallaxes, which are different from pc counterparts.
void closeBackgroundLayer();
- void initialiseRenderCycle();
+ void initializeRenderCycle();
void initBackground(int32 res, int32 new_palette);
void initPsxBackground(int32 res, int32 new_palette);
diff --git a/engines/sword2/scroll.cpp b/engines/sword2/scroll.cpp
index 11ba546cf3..cc864eb493 100644
--- a/engines/sword2/scroll.cpp
+++ b/engines/sword2/scroll.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index 3cf8523113..19e244e61c 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// ---------------------------------------------------------------------------
diff --git a/engines/sword2/sound.h b/engines/sword2/sound.h
index c37e006b76..9a59ef27a8 100644
--- a/engines/sword2/sound.h
+++ b/engines/sword2/sound.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
/*****************************************************************************
diff --git a/engines/sword2/speech.cpp b/engines/sword2/speech.cpp
index ec8e198377..cdc86a1e39 100644
--- a/engines/sword2/speech.cpp
+++ b/engines/sword2/speech.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp
index 9a25812178..8d260947f1 100644
--- a/engines/sword2/sprite.cpp
+++ b/engines/sword2/sprite.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/endian.h"
diff --git a/engines/sword2/startup.cpp b/engines/sword2/startup.cpp
index ea1751eb5f..b39141fe32 100644
--- a/engines/sword2/startup.cpp
+++ b/engines/sword2/startup.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 58f3547ff7..62a391923d 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "base/plugins.h"
@@ -31,7 +28,6 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/savefile.h"
#include "common/system.h"
#include "common/textconsole.h"
@@ -80,7 +76,7 @@ static const GameSettings sword2_settings[] = {
class Sword2MetaEngine : public MetaEngine {
public:
virtual const char *getName() const {
- return "Broken Sword II";
+ return "Sword2";
}
virtual const char *getOriginalCopyright() const {
return "Broken Sword Games (C) Revolution";
@@ -255,7 +251,7 @@ Common::Error Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine) c
namespace Sword2 {
-Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
+Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst), _rnd("sword2") {
// Add default file directories
const Common::FSNode gameDataDir(ConfMan.get("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "clusters");
@@ -295,8 +291,6 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
_gameSpeed = 1;
_gmmLoadSlot = -1; // Used to manage GMM Loading
-
- g_eventRec.registerRandomSource(_rnd, "sword2");
}
Sword2Engine::~Sword2Engine() {
@@ -431,7 +425,7 @@ Common::Error Sword2Engine::run() {
setInputEventFilter(RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP | RD_WHEELUP | RD_WHEELDOWN);
setupPersistentResources();
- initialiseFontResourceFlags();
+ initializeFontResourceFlags();
if (_features & GF_DEMO)
_logic->writeVar(DEMO, 1);
@@ -469,7 +463,7 @@ Common::Error Sword2Engine::run() {
} else
startGame();
- _screen->initialiseRenderCycle();
+ _screen->initializeRenderCycle();
while (1) {
_debugger->onFrame();
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index e741c51ce1..e4c9dcca3c 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef SWORD2_H
@@ -236,8 +233,8 @@ public:
void sleepUntil(uint32 time);
- void initialiseFontResourceFlags();
- void initialiseFontResourceFlags(uint8 language);
+ void initializeFontResourceFlags();
+ void initializeFontResourceFlags(uint8 language);
bool initStartMenu();
void registerStartPoint(int32 key, char *name);
diff --git a/engines/sword2/sync.cpp b/engines/sword2/sync.cpp
index ee4c6b2238..12e3c35698 100644
--- a/engines/sword2/sync.cpp
+++ b/engines/sword2/sync.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/sword2/walker.cpp b/engines/sword2/walker.cpp
index 7971299818..89ee6e18cc 100644
--- a/engines/sword2/walker.cpp
+++ b/engines/sword2/walker.cpp
@@ -20,9 +20,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// WALKER.CPP by James (14nov96)
diff --git a/engines/sword25/console.cpp b/engines/sword25/console.cpp
index 902d9a5b72..5d15f189ab 100644
--- a/engines/sword25/console.cpp
+++ b/engines/sword25/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "sword25/console.h"
diff --git a/engines/sword25/console.h b/engines/sword25/console.h
index dcf8082d3c..9e2516ccf0 100644
--- a/engines/sword25/console.h
+++ b/engines/sword25/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD25_CONSOLE_H
diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index fe24675f8a..edb8c30545 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -18,15 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "sword25/sword25.h"
+#include "sword25/detection_tables.h"
#include "sword25/kernel/persistenceservice.h"
namespace Sword25 {
@@ -38,38 +36,6 @@ static const PlainGameDescriptor Sword25Game[] = {
{0, 0}
};
-namespace Sword25 {
-
-// TODO: Need to decide whether we're going to implement code to detect all the various languages allowed,
-// both by the core data package, as well as the extra languages added by the patch file; also, I don't
-// think that all the languages supported by the game currently have constants in ScummVM
-static const ADGameDescription gameDescriptions[] = {
- {
- "sword25",
- "",
- AD_ENTRY1s("data.b25c", "f8b6e03ada2d2f6cf27fbc11ad1572e9", 654310588),
- Common::EN_ANY,
- Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
- },
- {
- "sword25",
- "Extracted",
- {{"_includes.lua", 0, 0, -1},
- {"boot.lua", 0, 0, -1},
- {"kernel.lua", 0, 0, -1},
- AD_LISTEND},
- Common::EN_ANY,
- Common::kPlatformUnknown,
- GF_EXTRACTED,
- Common::GUIO_NONE
- },
- AD_TABLE_END_MARKER
-};
-
-} // End of namespace Sword25
-
static const char *directoryGlobs[] = {
"system", // Used by extracted dats
0
@@ -105,7 +71,7 @@ public:
Sword25MetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "The Broken Sword 2.5 Engine";
+ return "Sword25";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/sword25/detection_tables.h b/engines/sword25/detection_tables.h
new file mode 100644
index 0000000000..ca586b4f01
--- /dev/null
+++ b/engines/sword25/detection_tables.h
@@ -0,0 +1,129 @@
+/* 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.
+ *
+ */
+
+namespace Sword25 {
+
+using Common::GUIO_NONE;
+using Common::GUIO_NOSPEECH;
+using Common::GUIO_NOSFX;
+using Common::GUIO_NOMUSIC;
+
+static const ADGameDescription gameDescriptions[] = {
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("data.b25c", "f8b6e03ada2d2f6cf27fbc11ad1572e9", 654310588),
+ Common::EN_ANY,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_fr.b25c", "690caf157387e06d2c3d1ca53c43f428", 1006043),
+ Common::FR_FRA,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("data.b25c", "f8b6e03ada2d2f6cf27fbc11ad1572e9", 654310588),
+ Common::DE_DEU,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_hr.b25c", "e881054d1f8ec1e527422fc521c25405", 1273217),
+ Common::HU_HUN,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_it.b25c", "f3325666da0515cc2b42062e953c0889", 996197),
+ Common::IT_ITA,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_pl.b25c", "49dc1a20f95391a808e475c49be2bac0", 1281799),
+ Common::PL_POL,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_pt.b25c", "1df701432f9e13dcefe1adeb890b9c69", 993812),
+ Common::PT_BRA,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_ru.b25c", "deb33dd2f90a71ff60181918a8ce5063", 1235378),
+ Common::RU_RUS,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ {
+ "sword25",
+ "",
+ AD_ENTRY1s("lang_es.b25c", "384c19072d83725f351bb9ecb4d3f02b", 987965),
+ Common::ES_ESP,
+ Common::kPlatformUnknown,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+
+ // Extracted version
+ {
+ "sword25",
+ "Extracted",
+ {{"_includes.lua", 0, 0, -1},
+ {"boot.lua", 0, 0, -1},
+ {"kernel.lua", 0, 0, -1},
+ AD_LISTEND},
+ Common::EN_ANY,
+ Common::kPlatformUnknown,
+ GF_EXTRACTED,
+ Common::GUIO_NONE
+ },
+ AD_TABLE_END_MARKER
+};
+
+} // End of namespace Sword25
diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp
index 975f08be22..d0ad41de22 100644
--- a/engines/sword25/fmv/movieplayer.cpp
+++ b/engines/sword25/fmv/movieplayer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -49,7 +46,7 @@ namespace Sword25 {
#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */
#ifdef USE_THEORADEC
-MoviePlayer::MoviePlayer(Kernel *pKernel) : Service(pKernel), _decoder(g_system->getMixer()) {
+MoviePlayer::MoviePlayer(Kernel *pKernel) : Service(pKernel), _decoder() {
if (!registerScriptBindings())
error("Script bindings could not be registered.");
else
@@ -122,21 +119,23 @@ bool MoviePlayer::pause() {
void MoviePlayer::update() {
if (_decoder.isVideoLoaded()) {
- const Graphics::Surface *s = _decoder.decodeNextFrame();
- if (s) {
- // Transfer the next frame
- assert(s->format.bytesPerPixel == 4);
+ if (_decoder.endOfVideo()) {
+ // Movie complete, so unload the movie
+ unloadMovie();
+ } else {
+ const Graphics::Surface *s = _decoder.decodeNextFrame();
+ if (s) {
+ // Transfer the next frame
+ assert(s->format.bytesPerPixel == 4);
#ifdef THEORA_INDIRECT_RENDERING
- byte *frameData = (byte *)s->getBasePtr(0, 0);
- _outputBitmap->setContent(frameData, s->pitch * s->h, 0, s->pitch);
+ byte *frameData = (byte *)s->getBasePtr(0, 0);
+ _outputBitmap->setContent(frameData, s->pitch * s->h, 0, s->pitch);
#else
- g_system->copyRectToScreen((byte *)s->getBasePtr(0, 0), s->pitch, _outX, _outY, MIN(s->w, _backSurface->w), MIN(s->h, _backSurface->h));
- g_system->updateScreen();
+ g_system->copyRectToScreen((byte *)s->getBasePtr(0, 0), s->pitch, _outX, _outY, MIN(s->w, _backSurface->w), MIN(s->h, _backSurface->h));
+ g_system->updateScreen();
#endif
- } else {
- // Movie complete, so unload the movie
- unloadMovie();
+ }
}
}
}
@@ -146,7 +145,7 @@ bool MoviePlayer::isMovieLoaded() {
}
bool MoviePlayer::isPaused() {
- return _decoder.isPaused();
+ return _decoder.isPaused() || _decoder.endOfVideo();
}
float MoviePlayer::getScaleFactor() {
diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h
index df0792c8a8..1d256e56ba 100644
--- a/engines/sword25/fmv/movieplayer.h
+++ b/engines/sword25/fmv/movieplayer.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/fmv/movieplayer_script.cpp b/engines/sword25/fmv/movieplayer_script.cpp
index dce9048438..8359059b85 100644
--- a/engines/sword25/fmv/movieplayer_script.cpp
+++ b/engines/sword25/fmv/movieplayer_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp
index 86236fbd21..be6d940d23 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/engines/sword25/fmv/theora_decoder.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -42,7 +39,8 @@
#ifdef USE_THEORADEC
#include "common/system.h"
#include "common/textconsole.h"
-#include "graphics/conversion.h"
+#include "common/util.h"
+#include "graphics/yuv_to_rgb.h"
#include "audio/decoders/raw.h"
#include "sword25/kernel/common.h"
@@ -54,15 +52,14 @@ static double rint(double v) {
return floor(v + 0.5);
}
-TheoraDecoder::TheoraDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : _mixer(mixer) {
+TheoraDecoder::TheoraDecoder(Audio::Mixer::SoundType soundType) {
_fileStream = 0;
- _surface = 0;
_theoraPacket = 0;
_vorbisPacket = 0;
_theoraDecode = 0;
_theoraSetup = 0;
- _stateFlag = false;
+ _nextFrameStartTime = 0.0;
_soundType = soundType;
_audStream = 0;
@@ -70,7 +67,7 @@ TheoraDecoder::TheoraDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundT
ogg_sync_init(&_oggSync);
- _curFrame = 0;
+ _curFrame = -1;
_audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t));
reset();
@@ -103,6 +100,8 @@ int TheoraDecoder::bufferData() {
bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
close();
+ _endOfAudio = false;
+ _endOfVideo = false;
_fileStream = stream;
// start up Ogg stream synchronization layer
@@ -118,7 +117,8 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
// Ogg file open; parse the headers
// Only interested in Vorbis/Theora streams
- while (!_stateFlag) {
+ bool foundHeader = false;
+ while (!foundHeader) {
int ret = bufferData();
if (ret == 0)
@@ -131,7 +131,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
if (!ogg_page_bos(&_oggPage)) {
// don't leak the page; get it into the appropriate stream
queuePage(&_oggPage);
- _stateFlag = true;
+ foundHeader = true;
break;
}
@@ -275,22 +275,39 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
vorbis_block_init(&_vorbisDSP, &_vorbisBlock);
debug(3, "Ogg logical stream %lx is Vorbis %d channel %ld Hz audio.",
_vorbisOut.serialno, _vorbisInfo.channels, _vorbisInfo.rate);
+
+ _audStream = Audio::makeQueuingAudioStream(_vorbisInfo.rate, _vorbisInfo.channels);
+
+ // Get enough audio data to start us off
+ while (_audStream->numQueuedStreams() == 0) {
+ // Queue more data
+ bufferData();
+ while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0)
+ queuePage(&_oggPage);
+
+ queueAudio();
+ }
+
+ if (_audStream)
+ g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream);
} else {
// tear down the partial vorbis setup
vorbis_info_clear(&_vorbisInfo);
vorbis_comment_clear(&_vorbisComment);
+ _endOfAudio = true;
}
- // open audio
- if (_vorbisPacket) {
- _audStream = createAudioStream();
- if (_audStream && _mixer)
- _mixer->playStream(_soundType, _audHandle, _audStream);
- }
+ _surface.create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat());
- _surface = new Graphics::Surface();
+ // Set up a display surface
+ _displaySurface.pixels = _surface.getBasePtr(_theoraInfo.pic_x, _theoraInfo.pic_y);
+ _displaySurface.w = _theoraInfo.pic_width;
+ _displaySurface.h = _theoraInfo.pic_height;
+ _displaySurface.format = _surface.format;
+ _displaySurface.pitch = _surface.pitch;
- _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat());
+ // Set the frame rate
+ _frameRate = Common::Rational(_theoraInfo.fps_numerator, _theoraInfo.fps_denominator);
return true;
}
@@ -303,8 +320,8 @@ void TheoraDecoder::close() {
vorbis_comment_clear(&_vorbisComment);
vorbis_info_clear(&_vorbisInfo);
- if (_mixer)
- _mixer->stopHandle(*_audHandle);
+ g_system->getMixer()->stopHandle(*_audHandle);
+
_audStream = 0;
_vorbisPacket = false;
}
@@ -325,57 +342,16 @@ void TheoraDecoder::close() {
delete _fileStream;
_fileStream = 0;
- _surface->free();
- delete _surface;
- _surface = 0;
+ _surface.free();
+ _displaySurface.pixels = 0;
+ _displaySurface.free();
reset();
}
const Graphics::Surface *TheoraDecoder::decodeNextFrame() {
- int i, j;
-
- // we want a video and audio frame ready to go at all times. If
- // we have to buffer incoming, buffer the compressed data (ie, let
- // ogg do the buffering)
- while (_vorbisPacket && !_audiobufReady) {
- int ret;
- float **pcm;
-
- // if there's pending, decoded audio, grab it
- if ((ret = vorbis_synthesis_pcmout(&_vorbisDSP, &pcm)) > 0) {
- int count = _audiobufFill / 2;
- int maxsamples = ((AUDIOFD_FRAGSIZE - _audiobufFill) / _vorbisInfo.channels) >> 1;
- for (i = 0; i < ret && i < maxsamples; i++)
- for (j = 0; j < _vorbisInfo.channels; j++) {
- int val = CLIP((int)rint(pcm[j][i] * 32767.f), -32768, 32767);
- _audiobuf[count++] = val;
- }
-
- vorbis_synthesis_read(&_vorbisDSP, i);
- _audiobufFill += (i * _vorbisInfo.channels) << 1;
-
- if (_audiobufFill == AUDIOFD_FRAGSIZE)
- _audiobufReady = true;
-
-#if ENABLE_THEORA_SEEKING
- if (_vorbisDSP.granulepos >= 0)
- _audiobufGranulePos = _vorbisDSP.granulepos - ret + i;
- else
- _audiobufGranulePos += i;
-#endif
- } else {
-
- // no pending audio; is there a pending packet to decode?
- if (ogg_stream_packetout(&_vorbisOut, &_oggPacket) > 0) {
- if (vorbis_synthesis(&_vorbisBlock, &_oggPacket) == 0) // test for success!
- vorbis_synthesis_blockin(&_vorbisDSP, &_vorbisBlock);
- } else // we need more data; break out to suck in another page
- break;
- }
- }
-
- while (_theoraPacket && !_videobufReady) {
+ // First, let's get our frame
+ while (_theoraPacket) {
// theora is one in, one out...
if (ogg_stream_packetout(&_theoraOut, &_oggPacket) > 0) {
@@ -385,85 +361,124 @@ const Graphics::Surface *TheoraDecoder::decodeNextFrame() {
_ppInc = 0;
}
-#if ENABLE_THEORA_SEEKING
- // HACK: This should be set after a seek or a gap, but we might not have
- // a granulepos for the first packet (we only have them for the last
- // packet on a page), so we just set it as often as we get it.
- // To do this right, we should back-track from the last packet on the
- // page and compute the correct granulepos for the first packet after
- // a seek or a gap.
- if (_oggPacket.granulepos >= 0) {
- th_decode_ctl(_theoraDecode, TH_DECCTL_SET_GRANPOS, &_oggPacket.granulepos, sizeof(_oggPacket.granulepos));
- }
-
- if (th_decode_packetin(_theoraDecode, &_oggPacket, &_videobufGranulePos) == 0) {
- _videobufTime = th_granule_time(_theoraDecode, _videobufGranulePos);
-#else
if (th_decode_packetin(_theoraDecode, &_oggPacket, NULL) == 0) {
-#endif
_curFrame++;
- _videobufReady = true;
+
+ // Convert YUV data to RGB data
+ th_ycbcr_buffer yuv;
+ th_decode_ycbcr_out(_theoraDecode, yuv);
+ translateYUVtoRGBA(yuv);
+
+ if (_curFrame == 0)
+ _startTime = g_system->getMillis();
+
+ double time = th_granule_time(_theoraDecode, _oggPacket.granulepos);
+
+ // We need to calculate when the next frame should be shown
+ // This is all in floating point because that's what the Ogg code gives us
+ // Ogg is a lossy container format, so it doesn't always list the time to the
+ // next frame. In such cases, we need to calculate it ourselves.
+ if (time == -1.0)
+ _nextFrameStartTime += _frameRate.getInverse().toDouble();
+ else
+ _nextFrameStartTime = time;
+
+ // break out
+ break;
}
- } else
- break;
- }
+ } else {
+ // If we can't get any more frames, we're done.
+ if (_theoraOut.e_o_s || _fileStream->eos()) {
+ _endOfVideo = true;
+ break;
+ }
+
+ // Queue more data
+ bufferData();
+ while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0)
+ queuePage(&_oggPage);
+ }
- if (!_videobufReady && !_audiobufReady && _fileStream->eos()) {
- return NULL;
+ // Update audio if we can
+ queueAudio();
}
- if (!_videobufReady || !_audiobufReady) {
- // no data yet for somebody. Grab another page
+ // Force at least some audio to be buffered
+ // TODO: 5 is very arbitrary. We probably should do something like QuickTime does.
+ while (!_endOfAudio && _audStream->numQueuedStreams() < 5) {
bufferData();
- while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) {
+ while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0)
queuePage(&_oggPage);
+
+ bool queuedAudio = queueAudio();
+ if ((_vorbisOut.e_o_s || _fileStream->eos()) && !queuedAudio) {
+ _endOfAudio = true;
+ break;
}
}
- // If playback has begun, top audio buffer off immediately.
- if (_stateFlag && _audiobufReady) {
- _audStream->queueBuffer((byte *)_audiobuf, AUDIOFD_FRAGSIZE, DisposeAfterUse::NO, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO);
+ return &_displaySurface;
+}
- // The audio mixer is now responsible for the old audio buffer.
- // We need to create a new one.
- _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t));
- _audiobufFill = 0;
- _audiobufReady = false;
- }
+bool TheoraDecoder::queueAudio() {
+ if (!_audStream)
+ return false;
- // are we at or past time for this video frame?
- if (_stateFlag && _videobufReady) {
- th_ycbcr_buffer yuv;
+ bool queuedAudio = false;
- th_decode_ycbcr_out(_theoraDecode, yuv);
+ for (;;) {
+ float **pcm;
- // Convert YUV data to RGB data
- translateYUVtoRGBA(yuv, (byte *)_surface->getBasePtr(0, 0));
-
- _videobufReady = false;
- }
+ // if there's pending, decoded audio, grab it
+ int ret = vorbis_synthesis_pcmout(&_vorbisDSP, &pcm);
+ if (ret > 0) {
+ int count = _audiobufFill / 2;
+ int maxsamples = ((AUDIOFD_FRAGSIZE - _audiobufFill) / _vorbisInfo.channels) >> 1;
+ int i;
+ for (i = 0; i < ret && i < maxsamples; i++)
+ for (int j = 0; j < _vorbisInfo.channels; j++) {
+ int val = CLIP((int)rint(pcm[j][i] * 32767.f), -32768, 32767);
+ _audiobuf[count++] = val;
+ }
- // if our buffers either don't exist or are ready to go,
- // we can begin playback
- if ((!_theoraPacket || _videobufReady) &&
- (!_vorbisPacket || _audiobufReady))
- _stateFlag = true;
+ vorbis_synthesis_read(&_vorbisDSP, i);
+ _audiobufFill += (i * _vorbisInfo.channels) << 1;
- // same if we've run out of input
- if (_fileStream->eos())
- _stateFlag = true;
+ if (_audiobufFill == AUDIOFD_FRAGSIZE) {
+ byte flags = Audio::FLAG_16BITS | Audio::FLAG_STEREO;
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= Audio::FLAG_LITTLE_ENDIAN;
+#endif
+ _audStream->queueBuffer((byte *)_audiobuf, AUDIOFD_FRAGSIZE, DisposeAfterUse::NO, flags);
- return _surface;
+ // The audio mixer is now responsible for the old audio buffer.
+ // We need to create a new one.
+ _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t));
+ _audiobufFill = 0;
+ queuedAudio = true;
+ }
+ } else {
+ // no pending audio; is there a pending packet to decode?
+ if (ogg_stream_packetout(&_vorbisOut, &_oggPacket) > 0) {
+ if (vorbis_synthesis(&_vorbisBlock, &_oggPacket) == 0) // test for success!
+ vorbis_synthesis_blockin(&_vorbisDSP, &_vorbisBlock);
+ } else // we've buffered all we have, break out for now
+ return queuedAudio;
+ }
+ }
+
+ // Unreachable
+ return false;
}
void TheoraDecoder::reset() {
- FixedRateVideoDecoder::reset();
+ VideoDecoder::reset();
+
+ // FIXME: This does a rewind() instead of a reset()!
if (_fileStream)
_fileStream->seek(0);
- _videobufReady = false;
-
#if ENABLE_THEORA_SEEKING
_videobufGranulePos = -1;
_audiobufGranulePos = 0;
@@ -473,36 +488,39 @@ void TheoraDecoder::reset() {
_audiobufFill = 0;
_audiobufReady = false;
- _curFrame = 0;
+ _curFrame = -1;
_theoraPacket = 0;
_vorbisPacket = 0;
- _stateFlag = false;
}
bool TheoraDecoder::endOfVideo() const {
- return !isVideoLoaded();
+ return !isVideoLoaded() || (_endOfVideo && (!_audStream || (_audStream->endOfData() && _endOfAudio)));
}
+uint32 TheoraDecoder::getTimeToNextFrame() const {
+ if (endOfVideo() || _curFrame < 0)
+ return 0;
-uint32 TheoraDecoder::getElapsedTime() const {
- if (_audStream && _mixer)
- return _mixer->getSoundElapsedTime(*_audHandle);
+ uint32 elapsedTime = getElapsedTime();
+ uint32 nextFrameStartTime = (uint32)(_nextFrameStartTime * 1000);
+
+ if (nextFrameStartTime <= elapsedTime)
+ return 0;
- return FixedRateVideoDecoder::getElapsedTime();
+ return nextFrameStartTime - elapsedTime;
}
-Audio::QueuingAudioStream *TheoraDecoder::createAudioStream() {
- return Audio::makeQueuingAudioStream(_vorbisInfo.rate, _vorbisInfo.channels);
+uint32 TheoraDecoder::getElapsedTime() const {
+ if (_audStream)
+ return g_system->getMixer()->getSoundElapsedTime(*_audHandle);
+
+ return VideoDecoder::getElapsedTime();
}
-static void convertYUVtoBGRA(int y, int u, int v, byte *dst) {
- byte r, g, b;
- Graphics::YUV2RGB(y, u, v, r, g, b);
- *(dst + 0) = b;
- *(dst + 1) = g;
- *(dst + 2) = r;
- *(dst + 3) = 0xFF;
+void TheoraDecoder::pauseVideoIntern(bool pause) {
+ if (_audStream)
+ g_system->getMixer()->pauseHandle(*_audHandle, pause);
}
enum TheoraYUVBuffers {
@@ -511,7 +529,7 @@ enum TheoraYUVBuffers {
kBufferV = 2
};
-void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer, byte *pixelData) {
+void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) {
// Width and height of all buffers have to be divisible by 2.
assert((YUVBuffer[kBufferY].width & 1) == 0);
assert((YUVBuffer[kBufferY].height & 1) == 0);
@@ -524,40 +542,7 @@ void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer, byte *pixelDa
assert(YUVBuffer[kBufferU].height == YUVBuffer[kBufferY].height >> 1);
assert(YUVBuffer[kBufferV].height == YUVBuffer[kBufferY].height >> 1);
- const byte *ySrc = YUVBuffer[kBufferY].data;
- const byte *uSrc = YUVBuffer[kBufferU].data;
- const byte *vSrc = YUVBuffer[kBufferV].data;
- byte *dst = pixelData;
- int u = 0, v = 0;
-
- const int blockSize = YUVBuffer[kBufferY].width << 2;
- const int halfHeight = YUVBuffer[kBufferY].height >> 1;
- const int halfWidth = YUVBuffer[kBufferY].width >> 1;
- const int yStep = (YUVBuffer[kBufferY].stride << 1) - YUVBuffer[kBufferY].width;
- // The UV step is usually 0, since in most cases stride == width.
- // The asserts at the top ensure that the U and V steps are equal
- // (and they must always be equal)
- const int uvStep = YUVBuffer[kBufferU].stride - YUVBuffer[kBufferU].width;
- const int stride = YUVBuffer[kBufferY].stride;
-
- for (int h = 0; h < halfHeight; ++h) {
- for (int w = 0; w < halfWidth; ++w) {
- u = *uSrc++;
- v = *vSrc++;
-
- for (int i = 0; i <= 1; i++) {
- convertYUVtoBGRA(*ySrc, u, v, dst);
- convertYUVtoBGRA(*(ySrc + stride), u, v, dst + blockSize);
- ySrc++;
- dst += 4; // BGRA
- }
- }
-
- dst += blockSize;
- ySrc += yStep;
- uSrc += uvStep;
- vSrc += uvStep;
- }
+ Graphics::convertYUV420ToRGB(&_surface, YUVBuffer[kBufferY].data, YUVBuffer[kBufferU].data, YUVBuffer[kBufferV].data, YUVBuffer[kBufferY].width, YUVBuffer[kBufferY].height, YUVBuffer[kBufferY].stride, YUVBuffer[kBufferU].stride);
}
} // End of namespace Sword25
diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h
index 4ed2af5f98..e8cc5ab8b9 100644
--- a/engines/sword25/fmv/theora_decoder.h
+++ b/engines/sword25/fmv/theora_decoder.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD25_THEORADECODER_H
@@ -44,8 +41,6 @@ namespace Common {
class SeekableReadStream;
}
-//#define ENABLE_THEORA_SEEKING // enables the extra calculations used for video seeking
-
namespace Sword25 {
/**
@@ -54,9 +49,9 @@ namespace Sword25 {
* Video decoder used in engines:
* - sword25
*/
-class TheoraDecoder : public Video::FixedRateVideoDecoder {
+class TheoraDecoder : public Video::VideoDecoder {
public:
- TheoraDecoder(Audio::Mixer *mixer = 0, Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
+ TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
virtual ~TheoraDecoder();
/**
@@ -74,51 +69,40 @@ public:
*/
const Graphics::Surface *decodeNextFrame();
- bool isVideoLoaded() const {
- return _fileStream != 0;
- }
- bool isPaused() const {
- return (FixedRateVideoDecoder::isPaused() || !isVideoLoaded());
- }
+ bool isVideoLoaded() const { return _fileStream != 0; }
+ uint16 getWidth() const { return _displaySurface.w; }
+ uint16 getHeight() const { return _displaySurface.h; }
- uint16 getWidth() const {
- return _surface->w;
- }
- uint16 getHeight() const {
- return _surface->h;
- }
uint32 getFrameCount() const {
// It is not possible to get frame count easily
// I.e. seeking is required
assert(0);
return 0;
}
- Graphics::PixelFormat getPixelFormat() const {
- return Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
- }
+ Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; }
uint32 getElapsedTime() const;
+ uint32 getTimeToNextFrame() const;
bool endOfVideo() const;
protected:
- Common::Rational getFrameRate() const {
- return _frameRate;
- }
+ void pauseVideoIntern(bool pause);
private:
void queuePage(ogg_page *page);
+ bool queueAudio();
int bufferData();
- Audio::QueuingAudioStream *createAudioStream();
- void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer, byte *pixelData);
+ void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer);
-private:
Common::SeekableReadStream *_fileStream;
- Graphics::Surface *_surface;
+ Graphics::Surface _surface;
+ Graphics::Surface _displaySurface;
Common::Rational _frameRate;
- uint32 _frameCount;
+ double _nextFrameStartTime;
+ bool _endOfVideo;
+ bool _endOfAudio;
- Audio::Mixer *_mixer;
Audio::Mixer::SoundType _soundType;
Audio::SoundHandle *_audHandle;
Audio::QueuingAudioStream *_audStream;
@@ -139,25 +123,15 @@ private:
int _theoraPacket;
int _vorbisPacket;
- bool _stateFlag;
int _ppLevelMax;
int _ppLevel;
int _ppInc;
- // single frame video buffering
- bool _videobufReady;
-
// single audio fragment audio buffering
int _audiobufFill;
bool _audiobufReady;
ogg_int16_t *_audiobuf;
-
-#if ENABLE_THEORA_SEEKING
- double _videobufTime;
- ogg_int64_t _videobufGranulePos;
- ogg_int64_t _audiobufGranulePos; // time position of last sample
-#endif
};
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index 5b56d708cb..22a4dfb71b 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h
index a530c02b12..55deacd333 100644
--- a/engines/sword25/gfx/animation.h
+++ b/engines/sword25/gfx/animation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationdescription.cpp b/engines/sword25/gfx/animationdescription.cpp
index 68ba7b63a6..da0a660df9 100644
--- a/engines/sword25/gfx/animationdescription.cpp
+++ b/engines/sword25/gfx/animationdescription.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationdescription.h b/engines/sword25/gfx/animationdescription.h
index 88cbb23503..3b11686bb9 100644
--- a/engines/sword25/gfx/animationdescription.h
+++ b/engines/sword25/gfx/animationdescription.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index f9347e3dad..a9c9cf9c29 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationresource.h b/engines/sword25/gfx/animationresource.h
index 0cbaf0a507..2a1e3ce882 100644
--- a/engines/sword25/gfx/animationresource.h
+++ b/engines/sword25/gfx/animationresource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp
index 835ae09fe8..19924302b9 100644
--- a/engines/sword25/gfx/animationtemplate.cpp
+++ b/engines/sword25/gfx/animationtemplate.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationtemplate.h b/engines/sword25/gfx/animationtemplate.h
index 06be94719d..b61ecfcf54 100644
--- a/engines/sword25/gfx/animationtemplate.h
+++ b/engines/sword25/gfx/animationtemplate.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp
index c41a7cde55..43c099c89d 100644
--- a/engines/sword25/gfx/animationtemplateregistry.cpp
+++ b/engines/sword25/gfx/animationtemplateregistry.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h
index 574ccce136..d3d02b2ac8 100644
--- a/engines/sword25/gfx/animationtemplateregistry.h
+++ b/engines/sword25/gfx/animationtemplateregistry.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/bitmap.cpp b/engines/sword25/gfx/bitmap.cpp
index 9010a9c981..593a426975 100644
--- a/engines/sword25/gfx/bitmap.cpp
+++ b/engines/sword25/gfx/bitmap.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/bitmap.h b/engines/sword25/gfx/bitmap.h
index 741269c423..caa1238558 100644
--- a/engines/sword25/gfx/bitmap.h
+++ b/engines/sword25/gfx/bitmap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index 9feca82184..f1278f3885 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp
index 46c2af55d7..137d943575 100644
--- a/engines/sword25/gfx/dynamicbitmap.cpp
+++ b/engines/sword25/gfx/dynamicbitmap.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/dynamicbitmap.h b/engines/sword25/gfx/dynamicbitmap.h
index 1737bdf5fc..35ed9a9341 100644
--- a/engines/sword25/gfx/dynamicbitmap.h
+++ b/engines/sword25/gfx/dynamicbitmap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp
index 0f0496e9ab..f99987fc91 100644
--- a/engines/sword25/gfx/fontresource.cpp
+++ b/engines/sword25/gfx/fontresource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/fontresource.h b/engines/sword25/gfx/fontresource.h
index 47aa581a9e..511f485658 100644
--- a/engines/sword25/gfx/fontresource.h
+++ b/engines/sword25/gfx/fontresource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index fbaa69d09c..6b1c2bc514 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index 8d12168b62..3309763966 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -109,7 +106,7 @@ public:
// ---------
/**
- * Initialises the graphics engine and sets the screen mode. Returns
+ * Initializes the graphics engine and sets the screen mode. Returns
* true if initialisation failed.
* @note This method should be called immediately after the
* initialisation of all services.
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index d8daaab32c..b4334195a1 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp
index 69f9425a53..cd7cfb6b69 100644
--- a/engines/sword25/gfx/image/art.cpp
+++ b/engines/sword25/gfx/image/art.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/art.h b/engines/sword25/gfx/image/art.h
index fe3bbd4982..bfeb31cc30 100644
--- a/engines/sword25/gfx/image/art.h
+++ b/engines/sword25/gfx/image/art.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/image.h b/engines/sword25/gfx/image/image.h
index 7029402c4a..f1934656da 100644
--- a/engines/sword25/gfx/image/image.h
+++ b/engines/sword25/gfx/image/image.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/imgloader.cpp b/engines/sword25/gfx/image/imgloader.cpp
new file mode 100644
index 0000000000..1df0fba70c
--- /dev/null
+++ b/engines/sword25/gfx/image/imgloader.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.
+ *
+ */
+
+/*
+ * This code is based on Broken Sword 2.5 engine
+ *
+ * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer
+ *
+ * Licensed under GNU GPL v2
+ *
+ */
+
+#include "common/memstream.h"
+#include "sword25/gfx/image/image.h"
+#include "sword25/gfx/image/imgloader.h"
+#include "graphics/pixelformat.h"
+#include "graphics/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::PNG *png = new Graphics::PNG();
+ if (!png->read(fileStr)) // the fileStr pointer, and thus pFileData will be deleted after this is done
+ error("Error while reading PNG image");
+
+ Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
+ Graphics::Surface *pngSurface = png->getSurface(format);
+
+ width = pngSurface->w;
+ height = pngSurface->h;
+ uncompressedDataPtr = new byte[pngSurface->pitch * pngSurface->h];
+ memcpy(uncompressedDataPtr, (byte *)pngSurface->pixels, pngSurface->pitch * pngSurface->h);
+ pngSurface->free();
+
+ delete pngSurface;
+ delete png;
+
+ // Signal success
+ return true;
+}
+
+bool ImgLoader::decodeThumbnailImage(const byte *pFileData, uint fileSize, byte *&pUncompressedData, int &width, int &height, int &pitch) {
+ const byte *src = pFileData + 4; // skip header
+ width = READ_LE_UINT16(src); src += 2;
+ height = READ_LE_UINT16(src); src += 2;
+ src++; // version, ignored for now
+ pitch = width * 4;
+
+ uint32 totalSize = pitch * height;
+ pUncompressedData = new byte[totalSize];
+ uint32 *dst = (uint32 *)pUncompressedData; // treat as uint32, for pixelformat output
+ const Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
+ byte r, g, b;
+
+ for (uint32 i = 0; i < totalSize / 4; i++) {
+ r = *src++;
+ g = *src++;
+ b = *src++;
+ *dst++ = format.RGBToColor(r, g, b);
+ }
+
+ return true;
+}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/pngloader.h b/engines/sword25/gfx/image/imgloader.h
index fea6ece0e9..735ab9203c 100644
--- a/engines/sword25/gfx/image/pngloader.h
+++ b/engines/sword25/gfx/image/imgloader.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -32,30 +29,22 @@
*
*/
-#ifndef SWORD25_PNGLOADER2_H
-#define SWORD25_PNGLOADER2_H
+#ifndef SWORD25_IMGLOADER_H
+#define SWORD25_IMGLOADER_H
#include "sword25/kernel/common.h"
#include "sword25/gfx/graphicengine.h"
namespace Sword25 {
-// Define to use ScummVM's PNG decoder, instead of libpng
-#define USE_INTERNAL_PNG_DECODER
-
/**
* Class for loading PNG files, and PNG data embedded into savegames.
*
* Originally written by Malte Thiesen.
*/
-class PNGLoader {
+class ImgLoader {
protected:
- PNGLoader() {} // Protected constructor to prevent instances
-
- static bool doDecodeImage(const byte *fileDataPtr, uint fileSize, byte *&uncompressedDataPtr, int &width, int &height, int &pitch);
-#ifndef USE_INTERNAL_PNG_DECODER
- static bool doImageProperties(const byte *fileDataPtr, uint fileSize, int &width, int &height);
-#endif
+ ImgLoader() {} // Protected constructor to prevent instances
public:
@@ -73,28 +62,15 @@ public:
* @remark This function does not free the image buffer passed to it,
* it is the callers responsibility to do so.
*/
- static bool decodeImage(const byte *pFileData, uint fileSize,
+ static bool decodePNGImage(const byte *pFileData, uint fileSize,
byte *&pUncompressedData,
int &width, int &height,
int &pitch);
-#ifndef USE_INTERNAL_PNG_DECODER
- /**
- * Extract the properties of an image.
- * @param[in] fileDatePtr pointer to the image data
- * @param[in] fileSize size of the image data in bytes
- * @param[out] width if successful, this is set to the width of the image
- * @param[out] height if successful, this is set to the height of the image
- * @return returns true if extraction of the properties was successful, false in case of an error
- *
- * @remark This function does not free the image buffer passed to it,
- * it is the callers responsibility to do so.
- */
- static bool imageProperties(const byte *fileDatePtr, uint fileSize,
- int &width,
- int &height);
-#endif
-
+ static bool decodeThumbnailImage(const byte *pFileData, uint fileSize,
+ byte *&pUncompressedData,
+ int &width, int &height,
+ int &pitch);
};
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/pngloader.cpp b/engines/sword25/gfx/image/pngloader.cpp
deleted file mode 100644
index d3c119b1a0..0000000000
--- a/engines/sword25/gfx/image/pngloader.cpp
+++ /dev/null
@@ -1,295 +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.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * This code is based on Broken Sword 2.5 engine
- *
- * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer
- *
- * Licensed under GNU GPL v2
- *
- */
-
-#ifndef USE_INTERNAL_PNG_DECODER
-// Disable symbol overrides so that we can use png.h
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-#endif
-
-#include "common/memstream.h"
-#include "sword25/gfx/image/image.h"
-#include "sword25/gfx/image/pngloader.h"
-#ifndef USE_INTERNAL_PNG_DECODER
-#include <png.h>
-#else
-#include "graphics/pixelformat.h"
-#include "graphics/png.h"
-#endif
-
-namespace Sword25 {
-
-/**
- * Load a NULL-terminated string from the given stream.
- */
-static Common::String loadString(Common::ReadStream &in, uint maxSize = 999) {
- Common::String result;
-
- while (!in.eos() && (result.size() < maxSize)) {
- char ch = (char)in.readByte();
- if (ch == '\0')
- break;
-
- result += ch;
- }
-
- return result;
-}
-
-/**
- * Check if the given data is a savegame, and if so, locate the
- * offset to the image data.
- * @return offset to image data if fileDataPtr contains a savegame; 0 otherwise
- */
-static uint findEmbeddedPNG(const byte *fileDataPtr, uint fileSize) {
- if (fileSize < 100)
- return 0;
- if (memcmp(fileDataPtr, "BS25SAVEGAME", 12))
- return 0;
-
- // Read in the header
- Common::MemoryReadStream stream(fileDataPtr, fileSize);
- stream.seek(0, SEEK_SET);
-
- // Read header information of savegame
- uint compressedGamedataSize;
- loadString(stream); // Marker
- loadString(stream); // Version
- loadString(stream); // Description
- Common::String gameSize = loadString(stream);
- compressedGamedataSize = atoi(gameSize.c_str());
- loadString(stream);
-
- // Return the offset of where the thumbnail starts
- return static_cast<uint>(stream.pos() + compressedGamedataSize);
-}
-
-#ifndef USE_INTERNAL_PNG_DECODER
-static void png_user_read_data(png_structp png_ptr, png_bytep data, png_size_t length) {
- const byte **ref = (const byte **)png_get_io_ptr(png_ptr);
- memcpy(data, *ref, length);
- *ref += length;
-}
-
-static bool doIsCorrectImageFormat(const byte *fileDataPtr, uint fileSize) {
- return (fileSize > 8) && png_check_sig(const_cast<byte *>(fileDataPtr), 8);
-}
-#endif
-
-bool PNGLoader::doDecodeImage(const byte *fileDataPtr, uint fileSize, byte *&uncompressedDataPtr, int &width, int &height, int &pitch) {
-#ifndef USE_INTERNAL_PNG_DECODER
- png_structp png_ptr = NULL;
- png_infop info_ptr = NULL;
-
- int bitDepth;
- int colorType;
- int interlaceType;
- int i;
-
- // Check for valid PNG signature
- if (!doIsCorrectImageFormat(fileDataPtr, fileSize)) {
- error("png_check_sig failed");
- }
-
- // Create both PNG structures
- png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- if (!png_ptr) {
- error("Could not create libpng read struct.");
- }
-
- info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr) {
- error("Could not create libpng info struct.");
- }
-
- // Use alternative reading function
- const byte **ref = &fileDataPtr;
- png_set_read_fn(png_ptr, (void *)ref, png_user_read_data);
-
- // Read PNG header
- png_read_info(png_ptr, info_ptr);
-
- // Read out PNG informations
-
- png_uint_32 w, h;
- png_get_IHDR(png_ptr, info_ptr, &w, &h, &bitDepth, &colorType, &interlaceType, NULL, NULL);
- width = w;
- height = h;
-
- // Calculate pitch of output image
- pitch = GraphicEngine::calcPitch(GraphicEngine::CF_ARGB32, width);
-
- // Allocate memory for the final image data.
- // To keep memory framentation low this happens before allocating memory for temporary image data.
- uncompressedDataPtr = new byte[pitch * height];
- if (!uncompressedDataPtr) {
- error("Could not allocate memory for output image.");
- }
-
- // Images of all color formates will be transformed into ARGB images
- if (bitDepth == 16)
- png_set_strip_16(png_ptr);
- if (colorType == PNG_COLOR_TYPE_PALETTE)
- png_set_expand(png_ptr);
- if (bitDepth < 8)
- png_set_expand(png_ptr);
- if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
- png_set_expand(png_ptr);
- if (colorType == PNG_COLOR_TYPE_GRAY ||
- colorType == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png_ptr);
-
- png_set_bgr(png_ptr);
-
- if (colorType != PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
-
- // After the transformations have been registered, the image data is read again.
- png_read_update_info(png_ptr, info_ptr);
- png_get_IHDR(png_ptr, info_ptr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL);
- width = w;
- height = h;
-
- if (interlaceType == PNG_INTERLACE_NONE) {
- // PNGs without interlacing can simply be read row by row.
- for (i = 0; i < height; i++) {
- png_read_row(png_ptr, uncompressedDataPtr + i * pitch, NULL);
- }
- } else {
- // PNGs with interlacing require us to allocate an auxillary
- // buffer with pointers to all row starts.
-
- // Allocate row pointer buffer
- png_bytep *pRowPtr = new png_bytep[height];
- if (!pRowPtr) {
- error("Could not allocate memory for row pointers.");
- }
-
- // Initialize row pointers
- for (i = 0; i < height; i++)
- pRowPtr[i] = uncompressedDataPtr + i * pitch;
-
- // Read image data
- png_read_image(png_ptr, pRowPtr);
-
- // Free row pointer buffer
- delete[] pRowPtr;
- }
-
- // Read additional data at the end.
- png_read_end(png_ptr, NULL);
-
- // Destroy libpng structures
- png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-#else
- Common::MemoryReadStream *fileStr = new Common::MemoryReadStream(fileDataPtr, fileSize, DisposeAfterUse::NO);
- Graphics::PNG *png = new Graphics::PNG();
- if (!png->read(fileStr)) // the fileStr pointer, and thus pFileData will be deleted after this is done
- error("Error while reading PNG image");
-
- Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
- Graphics::Surface *pngSurface = png->getSurface(format);
-
- width = pngSurface->w;
- height = pngSurface->h;
- uncompressedDataPtr = new byte[pngSurface->pitch * pngSurface->h];
- memcpy(uncompressedDataPtr, (byte *)pngSurface->pixels, pngSurface->pitch * pngSurface->h);
- pngSurface->free();
-
- delete pngSurface;
- delete png;
-
-#endif
- // Signal success
- return true;
-}
-
-bool PNGLoader::decodeImage(const byte *fileDataPtr, uint fileSize, byte *&uncompressedDataPtr, int &width, int &height, int &pitch) {
- uint pngOffset = findEmbeddedPNG(fileDataPtr, fileSize);
- return doDecodeImage(fileDataPtr + pngOffset, fileSize - pngOffset, uncompressedDataPtr, width, height, pitch);
-}
-
-#ifndef USE_INTERNAL_PNG_DECODER
-bool PNGLoader::doImageProperties(const byte *fileDataPtr, uint fileSize, int &width, int &height) {
- // Check for valid PNG signature
- if (!doIsCorrectImageFormat(fileDataPtr, fileSize))
- return false;
-
- png_structp png_ptr = NULL;
- png_infop info_ptr = NULL;
-
- // Create both PNG structures
- png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- if (!png_ptr) {
- error("Could not create libpng read struct.");
- }
-
- info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr) {
- error("Could not create libpng info struct.");
- }
-
- // Use alternative reading function
- const byte **ref = &fileDataPtr;
- png_set_read_fn(png_ptr, (void *)ref, png_user_read_data);
-
- // Read PNG Header
- png_read_info(png_ptr, info_ptr);
-
- // Read out PNG informations
- int bitDepth;
- int colorType;
- png_uint_32 w, h;
- png_get_IHDR(png_ptr, info_ptr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL);
-
- width = w;
- height = h;
-
- // Destroy libpng structures
- png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-
- return true;
-
-}
-
-bool PNGLoader::imageProperties(const byte *fileDataPtr, uint fileSize, int &width, int &height) {
- uint pngOffset = findEmbeddedPNG(fileDataPtr, fileSize);
- return doImageProperties(fileDataPtr + pngOffset, fileSize - pngOffset, width, height);
-}
-
-#else
- // We don't need to read the image properties here...
-#endif
-
-
-} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index 132c516c12..a9c9de4f0c 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -38,25 +35,64 @@
#include "common/savefile.h"
#include "sword25/package/packagemanager.h"
-#include "sword25/gfx/image/pngloader.h"
+#include "sword25/gfx/image/imgloader.h"
#include "sword25/gfx/image/renderedimage.h"
#include "common/system.h"
namespace Sword25 {
-// Duplicated from kernel/persistenceservice.cpp
-static Common::String generateSavegameFilename(uint slotID) {
- char buffer[100];
- // NOTE: This is hardcoded to sword25
- snprintf(buffer, 100, "%s.%.3d", "sword25", slotID);
- return Common::String(buffer);
-}
-
// -----------------------------------------------------------------------------
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
+/**
+ * Load a NULL-terminated string from the given stream.
+ */
+static Common::String loadString(Common::SeekableReadStream &in, uint maxSize = 999) {
+ Common::String result;
+
+ while (!in.eos() && (result.size() < maxSize)) {
+ char ch = (char)in.readByte();
+ if (ch == '\0')
+ break;
+
+ result += ch;
+ }
+
+ return result;
+}
+
+static byte *readSavegameThumbnail(const Common::String &filename, uint &fileSize, bool &isPNG) {
+ byte *pFileData;
+ Common::SaveFileManager *sfm = g_system->getSavefileManager();
+ Common::InSaveFile *file = sfm->openForLoading(lastPathComponent(filename, '/'));
+ if (!file)
+ error("Save file \"%s\" could not be loaded.", filename.c_str());
+
+ // Seek to the actual PNG image
+ loadString(*file); // Marker (BS25SAVEGAME)
+ loadString(*file); // Version
+ loadString(*file); // Description
+ uint32 compressedGamedataSize = atoi(loadString(*file).c_str());
+ loadString(*file); // Uncompressed game data size
+ file->skip(compressedGamedataSize); // Skip the game data and move to the thumbnail itself
+ uint32 thumbnailStart = file->pos();
+
+ fileSize = file->size() - thumbnailStart;
+
+ // Check if the thumbnail is in our own format, or a PNG file.
+ uint32 header = file->readUint32BE();
+ isPNG = (header != MKTAG('S','C','R','N'));
+ file->seek(-4, SEEK_CUR);
+
+ pFileData = new byte[fileSize];
+ file->read(pFileData, fileSize);
+ delete file;
+
+ return pFileData;
+}
+
RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
_data(0),
_width(0),
@@ -72,15 +108,10 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
byte *pFileData;
uint fileSize;
+ bool isPNG = true;
+
if (filename.hasPrefix("/saves")) {
- // A savegame thumbnail
- Common::SaveFileManager *sfm = g_system->getSavefileManager();
- int slotNum = atoi(filename.c_str() + filename.size() - 3);
- Common::InSaveFile *file = sfm->openForLoading(generateSavegameFilename(slotNum));
- fileSize = file->size();
- pFileData = new byte[fileSize];
- file->read(pFileData, fileSize);
- delete file;
+ pFileData = readSavegameThumbnail(filename, fileSize, isPNG);
} else {
pFileData = pPackage->getFile(filename, &fileSize);
}
@@ -90,18 +121,14 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
return;
}
-#ifndef USE_INTERNAL_PNG_DECODER
- // Determine image properties
- if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
- error("Could not read image properties.");
- delete[] pFileData;
- return;
- }
-#endif
-
// Uncompress the image
int pitch;
- if (!PNGLoader::decodeImage(pFileData, fileSize, _data, _width, _height, pitch)) {
+ if (isPNG)
+ result = ImgLoader::decodePNGImage(pFileData, fileSize, _data, _width, _height, pitch);
+ else
+ result = ImgLoader::decodeThumbnailImage(pFileData, fileSize, _data, _width, _height, pitch);
+
+ if (!result) {
error("Could not decode image.");
delete[] pFileData;
return;
@@ -112,7 +139,6 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
_doCleanup = true;
- result = true;
return;
}
diff --git a/engines/sword25/gfx/image/renderedimage.h b/engines/sword25/gfx/image/renderedimage.h
index e3f23747da..f92a5b39b4 100644
--- a/engines/sword25/gfx/image/renderedimage.h
+++ b/engines/sword25/gfx/image/renderedimage.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp
index 0f3814eb54..0b9cc11df2 100644
--- a/engines/sword25/gfx/image/swimage.cpp
+++ b/engines/sword25/gfx/image/swimage.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -33,7 +30,7 @@
*/
#include "sword25/package/packagemanager.h"
-#include "sword25/gfx/image/pngloader.h"
+#include "sword25/gfx/image/imgloader.h"
#include "sword25/gfx/image/swimage.h"
namespace Sword25 {
@@ -56,18 +53,10 @@ SWImage::SWImage(const Common::String &filename, bool &result) :
return;
}
-#ifndef USE_INTERNAL_PNG_DECODER
- // Determine image properties
- if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
- error("Could not read image properties.");
- return;
- }
-#endif
-
// Uncompress the image
int pitch;
byte *pUncompressedData;
- if (!PNGLoader::decodeImage(pFileData, fileSize, pUncompressedData, _width, _height, pitch)) {
+ if (!ImgLoader::decodePNGImage(pFileData, fileSize, pUncompressedData, _width, _height, pitch)) {
error("Could not decode image.");
return;
}
diff --git a/engines/sword25/gfx/image/swimage.h b/engines/sword25/gfx/image/swimage.h
index a914c4f41f..5f348958b2 100644
--- a/engines/sword25/gfx/image/swimage.h
+++ b/engines/sword25/gfx/image/swimage.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp
index 241e80bad3..9235ec2fcf 100644
--- a/engines/sword25/gfx/image/vectorimage.cpp
+++ b/engines/sword25/gfx/image/vectorimage.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h
index 79a7519dda..959f251c14 100644
--- a/engines/sword25/gfx/image/vectorimage.h
+++ b/engines/sword25/gfx/image/vectorimage.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp
index 99a47015fb..97dad3346d 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.cpp
+++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp
index 955c317399..6d5b2a623d 100644
--- a/engines/sword25/gfx/panel.cpp
+++ b/engines/sword25/gfx/panel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -50,12 +47,12 @@ Panel::Panel(RenderObjectPtr<RenderObject> parentPtr, int width, int height, uin
_height = height;
if (_width < 0) {
- error("Tried to initialise a panel with an invalid width (%d).", _width);
+ error("Tried to initialize a panel with an invalid width (%d).", _width);
return;
}
if (_height < 0) {
- error("Tried to initialise a panel with an invalid height (%d).", _height);
+ error("Tried to initialize a panel with an invalid height (%d).", _height);
return;
}
diff --git a/engines/sword25/gfx/panel.h b/engines/sword25/gfx/panel.h
index 6fe96369a6..cbf04ce40f 100644
--- a/engines/sword25/gfx/panel.h
+++ b/engines/sword25/gfx/panel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index b044d906f3..a977eb80ba 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/renderobject.h b/engines/sword25/gfx/renderobject.h
index 7b7b9047f7..0b54ccc24b 100644
--- a/engines/sword25/gfx/renderobject.h
+++ b/engines/sword25/gfx/renderobject.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp
index 1f7938f41f..38289991eb 100644
--- a/engines/sword25/gfx/renderobjectmanager.cpp
+++ b/engines/sword25/gfx/renderobjectmanager.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/renderobjectmanager.h b/engines/sword25/gfx/renderobjectmanager.h
index 8511382d6e..9e7efd8e60 100644
--- a/engines/sword25/gfx/renderobjectmanager.h
+++ b/engines/sword25/gfx/renderobjectmanager.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/renderobjectptr.h b/engines/sword25/gfx/renderobjectptr.h
index c22c6e83e7..7b7f190a01 100644
--- a/engines/sword25/gfx/renderobjectptr.h
+++ b/engines/sword25/gfx/renderobjectptr.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/renderobjectregistry.h b/engines/sword25/gfx/renderobjectregistry.h
index 988b676aa8..92d8c9b830 100644
--- a/engines/sword25/gfx/renderobjectregistry.h
+++ b/engines/sword25/gfx/renderobjectregistry.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/rootrenderobject.h b/engines/sword25/gfx/rootrenderobject.h
index e4e3fba3c8..4782fad175 100644
--- a/engines/sword25/gfx/rootrenderobject.h
+++ b/engines/sword25/gfx/rootrenderobject.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 6ea2b574d6..4f9ba1d3c5 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -32,90 +29,37 @@
*
*/
-// Disable symbol overrides so that we can use png.h
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
#include "common/memstream.h"
#include "common/textconsole.h"
#include "sword25/gfx/screenshot.h"
#include "sword25/kernel/filesystemutil.h"
-#include <png.h>
namespace Sword25 {
-#include "common/pack-start.h"
-struct RGB_PIXEL {
- byte red;
- byte green;
- byte blue;
-} PACKED_STRUCT;
-#include "common/pack-end.h"
-
-void userWriteFn(png_structp png_ptr, png_bytep data, png_size_t length) {
- static_cast<Common::WriteStream *>(png_get_io_ptr(png_ptr))->write(data, length);
-}
-
-void userFlushFn(png_structp png_ptr) {
-}
+#define THUMBNAIL_VERSION 1
bool Screenshot::saveToFile(Graphics::Surface *data, Common::WriteStream *stream) {
- // Reserve buffer space
- RGB_PIXEL *pixelBuffer = new RGB_PIXEL[data->w * data->h];
-
// Convert the RGBA data to RGB
const byte *pSrc = (const byte *)data->getBasePtr(0, 0);
- RGB_PIXEL *pDest = pixelBuffer;
+
+ // Write our own custom header
+ stream->writeUint32BE(MKTAG('S','C','R','N')); // SCRN, short for "Screenshot"
+ stream->writeUint16LE(data->w);
+ stream->writeUint16LE(data->h);
+ stream->writeByte(THUMBNAIL_VERSION);
for (uint y = 0; y < data->h; y++) {
for (uint x = 0; x < data->w; x++) {
+ // This is only called by createThumbnail below, which
+ // provides a fake 'surface' with LE data in it.
uint32 srcPixel = READ_LE_UINT32(pSrc);
pSrc += sizeof(uint32);
- pDest->red = (srcPixel >> 16) & 0xff;
- pDest->green = (srcPixel >> 8) & 0xff;
- pDest->blue = srcPixel & 0xff;
- ++pDest;
+ stream->writeByte((srcPixel >> 16) & 0xff); // R
+ stream->writeByte((srcPixel >> 8) & 0xff); // G
+ stream->writeByte(srcPixel & 0xff); // B
}
}
- png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- if (!png_ptr)
- error("Could not create PNG write-struct.");
-
- png_infop info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr)
- error("Could not create PNG info-struct.");
-
- // The compression buffer must be large enough to the entire image.
- // This ensures that only an IDAT chunk is created.
- // When buffer size is used 110% of the raw data size to be sure.
- png_set_compression_buffer_size(png_ptr, (data->w * data->h * 3 * 110) / 100);
-
- // Initialise PNG-Info structure
- png_set_IHDR(png_ptr, info_ptr,
- data->w, // Width
- data->h, // Height
- 8, // Bits depth
- PNG_COLOR_TYPE_RGB, // Color type
- PNG_INTERLACE_NONE, // No interlacing
- PNG_COMPRESSION_TYPE_DEFAULT, // Compression type
- PNG_FILTER_TYPE_DEFAULT); // Filter Type
-
- // Rowpointer erstellen
- png_bytep *rowPointers = new png_bytep[data->h];
- for (uint i = 0; i < data->h; i++) {
- rowPointers[i] = (png_bytep)&pixelBuffer[data->w * i];
- }
- png_set_rows(png_ptr, info_ptr, &rowPointers[0]);
-
- // Write out the png data to the file
- png_set_write_fn(png_ptr, (void *)stream, userWriteFn, userFlushFn);
- png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
-
- png_destroy_write_struct(&png_ptr, &info_ptr);
-
- delete[] pixelBuffer;
- delete[] rowPointers;
-
return true;
}
@@ -148,7 +92,7 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data)
for (int j = 0; j < 4; ++j) {
const uint32 *srcP = (const uint32 *)data->getBasePtr(x * 4, y * 4 + j + 50);
for (int i = 0; i < 4; ++i) {
- uint32 pixel = READ_LE_UINT32(srcP + i);
+ uint32 pixel = READ_UINT32(srcP + i);
alpha += (pixel >> 24);
red += (pixel >> 16) & 0xff;
green += (pixel >> 8) & 0xff;
diff --git a/engines/sword25/gfx/screenshot.h b/engines/sword25/gfx/screenshot.h
index a0f615f9e6..e2e2dfc7f5 100644
--- a/engines/sword25/gfx/screenshot.h
+++ b/engines/sword25/gfx/screenshot.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index 2e8d1ba071..60ad94e20f 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/staticbitmap.h b/engines/sword25/gfx/staticbitmap.h
index b5b4c4f5a2..e66ede02b4 100644
--- a/engines/sword25/gfx/staticbitmap.h
+++ b/engines/sword25/gfx/staticbitmap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index b1c1708565..8e18d2936d 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h
index 42c1cd7c5d..a0d668014f 100644
--- a/engines/sword25/gfx/text.h
+++ b/engines/sword25/gfx/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/timedrenderobject.cpp b/engines/sword25/gfx/timedrenderobject.cpp
index e3b4d1990c..e35b0ae95b 100644
--- a/engines/sword25/gfx/timedrenderobject.cpp
+++ b/engines/sword25/gfx/timedrenderobject.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/gfx/timedrenderobject.h b/engines/sword25/gfx/timedrenderobject.h
index 6fee19882a..44c3b40528 100644
--- a/engines/sword25/gfx/timedrenderobject.h
+++ b/engines/sword25/gfx/timedrenderobject.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/input/inputengine.cpp b/engines/sword25/input/inputengine.cpp
index 769baafeed..bb9c2c8b40 100644
--- a/engines/sword25/input/inputengine.cpp
+++ b/engines/sword25/input/inputengine.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/input/inputengine.h b/engines/sword25/input/inputengine.h
index 40f801dde2..f79890a9fd 100644
--- a/engines/sword25/input/inputengine.h
+++ b/engines/sword25/input/inputengine.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -175,7 +172,7 @@ public:
/// --------------------------------------------------------------
/**
- * Initialises the input engine
+ * Initializes the input engine
* @return Returns a true on success, otherwise false.
*/
bool init();
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp
index d4f2719b62..db2619294c 100644
--- a/engines/sword25/input/inputengine_script.cpp
+++ b/engines/sword25/input/inputengine_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/common.h b/engines/sword25/kernel/common.h
index 487bfc5c78..8cfc81e981 100644
--- a/engines/sword25/kernel/common.h
+++ b/engines/sword25/kernel/common.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/filesystemutil.cpp b/engines/sword25/kernel/filesystemutil.cpp
index e5ec6c15db..281e7986df 100644
--- a/engines/sword25/kernel/filesystemutil.cpp
+++ b/engines/sword25/kernel/filesystemutil.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/filesystemutil.h b/engines/sword25/kernel/filesystemutil.h
index b75454c1c8..bb100123d9 100644
--- a/engines/sword25/kernel/filesystemutil.h
+++ b/engines/sword25/kernel/filesystemutil.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/inputpersistenceblock.cpp b/engines/sword25/kernel/inputpersistenceblock.cpp
index 26c924dc82..c1cd771e39 100644
--- a/engines/sword25/kernel/inputpersistenceblock.cpp
+++ b/engines/sword25/kernel/inputpersistenceblock.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/inputpersistenceblock.h b/engines/sword25/kernel/inputpersistenceblock.h
index f6ab256460..f643b06bc1 100644
--- a/engines/sword25/kernel/inputpersistenceblock.h
+++ b/engines/sword25/kernel/inputpersistenceblock.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/kernel.cpp b/engines/sword25/kernel/kernel.cpp
index 99fec52040..d6388eee2b 100644
--- a/engines/sword25/kernel/kernel.cpp
+++ b/engines/sword25/kernel/kernel.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -57,7 +54,8 @@ Kernel::Kernel() :
_input(0),
_package(0),
_script(0),
- _fmv(0)
+ _fmv(0),
+ _rnd("sword25")
{
_instance = this;
@@ -65,7 +63,7 @@ Kernel::Kernel() :
// Create the resource manager
_resourceManager = new ResourceManager(this);
- // Initialise the script engine
+ // Initialize the script engine
_script = new LuaScriptEngine(this);
if (!_script || !_script->init()) {
_initSuccess = false;
diff --git a/engines/sword25/kernel/kernel.h b/engines/sword25/kernel/kernel.h
index 3abf43d239..adf69f92d6 100644
--- a/engines/sword25/kernel/kernel.h
+++ b/engines/sword25/kernel/kernel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -82,7 +79,7 @@ public:
uint getMilliTicks();
/**
- * Specifies whether the kernel was successfully initialised
+ * Specifies whether the kernel was successfully initialized
*/
bool getInitSuccess() const {
return _initSuccess;
diff --git a/engines/sword25/kernel/kernel_script.cpp b/engines/sword25/kernel/kernel_script.cpp
index 43a144b2c6..27a221d45f 100644
--- a/engines/sword25/kernel/kernel_script.cpp
+++ b/engines/sword25/kernel/kernel_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h
index 69d961ae91..d9a7c353f7 100644
--- a/engines/sword25/kernel/objectregistry.h
+++ b/engines/sword25/kernel/objectregistry.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/outputpersistenceblock.cpp b/engines/sword25/kernel/outputpersistenceblock.cpp
index a8a39cb822..cf28ea401f 100644
--- a/engines/sword25/kernel/outputpersistenceblock.cpp
+++ b/engines/sword25/kernel/outputpersistenceblock.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/outputpersistenceblock.h b/engines/sword25/kernel/outputpersistenceblock.h
index 71dbe68a52..12351d22e2 100644
--- a/engines/sword25/kernel/outputpersistenceblock.h
+++ b/engines/sword25/kernel/outputpersistenceblock.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/persistable.h b/engines/sword25/kernel/persistable.h
index 25cf70fda0..1807211847 100644
--- a/engines/sword25/kernel/persistable.h
+++ b/engines/sword25/kernel/persistable.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/persistenceblock.h b/engines/sword25/kernel/persistenceblock.h
index 4a64eff11b..d8440faa50 100644
--- a/engines/sword25/kernel/persistenceblock.h
+++ b/engines/sword25/kernel/persistenceblock.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index 6bb2b1b102..17e9199b5c 100644
--- a/engines/sword25/kernel/persistenceservice.cpp
+++ b/engines/sword25/kernel/persistenceservice.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -32,11 +29,9 @@
*
*/
-// Disable symbol overrides so that we can use zlib.h
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
#include "common/fs.h"
#include "common/savefile.h"
+#include "common/zlib.h"
#include "sword25/kernel/kernel.h"
#include "sword25/kernel/persistenceservice.h"
#include "sword25/kernel/inputpersistenceblock.h"
@@ -47,7 +42,6 @@
#include "sword25/input/inputengine.h"
#include "sword25/math/regionregistry.h"
#include "sword25/script/script.h"
-#include <zlib.h>
namespace Sword25 {
@@ -291,34 +285,23 @@ bool PersistenceService::saveGame(uint slotID, const Common::String &screenshotF
error("Unable to persist modules for savegame file \"%s\".", filename.c_str());
}
- // Daten komprimieren.
- uLongf compressedLength = writer.getDataSize() + (writer.getDataSize() + 500) / 1000 + 12;
- Bytef *compressionBuffer = new Bytef[compressedLength];
-
- if (compress2(&compressionBuffer[0], &compressedLength, reinterpret_cast<const Bytef *>(writer.getData()), writer.getDataSize(), 6) != Z_OK) {
- error("Unable to compress savegame data in savegame file \"%s\".", filename.c_str());
- }
-
- // Länge der komprimierten Daten und der unkomprimierten Daten in die Datei schreiben.
+ // Write the save game data uncompressed, since the final saved game will be
+ // compressed anyway.
char sBuffer[10];
- snprintf(sBuffer, 10, "%ld", compressedLength);
+ snprintf(sBuffer, 10, "%u", writer.getDataSize());
file->writeString(sBuffer);
file->writeByte(0);
snprintf(sBuffer, 10, "%u", writer.getDataSize());
file->writeString(sBuffer);
file->writeByte(0);
-
- // Komprimierte Daten in die Datei schreiben.
- file->write(reinterpret_cast<char *>(&compressionBuffer[0]), compressedLength);
- if (file->err()) {
- error("Unable to write game data to savegame file \"%s\".", filename.c_str());
- }
+ file->write(writer.getData(), writer.getDataSize());
// Get the screenshot
Common::SeekableReadStream *thumbnail = Kernel::getInstance()->getGfx()->getThumbnail();
if (thumbnail) {
- byte *buffer = new Byte[FILE_COPY_BUFFER_SIZE];
+ byte *buffer = new byte[FILE_COPY_BUFFER_SIZE];
+ thumbnail->seek(0, SEEK_SET);
while (!thumbnail->eos()) {
int bytesRead = thumbnail->read(&buffer[0], FILE_COPY_BUFFER_SIZE);
file->write(&buffer[0], bytesRead);
@@ -331,7 +314,6 @@ bool PersistenceService::saveGame(uint slotID, const Common::String &screenshotF
file->finalize();
delete file;
- delete[] compressionBuffer;
// Savegameinformationen für diesen Slot aktualisieren.
_impl->readSlotSavegameInformation(slotID);
@@ -372,7 +354,7 @@ bool PersistenceService::loadGame(uint slotID) {
#endif
byte *compressedDataBuffer = new byte[curSavegameInfo.gamedataLength];
- byte *uncompressedDataBuffer = new Bytef[curSavegameInfo.gamedataUncompressedLength];
+ byte *uncompressedDataBuffer = new byte[curSavegameInfo.gamedataUncompressedLength];
Common::String filename = generateSavegameFilename(slotID);
file = sfm->openForLoading(filename);
@@ -385,15 +367,22 @@ bool PersistenceService::loadGame(uint slotID) {
return false;
}
- // Spieldaten dekomprimieren.
- uLongf uncompressedBufferSize = curSavegameInfo.gamedataUncompressedLength;
- if (uncompress(reinterpret_cast<Bytef *>(&uncompressedDataBuffer[0]), &uncompressedBufferSize,
- reinterpret_cast<Bytef *>(&compressedDataBuffer[0]), curSavegameInfo.gamedataLength) != Z_OK) {
- error("Unable to decompress the gamedata from savegame file \"%s\".", filename.c_str());
- delete[] uncompressedDataBuffer;
- delete[] compressedDataBuffer;
- delete file;
- return false;
+ // Uncompress game data, if needed.
+ unsigned long uncompressedBufferSize = curSavegameInfo.gamedataUncompressedLength;
+
+ if (uncompressedBufferSize > curSavegameInfo.gamedataLength) {
+ // Older saved game, where the game data was compressed again.
+ if (!Common::uncompress(reinterpret_cast<byte *>(&uncompressedDataBuffer[0]), &uncompressedBufferSize,
+ reinterpret_cast<byte *>(&compressedDataBuffer[0]), curSavegameInfo.gamedataLength)) {
+ error("Unable to decompress the gamedata from savegame file \"%s\".", filename.c_str());
+ delete[] uncompressedDataBuffer;
+ delete[] compressedDataBuffer;
+ delete file;
+ return false;
+ }
+ } else {
+ // Newer saved game with uncompressed game data, copy it as-is.
+ memcpy(uncompressedDataBuffer, compressedDataBuffer, uncompressedBufferSize);
}
InputPersistenceBlock reader(&uncompressedDataBuffer[0], curSavegameInfo.gamedataUncompressedLength);
diff --git a/engines/sword25/kernel/persistenceservice.h b/engines/sword25/kernel/persistenceservice.h
index 0db109d1b0..f73962892c 100644
--- a/engines/sword25/kernel/persistenceservice.h
+++ b/engines/sword25/kernel/persistenceservice.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/resmanager.cpp b/engines/sword25/kernel/resmanager.cpp
index b77d79e8ea..cc3316250a 100644
--- a/engines/sword25/kernel/resmanager.cpp
+++ b/engines/sword25/kernel/resmanager.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/resmanager.h b/engines/sword25/kernel/resmanager.h
index f8006bd62d..6b95a45b6e 100644
--- a/engines/sword25/kernel/resmanager.h
+++ b/engines/sword25/kernel/resmanager.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/resource.cpp b/engines/sword25/kernel/resource.cpp
index f16cb3aaf2..656355cc17 100644
--- a/engines/sword25/kernel/resource.cpp
+++ b/engines/sword25/kernel/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/resource.h b/engines/sword25/kernel/resource.h
index 5c6108a281..7c8175c9c9 100644
--- a/engines/sword25/kernel/resource.h
+++ b/engines/sword25/kernel/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/resservice.h b/engines/sword25/kernel/resservice.h
index 65b2dc4b36..69b0688e32 100644
--- a/engines/sword25/kernel/resservice.h
+++ b/engines/sword25/kernel/resservice.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/kernel/service.h b/engines/sword25/kernel/service.h
index ef8858bb7d..576776bb5f 100644
--- a/engines/sword25/kernel/service.h
+++ b/engines/sword25/kernel/service.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/geometry.h b/engines/sword25/math/geometry.h
index 60898df635..bdbd5b2052 100644
--- a/engines/sword25/math/geometry.h
+++ b/engines/sword25/math/geometry.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp
index 4b5e0550fe..70798f7692 100644
--- a/engines/sword25/math/geometry_script.cpp
+++ b/engines/sword25/math/geometry_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/line.h b/engines/sword25/math/line.h
index d57fce68f7..9eaa2d3c8c 100644
--- a/engines/sword25/math/line.h
+++ b/engines/sword25/math/line.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/polygon.cpp b/engines/sword25/math/polygon.cpp
index e8385c60c8..2e7836ff77 100644
--- a/engines/sword25/math/polygon.cpp
+++ b/engines/sword25/math/polygon.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -62,7 +59,7 @@ Polygon::~Polygon() {
}
bool Polygon::init(int vertexCount_, const Vertex *vertices_) {
- // Rember the old obstate to restore it if an error occurs whilst initialising it with the new data
+ // Rember the old obstate to restore it if an error occurs whilst initializing it with the new data
int oldvertexCount = this->vertexCount;
Vertex *oldvertices = this->vertices;
diff --git a/engines/sword25/math/polygon.h b/engines/sword25/math/polygon.h
index 4bb28f827a..ffdbf14f6b 100644
--- a/engines/sword25/math/polygon.h
+++ b/engines/sword25/math/polygon.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -81,15 +78,15 @@ public:
virtual ~Polygon();
/**
- * Initialises the BS_Polygon with a list of Vertecies.
+ * Initializes the BS_Polygon with a list of Vertecies.
*
* The Vertices need to define a polygon must not have self-intersections.
- * If a polygon already has verticies, this will re-initialise it with the new list.
+ * If a polygon already has verticies, this will re-initialize it with the new list.
*
* @param VertexCount The number of vertices being passed
* @param Vertecies An array of BS_Vertex objects representing the vertices in the polygon.
* @return Returns false if the Vertecies have self-intersections. In this case,
- * the object is not initialised.
+ * the object is not initialized.
*/
bool init(int vertexCount_, const Vertex *vertices_);
diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp
index 5d08b0c14e..7681ef6d9f 100644
--- a/engines/sword25/math/region.cpp
+++ b/engines/sword25/math/region.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -118,7 +115,7 @@ bool Region::init(const Polygon &contour, const Common::Array<Polygon> *pHoles)
}
- // Initialise bounding box
+ // Initialize bounding box
updateBoundingBox();
_valid = true;
diff --git a/engines/sword25/math/region.h b/engines/sword25/math/region.h
index fa65b4b7ad..0fd7223631 100644
--- a/engines/sword25/math/region.h
+++ b/engines/sword25/math/region.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -76,12 +73,12 @@ public:
virtual ~Region();
/**
- * Initialises a BS_Region object
+ * Initializes a BS_Region object
* @param Contour A polygon indicating the outline of the region
* @param pHoles A pointer to an array of polygons representing the hole state in the region.
* If the region has no holes, it must be passed as NULL. The default value is NULL.
* @return Returns true if the initialisation was successful, otherwise false.
- * @remark If the region was already initialised, the old state will be deleted.
+ * @remark If the region was already initialized, the old state will be deleted.
*/
virtual bool init(const Polygon &contour, const Common::Array<Polygon> *pHoles = NULL);
diff --git a/engines/sword25/math/regionregistry.cpp b/engines/sword25/math/regionregistry.cpp
index 978a1807f7..dff8560205 100644
--- a/engines/sword25/math/regionregistry.cpp
+++ b/engines/sword25/math/regionregistry.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/regionregistry.h b/engines/sword25/math/regionregistry.h
index db3e021e25..9e0a28bea7 100644
--- a/engines/sword25/math/regionregistry.h
+++ b/engines/sword25/math/regionregistry.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/vertex.cpp b/engines/sword25/math/vertex.cpp
index 3746ec9410..b486d35e7e 100644
--- a/engines/sword25/math/vertex.cpp
+++ b/engines/sword25/math/vertex.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/math/vertex.h b/engines/sword25/math/vertex.h
index 0e6d14502c..4cb0eaca30 100644
--- a/engines/sword25/math/vertex.h
+++ b/engines/sword25/math/vertex.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -46,7 +43,8 @@
#include <math.h>
#include "common/rect.h"
#include "sword25/kernel/common.h"
-#include "sword25/util/lua/lua.h"
+
+struct lua_State;
#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
#define sqrtf(x) ((float)sqrt(x))
diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp
index 8306553f7b..bace4d54bc 100644
--- a/engines/sword25/math/walkregion.cpp
+++ b/engines/sword25/math/walkregion.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -104,7 +101,7 @@ static void initDijkstraNodes(DijkstraNode::Container &dijkstraNodes, const Regi
// Allocate sufficient space in the array
dijkstraNodes.resize(nodes.size());
- // Initialise all the nodes which are visible from the starting node
+ // Initialize all the nodes which are visible from the starting node
DijkstraNode::Iter dijkstraIter = dijkstraNodes.begin();
for (Common::Array<Vertex>::const_iterator nodesIter = nodes.begin();
nodesIter != nodes.end(); nodesIter++, dijkstraIter++) {
@@ -176,7 +173,7 @@ void reverseArray(Common::Array<T> &arr) {
bool WalkRegion::findPath(const Vertex &start, const Vertex &end, BS_Path &path) const {
// This is an implementation of Dijkstra's algorithm
- // Initialise edge node list
+ // Initialize edge node list
DijkstraNode::Container dijkstraNodes;
initDijkstraNodes(dijkstraNodes, *this, start, _nodes);
@@ -250,7 +247,7 @@ void WalkRegion::initNodeVector() {
}
void WalkRegion::computeVisibilityMatrix() {
- // Initialise visibility matrix
+ // Initialize visibility matrix
_visibilityMatrix = Common::Array< Common::Array <int> >();
for (uint idx = 0; idx < _nodes.size(); ++idx) {
Common::Array<int> arr;
diff --git a/engines/sword25/math/walkregion.h b/engines/sword25/math/walkregion.h
index e8bf40becc..7dded1980b 100644
--- a/engines/sword25/math/walkregion.h
+++ b/engines/sword25/math/walkregion.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk
index da91c848b5..302120c500 100644
--- a/engines/sword25/module.mk
+++ b/engines/sword25/module.mk
@@ -24,7 +24,7 @@ MODULE_OBJS := \
gfx/text.o \
gfx/timedrenderobject.o \
gfx/image/art.o \
- gfx/image/pngloader.o \
+ gfx/image/imgloader.o \
gfx/image/renderedimage.o \
gfx/image/swimage.o \
gfx/image/vectorimage.o \
@@ -60,7 +60,6 @@ MODULE_OBJS := \
util/lua/ldblib.o \
util/lua/ldebug.o \
util/lua/ldo.o \
- util/lua/ldump.o \
util/lua/lfunc.o \
util/lua/lgc.o \
util/lua/linit.o \
@@ -79,10 +78,9 @@ MODULE_OBJS := \
util/lua/ltable.o \
util/lua/ltablib.o \
util/lua/ltm.o \
- util/lua/lundump.o \
util/lua/lvm.o \
util/lua/lzio.o \
- util/lua/print.o \
+ util/lua/scummvm_file.o \
util/pluto/pdep.o \
util/pluto/pluto.o \
util/pluto/plzio.o
diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index 7a64fe2e29..5c869203c6 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/package/packagemanager.h b/engines/sword25/package/packagemanager.h
index 3a976b32fa..3c4c4e89c5 100644
--- a/engines/sword25/package/packagemanager.h
+++ b/engines/sword25/package/packagemanager.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/package/packagemanager_script.cpp b/engines/sword25/package/packagemanager_script.cpp
index eab66f7531..229ec37459 100644
--- a/engines/sword25/package/packagemanager_script.cpp
+++ b/engines/sword25/package/packagemanager_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/script/lua_extensions.cpp b/engines/sword25/script/lua_extensions.cpp
index 5ba38afc36..bf502d719e 100644
--- a/engines/sword25/script/lua_extensions.cpp
+++ b/engines/sword25/script/lua_extensions.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/script/luabindhelper.cpp b/engines/sword25/script/luabindhelper.cpp
index 03a1802a04..8fbbe7e272 100644
--- a/engines/sword25/script/luabindhelper.cpp
+++ b/engines/sword25/script/luabindhelper.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/script/luabindhelper.h b/engines/sword25/script/luabindhelper.h
index 94f52743f3..0cb6d37bdc 100644
--- a/engines/sword25/script/luabindhelper.h
+++ b/engines/sword25/script/luabindhelper.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/script/luacallback.cpp b/engines/sword25/script/luacallback.cpp
index 809676796e..cee0531b8a 100644
--- a/engines/sword25/script/luacallback.cpp
+++ b/engines/sword25/script/luacallback.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/script/luacallback.h b/engines/sword25/script/luacallback.h
index e097f5b499..796af8598b 100644
--- a/engines/sword25/script/luacallback.h
+++ b/engines/sword25/script/luacallback.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp
index cce01d58c7..9d394309e6 100644
--- a/engines/sword25/script/luascript.cpp
+++ b/engines/sword25/script/luascript.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -115,7 +112,7 @@ bool LuaScriptEngine::init() {
// Place the error handler function in the Lua registry, and remember the index
_pcallErrorhandlerRegistryIndex = luaL_ref(_state, LUA_REGISTRYINDEX);
- // Initialise the Pluto-Persistence library
+ // Initialize the Pluto-Persistence library
luaopen_pluto(_state);
lua_pop(_state, 1);
@@ -180,7 +177,7 @@ bool LuaScriptEngine::executeFile(const Common::String &fileName) {
}
bool LuaScriptEngine::executeString(const Common::String &code) {
- return executeBuffer((byte *)code.c_str(), code.size(), "???");
+ return executeBuffer((const byte *)code.c_str(), code.size(), "???");
}
namespace {
diff --git a/engines/sword25/script/luascript.h b/engines/sword25/script/luascript.h
index b66c32176a..1a4a38c3be 100644
--- a/engines/sword25/script/luascript.h
+++ b/engines/sword25/script/luascript.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -39,7 +36,8 @@
#include "common/str-array.h"
#include "sword25/kernel/common.h"
#include "sword25/script/script.h"
-#include "sword25/util/lua/lua.h"
+
+struct lua_State;
namespace Sword25 {
@@ -51,7 +49,7 @@ public:
virtual ~LuaScriptEngine();
/**
- * Initialises the scripting engine
+ * Initializes the scripting engine
* @return Returns true if successful, otherwise false.
*/
virtual bool init();
diff --git a/engines/sword25/script/script.h b/engines/sword25/script/script.h
index 9ca146026e..04f248fe7e 100644
--- a/engines/sword25/script/script.h
+++ b/engines/sword25/script/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -57,7 +54,7 @@ public:
// -----------------------------------------------------------------------------
/**
- * Initialises the scrip tengine. Returns true if successful, false otherwise.
+ * Initializes the scrip tengine. Returns true if successful, false otherwise.
*/
virtual bool init() = 0;
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 08f0f5b4ae..20622b2098 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -154,13 +151,17 @@ bool SoundEngine::playSound(const Common::String &fileName, SOUND_TYPES type, fl
uint SoundEngine::playSoundEx(const Common::String &fileName, SOUND_TYPES type, float volume, float pan, bool loop, int loopStart, int loopEnd, uint layer) {
Common::SeekableReadStream *in = Kernel::getInstance()->getPackage()->getStream(fileName);
+#ifdef USE_VORBIS
Audio::SeekableAudioStream *stream = Audio::makeVorbisStream(in, DisposeAfterUse::YES);
+#endif
uint id;
SndHandle *handle = getHandle(&id);
debugC(1, kDebugSound, "SoundEngine::playSoundEx(%s, %d, %f, %f, %d, %d, %d, %d)", fileName.c_str(), type, volume, pan, loop, loopStart, loopEnd, layer);
+#ifdef USE_VORBIS
_mixer->playStream(getType(type), &(handle->handle), stream, -1, (byte)(volume * 255), (int8)(pan * 127));
+#endif
return id;
}
diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h
index 576582b478..4dbd475846 100644
--- a/engines/sword25/sfx/soundengine.h
+++ b/engines/sword25/sfx/soundengine.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -91,7 +88,7 @@ public:
~SoundEngine() {}
/**
- * Initialises the sound engine
+ * Initializes the sound engine
* @param SampleRate Specifies the sample rate to use.
* @param Channels The maximum number of channels. The default is 32.
* @return Returns true on success, otherwise false.
diff --git a/engines/sword25/sfx/soundengine_script.cpp b/engines/sword25/sfx/soundengine_script.cpp
index d347cf5eb4..d7771967a3 100644
--- a/engines/sword25/sfx/soundengine_script.cpp
+++ b/engines/sword25/sfx/soundengine_script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index 38c1c89109..b111746c32 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
/*
@@ -97,7 +94,7 @@ Common::Error Sword25Engine::run() {
}
Common::Error Sword25Engine::appStart() {
- // Initialise the graphics mode to ARGB8888
+ // Initialize the graphics mode to ARGB8888
Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
initGraphics(800, 600, true, &format);
if (format != g_system->getScreenFormat())
@@ -145,7 +142,7 @@ bool Sword25Engine::appMain() {
}
bool Sword25Engine::appEnd() {
- // The kernel is shutdown, and un-initialises all subsystems
+ // The kernel is shutdown, and un-initializes all subsystems
Kernel::deleteInstance();
AnimationTemplateRegistry::destroy();
diff --git a/engines/sword25/sword25.h b/engines/sword25/sword25.h
index 5bd27b311f..5d11aa69e5 100644
--- a/engines/sword25/sword25.h
+++ b/engines/sword25/sword25.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef SWORD25_H
diff --git a/engines/sword25/util/lua/lapi.cpp b/engines/sword25/util/lua/lapi.cpp
index b1118db368..16f8460e39 100644
--- a/engines/sword25/util/lua/lapi.cpp
+++ b/engines/sword25/util/lua/lapi.cpp
@@ -26,9 +26,8 @@
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
-#include "lundump.h"
#include "lvm.h"
-
+#include "common/textconsole.h"
const char lua_ident[] =
@@ -876,17 +875,8 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data) {
- int status;
- TValue *o;
- lua_lock(L);
- api_checknelems(L, 1);
- o = L->top - 1;
- if (isLfunction(o))
- status = luaU_dump(L, clvalue(o)->l.p, writer, data, 0);
- else
- status = 1;
- lua_unlock(L);
- return status;
+ error("lua_dump not supported: Handling of precompiled LUA scripts has been removed in ScummVM");
+ return 1; // error
}
diff --git a/engines/sword25/util/lua/lauxlib.cpp b/engines/sword25/util/lua/lauxlib.cpp
index 53c0556625..8978cd5613 100644
--- a/engines/sword25/util/lua/lauxlib.cpp
+++ b/engines/sword25/util/lua/lauxlib.cpp
@@ -6,7 +6,6 @@
#include <ctype.h>
-#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -23,7 +22,8 @@
#include "lua.h"
#include "lauxlib.h"
-
+#include "scummvm_file.h"
+#include "common/textconsole.h"
#define FREELIST_REF 0 /* free list of references */
@@ -521,7 +521,7 @@ LUALIB_API void luaL_unref (lua_State *L, int t, int ref) {
typedef struct LoadF {
int extraline;
- FILE *f;
+ Sword25::Sword25FileProxy *f;
char buff[LUAL_BUFFERSIZE];
} LoadF;
@@ -534,27 +534,31 @@ static const char *getF (lua_State *L, void *ud, size_t *size) {
*size = 1;
return "\n";
}
- if (feof(lf->f)) return NULL;
- *size = fread(lf->buff, 1, sizeof(lf->buff), lf->f);
+ if (lf->f->eof()) return NULL;
+ *size = lf->f->read(lf->buff, 1, sizeof(lf->buff));
return (*size > 0) ? lf->buff : NULL;
}
static int errfile (lua_State *L, const char *what, int fnameindex) {
- const char *serr = strerror(errno);
- const char *filename = lua_tostring(L, fnameindex) + 1;
- lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr);
- lua_remove(L, fnameindex);
- return LUA_ERRFILE;
+ const char *serr = "General error";
+ const char *filename = lua_tostring(L, fnameindex) + 1;
+ lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr);
+ lua_remove(L, fnameindex);
+ return LUA_ERRFILE;
}
LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
LoadF lf;
int status, readstatus;
- int c;
+// int c;
int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */
lf.extraline = 0;
+
+ lua_pushfstring(L, "@%s", filename);
+ lf.f = new Sword25::Sword25FileProxy(filename, "r");
+/*
if (filename == NULL) {
lua_pushliteral(L, "=stdin");
lf.f = stdin;
@@ -564,23 +568,25 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
lf.f = fopen(filename, "r");
if (lf.f == NULL) return errfile(L, "open", fnameindex);
}
- c = getc(lf.f);
- if (c == '#') { /* Unix exec. file? */
+
+ c = lf.f->getc();
+ if (c == '#') { // Unix exec. file?
lf.extraline = 1;
- while ((c = getc(lf.f)) != EOF && c != '\n') ; /* skip first line */
- if (c == '\n') c = getc(lf.f);
+ while ((c = lf.f->getc()) != EOF && c != '\n') ; // skip first line
+ if (c == '\n') c = lf.f->getc();
}
- if (c == LUA_SIGNATURE[0] && filename) { /* binary file? */
- lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */
+ if (c == LUA_SIGNATURE[0] && filename) { // binary file?
+ lf.f = freopen(filename, "rb", lf.f); // reopen in binary mode
if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
- /* skip eventual `#!...' */
- while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ;
+ // skip eventual `#!...'
+ while ((c = lf.f->getc()) != EOF && c != LUA_SIGNATURE[0]) ;
lf.extraline = 0;
}
ungetc(c, lf.f);
+*/
status = lua_load(L, getF, &lf, lua_tostring(L, -1));
- readstatus = ferror(lf.f);
- if (filename) fclose(lf.f); /* close file (even in case of errors) */
+ readstatus = 0; //ferror(lf.f);
+ if (filename) delete lf.f; // close file (even in case of errors)
if (readstatus) {
lua_settop(L, fnameindex); /* ignore results from `lua_load' */
return errfile(L, "read", fnameindex);
@@ -638,7 +644,7 @@ static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
static int panic (lua_State *L) {
(void)L; /* to avoid warnings */
- fprintf(stderr, "PANIC: unprotected error in call to Lua API (%s)\n",
+ warning("PANIC: unprotected error in call to Lua API (%s)\n",
lua_tostring(L, -1));
return 0;
}
diff --git a/engines/sword25/util/lua/ldo.cpp b/engines/sword25/util/lua/ldo.cpp
index 07508fbb14..bbcdf98b3d 100644
--- a/engines/sword25/util/lua/ldo.cpp
+++ b/engines/sword25/util/lua/ldo.cpp
@@ -5,6 +5,16 @@
*/
+// FIXME: LUAI_THROW and LUAI_TRY use either throw/catch or setjmp/longjmp.
+// Neither of these is supported in ScummVM. So we need to come up
+// with a replacement. The most simple, direct and crude approach:
+// Replace "throw" with an "error()" call. Of course we only
+// would want to do that if this actually never happens...
+#define FORBIDDEN_SYMBOL_EXCEPTION_setjmp
+#define FORBIDDEN_SYMBOL_EXCEPTION_longjmp
+
+#include "common/textconsole.h"
+
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
@@ -26,10 +36,9 @@
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
-#include "lundump.h"
#include "lvm.h"
#include "lzio.h"
-
+#include "common/textconsole.h"
@@ -94,6 +103,11 @@ static void resetstack (lua_State *L, int status) {
void luaD_throw (lua_State *L, int errcode) {
if (L->errorJmp) {
L->errorJmp->status = errcode;
+ // FIXME: LUAI_THROW and LUAI_TRY use either throw/catch or setjmp/longjmp.
+ // Neither of these is supported in ScummVM. So we need to come up
+ // with a replacement. The most simple, direct and crude approach:
+ // Replace "throw" with an "error()" call. Of course we only
+ // would want to do that if this actually never happens...
LUAI_THROW(L, L->errorJmp);
}
else {
@@ -103,7 +117,7 @@ void luaD_throw (lua_State *L, int errcode) {
lua_unlock(L);
G(L)->panic(L);
}
- exit(EXIT_FAILURE);
+ error("luaD_throw failure");
}
}
@@ -113,6 +127,11 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
lj.status = 0;
lj.previous = L->errorJmp; /* chain new error handler */
L->errorJmp = &lj;
+ // FIXME: LUAI_THROW and LUAI_TRY use either throw/catch or setjmp/longjmp.
+ // Neither of these is supported in ScummVM. So we need to come up
+ // with a replacement. The most simple, direct and crude approach:
+ // Replace "throw" with an "error()" call. Of course we only
+ // would want to do that if this actually never happens...
LUAI_TRY(L, &lj,
(*f)(L, ud);
);
@@ -494,8 +513,9 @@ static void f_parser (lua_State *L, void *ud) {
struct SParser *p = cast(struct SParser *, ud);
int c = luaZ_lookahead(p->z);
luaC_checkGC(L);
- tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z,
- &p->buff, p->name);
+ if (c == LUA_SIGNATURE[0])
+ error("Handling of precompiled LUA scripts has been removed in ScummVM");
+ tf = luaY_parser(L, p->z, &p->buff, p->name);
cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L)));
cl->l.p = tf;
for (i = 0; i < tf->nups; i++) /* initialize eventual upvalues */
diff --git a/engines/sword25/util/lua/ldump.cpp b/engines/sword25/util/lua/ldump.cpp
deleted file mode 100644
index 3ce16542d6..0000000000
--- a/engines/sword25/util/lua/ldump.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-** $Id$
-** save precompiled Lua chunks
-** See Copyright Notice in lua.h
-*/
-
-#include <stddef.h>
-
-#define ldump_c
-#define LUA_CORE
-
-#include "lua.h"
-
-#include "lobject.h"
-#include "lstate.h"
-#include "lundump.h"
-
-typedef struct {
- lua_State* L;
- lua_Writer writer;
- void* data;
- int strip;
- int status;
-} DumpState;
-
-#define DumpMem(b,n,size,D) DumpBlock(b,(n)*(size),D)
-#define DumpVar(x,D) DumpMem(&x,1,sizeof(x),D)
-
-static void DumpBlock(const void* b, size_t size, DumpState* D)
-{
- if (D->status==0)
- {
- lua_unlock(D->L);
- D->status=(*D->writer)(D->L,b,size,D->data);
- lua_lock(D->L);
- }
-}
-
-static void DumpChar(int y, DumpState* D)
-{
- char x=(char)y;
- DumpVar(x,D);
-}
-
-static void DumpInt(int x, DumpState* D)
-{
- DumpVar(x,D);
-}
-
-static void DumpNumber(lua_Number x, DumpState* D)
-{
- DumpVar(x,D);
-}
-
-static void DumpVector(const void* b, int n, size_t size, DumpState* D)
-{
- DumpInt(n,D);
- DumpMem(b,n,size,D);
-}
-
-static void DumpString(const TString* s, DumpState* D)
-{
- if (s==NULL || getstr(s)==NULL)
- {
- size_t size=0;
- DumpVar(size,D);
- }
- else
- {
- size_t size=s->tsv.len+1; /* include trailing '\0' */
- DumpVar(size,D);
- DumpBlock(getstr(s),size,D);
- }
-}
-
-#define DumpCode(f,D) DumpVector(f->code,f->sizecode,sizeof(Instruction),D)
-
-static void DumpFunction(const Proto* f, const TString* p, DumpState* D);
-
-static void DumpConstants(const Proto* f, DumpState* D)
-{
- int i,n=f->sizek;
- DumpInt(n,D);
- for (i=0; i<n; i++)
- {
- const TValue* o=&f->k[i];
- DumpChar(ttype(o),D);
- switch (ttype(o))
- {
- case LUA_TNIL:
- break;
- case LUA_TBOOLEAN:
- DumpChar(bvalue(o),D);
- break;
- case LUA_TNUMBER:
- DumpNumber(nvalue(o),D);
- break;
- case LUA_TSTRING:
- DumpString(rawtsvalue(o),D);
- break;
- default:
- lua_assert(0); /* cannot happen */
- break;
- }
- }
- n=f->sizep;
- DumpInt(n,D);
- for (i=0; i<n; i++) DumpFunction(f->p[i],f->source,D);
-}
-
-static void DumpDebug(const Proto* f, DumpState* D)
-{
- int i,n;
- n= (D->strip) ? 0 : f->sizelineinfo;
- DumpVector(f->lineinfo,n,sizeof(int),D);
- n= (D->strip) ? 0 : f->sizelocvars;
- DumpInt(n,D);
- for (i=0; i<n; i++)
- {
- DumpString(f->locvars[i].varname,D);
- DumpInt(f->locvars[i].startpc,D);
- DumpInt(f->locvars[i].endpc,D);
- }
- n= (D->strip) ? 0 : f->sizeupvalues;
- DumpInt(n,D);
- for (i=0; i<n; i++) DumpString(f->upvalues[i],D);
-}
-
-static void DumpFunction(const Proto* f, const TString* p, DumpState* D)
-{
- DumpString((f->source==p || D->strip) ? NULL : f->source,D);
- DumpInt(f->linedefined,D);
- DumpInt(f->lastlinedefined,D);
- DumpChar(f->nups,D);
- DumpChar(f->numparams,D);
- DumpChar(f->is_vararg,D);
- DumpChar(f->maxstacksize,D);
- DumpCode(f,D);
- DumpConstants(f,D);
- DumpDebug(f,D);
-}
-
-static void DumpHeader(DumpState* D)
-{
- char h[LUAC_HEADERSIZE];
- luaU_header(h);
- DumpBlock(h,LUAC_HEADERSIZE,D);
-}
-
-/*
-** dump Lua function as precompiled chunk
-*/
-int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip)
-{
- DumpState D;
- D.L=L;
- D.writer=w;
- D.data=data;
- D.strip=strip;
- D.status=0;
- DumpHeader(&D);
- DumpFunction(f,NULL,&D);
- return D.status;
-}
diff --git a/engines/sword25/util/lua/liolib.cpp b/engines/sword25/util/lua/liolib.cpp
index aa44dcafa3..b505d1e4df 100644
--- a/engines/sword25/util/lua/liolib.cpp
+++ b/engines/sword25/util/lua/liolib.cpp
@@ -5,7 +5,6 @@
*/
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -17,7 +16,8 @@
#include "lauxlib.h"
#include "lualib.h"
-
+#include "common/textconsole.h"
+#include "scummvm_file.h"
#define IO_INPUT 1
@@ -28,7 +28,7 @@ static const char *const fnames[] = {"input", "output"};
static int pushresult (lua_State *L, int i, const char *filename) {
- int en = errno; /* calls to Lua API may change this value */
+ int en = 0; /*errno;*/ // Currently hardcoded for ScumMVM, this may need to be changed
if (i) {
lua_pushboolean(L, 1);
return 1;
@@ -36,55 +36,56 @@ static int pushresult (lua_State *L, int i, const char *filename) {
else {
lua_pushnil(L);
if (filename)
- lua_pushfstring(L, "%s: %s", filename, strerror(en));
+ lua_pushfstring(L, "%s: %s", filename, "General error" /*strerror(en)*/);
else
- lua_pushfstring(L, "%s", strerror(en));
+ lua_pushfstring(L, "%s", "General error" /*strerror(en)*/);
lua_pushinteger(L, en);
return 3;
}
}
-
+/*
static void fileerror (lua_State *L, int arg, const char *filename) {
- lua_pushfstring(L, "%s: %s", filename, strerror(errno));
+ lua_pushfstring(L, "%s: %s", filename, "LUA I/O error descriptions have been removed in ScummVM");
luaL_argerror(L, arg, lua_tostring(L, -1));
}
-
+*/
#define tofilep(L) ((FILE **)luaL_checkudata(L, 1, LUA_FILEHANDLE))
-
+#define tofileProxy(L) ((Sword25::Sword25FileProxy **)luaL_checkudata(L, 1, LUA_FILEHANDLE))
static int io_type (lua_State *L) {
+ return luaL_error(L, "%s", "LUA I/O has been removed in ScummVM");
+/*
void *ud;
luaL_checkany(L, 1);
ud = lua_touserdata(L, 1);
lua_getfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE);
if (ud == NULL || !lua_getmetatable(L, 1) || !lua_rawequal(L, -2, -1))
- lua_pushnil(L); /* not a file */
+ lua_pushnil(L); // not a file
else if (*((FILE **)ud) == NULL)
lua_pushliteral(L, "closed file");
else
lua_pushliteral(L, "file");
return 1;
+*/
}
-
-static FILE *tofile (lua_State *L) {
- FILE **f = tofilep(L);
+static Sword25::Sword25FileProxy *tofile (lua_State *L) {
+ Sword25::Sword25FileProxy **f = tofileProxy(L);
if (*f == NULL)
luaL_error(L, "attempt to use a closed file");
return *f;
}
-
/*
** When creating file handles, always creates a `closed' file handle
** before opening the actual file; so, if there is a memory error, the
** file is not left opened.
*/
-static FILE **newfile (lua_State *L) {
- FILE **pf = (FILE **)lua_newuserdata(L, sizeof(FILE *));
+static Sword25::Sword25FileProxy **newfile (lua_State *L) {
+ Sword25::Sword25FileProxy **pf = (Sword25::Sword25FileProxy **)lua_newuserdata(L, sizeof(Sword25::Sword25FileProxy *));
*pf = NULL; /* file handle is currently `closed' */
luaL_getmetatable(L, LUA_FILEHANDLE);
lua_setmetatable(L, -2);
@@ -106,10 +107,13 @@ static int io_noclose (lua_State *L) {
** function to close 'popen' files
*/
static int io_pclose (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+/*
FILE **p = tofilep(L);
int ok = lua_pclose(L, *p);
*p = NULL;
return pushresult(L, ok, NULL);
+ */
}
@@ -117,52 +121,63 @@ static int io_pclose (lua_State *L) {
** function to close regular files
*/
static int io_fclose (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+ /*
FILE **p = tofilep(L);
int ok = (fclose(*p) == 0);
*p = NULL;
return pushresult(L, ok, NULL);
+ */
}
-
+/*
static int aux_close (lua_State *L) {
lua_getfenv(L, 1);
lua_getfield(L, -1, "__close");
return (lua_tocfunction(L, -1))(L);
}
-
+*/
static int io_close (lua_State *L) {
if (lua_isnone(L, 1))
lua_rawgeti(L, LUA_ENVIRONINDEX, IO_OUTPUT);
- tofile(L); /* make sure argument is a file */
- return aux_close(L);
+
+ Sword25::Sword25FileProxy **f = tofileProxy(L);
+ delete *f;
+ *f = NULL;
+
+ return 0;
}
static int io_gc (lua_State *L) {
- FILE *f = *tofilep(L);
- /* ignore closed files */
- if (f != NULL)
- aux_close(L);
+ Sword25::Sword25FileProxy **f = tofileProxy(L);
+ // ignore closed files
+ if (*f != NULL)
+ delete *f;
+
return 0;
}
static int io_tostring (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+ /*
FILE *f = *tofilep(L);
if (f == NULL)
lua_pushliteral(L, "file (closed)");
else
lua_pushfstring(L, "file (%p)", f);
return 1;
+ */
}
static int io_open (lua_State *L) {
const char *filename = luaL_checkstring(L, 1);
const char *mode = luaL_optstring(L, 2, "r");
- FILE **pf = newfile(L);
- *pf = fopen(filename, mode);
+ Sword25::Sword25FileProxy **pf = newfile(L);
+ *pf = new Sword25::Sword25FileProxy(filename, mode);
return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
}
@@ -172,21 +187,22 @@ static int io_open (lua_State *L) {
** correct __close for 'popen' files
*/
static int io_popen (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+/*
const char *filename = luaL_checkstring(L, 1);
const char *mode = luaL_optstring(L, 2, "r");
FILE **pf = newfile(L);
*pf = lua_popen(L, filename, mode);
return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
+ */
}
static int io_tmpfile (lua_State *L) {
- FILE **pf = newfile(L);
- *pf = tmpfile();
- return (*pf == NULL) ? pushresult(L, 0, NULL) : 1;
+ return luaL_error(L, "%s", "LUA I/O error descriptions have been removed in ScummVM");
}
-
+/*
static FILE *getiofile (lua_State *L, int findex) {
FILE *f;
lua_rawgeti(L, LUA_ENVIRONINDEX, findex);
@@ -195,8 +211,8 @@ static FILE *getiofile (lua_State *L, int findex) {
luaL_error(L, "standard %s file is closed", fnames[findex - 1]);
return f;
}
-
-
+*/
+/*
static int g_iofile (lua_State *L, int f, const char *mode) {
if (!lua_isnoneornil(L, 1)) {
const char *filename = lua_tostring(L, 1);
@@ -207,24 +223,26 @@ static int g_iofile (lua_State *L, int f, const char *mode) {
fileerror(L, 1, filename);
}
else {
- tofile(L); /* check that it's a valid file handle */
+ tofile(L); // check that it's a valid file handle
lua_pushvalue(L, 1);
}
lua_rawseti(L, LUA_ENVIRONINDEX, f);
}
- /* return current value */
+ // return current value
lua_rawgeti(L, LUA_ENVIRONINDEX, f);
return 1;
}
-
+*/
static int io_input (lua_State *L) {
- return g_iofile(L, IO_INPUT, "r");
+ error("LUA I/O has been removed in ScummVM");
+// return g_iofile(L, IO_INPUT, "r");
}
static int io_output (lua_State *L) {
- return g_iofile(L, IO_OUTPUT, "w");
+ error("LUA I/O has been removed in ScummVM");
+// return g_iofile(L, IO_OUTPUT, "w");
}
@@ -246,8 +264,10 @@ static int f_lines (lua_State *L) {
static int io_lines (lua_State *L) {
- if (lua_isnoneornil(L, 1)) { /* no arguments? */
- /* will iterate over default input */
+ error("LUA I/O has been removed in ScummVM");
+/*
+ if (lua_isnoneornil(L, 1)) { // no arguments?
+ // will iterate over default input
lua_rawgeti(L, LUA_ENVIRONINDEX, IO_INPUT);
return f_lines(L);
}
@@ -260,6 +280,7 @@ static int io_lines (lua_State *L) {
aux_lines(L, lua_gettop(L), 1);
return 1;
}
+ */
}
@@ -269,18 +290,18 @@ static int io_lines (lua_State *L) {
** =======================================================
*/
-
-static int read_number (lua_State *L, FILE *f) {
+/*
+static int read_number (lua_State *L, Sword25::Sword25FileProxy *f) {
lua_Number d;
if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {
lua_pushnumber(L, d);
return 1;
}
- else return 0; /* read fails */
+ else return 0; // read fails
}
-static int test_eof (lua_State *L, FILE *f) {
+static int test_eof (lua_State *L, Sword25::Sword25FileProxy *f) {
int c = getc(f);
ungetc(c, f);
lua_pushlstring(L, NULL, 0);
@@ -288,56 +309,56 @@ static int test_eof (lua_State *L, FILE *f) {
}
-static int read_line (lua_State *L, FILE *f) {
+static int read_line (lua_State *L, Sword25::Sword25FileProxy *f) {
luaL_Buffer b;
luaL_buffinit(L, &b);
for (;;) {
size_t l;
char *p = luaL_prepbuffer(&b);
- if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { /* eof? */
- luaL_pushresult(&b); /* close buffer */
- return (lua_objlen(L, -1) > 0); /* check whether read something */
+ if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { // eof?
+ luaL_pushresult(&b); // close buffer
+ return (lua_objlen(L, -1) > 0); // check whether read something
}
l = strlen(p);
if (l == 0 || p[l-1] != '\n')
luaL_addsize(&b, l);
else {
- luaL_addsize(&b, l - 1); /* do not include `eol' */
- luaL_pushresult(&b); /* close buffer */
- return 1; /* read at least an `eol' */
+ luaL_addsize(&b, l - 1); // do not include `eol'
+ luaL_pushresult(&b); // close buffer
+ return 1; // read at least an `eol'
}
}
}
-static int read_chars (lua_State *L, FILE *f, size_t n) {
- size_t rlen; /* how much to read */
- size_t nr; /* number of chars actually read */
+static int read_chars (lua_State *L, Sword25::Sword25FileProxy *f, size_t n) {
+ size_t rlen; // how much to read
+ size_t nr; // number of chars actually read
luaL_Buffer b;
luaL_buffinit(L, &b);
- rlen = LUAL_BUFFERSIZE; /* try to read that much each time */
+ rlen = LUAL_BUFFERSIZE; // try to read that much each time
do {
char *p = luaL_prepbuffer(&b);
- if (rlen > n) rlen = n; /* cannot read more than asked */
+ if (rlen > n) rlen = n; // cannot read more than asked
nr = fread(p, sizeof(char), rlen, f);
luaL_addsize(&b, nr);
- n -= nr; /* still have to read `n' chars */
- } while (n > 0 && nr == rlen); /* until end of count or eof */
- luaL_pushresult(&b); /* close buffer */
+ n -= nr; // still have to read `n' chars
+ } while (n > 0 && nr == rlen); // until end of count or eof
+ luaL_pushresult(&b); // close buffer
return (n == 0 || lua_objlen(L, -1) > 0);
}
-static int g_read (lua_State *L, FILE *f, int first) {
+static int g_read (lua_State *L, Sword25::Sword25FileProxy *f, int first) {
int nargs = lua_gettop(L) - 1;
int success;
int n;
clearerr(f);
- if (nargs == 0) { /* no arguments? */
+ if (nargs == 0) { // no arguments?
success = read_line(L, f);
- n = first+1; /* to return 1 result */
+ n = first+1; // to return 1 result
}
- else { /* ensure stack space for all results and for auxlib's buffer */
+ else { // ensure stack space for all results and for auxlib's buffer
luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments");
success = 1;
for (n = first; nargs-- && success; n++) {
@@ -349,15 +370,15 @@ static int g_read (lua_State *L, FILE *f, int first) {
const char *p = lua_tostring(L, n);
luaL_argcheck(L, p && p[0] == '*', n, "invalid option");
switch (p[1]) {
- case 'n': /* number */
+ case 'n': // number
success = read_number(L, f);
break;
- case 'l': /* line */
+ case 'l': // line
success = read_line(L, f);
break;
- case 'a': /* file */
- read_chars(L, f, ~((size_t)0)); /* read MAX_SIZE_T chars */
- success = 1; /* always success */
+ case 'a': // file
+ read_chars(L, f, ~((size_t)0)); // read MAX_SIZE_T chars
+ success = 1; // always success
break;
default:
return luaL_argerror(L, n, "invalid format");
@@ -368,58 +389,66 @@ static int g_read (lua_State *L, FILE *f, int first) {
if (ferror(f))
return pushresult(L, 0, NULL);
if (!success) {
- lua_pop(L, 1); /* remove last result */
- lua_pushnil(L); /* push nil instead */
+ lua_pop(L, 1); // remove last result
+ lua_pushnil(L); // push nil instead
}
return n - first;
}
-
+*/
static int io_read (lua_State *L) {
- return g_read(L, getiofile(L, IO_INPUT), 1);
+ error("LUA I/O has been removed in ScummVM");
+// return g_read(L, getiofile(L, IO_INPUT), 1);
}
static int f_read (lua_State *L) {
- return g_read(L, tofile(L), 2);
+ error("LUA I/O has been removed in ScummVM");
+// return g_read(L, tofile(L), 2);
}
static int io_readline (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+/*
FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1));
int sucess;
- if (f == NULL) /* file is already closed? */
+ if (f == NULL) // file is already closed?
luaL_error(L, "file is already closed");
sucess = read_line(L, f);
if (ferror(f))
- return luaL_error(L, "%s", strerror(errno));
+ return luaL_error(L, "%s", "LUA I/O error descriptions have been removed in ScummVM");
if (sucess) return 1;
- else { /* EOF */
- if (lua_toboolean(L, lua_upvalueindex(2))) { /* generator created file? */
+ else { // EOF
+ if (lua_toboolean(L, lua_upvalueindex(2))) { // generator created file?
lua_settop(L, 0);
lua_pushvalue(L, lua_upvalueindex(1));
- aux_close(L); /* close it */
+ aux_close(L); // close it
}
return 0;
}
+*/
}
/* }====================================================== */
-static int g_write (lua_State *L, FILE *f, int arg) {
+static int g_write (lua_State *L, Sword25::Sword25FileProxy *f, int arg) {
int nargs = lua_gettop(L) - 1;
int status = 1;
for (; nargs--; arg++) {
if (lua_type(L, arg) == LUA_TNUMBER) {
- /* optimization: could be done exactly as for strings */
- status = status &&
- fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0;
- }
+ // optimization: could be done exactly as for strings
+ if (status) {
+ char buffer[20];
+ sprintf(buffer, LUA_NUMBER_FMT, lua_tonumber(L, arg));
+ status = f->write(buffer, strlen(buffer)) == strlen(buffer);
+ }
+ }
else {
size_t l;
const char *s = luaL_checklstring(L, arg, &l);
- status = status && (fwrite(s, sizeof(char), l, f) == l);
+ status = status && (f->write(s, l) == l);
}
}
return pushresult(L, status, NULL);
@@ -427,7 +456,8 @@ static int g_write (lua_State *L, FILE *f, int arg) {
static int io_write (lua_State *L) {
- return g_write(L, getiofile(L, IO_OUTPUT), 1);
+ error("LUA I/O has been removed in ScummVM");
+// return g_write(L, getiofile(L, IO_OUTPUT), 1);
}
@@ -437,6 +467,8 @@ static int f_write (lua_State *L) {
static int f_seek (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+ /*
static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END};
static const char *const modenames[] = {"set", "cur", "end", NULL};
FILE *f = tofile(L);
@@ -444,15 +476,18 @@ static int f_seek (lua_State *L) {
long offset = luaL_optlong(L, 3, 0);
op = fseek(f, offset, mode[op]);
if (op)
- return pushresult(L, 0, NULL); /* error */
+ return pushresult(L, 0, NULL); // error
else {
lua_pushinteger(L, ftell(f));
return 1;
}
+*/
}
static int f_setvbuf (lua_State *L) {
+ error("LUA I/O has been removed in ScummVM");
+ /*
static const int mode[] = {_IONBF, _IOFBF, _IOLBF};
static const char *const modenames[] = {"no", "full", "line", NULL};
FILE *f = tofile(L);
@@ -460,17 +495,20 @@ static int f_setvbuf (lua_State *L) {
lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE);
int res = setvbuf(f, NULL, mode[op], sz);
return pushresult(L, res == 0, NULL);
+ */
}
static int io_flush (lua_State *L) {
- return pushresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL);
+ error("LUA I/O has been removed in ScummVM");
+// return pushresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL);
}
static int f_flush (lua_State *L) {
- return pushresult(L, fflush(tofile(L)) == 0, NULL);
+ error("LUA I/O has been removed in ScummVM");
+// return pushresult(L, fflush(tofile(L)) == 0, NULL);
}
@@ -511,18 +549,18 @@ static void createmeta (lua_State *L) {
luaL_register(L, NULL, flib); /* file methods */
}
-
+/*
static void createstdfile (lua_State *L, FILE *f, int k, const char *fname) {
*newfile(L) = f;
if (k > 0) {
lua_pushvalue(L, -1);
lua_rawseti(L, LUA_ENVIRONINDEX, k);
}
- lua_pushvalue(L, -2); /* copy environment */
- lua_setfenv(L, -2); /* set it */
+ lua_pushvalue(L, -2); // copy environment
+ lua_setfenv(L, -2); // set it
lua_setfield(L, -3, fname);
}
-
+*/
static void newfenv (lua_State *L, lua_CFunction cls) {
lua_createtable(L, 0, 1);
@@ -540,9 +578,11 @@ LUALIB_API int luaopen_io (lua_State *L) {
luaL_register(L, LUA_IOLIBNAME, iolib);
/* create (and set) default files */
newfenv(L, io_noclose); /* close function for default files */
+/*
createstdfile(L, stdin, IO_INPUT, "stdin");
createstdfile(L, stdout, IO_OUTPUT, "stdout");
createstdfile(L, stderr, 0, "stderr");
+*/
lua_pop(L, 1); /* pop environment for default files */
lua_getfield(L, -1, "popen");
newfenv(L, io_pclose); /* create environment for 'popen' */
diff --git a/engines/sword25/util/lua/llex.cpp b/engines/sword25/util/lua/llex.cpp
index fdde2b8e5f..4d73a6a600 100644
--- a/engines/sword25/util/lua/llex.cpp
+++ b/engines/sword25/util/lua/llex.cpp
@@ -6,7 +6,7 @@
#include <ctype.h>
-#include <locale.h>
+#include <stdio.h>
#include <string.h>
#define llex_c
@@ -176,9 +176,23 @@ static void buffreplace (LexState *ls, char from, char to) {
static void trydecpoint (LexState *ls, SemInfo *seminfo) {
/* format error: try to update decimal point separator */
- struct lconv *cv = localeconv();
+ // Normally we'd use localeconv() to get the decimal point separator, but
+ // annoyingly that is not available on some platforms, e.g. Android. Figure
+ // it out by formatting a known value and extract the separator from that
+ // instead. The result could be cached, but considering the game I doubt
+ // this will ever be a bottleneck. Note that the separator is assumed to fit
+ // in a char, but that was a limitation in the original code as well.
char old = ls->decpoint;
- ls->decpoint = (cv ? cv->decimal_point[0] : '.');
+ char buf[5];
+ int i;
+ sprintf(buf, "%.1f", 1.0);
+ ls->decpoint = '.';
+ for (i = 0; buf[i]; i++) {
+ if (!isspace(buf[i]) && !isdigit(buf[i])) {
+ ls->decpoint = buf[i];
+ break;
+ }
+ }
buffreplace(ls, old, ls->decpoint); /* try updated decimal separator */
if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) {
/* format error with correct decimal point: no more options */
diff --git a/engines/sword25/util/lua/lmathlib.cpp b/engines/sword25/util/lua/lmathlib.cpp
index 7e64d75789..6c36bbcf4e 100644
--- a/engines/sword25/util/lua/lmathlib.cpp
+++ b/engines/sword25/util/lua/lmathlib.cpp
@@ -5,6 +5,10 @@
*/
+// FIXME: rand and srand should be replaced by a RandomSource
+#define FORBIDDEN_SYMBOL_EXCEPTION_rand
+#define FORBIDDEN_SYMBOL_EXCEPTION_srand
+
#include <stdlib.h>
// MSVC does not define M_PI, M_SQRT2 and other math defines by default.
// _USE_MATH_DEFINES must be defined in order to have these defined, thus
diff --git a/engines/sword25/util/lua/loadlib.cpp b/engines/sword25/util/lua/loadlib.cpp
index 2549e2bdb1..9795a575f5 100644
--- a/engines/sword25/util/lua/loadlib.cpp
+++ b/engines/sword25/util/lua/loadlib.cpp
@@ -9,10 +9,6 @@
*/
-#include <stdlib.h>
-#include <string.h>
-
-
#define loadlib_c
#define LUA_LIB
@@ -35,18 +31,6 @@
#define LIB_FAIL "open"
-/* error codes for ll_loadfunc */
-#define ERRLIB 1
-#define ERRFUNC 2
-
-#define setprogdir(L) ((void)0)
-
-
-static void ll_unloadlib (void *lib);
-static void *ll_load (lua_State *L, const char *path);
-static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym);
-
-
/*
** {======================================================
** Fallback for other systems
@@ -60,24 +44,6 @@ static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym);
#define DLMSG "dynamic libraries not enabled; check your Lua installation"
-static void ll_unloadlib (void *lib) {
- (void)lib; /* to avoid warnings */
-}
-
-
-static void *ll_load (lua_State *L, const char *path) {
- (void)path; /* to avoid warnings */
- lua_pushliteral(L, DLMSG);
- return NULL;
-}
-
-
-static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
- (void)lib; (void)sym; /* to avoid warnings */
- lua_pushliteral(L, DLMSG);
- return NULL;
-}
-
/* }====================================================== */
@@ -108,39 +74,33 @@ static void **ll_register (lua_State *L, const char *path) {
*/
static int gctm (lua_State *L) {
void **lib = (void **)luaL_checkudata(L, 1, "_LOADLIB");
- if (*lib) ll_unloadlib(*lib);
*lib = NULL; /* mark library as closed */
return 0;
}
-static int ll_loadfunc (lua_State *L, const char *path, const char *sym) {
- void **reg = ll_register(L, path);
- if (*reg == NULL) *reg = ll_load(L, path);
- if (*reg == NULL)
- return ERRLIB; /* unable to load library */
- else {
- lua_CFunction f = ll_sym(L, *reg, sym);
- if (f == NULL)
- return ERRFUNC; /* unable to find function */
- lua_pushcfunction(L, f);
- return 0; /* return function */
- }
-}
+/* error codes for ll_loadfunc */
+#define ERRLIB 1
+#define ERRFUNC 2
static int ll_loadlib (lua_State *L) {
const char *path = luaL_checkstring(L, 1);
- const char *init = luaL_checkstring(L, 2);
- int stat = ll_loadfunc(L, path, init);
- if (stat == 0) /* no errors? */
- return 1; /* return the loaded function */
- else { /* error; error message is on stack top */
- lua_pushnil(L);
- lua_insert(L, -2);
- lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init");
- return 3; /* return nil, error message, and where */
+// const char *init = luaL_checkstring(L, 2);
+ int stat;
+ void **reg = ll_register(L, path);
+ if (*reg == NULL) {
+ stat = ERRLIB; /* unable to load library */
+ } else {
+ stat = ERRFUNC; /* unable to find function */
}
+ lua_pushliteral(L, DLMSG);
+
+ /* error; error message is on stack top */
+ lua_pushnil(L);
+ lua_insert(L, -2);
+ lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init");
+ return 3; /* return nil, error message, and where */
}
@@ -152,109 +112,6 @@ static int ll_loadlib (lua_State *L) {
*/
-static int readable (const char *filename) {
- FILE *f = fopen(filename, "r"); /* try to open file */
- if (f == NULL) return 0; /* open failed */
- fclose(f);
- return 1;
-}
-
-
-static const char *pushnexttemplate (lua_State *L, const char *path) {
- const char *l;
- while (*path == *LUA_PATHSEP) path++; /* skip separators */
- if (*path == '\0') return NULL; /* no more templates */
- l = strchr(path, *LUA_PATHSEP); /* find next separator */
- if (l == NULL) l = path + strlen(path);
- lua_pushlstring(L, path, l - path); /* template */
- return l;
-}
-
-
-static const char *findfile (lua_State *L, const char *name,
- const char *pname) {
- const char *path;
- name = luaL_gsub(L, name, ".", LUA_DIRSEP);
- lua_getfield(L, LUA_ENVIRONINDEX, pname);
- path = lua_tostring(L, -1);
- if (path == NULL)
- luaL_error(L, LUA_QL("package.%s") " must be a string", pname);
- lua_pushliteral(L, ""); /* error accumulator */
- while ((path = pushnexttemplate(L, path)) != NULL) {
- const char *filename;
- filename = luaL_gsub(L, lua_tostring(L, -1), LUA_PATH_MARK, name);
- lua_remove(L, -2); /* remove path template */
- if (readable(filename)) /* does file exist and is readable? */
- return filename; /* return that file name */
- lua_pushfstring(L, "\n\tno file " LUA_QS, filename);
- lua_remove(L, -2); /* remove file name */
- lua_concat(L, 2); /* add entry to possible error message */
- }
- return NULL; /* not found */
-}
-
-
-static void loaderror (lua_State *L, const char *filename) {
- luaL_error(L, "error loading module " LUA_QS " from file " LUA_QS ":\n\t%s",
- lua_tostring(L, 1), filename, lua_tostring(L, -1));
-}
-
-
-static int loader_Lua (lua_State *L) {
- const char *filename;
- const char *name = luaL_checkstring(L, 1);
- filename = findfile(L, name, "path");
- if (filename == NULL) return 1; /* library not found in this path */
- if (luaL_loadfile(L, filename) != 0)
- loaderror(L, filename);
- return 1; /* library loaded successfully */
-}
-
-
-static const char *mkfuncname (lua_State *L, const char *modname) {
- const char *funcname;
- const char *mark = strchr(modname, *LUA_IGMARK);
- if (mark) modname = mark + 1;
- funcname = luaL_gsub(L, modname, ".", LUA_OFSEP);
- funcname = lua_pushfstring(L, POF"%s", funcname);
- lua_remove(L, -2); /* remove 'gsub' result */
- return funcname;
-}
-
-
-static int loader_C (lua_State *L) {
- const char *funcname;
- const char *name = luaL_checkstring(L, 1);
- const char *filename = findfile(L, name, "cpath");
- if (filename == NULL) return 1; /* library not found in this path */
- funcname = mkfuncname(L, name);
- if (ll_loadfunc(L, filename, funcname) != 0)
- loaderror(L, filename);
- return 1; /* library loaded successfully */
-}
-
-
-static int loader_Croot (lua_State *L) {
- const char *funcname;
- const char *filename;
- const char *name = luaL_checkstring(L, 1);
- const char *p = strchr(name, '.');
- int stat;
- if (p == NULL) return 0; /* is root */
- lua_pushlstring(L, name, p - name);
- filename = findfile(L, lua_tostring(L, -1), "cpath");
- if (filename == NULL) return 1; /* root not found */
- funcname = mkfuncname(L, name);
- if ((stat = ll_loadfunc(L, filename, funcname)) != 0) {
- if (stat != ERRFUNC) loaderror(L, filename); /* real error */
- lua_pushfstring(L, "\n\tno module " LUA_QS " in file " LUA_QS,
- name, filename);
- return 1; /* function not found */
- }
- return 1;
-}
-
-
static int loader_preload (lua_State *L) {
const char *name = luaL_checkstring(L, 1);
lua_getfield(L, LUA_ENVIRONINDEX, "preload");
@@ -407,23 +264,11 @@ static int ll_seeall (lua_State *L) {
-/* auxiliary mark (for internal use) */
-#define AUXMARK "\1"
-
static void setpath (lua_State *L, const char *fieldname, const char *envname,
const char *def) {
- const char *path = getenv(envname);
- if (path == NULL) /* no environment variable? */
- lua_pushstring(L, def); /* use default */
- else {
- /* replace ";;" by ";AUXMARK;" and then AUXMARK by default path */
- path = luaL_gsub(L, path, LUA_PATHSEP LUA_PATHSEP,
- LUA_PATHSEP AUXMARK LUA_PATHSEP);
- luaL_gsub(L, path, AUXMARK, def);
- lua_remove(L, -2);
- }
- setprogdir(L);
- lua_setfield(L, -2, fieldname);
+ // no environment variable -> use default
+ lua_pushstring(L, def);
+ lua_setfield(L, -2, fieldname);
}
@@ -442,7 +287,7 @@ static const luaL_Reg ll_funcs[] = {
static const lua_CFunction loaders[] =
- {loader_preload, loader_Lua, loader_C, loader_Croot, NULL};
+ {loader_preload, NULL};
LUALIB_API int luaopen_package (lua_State *L) {
diff --git a/engines/sword25/util/lua/loslib.cpp b/engines/sword25/util/lua/loslib.cpp
index 035925ceb5..b61f8c65e1 100644
--- a/engines/sword25/util/lua/loslib.cpp
+++ b/engines/sword25/util/lua/loslib.cpp
@@ -4,11 +4,9 @@
** See Copyright Notice in lua.h
*/
+// FIXME: Get rid of all time.h stuff
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
-#include <errno.h>
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
#include <time.h>
#define loslib_c
@@ -19,54 +17,53 @@
#include "lauxlib.h"
#include "lualib.h"
-
-static int os_pushresult (lua_State *L, int i, const char *filename) {
- int en = errno; /* calls to Lua API may change this value */
- if (i) {
- lua_pushboolean(L, 1);
- return 1;
- }
- else {
- lua_pushnil(L);
- lua_pushfstring(L, "%s: %s", filename, strerror(en));
- lua_pushinteger(L, en);
- return 3;
- }
-}
+#include "common/system.h"
+#include "common/textconsole.h"
static int os_execute (lua_State *L) {
- lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));
+ // Non-portable call, removed in ScummVM.
+ // FIXME: Is this ever invoked? If so, investigate that code further.
+ lua_pushinteger(L, -1); // signal that an error occurred
return 1;
}
static int os_remove (lua_State *L) {
- const char *filename = luaL_checkstring(L, 1);
- return os_pushresult(L, remove(filename) == 0, filename);
+ // Non-portable call that deletes a file. Removed in ScummVM.
+ // This call is invoked in sword25 when loading games in order to remove the
+ // temporary savegame thumbnail that the original engine code created. We
+ // embed the thumbnail in the savegame instead, so this call is not needed at
+ // all.
+ return 1;
}
static int os_rename (lua_State *L) {
- const char *fromname = luaL_checkstring(L, 1);
- const char *toname = luaL_checkstring(L, 2);
- return os_pushresult(L, rename(fromname, toname) == 0, fromname);
+ // Non-portable call, removed in ScummVM.
+ return 1;
}
static int os_tmpname (lua_State *L) {
+ // Non-portable call, removed in ScummVM.
+ // FIXME: Why do we return an error in tmpname, but for other
+ // removed methods we just do nothing?
return luaL_error(L, "unable to generate a unique filename");
}
static int os_getenv (lua_State *L) {
- lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */
+ // Non-portable call, removed in ScummVM.
+ // FIXME: Is this ever invoked? If so, investigate that code further.
+ lua_pushstring(L, NULL);
return 1;
}
static int os_clock (lua_State *L) {
- lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC);
+ // Non-portable call to clock() replaced by invocation of OSystem::getMillis.
+ lua_pushnumber(L, ((lua_Number)g_system->getMillis())/(lua_Number)1000);
return 1;
}
@@ -117,6 +114,12 @@ static int getfield (lua_State *L, const char *key, int d) {
static int os_date (lua_State *L) {
const char *s = luaL_optstring(L, 1, "%c");
+ // FIXME: Rewrite the code below to use OSystem::getTimeAndDate
+ // Alternatively, remove it, if sword25 does not use it.
+ //
+ // The former would mean sacrificing the ability to choose the timezone, *or*
+ // we would have to drive an effort to add time zone support to OSystem (is it
+ // worth that, though???)
time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL));
struct tm *stm;
if (*s == '!') { /* UTC? */
@@ -162,6 +165,8 @@ static int os_date (lua_State *L) {
static int os_time (lua_State *L) {
+ // FIXME: Rewrite the code below to use OSystem::getTimeAndDate.
+ // Alternatively, remove it, if sword25 does not use it.
time_t t;
if (lua_isnoneornil(L, 1)) /* called without args? */
t = time(NULL); /* get current time */
@@ -187,6 +192,9 @@ static int os_time (lua_State *L) {
static int os_difftime (lua_State *L) {
+ // FIXME: difftime is not portable, unfortunately.
+ // So we either have to replace this code, or just remove it,
+ // depending on whether sword25 actually uses it.
lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)),
(time_t)(luaL_optnumber(L, 2, 0))));
return 1;
@@ -196,19 +204,20 @@ static int os_difftime (lua_State *L) {
static int os_setlocale (lua_State *L) {
- static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY,
- LC_NUMERIC, LC_TIME};
- static const char *const catnames[] = {"all", "collate", "ctype", "monetary",
- "numeric", "time", NULL};
- const char *l = luaL_optstring(L, 1, NULL);
- int op = luaL_checkoption(L, 2, "all", catnames);
- lua_pushstring(L, setlocale(cat[op], l));
+ // Non-portable call to set the numeric locale. Removed in ScummVM, as it's
+ // not used in sword25.
return 1;
}
static int os_exit (lua_State *L) {
- exit(luaL_optint(L, 1, EXIT_SUCCESS));
+ // FIXME: Using exit is not portable!
+ // Using OSystem::quit() isn't really a great idea, either.
+ // We really would prefer to let the main run loop exit, so that
+ // our main() can perform cleanup.
+ if (0 == luaL_optint(L, 1, EXIT_SUCCESS))
+ g_system->quit();
+ error("LUA os_exit invokes with non-zero exit value");
}
static const luaL_Reg syslib[] = {
diff --git a/engines/sword25/util/lua/lua.h b/engines/sword25/util/lua/lua.h
index 088a511cf9..417cdadf8b 100644
--- a/engines/sword25/util/lua/lua.h
+++ b/engines/sword25/util/lua/lua.h
@@ -9,6 +9,8 @@
#ifndef lua_h
#define lua_h
+#include "common/scummsys.h"
+
#include <stdarg.h>
#include <stddef.h>
diff --git a/engines/sword25/util/lua/luaconf.h b/engines/sword25/util/lua/luaconf.h
index 669b0e7a49..f3509e969b 100644
--- a/engines/sword25/util/lua/luaconf.h
+++ b/engines/sword25/util/lua/luaconf.h
@@ -183,7 +183,11 @@
#define LUAI_DATA /* empty */
#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
- defined(__ELF__)
+ defined(__ELF__) && !defined(__PLAYSTATION2__)
+/*
+** The PS2 gcc compiler doesn't like the visibility attribute, so
+** we use the normal "extern" definitions in the block below
+*/
#define LUAI_FUNC __attribute__((visibility("hidden"))) extern
#define LUAI_DATA LUAI_FUNC
@@ -345,7 +349,7 @@
/*
@@ LUA_COMPAT_LSTR controls compatibility with old long string nesting
@* facility.
-** CHANGE it to 2 if you want the old behaviour, or undefine it to turn
+** CHANGE it to 2 if you want the old behavior, or undefine it to turn
** off the advisory error when nesting [[...]].
*/
#define LUA_COMPAT_LSTR 1
@@ -634,33 +638,6 @@ union luai_Cast { double l_d; long l_l; };
/*
-@@ lua_tmpnam is the function that the OS library uses to create a
-@* temporary name.
-@@ LUA_TMPNAMBUFSIZE is the maximum size of a name created by lua_tmpnam.
-** CHANGE them if you have an alternative to tmpnam (which is considered
-** insecure) or if you want the original tmpnam anyway. By default, Lua
-** uses tmpnam except when POSIX is available, where it uses mkstemp.
-*/
-#if defined(loslib_c) || defined(luaall_c)
-
-#if defined(LUA_USE_MKSTEMP)
-#include <unistd.h>
-#define LUA_TMPNAMBUFSIZE 32
-#define lua_tmpnam(b,e) { \
- strcpy(b, "/tmp/lua_XXXXXX"); \
- e = mkstemp(b); \
- if (e != -1) close(e); \
- e = (e == -1); }
-
-#else
-#define LUA_TMPNAMBUFSIZE L_tmpnam
-#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
-#endif
-
-#endif
-
-
-/*
@@ lua_popen spawns a new process connected to the current one through
@* the file streams.
** CHANGE it if you have a way to implement it in your system.
diff --git a/engines/sword25/util/lua/lundump.cpp b/engines/sword25/util/lua/lundump.cpp
deleted file mode 100644
index 4ffc623575..0000000000
--- a/engines/sword25/util/lua/lundump.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
-** $Id$
-** load precompiled Lua chunks
-** See Copyright Notice in lua.h
-*/
-
-#include <string.h>
-
-#define lundump_c
-#define LUA_CORE
-
-#include "lua.h"
-
-#include "ldebug.h"
-#include "ldo.h"
-#include "lfunc.h"
-#include "lmem.h"
-#include "lobject.h"
-#include "lstring.h"
-#include "lundump.h"
-#include "lzio.h"
-
-typedef struct {
- lua_State* L;
- ZIO* Z;
- Mbuffer* b;
- const char* name;
-} LoadState;
-
-#ifdef LUAC_TRUST_BINARIES
-#define IF(c,s)
-#define error(S,s)
-#else
-#define IF(c,s) if (c) error(S,s)
-
-static void error(LoadState* S, const char* why)
-{
- luaO_pushfstring(S->L,"%s: %s in precompiled chunk",S->name,why);
- luaD_throw(S->L,LUA_ERRSYNTAX);
-}
-#endif
-
-#define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size))
-#define LoadByte(S) (lu_byte)LoadChar(S)
-#define LoadVar(S,x) LoadMem(S,&x,1,sizeof(x))
-#define LoadVector(S,b,n,size) LoadMem(S,b,n,size)
-
-static void LoadBlock(LoadState* S, void* b, size_t size)
-{
- size_t r=luaZ_read(S->Z,b,size);
- UNUSED(r);
- IF (r!=0, "unexpected end");
-}
-
-static int LoadChar(LoadState* S)
-{
- char x;
- LoadVar(S,x);
- return x;
-}
-
-static int LoadInt(LoadState* S)
-{
- int x;
- LoadVar(S,x);
- IF (x<0, "bad integer");
- return x;
-}
-
-static lua_Number LoadNumber(LoadState* S)
-{
- lua_Number x;
- LoadVar(S,x);
- return x;
-}
-
-static TString* LoadString(LoadState* S)
-{
- size_t size;
- LoadVar(S,size);
- if (size==0)
- return NULL;
- else
- {
- char* s=luaZ_openspace(S->L,S->b,size);
- LoadBlock(S,s,size);
- return luaS_newlstr(S->L,s,size-1); /* remove trailing '\0' */
- }
-}
-
-static void LoadCode(LoadState* S, Proto* f)
-{
- int n=LoadInt(S);
- f->code=luaM_newvector(S->L,n,Instruction);
- f->sizecode=n;
- LoadVector(S,f->code,n,sizeof(Instruction));
-}
-
-static Proto* LoadFunction(LoadState* S, TString* p);
-
-static void LoadConstants(LoadState* S, Proto* f)
-{
- int i,n;
- n=LoadInt(S);
- f->k=luaM_newvector(S->L,n,TValue);
- f->sizek=n;
- for (i=0; i<n; i++) setnilvalue(&f->k[i]);
- for (i=0; i<n; i++)
- {
- TValue* o=&f->k[i];
- int t=LoadChar(S);
- switch (t)
- {
- case LUA_TNIL:
- setnilvalue(o);
- break;
- case LUA_TBOOLEAN:
- setbvalue(o,LoadChar(S));
- break;
- case LUA_TNUMBER:
- setnvalue(o,LoadNumber(S));
- break;
- case LUA_TSTRING:
- setsvalue2n(S->L,o,LoadString(S));
- break;
- default:
- error(S,"bad constant");
- break;
- }
- }
- n=LoadInt(S);
- f->p=luaM_newvector(S->L,n,Proto*);
- f->sizep=n;
- for (i=0; i<n; i++) f->p[i]=NULL;
- for (i=0; i<n; i++) f->p[i]=LoadFunction(S,f->source);
-}
-
-static void LoadDebug(LoadState* S, Proto* f)
-{
- int i,n;
- n=LoadInt(S);
- f->lineinfo=luaM_newvector(S->L,n,int);
- f->sizelineinfo=n;
- LoadVector(S,f->lineinfo,n,sizeof(int));
- n=LoadInt(S);
- f->locvars=luaM_newvector(S->L,n,LocVar);
- f->sizelocvars=n;
- for (i=0; i<n; i++) f->locvars[i].varname=NULL;
- for (i=0; i<n; i++)
- {
- f->locvars[i].varname=LoadString(S);
- f->locvars[i].startpc=LoadInt(S);
- f->locvars[i].endpc=LoadInt(S);
- }
- n=LoadInt(S);
- f->upvalues=luaM_newvector(S->L,n,TString*);
- f->sizeupvalues=n;
- for (i=0; i<n; i++) f->upvalues[i]=NULL;
- for (i=0; i<n; i++) f->upvalues[i]=LoadString(S);
-}
-
-static Proto* LoadFunction(LoadState* S, TString* p)
-{
- Proto* f=luaF_newproto(S->L);
- setptvalue2s(S->L,S->L->top,f); incr_top(S->L);
- f->source=LoadString(S); if (f->source==NULL) f->source=p;
- f->linedefined=LoadInt(S);
- f->lastlinedefined=LoadInt(S);
- f->nups=LoadByte(S);
- f->numparams=LoadByte(S);
- f->is_vararg=LoadByte(S);
- f->maxstacksize=LoadByte(S);
- LoadCode(S,f);
- LoadConstants(S,f);
- LoadDebug(S,f);
- IF (!luaG_checkcode(f), "bad code");
- S->L->top--;
- return f;
-}
-
-static void LoadHeader(LoadState* S)
-{
- char h[LUAC_HEADERSIZE];
- char s[LUAC_HEADERSIZE];
- luaU_header(h);
- LoadBlock(S,s,LUAC_HEADERSIZE);
- IF (memcmp(h,s,LUAC_HEADERSIZE)!=0, "bad header");
-}
-
-/*
-** load precompiled chunk
-*/
-Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name)
-{
- LoadState S;
- if (*name=='@' || *name=='=')
- S.name=name+1;
- else if (*name==LUA_SIGNATURE[0])
- S.name="binary string";
- else
- S.name=name;
- S.L=L;
- S.Z=Z;
- S.b=buff;
- LoadHeader(&S);
- return LoadFunction(&S,luaS_newliteral(L,"=?"));
-}
-
-/*
-* make header
-*/
-void luaU_header (char* h)
-{
- int x=1;
- memcpy(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-1);
- h+=sizeof(LUA_SIGNATURE)-1;
- *h++=(char)LUAC_VERSION;
- *h++=(char)LUAC_FORMAT;
- *h++=(char)*(char*)&x; /* endianness */
- *h++=(char)sizeof(int);
- *h++=(char)sizeof(size_t);
- *h++=(char)sizeof(Instruction);
- *h++=(char)sizeof(lua_Number);
- *h++=(char)(((lua_Number)0.5)==0); /* is lua_Number integral? */
-}
diff --git a/engines/sword25/util/lua/lundump.h b/engines/sword25/util/lua/lundump.h
deleted file mode 100644
index f791a4f173..0000000000
--- a/engines/sword25/util/lua/lundump.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-** $Id$
-** load precompiled Lua chunks
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lundump_h
-#define lundump_h
-
-#include "lobject.h"
-#include "lzio.h"
-
-/* load one chunk; from lundump.c */
-LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);
-
-/* make header; from lundump.c */
-LUAI_FUNC void luaU_header (char* h);
-
-/* dump one chunk; from ldump.c */
-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
-
-#ifdef luac_c
-/* print one chunk; from print.c */
-LUAI_FUNC void luaU_print (const Proto* f, int full);
-#endif
-
-/* for header of binary files -- this is Lua 5.1 */
-#define LUAC_VERSION 0x51
-
-/* for header of binary files -- this is the official format */
-#define LUAC_FORMAT 0
-
-/* size of header of binary files */
-#define LUAC_HEADERSIZE 12
-
-#endif
diff --git a/engines/sword25/util/lua/lvm.cpp b/engines/sword25/util/lua/lvm.cpp
index ae70fe2645..fb700c20a2 100644
--- a/engines/sword25/util/lua/lvm.cpp
+++ b/engines/sword25/util/lua/lvm.cpp
@@ -202,7 +202,7 @@ static int l_strcmp (const TString *ls, const TString *rs) {
const char *r = getstr(rs);
size_t lr = rs->tsv.len;
for (;;) {
- int temp = strcoll(l, r);
+ int temp = strcmp(l, r);
if (temp != 0) return temp;
else { /* strings are equal up to a `\0' */
size_t len = strlen(l); /* index of first `\0' in both strings */
diff --git a/engines/sword25/util/lua/print.cpp b/engines/sword25/util/lua/print.cpp
deleted file mode 100644
index 22039c9861..0000000000
--- a/engines/sword25/util/lua/print.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-** $Id$
-** print bytecodes
-** See Copyright Notice in lua.h
-*/
-
-#include <ctype.h>
-#include <stdio.h>
-
-#define luac_c
-#define LUA_CORE
-
-#include "ldebug.h"
-#include "lobject.h"
-#include "lopcodes.h"
-#include "lundump.h"
-
-#define PrintFunction luaU_print
-
-#define Sizeof(x) ((int)sizeof(x))
-#define VOID(p) ((const void*)(p))
-
-static void PrintString(const TString* ts)
-{
- const char* s=getstr(ts);
- size_t i,n=ts->tsv.len;
- putchar('"');
- for (i=0; i<n; i++)
- {
- int c=s[i];
- switch (c)
- {
- case '"': printf("\\\""); break;
- case '\\': printf("\\\\"); break;
- case '\a': printf("\\a"); break;
- case '\b': printf("\\b"); break;
- case '\f': printf("\\f"); break;
- case '\n': printf("\\n"); break;
- case '\r': printf("\\r"); break;
- case '\t': printf("\\t"); break;
- case '\v': printf("\\v"); break;
- default: if (isprint((unsigned char)c))
- putchar(c);
- else
- printf("\\%03u",(unsigned char)c);
- }
- }
- putchar('"');
-}
-
-static void PrintConstant(const Proto* f, int i)
-{
- const TValue* o=&f->k[i];
- switch (ttype(o))
- {
- case LUA_TNIL:
- printf("nil");
- break;
- case LUA_TBOOLEAN:
- printf(bvalue(o) ? "true" : "false");
- break;
- case LUA_TNUMBER:
- printf(LUA_NUMBER_FMT,nvalue(o));
- break;
- case LUA_TSTRING:
- PrintString(rawtsvalue(o));
- break;
- default: /* cannot happen */
- printf("? type=%d",ttype(o));
- break;
- }
-}
-
-static void PrintCode(const Proto* f)
-{
- const Instruction* code=f->code;
- int pc,n=f->sizecode;
- for (pc=0; pc<n; pc++)
- {
- Instruction i=code[pc];
- OpCode o=GET_OPCODE(i);
- int a=GETARG_A(i);
- int b=GETARG_B(i);
- int c=GETARG_C(i);
- int bx=GETARG_Bx(i);
- int sbx=GETARG_sBx(i);
- int line=getline(f,pc);
- printf("\t%d\t",pc+1);
- if (line>0) printf("[%d]\t",line); else printf("[-]\t");
- printf("%-9s\t",luaP_opnames[o]);
- switch (getOpMode(o))
- {
- case iABC:
- printf("%d",a);
- if (getBMode(o)!=OpArgN) printf(" %d",ISK(b) ? (-1-INDEXK(b)) : b);
- if (getCMode(o)!=OpArgN) printf(" %d",ISK(c) ? (-1-INDEXK(c)) : c);
- break;
- case iABx:
- if (getBMode(o)==OpArgK) printf("%d %d",a,-1-bx); else printf("%d %d",a,bx);
- break;
- case iAsBx:
- if (o==OP_JMP) printf("%d",sbx); else printf("%d %d",a,sbx);
- break;
- }
- switch (o)
- {
- case OP_LOADK:
- printf("\t; "); PrintConstant(f,bx);
- break;
- case OP_GETUPVAL:
- case OP_SETUPVAL:
- printf("\t; %s", (f->sizeupvalues>0) ? getstr(f->upvalues[b]) : "-");
- break;
- case OP_GETGLOBAL:
- case OP_SETGLOBAL:
- printf("\t; %s",svalue(&f->k[bx]));
- break;
- case OP_GETTABLE:
- case OP_SELF:
- if (ISK(c)) { printf("\t; "); PrintConstant(f,INDEXK(c)); }
- break;
- case OP_SETTABLE:
- case OP_ADD:
- case OP_SUB:
- case OP_MUL:
- case OP_DIV:
- case OP_POW:
- case OP_EQ:
- case OP_LT:
- case OP_LE:
- if (ISK(b) || ISK(c))
- {
- printf("\t; ");
- if (ISK(b)) PrintConstant(f,INDEXK(b)); else printf("-");
- printf(" ");
- if (ISK(c)) PrintConstant(f,INDEXK(c)); else printf("-");
- }
- break;
- case OP_JMP:
- case OP_FORLOOP:
- case OP_FORPREP:
- printf("\t; to %d",sbx+pc+2);
- break;
- case OP_CLOSURE:
- printf("\t; %p",VOID(f->p[bx]));
- break;
- case OP_SETLIST:
- if (c==0) printf("\t; %d",(int)code[++pc]);
- else printf("\t; %d",c);
- break;
- default:
- break;
- }
- printf("\n");
- }
-}
-
-#define SS(x) (x==1)?"":"s"
-#define S(x) x,SS(x)
-
-static void PrintHeader(const Proto* f)
-{
- const char* s=getstr(f->source);
- if (*s=='@' || *s=='=')
- s++;
- else if (*s==LUA_SIGNATURE[0])
- s="(bstring)";
- else
- s="(string)";
- printf("\n%s <%s:%d,%d> (%d instruction%s, %d bytes at %p)\n",
- (f->linedefined==0)?"main":"function",s,
- f->linedefined,f->lastlinedefined,
- S(f->sizecode),f->sizecode*Sizeof(Instruction),VOID(f));
- printf("%d%s param%s, %d slot%s, %d upvalue%s, ",
- f->numparams,f->is_vararg?"+":"",SS(f->numparams),
- S(f->maxstacksize),S(f->nups));
- printf("%d local%s, %d constant%s, %d function%s\n",
- S(f->sizelocvars),S(f->sizek),S(f->sizep));
-}
-
-static void PrintConstants(const Proto* f)
-{
- int i,n=f->sizek;
- printf("constants (%d) for %p:\n",n,VOID(f));
- for (i=0; i<n; i++)
- {
- printf("\t%d\t",i+1);
- PrintConstant(f,i);
- printf("\n");
- }
-}
-
-static void PrintLocals(const Proto* f)
-{
- int i,n=f->sizelocvars;
- printf("locals (%d) for %p:\n",n,VOID(f));
- for (i=0; i<n; i++)
- {
- printf("\t%d\t%s\t%d\t%d\n",
- i,getstr(f->locvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1);
- }
-}
-
-static void PrintUpvalues(const Proto* f)
-{
- int i,n=f->sizeupvalues;
- printf("upvalues (%d) for %p:\n",n,VOID(f));
- if (f->upvalues==NULL) return;
- for (i=0; i<n; i++)
- {
- printf("\t%d\t%s\n",i,getstr(f->upvalues[i]));
- }
-}
-
-void PrintFunction(const Proto* f, int full)
-{
- int i,n=f->sizep;
- PrintHeader(f);
- PrintCode(f);
- if (full)
- {
- PrintConstants(f);
- PrintLocals(f);
- PrintUpvalues(f);
- }
- for (i=0; i<n; i++) PrintFunction(f->p[i],full);
-}
diff --git a/engines/sword25/util/lua/scummvm_file.cpp b/engines/sword25/util/lua/scummvm_file.cpp
new file mode 100644
index 0000000000..3c0377d0ee
--- /dev/null
+++ b/engines/sword25/util/lua/scummvm_file.cpp
@@ -0,0 +1,205 @@
+/* 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 "sword25/util/lua/scummvm_file.h"
+#include "common/config-manager.h"
+#include "common/util.h"
+
+namespace Sword25 {
+
+Sword25FileProxy::Sword25FileProxy(const Common::String &filename, const Common::String &mode) {
+ assert(filename.contains("config.lua"));
+ if (mode == "r")
+ setupConfigFile();
+}
+
+void Sword25FileProxy::setupConfigFile() {
+ double sfxVolume = ConfMan.hasKey("sfx_volume") ? 1.0 : 1.0 * ConfMan.getInt("sfx_volume") / 255.0;
+ double musicVolume = ConfMan.hasKey("music_volume") ? 0.5 : 1.0 * ConfMan.getInt("music_volume") / 255.0;
+ double speechVolume = ConfMan.hasKey("speech_volume") ? 1.0 : 1.0 * ConfMan.getInt("speech_volume") / 255.0;
+ bool subtitles = ConfMan.hasKey("subtitles") ? true : ConfMan.getBool("subtitles");
+
+ _readData = Common::String::format(
+"GAME_LANGUAGE = \"%s\"\r\n\
+GAME_SUBTITLES = %s\r\n\
+MAX_MEMORY_USAGE = 256000000\r\n\
+GFX_VSYNC_ACTIVE = true\r\n\
+SFX_SAMPLING_RATE = 44100\r\n\
+SFX_CHANNEL_COUNT = 32\r\n\
+SFX_SOUND_VOLUME = %f\r\n\
+SFX_MUSIC_VOLUME = %f\r\n\
+SFX_SPEECH_VOLUME = %f\r\n",
+ getLanguage().c_str(), subtitles ? "true" : "false", sfxVolume, musicVolume, speechVolume);
+
+ _readPos = 0;
+}
+
+Sword25FileProxy::~Sword25FileProxy() {
+ if (!_settings.empty())
+ writeSettings();
+}
+
+size_t Sword25FileProxy::read(void *ptr, size_t size, size_t count) {
+ size_t bytesRead = MIN<size_t>(_readData.size() - _readPos, size * count);
+ memmove(ptr, &_readData.c_str()[_readPos], bytesRead);
+ _readPos += bytesRead;
+ return bytesRead / size;
+}
+
+size_t Sword25FileProxy::write(const char *ptr, size_t count) {
+ // Loop through the provided line(s)
+ while (*ptr) {
+ if ((*ptr == '-') && (*(ptr + 1) == '-')) {
+ // Comment line to skip over
+ while ((*ptr != '\r') && (*ptr != '\n'))
+ ++ptr;
+ } else {
+ // Legitimate data
+ const char *p = strchr(ptr, '\n');
+ if (!p) p = ptr + strlen(ptr);
+ while ((*p == '\r') || (*p == '\n'))
+ ++p;
+
+ _settings += Common::String(ptr, p - ptr);
+ ptr = p;
+ }
+
+ while ((*ptr == '\r') || (*ptr == '\n'))
+ ++ptr;
+ }
+
+ return count;
+}
+
+void Sword25FileProxy::writeSettings() {
+ // Loop through the setting lines
+ const char *pSrc = _settings.c_str();
+ while (*pSrc) {
+ if ((*pSrc != '\r') && (*pSrc != '\n')) {
+ const char *p = strchr(pSrc, '=');
+ assert(p);
+
+ // Get the setting name
+ const char *pEnd = p - 1;
+ while (*pEnd == ' ')
+ --pEnd;
+ Common::String settingName(pSrc, pEnd - pSrc + 1);
+
+ // Get the setting value
+ const char *pStart = p + 1;
+ while (*pStart == ' ')
+ ++pStart;
+
+ pEnd = pStart + 1;
+ while ((*pEnd != '\r') && (*pEnd != '\n') && (*pEnd != '\0'))
+ ++pEnd;
+ Common::String value(pStart + (*pStart == '"' ? 1 : 0), pEnd - pStart - (*pStart == '"' ? 2 : 0));
+
+ // Update the setting
+ updateSetting(settingName, value);
+ pSrc = pEnd;
+ }
+
+ // Move to next line
+ while ((*pSrc == '\r') || (*pSrc == '\n'))
+ ++pSrc;
+ }
+
+ ConfMan.flushToDisk();
+}
+
+void Sword25FileProxy::updateSetting(const Common::String &setting, const Common::String &value) {
+ if (setting == "GAME_LANGUAGE")
+ setLanguage(value);
+ else if (setting == "GAME_SUBTITLES")
+ ConfMan.setBool("subtitles", value == "true");
+ else if (setting == "SFX_SOUND_VOLUME") {
+ double v = strtod(value.c_str(), NULL);
+ ConfMan.setInt("sfx_volume", (int)(v * 255));
+ } else if (setting == "SFX_MUSIC_VOLUME") {
+ double v = strtod(value.c_str(), NULL);
+ ConfMan.setInt("music_volume", (int)(v * 255));
+ } else if (setting == "SFX_SPEECH_VOLUME") {
+ double v = strtod(value.c_str(), NULL);
+ ConfMan.setInt("speech_volume", (int)(v * 255));
+ } else {
+ // All other settings are ignored
+ }
+}
+
+/**
+ * Get the language code used by the game for each language it supports
+ */
+Common::String Sword25FileProxy::getLanguage() {
+ Common::Language lang = Common::parseLanguage(ConfMan.get("language"));
+ switch (lang) {
+ case Common::EN_ANY:
+ return "en";
+ case Common::DE_DEU:
+ return "de";
+ case Common::ES_ESP:
+ return "es";
+ case Common::FR_FRA:
+ return "fr";
+ case Common::HU_HUN:
+ return "hr";
+ case Common::IT_ITA:
+ return "it";
+ case Common::PL_POL:
+ return "pl";
+ case Common::PT_BRA:
+ return "pt";
+ case Common::RU_RUS:
+ return "ru";
+ default:
+ error("Unknown language '%s' encountered", ConfMan.get("language").c_str());
+ break;
+ }
+}
+
+/**
+ * Set the language code fro the game
+ */
+void Sword25FileProxy::setLanguage(const Common::String &lang) {
+ if (lang == "en")
+ ConfMan.set("language", Common::getLanguageCode(Common::EN_ANY));
+ else if (lang == "de")
+ ConfMan.set("language", Common::getLanguageCode(Common::DE_DEU));
+ else if (lang == "es")
+ ConfMan.set("language", Common::getLanguageCode(Common::ES_ESP));
+ else if (lang == "fr")
+ ConfMan.set("language", Common::getLanguageCode(Common::FR_FRA));
+ else if (lang == "hr")
+ ConfMan.set("language", Common::getLanguageCode(Common::HU_HUN));
+ else if (lang == "it")
+ ConfMan.set("language", Common::getLanguageCode(Common::IT_ITA));
+ else if (lang == "pl")
+ ConfMan.set("language", Common::getLanguageCode(Common::PL_POL));
+ else if (lang == "pt")
+ ConfMan.set("language", Common::getLanguageCode(Common::PT_BRA));
+ else if (lang == "ru")
+ ConfMan.set("language", Common::getLanguageCode(Common::RU_RUS));
+ else
+ error("Unknown language encountered");
+}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/util/lua/scummvm_file.h b/engines/sword25/util/lua/scummvm_file.h
new file mode 100644
index 0000000000..a4cbd2a6cf
--- /dev/null
+++ b/engines/sword25/util/lua/scummvm_file.h
@@ -0,0 +1,56 @@
+/* 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 SWORD25_SCUMMVM_FILE_H
+#define SWORD25_SCUMMVM_FILE_H
+
+#include "common/str.h"
+
+namespace Sword25 {
+
+/**
+ * The following class acts as a proxy interface to the I/O code, pretending that the ScummVM
+ * settings are a properly formatted 'config.lua' file
+ */
+class Sword25FileProxy {
+private:
+ Common::String _readData;
+ uint _readPos;
+ Common::String _settings;
+
+ void setupConfigFile();
+ Common::String getLanguage();
+ void setLanguage(const Common::String &lang);
+ void writeSettings();
+ void updateSetting(const Common::String &setting, const Common::String &value);
+public:
+ Sword25FileProxy(const Common::String &filename, const Common::String &mode);
+ ~Sword25FileProxy();
+
+ bool eof() const { return _readPos >= _readData.size(); }
+ size_t read(void *ptr, size_t size, size_t count);
+ size_t write(const char *ptr, size_t count);
+};
+
+} // End of namespace Sword25
+
+#endif
diff --git a/engines/teenagent/actor.cpp b/engines/teenagent/actor.cpp
index 9dd30f43c3..717c022c38 100644
--- a/engines/teenagent/actor.cpp
+++ b/engines/teenagent/actor.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/actor.h"
@@ -34,10 +31,9 @@ namespace TeenAgent {
Actor::Actor() : head_index(0), idle_type(0) {}
//idle animation lists at dseg: 0x6540
-Common::Rect Actor::renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, uint zoom) {
- static Common::RandomSource random;
+Common::Rect Actor::renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, uint zoom, Common::RandomSource &rnd) {
if (index == 0) {
- idle_type = random.getRandomNumber(2);
+ idle_type = rnd.getRandomNumber(2);
debug(0, "switched to idle animation %u", idle_type);
}
@@ -47,7 +43,7 @@ Common::Rect Actor::renderIdle(Graphics::Surface *surface, const Common::Point &
frames_idle = res->dseg.ptr(res->dseg.get_word(0x6540 + idle_type * 2)) + index;
index += delta_frame;
if (*frames_idle == 0) {
- idle_type = random.getRandomNumber(2);
+ idle_type = rnd.getRandomNumber(2);
debug(0, "switched to idle animation %u[loop]", idle_type);
index = 3; //put 4th frame (base 1) if idle animation loops
}
diff --git a/engines/teenagent/actor.h b/engines/teenagent/actor.h
index 1afe2c3d33..9a7d395547 100644
--- a/engines/teenagent/actor.h
+++ b/engines/teenagent/actor.h
@@ -17,14 +17,15 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/animation.h"
#include "common/rect.h"
+namespace Common {
+class RandomSource;
+}
+
namespace TeenAgent {
class Actor : public Animation {
@@ -33,7 +34,7 @@ class Actor : public Animation {
public:
Actor();
Common::Rect render(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, bool head, uint zoom);
- Common::Rect renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, uint zoom);
+ Common::Rect renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, uint zoom, Common::RandomSource &rnd);
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/animation.cpp b/engines/teenagent/animation.cpp
index 623966f265..af54bca6a4 100644
--- a/engines/teenagent/animation.cpp
+++ b/engines/teenagent/animation.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/animation.h"
diff --git a/engines/teenagent/animation.h b/engines/teenagent/animation.h
index 31c3fa7eaf..e98bb42ea0 100644
--- a/engines/teenagent/animation.h
+++ b/engines/teenagent/animation.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_ANIMATION_H
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index f4be917eac..ae498478a4 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/scene.h"
@@ -39,7 +36,7 @@ namespace TeenAgent {
void TeenAgentEngine::rejectMessage() {
Resources * res = Resources::instance();
//random reject message:
- uint i = random.getRandomNumber(3);
+ uint i = _rnd.getRandomNumber(3);
//debug(0, "reject message: %s", (const char *)res->dseg.ptr(res->dseg.get_word(0x339e + 2 * i)));
displayMessage(res->dseg.get_word(0x339e + 2 * i));
}
@@ -3007,7 +3004,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
moveTo(153, 163, 4);
playActorAnimation(973);
if (CHECK_FLAG(0xDBC1, 0)) {
- SET_FLAG(0xDBC1, random.getRandomNumber(5) + 1);
+ SET_FLAG(0xDBC1, _rnd.getRandomNumber(5) + 1);
}
loadScene(30, 18, 159, 2);
return true;
diff --git a/engines/teenagent/console.cpp b/engines/teenagent/console.cpp
index 60f7854f09..2f4d7cc9c3 100644
--- a/engines/teenagent/console.cpp
+++ b/engines/teenagent/console.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/console.h"
diff --git a/engines/teenagent/console.h b/engines/teenagent/console.h
index d6c24d4d8f..ab2f068520 100644
--- a/engines/teenagent/console.h
+++ b/engines/teenagent/console.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_CONSOLE_H
diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp
index d741039e8d..5012e6af65 100644
--- a/engines/teenagent/detection.cpp
+++ b/engines/teenagent/detection.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/system.h"
@@ -116,7 +113,7 @@ public:
}
virtual const char *getName() const {
- return "Teen Agent Engine";
+ return "TeenAgent";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/teenagent/dialog.cpp b/engines/teenagent/dialog.cpp
index 2479da42a1..400bd7cec2 100644
--- a/engines/teenagent/dialog.cpp
+++ b/engines/teenagent/dialog.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/dialog.h"
diff --git a/engines/teenagent/dialog.h b/engines/teenagent/dialog.h
index 51597db6d9..3bb7d818c1 100644
--- a/engines/teenagent/dialog.h
+++ b/engines/teenagent/dialog.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_DIALOG_H
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index 2d98ae9de7..f7558b60f2 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/font.h"
diff --git a/engines/teenagent/font.h b/engines/teenagent/font.h
index 29a8121435..773edaf4e2 100644
--- a/engines/teenagent/font.h
+++ b/engines/teenagent/font.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_FONT_H
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 4d18d68502..8430f42c61 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/memstream.h"
@@ -46,22 +43,22 @@ Inventory::Inventory(TeenAgentEngine *engine) {
if (!s)
error("no inventory background");
debug(0, "loading inventory background...");
- background.load(s, Surface::kTypeOns);
+ _background.load(s, Surface::kTypeOns);
}
uint32 items_size = varia.getSize(4);
if (items_size == 0)
error("invalid inventory items size");
debug(0, "loading items, size: %u", items_size);
- items = new byte[items_size];
- varia.read(4, items, items_size);
+ _items = new byte[items_size];
+ varia.read(4, _items, items_size);
- byte offsets = items[0];
+ byte offsets = _items[0];
assert(offsets == 92);
for (byte i = 0; i < offsets; ++i) {
- offset[i] = READ_LE_UINT16(items + i * 2 + 1);
+ _offset[i] = READ_LE_UINT16(_items + i * 2 + 1);
}
- offset[92] = items_size;
+ _offset[92] = items_size;
Resources *res = Resources::instance();
for (byte i = 0; i <= 92; ++i) {
@@ -69,31 +66,31 @@ Inventory::Inventory(TeenAgentEngine *engine) {
uint16 obj_addr = res->dseg.get_word(0xc4a4 + i * 2);
if (obj_addr != 0)
io.load(res->dseg.ptr(obj_addr));
- objects.push_back(io);
+ _objects.push_back(io);
}
- inventory = res->dseg.ptr(0xc48d);
+ _inventory = res->dseg.ptr(0xc48d);
for (int y = 0; y < 4; ++y)
for (int x = 0; x < 6; ++x) {
int i = y * 6 + x;
- graphics[i].rect.left = 28 + 45 * x - 1;
- graphics[i].rect.top = 23 + 31 * y - 1;
- graphics[i].rect.right = graphics[i].rect.left + 40;
- graphics[i].rect.bottom = graphics[i].rect.top + 26;
+ _graphics[i]._rect.left = 28 + 45 * x - 1;
+ _graphics[i]._rect.top = 23 + 31 * y - 1;
+ _graphics[i]._rect.right = _graphics[i]._rect.left + 40;
+ _graphics[i]._rect.bottom = _graphics[i]._rect.top + 26;
}
varia.close();
- hovered_obj = selected_obj = NULL;
+ _hoveredObj = _selectedObj = NULL;
}
Inventory::~Inventory() {
- delete[] items;
+ delete[] _items;
}
bool Inventory::has(byte item) const {
for (int i = 0; i < 24; ++i) {
- if (inventory[i] == item)
+ if (_inventory[i] == item)
return true;
}
return false;
@@ -103,32 +100,32 @@ void Inventory::remove(byte item) {
debug(0, "removing %u from inventory", item);
int i;
for (i = 0; i < 24; ++i) {
- if (inventory[i] == item) {
+ if (_inventory[i] == item) {
break;
}
}
for (; i < 23; ++i) {
- inventory[i] = inventory[i + 1];
- graphics[i].free();
+ _inventory[i] = _inventory[i + 1];
+ _graphics[i].free();
}
- inventory[23] = 0;
- graphics[23].free();
+ _inventory[23] = 0;
+ _graphics[23].free();
}
void Inventory::clear() {
debug(0, "clearing inventory");
for (int i = 0; i < 24; ++i) {
- inventory[i] = 0;
- graphics[i].free();
+ _inventory[i] = 0;
+ _graphics[i].free();
}
}
void Inventory::reload() {
for (int i = 0; i < 24; ++i) {
- graphics[i].free();
- uint item = inventory[i];
+ _graphics[i].free();
+ uint item = _inventory[i];
if (item != 0)
- graphics[i].load(this, item);
+ _graphics[i].load(this, item);
}
}
@@ -137,8 +134,8 @@ void Inventory::add(byte item) {
return;
debug(0, "adding %u to inventory", item);
for (int i = 0; i < 24; ++i) {
- if (inventory[i] == 0) {
- inventory[i] = item;
+ if (_inventory[i] == 0) {
+ _inventory[i] = item;
return;
}
}
@@ -168,27 +165,27 @@ bool Inventory::processEvent(const Common::Event &event) {
if (!_active) {
if (event.mouse.y < 5)
activate(true);
- mouse = event.mouse;
+ _mouse = event.mouse;
return false;
}
- if (event.mouse.x < 17 || event.mouse.x >= 303 || (event.mouse.y - mouse.y > 0 && event.mouse.y >= 153)) {
+ if (event.mouse.x < 17 || event.mouse.x >= 303 || (event.mouse.y - _mouse.y > 0 && event.mouse.y >= 153)) {
activate(false);
- mouse = event.mouse;
+ _mouse = event.mouse;
return false;
}
- mouse = event.mouse;
- hovered_obj = NULL;
+ _mouse = event.mouse;
+ _hoveredObj = NULL;
for (int i = 0; i < 24; ++i) {
- byte item = inventory[i];
+ byte item = _inventory[i];
if (item == 0)
continue;
- graphics[i].hovered = graphics[i].rect.in(mouse);
- if (graphics[i].hovered)
- hovered_obj = &objects[item];
+ _graphics[i]._hovered = _graphics[i]._rect.in(_mouse);
+ if (_graphics[i]._hovered)
+ _hoveredObj = &_objects[item];
}
return true;
@@ -197,22 +194,22 @@ bool Inventory::processEvent(const Common::Event &event) {
if (!_active)
return false;
- if (hovered_obj == NULL)
+ if (_hoveredObj == NULL)
return true;
- debug(0, "lclick on %u:%s", hovered_obj->id, hovered_obj->name.c_str());
+ debug(0, "lclick on %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
- if (selected_obj == NULL) {
- if (tryObjectCallback(hovered_obj))
+ if (_selectedObj == NULL) {
+ if (tryObjectCallback(_hoveredObj))
return true;
//activate(false);
- int w = res->font7.render(NULL, 0, 0, hovered_obj->description, 0xd1);
- _engine->scene->displayMessage(hovered_obj->description, 0xd1, Common::Point((320 - w) / 2, 162));
+ int w = res->font7.render(NULL, 0, 0, _hoveredObj->description, 0xd1);
+ _engine->scene->displayMessage(_hoveredObj->description, 0xd1, Common::Point((320 - w) / 2, 162));
return true;
}
- int id1 = selected_obj->id;
- int id2 = hovered_obj->id;
+ int id1 = _selectedObj->id;
+ int id2 = _hoveredObj->id;
if (id1 == id2)
return true;
@@ -249,15 +246,15 @@ bool Inventory::processEvent(const Common::Event &event) {
if (!_active)
return false;
- if (hovered_obj != NULL) {
- debug(0, "rclick object %u:%s", hovered_obj->id, hovered_obj->name.c_str());
- if (hovered_obj->id != 51 && tryObjectCallback(hovered_obj)) //do not process callback for banknote on r-click
+ if (_hoveredObj != NULL) {
+ debug(0, "rclick object %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
+ if (_hoveredObj->id != 51 && tryObjectCallback(_hoveredObj)) //do not process callback for banknote on r-click
return true;
}
- selected_obj = hovered_obj;
- if (selected_obj)
- debug(0, "selected object %s", selected_obj->name.c_str());
+ _selectedObj = _hoveredObj;
+ if (_selectedObj)
+ debug(0, "selected object %s", _selectedObj->name.c_str());
return true;
case Common::EVENT_KEYDOWN:
@@ -282,13 +279,13 @@ bool Inventory::processEvent(const Common::Event &event) {
void Inventory::Item::free() {
- animation.free();
- surface.free();
+ _animation.free();
+ _surface.free();
}
void Inventory::Item::backgroundEffect(Graphics::Surface *s) {
- uint w = rect.right - rect.left, h = rect.bottom - rect.top;
- byte *line = (byte *)s->getBasePtr(rect.left, rect.top);
+ uint w = _rect.right - _rect.left, h = _rect.bottom - _rect.top;
+ byte *line = (byte *)s->getBasePtr(_rect.left, _rect.top);
for(uint y = 0; y < h; ++y, line += s->pitch) {
byte *dst = line;
for(uint x = 0; x < w; ++x, ++dst) {
@@ -298,54 +295,54 @@ void Inventory::Item::backgroundEffect(Graphics::Surface *s) {
}
void Inventory::Item::load(Inventory *inventory, uint item_id) {
- InventoryObject *obj = &inventory->objects[item_id];
+ InventoryObject *obj = &inventory->_objects[item_id];
if (obj->animated) {
- if (animation.empty()) {
- debug(0, "loading item %d from offset %x", obj->id, inventory->offset[obj->id - 1]);
- Common::MemoryReadStream s(inventory->items + inventory->offset[obj->id - 1], inventory->offset[obj->id] - inventory->offset[obj->id - 1]);
- animation.load(&s, Animation::kTypeInventory);
+ if (_animation.empty()) {
+ debug(0, "loading item %d from offset %x", obj->id, inventory->_offset[obj->id - 1]);
+ Common::MemoryReadStream s(inventory->_items + inventory->_offset[obj->id - 1], inventory->_offset[obj->id] - inventory->_offset[obj->id - 1]);
+ _animation.load(&s, Animation::kTypeInventory);
}
} else {
- if (surface.empty()) {
- debug(0, "loading item %d from offset %x", obj->id, inventory->offset[obj->id - 1]);
- Common::MemoryReadStream s(inventory->items + inventory->offset[obj->id - 1], inventory->offset[obj->id] - inventory->offset[obj->id - 1]);
- surface.load(&s, Surface::kTypeOns);
+ if (_surface.empty()) {
+ debug(0, "loading item %d from offset %x", obj->id, inventory->_offset[obj->id - 1]);
+ Common::MemoryReadStream s(inventory->_items + inventory->_offset[obj->id - 1], inventory->_offset[obj->id] - inventory->_offset[obj->id - 1]);
+ _surface.load(&s, Surface::kTypeOns);
}
}
}
void Inventory::Item::render(Inventory *inventory, uint item_id, Graphics::Surface *dst, int delta) {
- InventoryObject *obj = &inventory->objects[item_id];
+ InventoryObject *obj = &inventory->_objects[item_id];
Resources *res = Resources::instance();
backgroundEffect(dst);
- rect.render(dst, hovered ? 233 : 234);
+ _rect.render(dst, _hovered ? 233 : 234);
load(inventory, item_id);
if (obj->animated) {
- if (hovered) {
- Surface *s = animation.currentFrame(delta);
- if (animation.currentIndex() == 0)
- s = animation.currentFrame(1); //force index to be 1 here
+ if (_hovered) {
+ Surface *s = _animation.currentFrame(delta);
+ if (_animation.currentIndex() == 0)
+ s = _animation.currentFrame(1); //force index to be 1 here
if (s != NULL)
- s->render(dst, rect.left + 1, rect.top + 1);
+ s->render(dst, _rect.left + 1, _rect.top + 1);
} else {
- Surface *s = animation.firstFrame();
+ Surface *s = _animation.firstFrame();
if (s != NULL)
- s->render(dst, rect.left + 1, rect.top + 1);
+ s->render(dst, _rect.left + 1, _rect.top + 1);
}
} else {
- surface.render(dst, rect.left + 1, rect.top + 1);
+ _surface.render(dst, _rect.left + 1, _rect.top + 1);
}
Common::String name;
- if (inventory->selected_obj) {
- name = inventory->selected_obj->name;
+ if (inventory->_selectedObj) {
+ name = inventory->_selectedObj->name;
name += " & ";
}
- if (inventory->selected_obj != inventory->hovered_obj)
+ if (inventory->_selectedObj != inventory->_hoveredObj)
name += obj->name;
- if (hovered && inventory->_engine->scene->getMessage().empty()) {
+ if (_hovered && inventory->_engine->scene->getMessage().empty()) {
int w = res->font7.render(NULL, 0, 0, name, 0xd1, true);
res->font7.render(dst, (320 - w) / 2, 180, name, 0xd1, true);
}
@@ -355,17 +352,17 @@ void Inventory::render(Graphics::Surface *surface, int delta) {
if (!_active)
return;
- background.render(surface);
+ _background.render(surface);
for (int y = 0; y < 4; y++) {
for (int x = 0; x < 6; x++) {
int idx = x + 6 * y;
- byte item = inventory[idx];
+ byte item = _inventory[idx];
if (item == 0)
continue;
//debug(0, "%d,%d -> %u", x0, y0, item);
- graphics[idx].render(this, item, surface, delta);
+ _graphics[idx].render(this, item, surface, delta);
}
}
}
diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h
index ad73ff25a9..55c58a1c22 100644
--- a/engines/teenagent/inventory.h
+++ b/engines/teenagent/inventory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_INVENTORY_H
@@ -54,37 +51,40 @@ public:
bool processEvent(const Common::Event &event);
- InventoryObject *selectedObject() { return selected_obj; }
- void resetSelectedObject() { selected_obj = NULL; }
+ InventoryObject *selectedObject() { return _selectedObj; }
+ void resetSelectedObject() { _selectedObj = NULL; }
private:
TeenAgentEngine *_engine;
- Surface background;
- byte *items;
- uint offset[93];
+ Surface _background;
+ byte *_items;
+ uint _offset[93];
+
+ Common::Array<InventoryObject> _objects;
+ byte *_inventory;
- Common::Array<InventoryObject> objects;
- byte *inventory;
struct Item {
- Animation animation;
- Surface surface;
- Rect rect;
- bool hovered;
+ Animation _animation;
+ Surface _surface;
+ Rect _rect;
+ bool _hovered;
- Item() : hovered(false) {}
+ Item() : _hovered(false) {}
void free();
void load(Inventory *inventory, uint item_id);
void backgroundEffect(Graphics::Surface *s);
void render(Inventory *inventory, uint item_id, Graphics::Surface *surface, int delta);
- } graphics[24];
+ };
+
+ Item _graphics[24];
bool _active;
- Common::Point mouse;
- int hovered;
+ Common::Point _mouse;
bool tryObjectCallback(InventoryObject *obj);
- InventoryObject *hovered_obj, *selected_obj;
+ InventoryObject *_hoveredObj;
+ InventoryObject *_selectedObj;
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp
index f0be5165f6..0f70f4b082 100644
--- a/engines/teenagent/music.cpp
+++ b/engines/teenagent/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "teenagent/music.h"
diff --git a/engines/teenagent/music.h b/engines/teenagent/music.h
index 52a347bf10..bf36ac7057 100644
--- a/engines/teenagent/music.h
+++ b/engines/teenagent/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TEEN_MUSIC_H
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp
index e6442d3809..74e3a4944d 100644
--- a/engines/teenagent/objects.cpp
+++ b/engines/teenagent/objects.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/debug.h"
diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h
index 59e9d732fc..d1e4388a15 100644
--- a/engines/teenagent/objects.h
+++ b/engines/teenagent/objects.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/teenagent/pack.cpp b/engines/teenagent/pack.cpp
index 8584e05807..aada922f7d 100644
--- a/engines/teenagent/pack.cpp
+++ b/engines/teenagent/pack.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/pack.h"
diff --git a/engines/teenagent/pack.h b/engines/teenagent/pack.h
index a24091e153..09168676e2 100644
--- a/engines/teenagent/pack.h
+++ b/engines/teenagent/pack.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 69908239ab..9e69383215 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/resources.h"
diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h
index d49602c3c5..c2eb32dbd4 100644
--- a/engines/teenagent/resources.h
+++ b/engines/teenagent/resources.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_RESOURCES_H
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index ee431b2ab5..ef18b95f5a 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
@@ -807,7 +804,7 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
if (_idle_timer < 50)
actor_animation_position = teenagent.render(surface, position, orientation, 0, actor_talking, zoom);
else
- actor_animation_position = teenagent_idle.renderIdle(surface, position, orientation, mark_delta, zoom);
+ actor_animation_position = teenagent_idle.renderIdle(surface, position, orientation, mark_delta, zoom, _engine->_rnd);
}
}
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 28def3a064..bc101847fa 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_SCENE_H
diff --git a/engines/teenagent/segment.cpp b/engines/teenagent/segment.cpp
index 829c84765d..cb17190da7 100644
--- a/engines/teenagent/segment.cpp
+++ b/engines/teenagent/segment.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/segment.h"
diff --git a/engines/teenagent/segment.h b/engines/teenagent/segment.h
index 98bd9ca0c9..303198b071 100644
--- a/engines/teenagent/segment.h
+++ b/engines/teenagent/segment.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_SEGMENT_H
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index 545b0f75f0..2e23c7a8ed 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/surface.h"
diff --git a/engines/teenagent/surface.h b/engines/teenagent/surface.h
index 82c13c84bd..5f74176c68 100644
--- a/engines/teenagent/surface.h
+++ b/engines/teenagent/surface.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_SURFACE_H
diff --git a/engines/teenagent/surface_list.cpp b/engines/teenagent/surface_list.cpp
index 972c7a4186..e98153a935 100644
--- a/engines/teenagent/surface_list.cpp
+++ b/engines/teenagent/surface_list.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "teenagent/surface.h"
diff --git a/engines/teenagent/surface_list.h b/engines/teenagent/surface_list.h
index 23e0ff423a..d949a722d6 100644
--- a/engines/teenagent/surface_list.h
+++ b/engines/teenagent/surface_list.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_SURFACE_LIST_H__
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index ec1e945f8d..f076dbc0a1 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
@@ -50,7 +47,9 @@
namespace TeenAgent {
-TeenAgentEngine::TeenAgentEngine(OSystem *system, const ADGameDescription *gd) : Engine(system), action(kActionNone), _gameDescription(gd) {
+TeenAgentEngine::TeenAgentEngine(OSystem *system, const ADGameDescription *gd)
+ : Engine(system), action(kActionNone), _gameDescription(gd),
+ _rnd("teenagent") {
music = new MusicPlayer();
console = 0;
@@ -399,8 +398,8 @@ bool TeenAgentEngine::showMetropolis() {
//generate colors matrix
memmove(colors + 320, colors + 480, 8480);
for(uint c = 0; c < 17; ++c) {
- byte x = (random.getRandomNumber(184) + 5) & 0xff;
- uint offset = 8800 + random.getRandomNumber(158);
+ byte x = (_rnd.getRandomNumber(184) + 5) & 0xff;
+ uint offset = 8800 + _rnd.getRandomNumber(158);
colors[offset++] = x;
colors[offset++] = x;
}
diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h
index a43ee68f56..bc802da8bc 100644
--- a/engines/teenagent/teenagent.h
+++ b/engines/teenagent/teenagent.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TEENAGENT_ENGINE_H
@@ -50,7 +47,7 @@ class Scene;
class MusicPlayer;
class Console;
-class TeenAgentEngine: public Engine {
+class TeenAgentEngine : public Engine {
public:
enum Action { kActionNone, kActionExamine, kActionUse };
@@ -120,7 +117,7 @@ public:
void fadeOut();
void wait(uint16 frames);
- Common::RandomSource random;
+ Common::RandomSource _rnd;
Scene *scene;
Inventory *inventory;
diff --git a/engines/testbed/config-params.cpp b/engines/testbed/config-params.cpp
index c9f3932539..9a5062185b 100644
--- a/engines/testbed/config-params.cpp
+++ b/engines/testbed/config-params.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
diff --git a/engines/testbed/config-params.h b/engines/testbed/config-params.h
index 7a0e1cf5f2..e982f62c72 100644
--- a/engines/testbed/config-params.h
+++ b/engines/testbed/config-params.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_CONFIG_PARAMS_H
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 4f871db8d2..6adf82952f 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/stream.h"
diff --git a/engines/testbed/config.h b/engines/testbed/config.h
index cf1948b412..c0df65ad32 100644
--- a/engines/testbed/config.h
+++ b/engines/testbed/config.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_CONFIG_H
diff --git a/engines/testbed/detection.cpp b/engines/testbed/detection.cpp
index b08cca291a..91518b2b8e 100644
--- a/engines/testbed/detection.cpp
+++ b/engines/testbed/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "engines/advancedDetector.h"
diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp
index 37b0a7ead4..78de87e133 100644
--- a/engines/testbed/events.cpp
+++ b/engines/testbed/events.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/events.h"
diff --git a/engines/testbed/events.h b/engines/testbed/events.h
index 607bba79d5..00a659bd33 100644
--- a/engines/testbed/events.h
+++ b/engines/testbed/events.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_EVENTS_H
diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp
index f951224910..e2bedb1898 100644
--- a/engines/testbed/fs.cpp
+++ b/engines/testbed/fs.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
diff --git a/engines/testbed/fs.h b/engines/testbed/fs.h
index c51d898c9d..1cb7b3a871 100644
--- a/engines/testbed/fs.h
+++ b/engines/testbed/fs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_FS_H
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index c8558e30f4..b38b83f222 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/events.h"
diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h
index a4e698b44c..7fa8f9d708 100644
--- a/engines/testbed/graphics.h
+++ b/engines/testbed/graphics.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_GRAPHICS_H
diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp
index 7ec24aa670..54be866b4c 100644
--- a/engines/testbed/midi.cpp
+++ b/engines/testbed/midi.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/archive.h"
diff --git a/engines/testbed/midi.h b/engines/testbed/midi.h
index 676229570e..02550a6eb2 100644
--- a/engines/testbed/midi.h
+++ b/engines/testbed/midi.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_MIDI_H
diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp
index 36687f570e..35b3c6bfe2 100644
--- a/engines/testbed/misc.cpp
+++ b/engines/testbed/misc.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "testbed/misc.h"
diff --git a/engines/testbed/misc.h b/engines/testbed/misc.h
index 395955c7fe..415fe82903 100644
--- a/engines/testbed/misc.h
+++ b/engines/testbed/misc.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_MISC_H
diff --git a/engines/testbed/savegame.cpp b/engines/testbed/savegame.cpp
index 0ffd3672fa..b19c8e3872 100644
--- a/engines/testbed/savegame.cpp
+++ b/engines/testbed/savegame.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/savefile.h"
diff --git a/engines/testbed/savegame.h b/engines/testbed/savegame.h
index dc41ff9b65..2c9ec83470 100644
--- a/engines/testbed/savegame.h
+++ b/engines/testbed/savegame.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_SAVEGAME_H
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index dca116368e..bb7ae2c055 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "audio/softsynth/pcspk.h"
diff --git a/engines/testbed/sound.h b/engines/testbed/sound.h
index b797ecb2b0..76d0c7bb61 100644
--- a/engines/testbed/sound.h
+++ b/engines/testbed/sound.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_SOUND_H
diff --git a/engines/testbed/template.h b/engines/testbed/template.h
index 849d157a03..847777f34b 100644
--- a/engines/testbed/template.h
+++ b/engines/testbed/template.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_TEMPLATE_H
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index 179be2bb8b..41a705e292 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/debug-channels.h"
diff --git a/engines/testbed/testbed.h b/engines/testbed/testbed.h
index ca803a4cec..6933efa0f0 100644
--- a/engines/testbed/testbed.h
+++ b/engines/testbed/testbed.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_H
diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp
index fa8764e869..77211b3e64 100644
--- a/engines/testbed/testsuite.cpp
+++ b/engines/testbed/testsuite.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
diff --git a/engines/testbed/testsuite.h b/engines/testbed/testsuite.h
index 94b3d70fd4..3a3a78b9bb 100644
--- a/engines/testbed/testsuite.h
+++ b/engines/testbed/testsuite.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef TESTBED_TESTSUITE_H
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 9ec253e512..4e9847f8b4 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Handles things to do with actors, delegates much moving actor stuff.
*/
@@ -437,7 +434,7 @@ void StartTaggedActors(SCNHANDLE ah, int numActors, bool bRunScript) {
memset(taggedActors, 0, sizeof(taggedActors));
numTaggedActors = numActors;
} else {
- // Only actors with code blocks got (x, y) re-initialised, so...
+ // Only actors with code blocks got (x, y) re-initialized, so...
for (i = 0; i < NumActors; i++) {
actorInfo[i].x = actorInfo[i].y = 0;
actorInfo[i].mtype = 0;
diff --git a/engines/tinsel/actors.h b/engines/tinsel/actors.h
index 2be42b00e6..e707db77ba 100644
--- a/engines/tinsel/actors.h
+++ b/engines/tinsel/actors.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Prototypes of actor functions
*/
diff --git a/engines/tinsel/adpcm.cpp b/engines/tinsel/adpcm.cpp
index 530395d754..4ea835586b 100644
--- a/engines/tinsel/adpcm.cpp
+++ b/engines/tinsel/adpcm.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/stream.h"
diff --git a/engines/tinsel/adpcm.h b/engines/tinsel/adpcm.h
index 79d537eef6..3e899d94c3 100644
--- a/engines/tinsel/adpcm.h
+++ b/engines/tinsel/adpcm.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_ADPCM_H
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp
index 61c8b67624..034296ccc7 100644
--- a/engines/tinsel/anim.cpp
+++ b/engines/tinsel/anim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains utilities to handle object animation.
*/
diff --git a/engines/tinsel/anim.h b/engines/tinsel/anim.h
index 97065f6a54..0c60cf84d4 100644
--- a/engines/tinsel/anim.h
+++ b/engines/tinsel/anim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Object animation definitions
*/
diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp
index 79f051420b..72397db97f 100644
--- a/engines/tinsel/background.cpp
+++ b/engines/tinsel/background.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Background handling code.
*/
@@ -40,7 +37,7 @@ namespace Tinsel {
const BACKGND *pCurBgnd = NULL;
/**
- * Called to initialise a background.
+ * Called to initialize a background.
* @param pBgnd Pointer to data struct for current background
*/
@@ -152,7 +149,7 @@ int PlayfieldGetCenterX(int which) {
* @param which Which playfield
*/
-OBJECT *GetPlayfieldList(int which) {
+OBJECT **GetPlayfieldList(int which) {
PLAYFIELD *pPlayfield; // pointer to relavent playfield
// make sure there is a background
@@ -165,7 +162,7 @@ OBJECT *GetPlayfieldList(int which) {
pPlayfield = pCurBgnd->fieldArray + which;
// return the display list pointer for this playfield
- return pPlayfield->pDispList;
+ return &pPlayfield->pDispList;
}
/**
@@ -205,10 +202,10 @@ void DrawBackgnd() {
pPlay->bMoved = true;
// sort the display list for this background - just in case somebody has changed object Z positions
- SortObjectList(pPlay->pDispList);
+ SortObjectList(&pPlay->pDispList);
// generate clipping rects for all objects that have moved etc.
- FindMovingObjects(pPlay->pDispList, &ptWin,
+ FindMovingObjects(&pPlay->pDispList, &ptWin,
&pPlay->rcClip, false, pPlay->bMoved);
// clear playfield moved flag
@@ -235,8 +232,7 @@ void DrawBackgnd() {
if (IntersectRectangle(rcPlayClip, pPlay->rcClip, *r))
// redraw all objects within this clipping rect
- UpdateClipRect(pPlay->pDispList,
- &ptWin, &rcPlayClip);
+ UpdateClipRect(&pPlay->pDispList, &ptWin, &rcPlayClip);
}
}
diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h
index 06789e50bf..34f1bd6dd2 100644
--- a/engines/tinsel/background.h
+++ b/engines/tinsel/background.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Data structures used for handling backgrounds
*/
@@ -76,7 +73,7 @@ struct BACKGND {
|* Background Function Prototypes *|
\*----------------------------------------------------------------------*/
-void InitBackground( // called to initialise a background
+void InitBackground( // called to initialize a background
const BACKGND *pBgnd); // pointer to data struct for current background
void StartupBackground(CORO_PARAM, SCNHANDLE hFilm);
@@ -96,7 +93,7 @@ void PlayfieldGetPos( // Returns the xy position of the specified playfield in
int PlayfieldGetCenterX( // Returns the xy position of the specified playfield in the current background
int which); // which playfield
-OBJECT *GetPlayfieldList( // Returns the display list for the specified playfield
+OBJECT **GetPlayfieldList( // Returns the display list for the specified playfield
int which); // which playfield
void KillPlayfieldList( // Kills all the objects on the display list for the specified playfield
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index 0e67c3a06e..cf692e16ea 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Plays the background film of a scene.
*/
@@ -129,7 +126,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
// Get the MULTI_INIT structure
pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
- // Initialise and insert the object, and initialise its script.
+ // Initialize and insert the object, and initialize its script.
pBG[0] = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), pBG[0]);
InitStepAnimScript(&thisAnim[0], pBG[0], FROM_LE_32(pReel->script), BGspeed);
@@ -144,7 +141,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
// Get the MULTI_INIT structure
pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFilm->reels[i].mobj));
- // Initialise and insert the object, and initialise its script.
+ // Initialize and insert the object, and initialize its script.
pBG[i] = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), pBG[i]);
MultiSetZPosition(pBG[i], 0);
@@ -179,7 +176,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
pFilm = (const FILM *)LockMem(hBackground);
assert(bgReels == (int32)FROM_LE_32(pFilm->numreels));
- // Just re-initialise the scripts.
+ // Just re-initialize the scripts.
for (int i = 0; i < bgReels; i++) {
InitStepAnimScript(&thisAnim[i], pBG[i], pFilm->reels[i].script, BGspeed);
StepAnimScript(&thisAnim[i]);
@@ -205,7 +202,7 @@ static void BGotherProcess(CORO_PARAM, const void *param) {
CORO_BEGIN_CODE(_ctx);
- // Initialise and insert the object, and initialise its script.
+ // Initialize and insert the object, and initialize its script.
_ctx->pObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), _ctx->pObj);
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index 793febdc21..24d47b920f 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* The movie player.
*/
@@ -388,7 +385,7 @@ void BMVPlayer::MoviePalette(int paletteOffset) {
SetTextPal(talkColor);
}
-void BMVPlayer::InitialiseMovieSound() {
+void BMVPlayer::InitializeMovieSound() {
_audioStream = Audio::makeQueuingAudioStream(22050, true);
audioStarted = false;
}
@@ -666,7 +663,7 @@ void BMVPlayer::LoadSlots(int number) {
/**
* Called from the foreground when starting playback of a movie.
*/
-void BMVPlayer::InitialiseBMV() {
+void BMVPlayer::InitializeBMV() {
if (!stream.open(szMovieFile))
error(CANNOT_FIND_FILE, szMovieFile);
@@ -683,7 +680,7 @@ void BMVPlayer::InitialiseBMV() {
// Pass the sceen buffer to the decompresser
InitBMV(screenBuffer);
- // Initialise some stuff
+ // Initialize some stuff
nextUseOffset = 0;
nextSoundOffset = 0;
wrapUseOffset = -1;
@@ -708,8 +705,8 @@ void BMVPlayer::InitialiseBMV() {
while (numAdvancePackets < ADVANCE_SOUND)
LoadSlots(1);
- // Initialise the sound channel
- InitialiseMovieSound();
+ // Initialize the sound channel
+ InitializeMovieSound();
}
/**
@@ -1069,7 +1066,7 @@ void BMVPlayer::FettleBMV() {
// First time in with this movie
- InitialiseBMV();
+ InitializeBMV();
for (i = 0; i < ADVANCE_SOUND;) {
if (DoSoundFrame())
diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h
index d90d68fc13..eadf65c3aa 100644
--- a/engines/tinsel/bmv.h
+++ b/engines/tinsel/bmv.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Plays films within a scene, takes into account the actor in each 'column'.
*/
@@ -137,7 +134,7 @@ private:
void InitBMV(byte *memoryBuffer);
void PrepAudio(const byte *sourceData, int blobCount, byte *destPtr);
void MoviePalette(int paletteOffset);
- void InitialiseMovieSound();
+ void InitializeMovieSound();
void StartMovieSound();
void FinishMovieSound();
void MovieAudio(int audioOffset, int blobs);
@@ -147,7 +144,7 @@ private:
int MovieCommand(char cmd, int commandOffset);
int FollowingPacket(int thisPacket, bool bReallyImportant);
void LoadSlots(int number);
- void InitialiseBMV();
+ void InitializeBMV();
bool MaintainBuffer();
bool DoBMVFrame();
bool DoSoundFrame();
diff --git a/engines/tinsel/cliprect.cpp b/engines/tinsel/cliprect.cpp
index 5f287d3eab..76feede83f 100644
--- a/engines/tinsel/cliprect.cpp
+++ b/engines/tinsel/cliprect.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains the clipping rectangle code.
*/
@@ -108,10 +105,10 @@ static bool LooseIntersectRectangle(const Common::Rect &pSrc1, const Common::Rec
* @param bNoVelocity When reset, objects pos is updated with velocity
* @param bScrolled) When set, playfield has scrolled
*/
-void FindMovingObjects(OBJECT *pObjList, Common::Point *pWin, Common::Rect *pClip, bool bNoVelocity, bool bScrolled) {
+void FindMovingObjects(OBJECT **pObjList, Common::Point *pWin, Common::Rect *pClip, bool bNoVelocity, bool bScrolled) {
OBJECT *pObj; // object list traversal pointer
- for (pObj = pObjList->pNext; pObj != NULL; pObj = pObj->pNext) {
+ for (pObj = *pObjList; pObj != NULL; pObj = pObj->pNext) {
if (!bNoVelocity) {
// we want to add velocities to objects position
@@ -206,16 +203,16 @@ void MergeClipRect() {
* @param pWin Window top left position
* @param pClip Pointer to clip rectangle
*/
-void UpdateClipRect(OBJECT *pObjList, Common::Point *pWin, Common::Rect *pClip) {
+void UpdateClipRect(OBJECT **pObjList, Common::Point *pWin, Common::Rect *pClip) {
int x, y, right, bottom; // object corners
int hclip, vclip; // total size of object clipping
DRAWOBJECT currentObj; // filled in to draw the current object in list
OBJECT *pObj; // object list iterator
- // Initialise the fields of the drawing object to empty
+ // Initialize the fields of the drawing object to empty
memset(&currentObj, 0, sizeof(DRAWOBJECT));
- for (pObj = pObjList->pNext; pObj != NULL; pObj = pObj->pNext) {
+ for (pObj = *pObjList; pObj != NULL; pObj = pObj->pNext) {
if (pObj->flags & DMA_ABS) {
// object position is absolute
x = fracToInt(pObj->xPos);
diff --git a/engines/tinsel/cliprect.h b/engines/tinsel/cliprect.h
index 7bbb6bdc25..101289b837 100644
--- a/engines/tinsel/cliprect.h
+++ b/engines/tinsel/cliprect.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Clipping rectangle defines
*/
@@ -58,7 +55,7 @@ bool UnionRectangle( // Creates the union of two rectangles
const Common::Rect &pSrc2); // a source rectangle
void FindMovingObjects( // Creates clipping rectangles for all the objects that have moved on the specified object list
- OBJECT *pObjList, // playfield display list to draw
+ OBJECT **pObjList, // playfield display list to draw
Common::Point *pWin, // playfield window top left position
Common::Rect *pClip, // playfield clipping rectangle
bool bVelocity, // when set, objects pos is updated with velocity
@@ -67,7 +64,7 @@ void FindMovingObjects( // Creates clipping rectangles for all the objects that
void MergeClipRect(); // Merges any clipping rectangles that overlap
void UpdateClipRect( // Redraws all objects within this clipping rectangle
- OBJECT *pObjList, // object list to draw
+ OBJECT **pObjList, // object list to draw
Common::Point *pWin, // window top left position
Common::Rect *pClip); // pointer to clip rectangle
diff --git a/engines/tinsel/config.cpp b/engines/tinsel/config.cpp
index a206ebf03b..fd278db972 100644
--- a/engines/tinsel/config.cpp
+++ b/engines/tinsel/config.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains configuration functionality
*/
diff --git a/engines/tinsel/config.h b/engines/tinsel/config.h
index dcfaf47b0c..8b6b675766 100644
--- a/engines/tinsel/config.h
+++ b/engines/tinsel/config.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_CONFIG_H
diff --git a/engines/tinsel/coroutine.cpp b/engines/tinsel/coroutine.cpp
index b568cb4a46..998d98b52a 100644
--- a/engines/tinsel/coroutine.cpp
+++ b/engines/tinsel/coroutine.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "tinsel/coroutine.h"
diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h
index b14030c708..b62c40b4e5 100644
--- a/engines/tinsel/coroutine.h
+++ b/engines/tinsel/coroutine.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_COROUTINE_H
diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp
index 66dc47df1f..8248609a81 100644
--- a/engines/tinsel/cursor.cpp
+++ b/engines/tinsel/cursor.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Cursor and cursor trails.
*/
@@ -80,7 +77,7 @@ static int nextTrail = 0;
static bool bWhoa = false; // Set by DropCursor() at the end of a scene
// - causes cursor processes to do nothing
- // Reset when main cursor has re-initialised
+ // Reset when main cursor has re-initialized
static uint16 restart = 0; // When main cursor has been bWhoa-ed, it waits
// for this to be set to 0x8000.
@@ -109,8 +106,8 @@ static int lastCursorX = 0, lastCursorY = 0;
static void DoCursorMove();
/**
- * Initialise and insert a cursor trail object, set its Z-pos, and hide
- * it. Also initialise its animation script.
+ * Initialize and insert a cursor trail object, set its Z-pos, and hide
+ * it. Also initialize its animation script.
*/
static void InitCurTrailObj(int i, int x, int y) {
const FREEL *pfr; // pointer to reel
@@ -130,13 +127,13 @@ static void InitCurTrailObj(int i, int x, int y) {
assert(BgPal()); // No background palette
pim->hImgPal = TO_LE_32(BgPal());
- // Initialise and insert the object, set its Z-pos, and hide it
+ // Initialize and insert the object, set its Z-pos, and hide it
ntrailData[i].trailObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), ntrailData[i].trailObj);
MultiSetZPosition(ntrailData[i].trailObj, Z_CURSORTRAIL);
MultiSetAniXY(ntrailData[i].trailObj, x, y);
- // Initialise the animation script
+ // Initialize the animation script
InitStepAnimScript(&ntrailData[i].trailAnim, ntrailData[i].trailObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
StepAnimScript(&ntrailData[i].trailAnim);
}
@@ -230,7 +227,7 @@ void GetCursorXY(int *x, int *y, bool absolute) {
}
/**
- * Re-initialise the main cursor to use the main cursor reel.
+ * Re-initialize the main cursor to use the main cursor reel.
* Called from TINLIB.C to restore cursor after hiding it.
* Called from INVENTRY.C to restore cursor after customising it.
*/
@@ -388,11 +385,11 @@ void SetAuxCursor(SCNHANDLE hFilm) {
ACoY = (short)((FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK)/2 -
((int16) FROM_LE_16(pim->anioffY)));
- // Initialise and insert the auxillary cursor object
+ // Initialize and insert the auxillary cursor object
AcurObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), AcurObj);
- // Initialise the animation and set its position
+ // Initialize the animation and set its position
InitStepAnimScript(&AcurAnim, AcurObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
MultiSetAniXY(AcurObj, x - ACoX, y - ACoY);
MultiSetZPosition(AcurObj, Z_ACURSOR);
@@ -473,7 +470,7 @@ static void DoCursorMove() {
}
/**
- * Initialise cursor object.
+ * Initialize cursor object.
*/
static void InitCurObj() {
const FILM *pFilm;
@@ -503,7 +500,7 @@ static void InitCurObj() {
}
/**
- * Initialise the cursor position.
+ * Initialize the cursor position.
*/
static void InitCurPos() {
Common::Point ptMouse = _vm->getMousePosition();
@@ -533,7 +530,7 @@ static void CursorStoppedCheck(CORO_PARAM) {
while (restart != 0x8000)
CORO_SLEEP(1);
- // Re-initialise
+ // Re-initialize
InitCurObj();
InitCurPos();
InventoryIconCursor(false); // May be holding something
@@ -659,7 +656,7 @@ void DropCursor() {
* RestartCursor is called when a new scene is starting up.
*/
void RestartCursor() {
- restart = 0x8000; // Get the main cursor to re-initialise
+ restart = 0x8000; // Get the main cursor to re-initialize
}
/**
diff --git a/engines/tinsel/cursor.h b/engines/tinsel/cursor.h
index 71e846297c..4e32aa3a19 100644
--- a/engines/tinsel/cursor.h
+++ b/engines/tinsel/cursor.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Clipping rectangle defines
*/
diff --git a/engines/tinsel/debugger.cpp b/engines/tinsel/debugger.cpp
index ed877587c7..1261326032 100644
--- a/engines/tinsel/debugger.cpp
+++ b/engines/tinsel/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tinsel/tinsel.h"
diff --git a/engines/tinsel/debugger.h b/engines/tinsel/debugger.h
index e803f16566..ff4ccd519f 100644
--- a/engines/tinsel/debugger.h
+++ b/engines/tinsel/debugger.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_DEBUGGER_H
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index 70bf398baf..27b16c5b93 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "base/plugins.h"
@@ -107,7 +104,7 @@ public:
TinselMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Tinsel Engine";
+ return "Tinsel";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index 6894cd0c47..c86db9e438 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace Tinsel {
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 281dd2da55..6ca070b67a 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Handles the inventory and conversation windows.
*
* And the save/load game windows. Some of this will be platform
@@ -1322,7 +1319,7 @@ extern int WhichItemHeld() {
}
/**
- * Called from the cursor module when it re-initialises (at the start of
+ * Called from the cursor module when it re-initializes (at the start of
* a new scene). For if we are holding something at scene-change time.
*/
extern void InventoryIconCursor(bool bNewItem) {
diff --git a/engines/tinsel/dialogs.h b/engines/tinsel/dialogs.h
index f81a59a0b7..8c48eb8b76 100644
--- a/engines/tinsel/dialogs.h
+++ b/engines/tinsel/dialogs.h
@@ -19,9 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Inventory related functions
*/
diff --git a/engines/tinsel/drives.cpp b/engines/tinsel/drives.cpp
index d252e45cf5..5977d3b718 100644
--- a/engines/tinsel/drives.cpp
+++ b/engines/tinsel/drives.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* CD/drive handling functions
*/
diff --git a/engines/tinsel/drives.h b/engines/tinsel/drives.h
index 709c0d2392..907071d2f8 100644
--- a/engines/tinsel/drives.h
+++ b/engines/tinsel/drives.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* CD/drive handling functions
*/
diff --git a/engines/tinsel/dw.h b/engines/tinsel/dw.h
index aed4c50408..21f6db946e 100644
--- a/engines/tinsel/dw.h
+++ b/engines/tinsel/dw.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_DW_H
diff --git a/engines/tinsel/effect.cpp b/engines/tinsel/effect.cpp
index 95785e5840..22027b0f02 100644
--- a/engines/tinsel/effect.cpp
+++ b/engines/tinsel/effect.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Handles effect polygons.
diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp
index 4e61a6ef29..e701ddca99 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Main purpose is to process user events.
* Also provides a couple of utility functions.
*/
diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h
index a491f1e036..f2b4d7f663 100644
--- a/engines/tinsel/events.h
+++ b/engines/tinsel/events.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* User events processing and utility functions
*/
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index 99a8b9ff14..86d117af81 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Palette Fader and Flasher processes.
*/
diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h
index b30a26d893..dc0b903d7e 100644
--- a/engines/tinsel/faders.h
+++ b/engines/tinsel/faders.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Data structures used by the fader and flasher processes
*/
diff --git a/engines/tinsel/film.h b/engines/tinsel/film.h
index 231fbf28db..edb8dc268d 100644
--- a/engines/tinsel/film.h
+++ b/engines/tinsel/film.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_FILM_H // prevent multiple includes
diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp
index f57a6d5d54..e857dca509 100644
--- a/engines/tinsel/font.cpp
+++ b/engines/tinsel/font.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "tinsel/actors.h"
diff --git a/engines/tinsel/font.h b/engines/tinsel/font.h
index e5f5ece201..83bc12354e 100644
--- a/engines/tinsel/font.h
+++ b/engines/tinsel/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_FONT_H // prevent multiple includes
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index bdcd3207f9..6a5d626de8 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Low level graphics interface.
*/
diff --git a/engines/tinsel/graphics.h b/engines/tinsel/graphics.h
index de16082441..d34f069f6a 100644
--- a/engines/tinsel/graphics.h
+++ b/engines/tinsel/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Low level graphics interface.
*/
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index 6f5f92c969..eeb83b1f98 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains the handle based Memory Manager code
*/
@@ -246,9 +243,6 @@ void LoadCDGraphData(MEMHANDLE *pH) {
* @param next Handle of end of range + 1
*/
void LoadExtraGraphData(SCNHANDLE start, SCNHANDLE next) {
- if (start == cdBaseHandle)
- return;
-
OpenCDGraphFile();
MemoryDiscard((handleTable + cdPlayHandle)->_node); // Free it
diff --git a/engines/tinsel/handle.h b/engines/tinsel/handle.h
index c3c303a1e9..e681bfc131 100644
--- a/engines/tinsel/handle.h
+++ b/engines/tinsel/handle.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Graphics Memory Manager data structures
*/
diff --git a/engines/tinsel/heapmem.cpp b/engines/tinsel/heapmem.cpp
index e8c4ed23ee..026dc9457e 100644
--- a/engines/tinsel/heapmem.cpp
+++ b/engines/tinsel/heapmem.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains the handle based Memory Manager code.
*/
@@ -103,7 +100,7 @@ static void MemoryStats() {
#endif
/**
- * Initialises the memory manager.
+ * Initializes the memory manager.
*/
void MemoryInit() {
// place first node on free list
@@ -136,7 +133,7 @@ void MemoryInit() {
}
/**
- * Deinitialises the memory manager.
+ * Deinitializes the memory manager.
*/
void MemoryDeinit() {
const MEM_NODE *pHeap = &heapSentinel;
diff --git a/engines/tinsel/heapmem.h b/engines/tinsel/heapmem.h
index 95cc0285f2..7b29a3ecce 100644
--- a/engines/tinsel/heapmem.h
+++ b/engines/tinsel/heapmem.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains the handle based Memory Manager defines
*/
@@ -38,8 +35,8 @@ struct MEM_NODE;
|* Memory Function Prototypes *|
\*----------------------------------------------------------------------*/
-void MemoryInit(); // initialises the memory manager
-void MemoryDeinit(); // deinitialises the memory manager
+void MemoryInit(); // initializes the memory manager
+void MemoryDeinit(); // deinitializes the memory manager
// reserves a memory node for a movable & discardable block
MEM_NODE *MemoryNoAlloc();
diff --git a/engines/tinsel/mareels.cpp b/engines/tinsel/mareels.cpp
index 5d9672972a..bd267a2c65 100644
--- a/engines/tinsel/mareels.cpp
+++ b/engines/tinsel/mareels.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Functions to set up moving actors' reels.
*/
diff --git a/engines/tinsel/mareels.h b/engines/tinsel/mareels.h
index c31ceafbf4..2ff5ca906e 100644
--- a/engines/tinsel/mareels.h
+++ b/engines/tinsel/mareels.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_MAREELS_H // prevent multiple includes
diff --git a/engines/tinsel/move.cpp b/engines/tinsel/move.cpp
index 5fc555f9b0..e20f28d528 100644
--- a/engines/tinsel/move.cpp
+++ b/engines/tinsel/move.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Handles walking and use of the path system.
*
* Contains the dodgiest code in the whole system.
@@ -581,7 +578,7 @@ static void SetMoverUltDest(PMOVER pActor, int x, int y) {
* Set intermediate destination.
*
* If in final destination path, go straight to target.
- * If in a neighbouring path to the final destination, if the target path
+ * If in a neighboring path to the final destination, if the target path
* is a follow nodes path, head for the end node, otherwise head straight
* for the target.
* Otherwise, head towards the pseudo-center or end node of the first
diff --git a/engines/tinsel/move.h b/engines/tinsel/move.h
index 027a89f67e..a307e5c081 100644
--- a/engines/tinsel/move.h
+++ b/engines/tinsel/move.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_MOVE_H // prevent multiple includes
diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp
index 9a7dac5929..c48fefdd22 100644
--- a/engines/tinsel/multiobj.cpp
+++ b/engines/tinsel/multiobj.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains utilities to handle multi-part objects.
*/
@@ -32,7 +29,7 @@
namespace Tinsel {
/**
- * Initialise a multi-part object using a list of images to init
+ * Initialize a multi-part object using a list of images to init
* each object piece. One object is created for each image in the list.
* All objects are given the same palette as the first image. A pointer
* to the first (master) object created is returned.
@@ -93,7 +90,7 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) {
*/
-void MultiInsertObject(OBJECT *pObjList, OBJECT *pInsObj) {
+void MultiInsertObject(OBJECT **pObjList, OBJECT *pInsObj) {
// validate object pointer
assert(isValidObject(pInsObj));
@@ -114,7 +111,7 @@ void MultiInsertObject(OBJECT *pObjList, OBJECT *pInsObj) {
* @param pMultiObj Multi-part object to be deleted
*/
-void MultiDeleteObject(OBJECT *pObjList, OBJECT *pMultiObj) {
+void MultiDeleteObject(OBJECT **pObjList, OBJECT *pMultiObj) {
// validate object pointer
assert(isValidObject(pMultiObj));
diff --git a/engines/tinsel/multiobj.h b/engines/tinsel/multiobj.h
index b94d63e79f..a0f977553a 100644
--- a/engines/tinsel/multiobj.h
+++ b/engines/tinsel/multiobj.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Multi-part object definitions
*/
@@ -56,15 +53,15 @@ typedef MULTI_INIT *PMULTI_INIT;
|* Multi Object Function Prototypes *|
\*----------------------------------------------------------------------*/
-OBJECT *MultiInitObject( // Initialise a multi-part object
+OBJECT *MultiInitObject( // Initialize a multi-part object
const MULTI_INIT *pInitTbl); // pointer to multi-object initialisation table
void MultiInsertObject( // Insert a multi-part object onto a object list
- OBJECT *pObjList, // list to insert multi-part object onto
+ OBJECT **pObjList, // list to insert multi-part object onto
OBJECT *pInsObj); // head of multi-part object to insert
void MultiDeleteObject( // Delete all the pieces of a multi-part object
- OBJECT *pObjList, // list to delete multi-part object from
+ OBJECT **pObjList, // list to delete multi-part object from
OBJECT *pMultiObj); // multi-part object to be deleted
void MultiHideObject( // Hide a multi-part object
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index 12bcff829b..d6478f5cae 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// FIXME: This code is taken from MADE and may need more work (e.g. setVolume).
diff --git a/engines/tinsel/music.h b/engines/tinsel/music.h
index 9003e60078..d43fed268d 100644
--- a/engines/tinsel/music.h
+++ b/engines/tinsel/music.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// Music class
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index ad02a614a5..cbe5b0a88f 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains the Object Manager code.
*/
@@ -165,13 +162,13 @@ void CopyObject(OBJECT *pDest, OBJECT *pSrc) {
* @param pInsObj Object to insert
*/
-void InsertObject(OBJECT *pObjList, OBJECT *pInsObj) {
- OBJECT *pPrev, *pObj; // object list traversal pointers
+void InsertObject(OBJECT **pObjList, OBJECT *pInsObj) {
+ OBJECT **pAnchor, *pObj; // object list traversal pointers
// validate object pointer
assert(isValidObject(pInsObj));
- for (pPrev = pObjList, pObj = pObjList->pNext; pObj != NULL; pPrev = pObj, pObj = pObj->pNext) {
+ for (pAnchor = pObjList, pObj = *pAnchor; pObj != NULL; pAnchor = &pObj->pNext, pObj = *pAnchor) {
// check Z order
if (pInsObj->zPos < pObj->zPos) {
// object Z is lower than list Z - insert here
@@ -185,9 +182,9 @@ void InsertObject(OBJECT *pObjList, OBJECT *pInsObj) {
}
}
- // insert obj between pPrev and pObj
+ // insert obj between pAnchor and pObj
pInsObj->pNext = pObj;
- pPrev->pNext = pInsObj;
+ *pAnchor = pInsObj;
}
@@ -197,8 +194,8 @@ void InsertObject(OBJECT *pObjList, OBJECT *pInsObj) {
* @param pObjList List to delete object from
* @param pDelObj Object to delete
*/
-void DelObject(OBJECT *pObjList, OBJECT *pDelObj) {
- OBJECT *pPrev, *pObj; // object list traversal pointers
+void DelObject(OBJECT **pObjList, OBJECT *pDelObj) {
+ OBJECT **pAnchor, *pObj; // object list traversal pointers
const Common::Rect rcScreen(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
// validate object pointer
@@ -210,7 +207,7 @@ void DelObject(OBJECT *pObjList, OBJECT *pDelObj) {
assert(numObj >= 0);
#endif
- for (pPrev = pObjList, pObj = pObjList->pNext; pObj != NULL; pPrev = pObj, pObj = pObj->pNext) {
+ for (pAnchor = pObjList, pObj = *pAnchor; pObj != NULL; pAnchor = &pObj->pNext, pObj = *pAnchor) {
if (pObj == pDelObj) {
// found object to delete
@@ -220,7 +217,7 @@ void DelObject(OBJECT *pObjList, OBJECT *pDelObj) {
}
// make PREV next = OBJ next - removes OBJ from list
- pPrev->pNext = pObj->pNext;
+ *pAnchor = pObj->pNext;
// place free list in OBJ next
pObj->pNext = pFreeObjects;
@@ -248,12 +245,12 @@ void DelObject(OBJECT *pObjList, OBJECT *pDelObj) {
* Sort the specified object list in Z Y order.
* @param pObjList List to sort
*/
-void SortObjectList(OBJECT *pObjList) {
+void SortObjectList(OBJECT **pObjList) {
OBJECT *pPrev, *pObj; // object list traversal pointers
OBJECT head; // temporary head of list - because pObjList is not usually a OBJECT
// put at head of list
- head.pNext = pObjList->pNext;
+ head.pNext = *pObjList;
// set head of list dummy OBJ Z Y values to lowest possible
head.yPos = intToFrac(MIN_INT16);
@@ -348,7 +345,7 @@ void GetAniPosition(OBJECT *pObj, int *pPosX, int *pPosY) {
}
/**
- * Initialise a object using a OBJ_INIT structure to supply parameters.
+ * Initialize a object using a OBJ_INIT structure to supply parameters.
* @param pInitTbl Pointer to object initialisation table
*/
OBJECT *InitObject(const OBJ_INIT *pInitTbl) {
@@ -489,7 +486,7 @@ void AnimateObject(OBJECT *pAniObj, SCNHANDLE hNewImg) {
* @param height Height of rectangle
*/
OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
- // template for initialising the rectangle object
+ // template for initializing the rectangle object
static const OBJ_INIT rectObj = {0, DMA_CONST, OID_EFFECTS, 0, 0, 0};
PALQ *pPalQ; // palette queue pointer
@@ -525,7 +522,7 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
* @param height Height of rectangle
*/
OBJECT *TranslucentObject(int width, int height) {
- // template for initialising the rectangle object
+ // template for initializing the rectangle object
static const OBJ_INIT rectObj = {0, DMA_TRANS, OID_EFFECTS, 0, 0, 0};
// allocate and init a new object
diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h
index 9f10c06cd2..5644ddf19c 100644
--- a/engines/tinsel/object.h
+++ b/engines/tinsel/object.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Object Manager data structures
*/
@@ -137,24 +134,15 @@ void CopyObject( // copy one object to another
OBJECT *pSrc); // source object
void InsertObject( // insert a object onto a sorted object list
- OBJECT *pObjList, // list to insert object onto
+ OBJECT **pObjList, // list to insert object onto
OBJECT *pInsObj); // object to insert
void DelObject( // delete a object from a object list and add to free list
- OBJECT *pObjList, // list to delete object from
+ OBJECT **pObjList, // list to delete object from
OBJECT *pDelObj); // object to delete
void SortObjectList( // re-sort an object list
- OBJECT *pObjList); // list to sort
-
-OBJECT *GetNextObject( // object list iterator - returns next obj in list
- OBJECT *pObjList, // which object list
- OBJECT *pStrtObj); // object to start from - when NULL will start from beginning of list
-
-OBJECT *FindObject( // Searches the specified obj list for a object matching the specified OID
- OBJECT *pObjList, // object list to search
- int oidDesired, // object identifer of object to find
- int oidMask); // mask to apply to object identifiers before comparison
+ OBJECT **pObjList); // list to sort
void GetAniOffset( // returns the anim offsets of a image, takes into account orientation
SCNHANDLE hImg, // image to get animation offset of
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 0877337603..f2437bd17e 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Palette Allocator for IBM PC.
*/
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index 694eff504d..af58a7ffbd 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Palette Allocator Definitions
*/
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index a1cc02a832..0834e7df24 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Virtual processor.
*/
@@ -351,7 +348,7 @@ void FreeMasterInterpretContext() {
}
/**
- * Allocate and initialise an interpret context.
+ * Allocate and initialize an interpret context.
* Called from a process prior to Interpret().
* @param gsort which sort of code
* @param hCode Handle to code to execute
@@ -388,7 +385,7 @@ INT_CONTEXT *InitInterpretContext(GSORT gsort, SCNHANDLE hCode, TINSEL_EVENT eve
}
/**
- * Allocate and initialise an interpret context with restored data.
+ * Allocate and initialize an interpret context with restored data.
*/
INT_CONTEXT *RestoreInterpretContext(INT_CONTEXT *ric) {
INT_CONTEXT *ic;
diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h
index f31f2eb5c6..971a42d7bd 100644
--- a/engines/tinsel/pcode.h
+++ b/engines/tinsel/pcode.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Virtual processor definitions
*/
@@ -77,7 +74,7 @@ struct INT_CONTEXT {
int ip; ///< instruction pointer
bool bHalt; ///< set to exit interpeter
bool escOn;
- int myEscape; ///< only initialised to prevent compiler warning!
+ int myEscape; ///< only initialized to prevent compiler warning!
uint32 waitNumber1; // The waiting numbert
uint32 waitNumber2; // The wait for number
diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp
index 5022f4757a..7439c6f77d 100644
--- a/engines/tinsel/pdisplay.cpp
+++ b/engines/tinsel/pdisplay.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* CursorPositionProcess()
* TagProcess()
* PointProcess()
diff --git a/engines/tinsel/pdisplay.h b/engines/tinsel/pdisplay.h
index 4e19f1a78a..aefaf015bd 100644
--- a/engines/tinsel/pdisplay.h
+++ b/engines/tinsel/pdisplay.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Tag related methods
*/
diff --git a/engines/tinsel/pid.h b/engines/tinsel/pid.h
index d6f87bdf98..4f63045cb4 100644
--- a/engines/tinsel/pid.h
+++ b/engines/tinsel/pid.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* List of all process identifiers
*/
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
index 145634b9dd..71e07721a6 100644
--- a/engines/tinsel/play.cpp
+++ b/engines/tinsel/play.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Plays films within a scene, takes into account the actor in each 'column'. |
*/
diff --git a/engines/tinsel/play.h b/engines/tinsel/play.h
index 2e981b1e2e..041b7096a8 100644
--- a/engines/tinsel/play.h
+++ b/engines/tinsel/play.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Plays films within a scene, takes into account the actor in each 'column'.
*/
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index f49dddeef4..6fc1c65ec5 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "tinsel/actors.h"
@@ -1278,13 +1275,13 @@ HPOLYGON GetPolyHandle(int i) {
// **************************************************************************
//
-// Code called to initialise or wrap up a scene:
+// Code called to initialize or wrap up a scene:
//
// **************************************************************************
/**
* Called at the start of a scene, when all polygons have been
- * initialised, to work out which paths are adjacent to which.
+ * initialized, to work out which paths are adjacent to which.
*/
static int DistinctCorners(HPOLYGON hp1, HPOLYGON hp2) {
const POLYGON *pp1, *pp2;
@@ -1596,7 +1593,7 @@ static PPOLYGON GetPolyEntry() {
/**
* Variation of GetPolyEntry from Tinsel 1 that splits up getting a new
- * polygon structure from initialising it
+ * polygon structure from initializing it
*/
static PPOLYGON CommonInits(PTYPE polyType, int pno, const Poly &ptp, bool bRestart) {
int i;
@@ -1660,14 +1657,14 @@ static void PseudoCenter(POLYGON *p) {
}
/**
- * Initialise an EXIT polygon.
+ * Initialize an EXIT polygon.
*/
static void InitExit(const Poly &ptp, int pno, bool bRestart) {
CommonInits(EXIT, pno, ptp, bRestart);
}
/**
- * Initialise a PATH or NPATH polygon.
+ * Initialize a PATH or NPATH polygon.
*/
static void InitPath(const Poly &ptp, bool NodePath, int pno, bool bRestart) {
PPOLYGON p = CommonInits(PATH, pno, ptp, bRestart);
@@ -1679,14 +1676,14 @@ static void InitPath(const Poly &ptp, bool NodePath, int pno, bool bRestart) {
/**
- * Initialise a BLOCKING polygon.
+ * Initialize a BLOCKING polygon.
*/
static void InitBlock(const Poly &ptp, int pno, bool bRestart) {
CommonInits(BLOCK, pno, ptp, bRestart);
}
/**
- * Initialise an extra BLOCKING polygon related to a moving actor.
+ * Initialize an extra BLOCKING polygon related to a moving actor.
* The width of the polygon depends on the width of the actor which is
* trying to walk through the actor you first thought of.
* This is for dynamic blocking.
@@ -1721,7 +1718,7 @@ HPOLYGON InitExtraBlock(PMOVER ca, PMOVER ta) {
}
/**
- * Initialise an EFFECT polygon.
+ * Initialize an EFFECT polygon.
*/
static void InitEffect(const Poly &ptp, int pno, bool bRestart) {
CommonInits(EFFECT, pno, ptp, bRestart);
@@ -1729,7 +1726,7 @@ static void InitEffect(const Poly &ptp, int pno, bool bRestart) {
/**
- * Initialise a REFER polygon.
+ * Initialize a REFER polygon.
*/
static void InitRefer(const Poly &ptp, int pno, bool bRestart) {
PPOLYGON p = CommonInits(REFER, pno, ptp, bRestart);
@@ -1739,7 +1736,7 @@ static void InitRefer(const Poly &ptp, int pno, bool bRestart) {
/**
- * Initialise a TAG polygon.
+ * Initialize a TAG polygon.
*/
static void InitTag(const Poly &ptp, int pno, bool bRestart) {
CommonInits(TAG, pno, ptp, bRestart);
@@ -1784,7 +1781,7 @@ static void KillDeadPolygons() {
}
/**
- * Called at the start of a scene to initialise the polys in that scene.
+ * Called at the start of a scene to initialize the polys in that scene.
*/
void InitPolygons(SCNHANDLE ph, int numPoly, bool bRestart) {
pHandle = ph;
diff --git a/engines/tinsel/polygons.h b/engines/tinsel/polygons.h
index cf8f9e98c2..6d36d555d8 100644
--- a/engines/tinsel/polygons.h
+++ b/engines/tinsel/polygons.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Definition of POLYGON structure and functions in POLYGONS.C
*/
diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp
index 38ac0a2ce6..ca196aac92 100644
--- a/engines/tinsel/rince.cpp
+++ b/engines/tinsel/rince.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Should really be called "moving actors.c"
*/
diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h
index 5d09a1e945..93fd191172 100644
--- a/engines/tinsel/rince.h
+++ b/engines/tinsel/rince.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Should really be called "moving actors.h"
*/
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 50f6d8d00b..caaf9a13f8 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Save and restore scene and game.
*/
diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp
index aa359d281f..89d68a611e 100644
--- a/engines/tinsel/savescn.cpp
+++ b/engines/tinsel/savescn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Save and restore scene and game.
*/
@@ -153,14 +150,14 @@ void DoRestoreScene(SAVED_DATA *sd, bool bFadeOut) {
RestoreSceneCount = RS_COUNT; // Set restore scene count
}
-void InitialiseSaveScenes() {
+void InitializeSaveScenes() {
if (ssData == NULL) {
ssData = (SAVED_DATA *)calloc(MAX_NEST, sizeof(SAVED_DATA));
if (ssData == NULL) {
error("Cannot allocate memory for scene changes");
}
} else {
- // Re-initialise - no scenes saved
+ // Re-initialize - no scenes saved
savedSceneCount = 0;
}
}
diff --git a/engines/tinsel/savescn.h b/engines/tinsel/savescn.h
index 271cdd5eb1..894af0d6b8 100644
--- a/engines/tinsel/savescn.h
+++ b/engines/tinsel/savescn.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Should really be called "moving actors.h"
*/
@@ -99,7 +96,7 @@ void ProcessSRQueue();
void RequestSaveGame(char *name, char *desc, SAVED_DATA *sd, int *ssCount, SAVED_DATA *ssData);
void RequestRestoreGame(int num, SAVED_DATA *sd, int *ssCount, SAVED_DATA *ssData);
-void InitialiseSaveScenes();
+void InitializeSaveScenes();
void FreeSaveScenes();
} // End of namespace Tinsel
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index b82bac32cc..89b0da7d65 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Starts up new scenes.
*/
@@ -204,8 +201,8 @@ void SendSceneTinselProcess(TINSEL_EVENT event) {
/**
* Get the SCENE_STRUC
- * Initialise polygons for the scene
- * Initialise the actors for this scene
+ * Initialize polygons for the scene
+ * Initialize the actors for this scene
* Run the appropriate entrance code (if any)
* Get the default refer type
*/
@@ -247,10 +244,10 @@ static void LoadScene(SCNHANDLE scene, int entry) {
if (entry == NO_ENTRY_NUM) {
// Restoring scene
- // Initialise all the polygons for this scene
+ // Initialize all the polygons for this scene
InitPolygons(FROM_LE_32(ss->hPoly), FROM_LE_32(ss->numPoly), true);
- // Initialise the actors for this scene
+ // Initialize the actors for this scene
StartTaggedActors(FROM_LE_32(ss->hTaggedActor), FROM_LE_32(ss->numTaggedActor), false);
if (TinselV2)
@@ -260,10 +257,10 @@ static void LoadScene(SCNHANDLE scene, int entry) {
} else {
// Genuine new scene
- // Initialise all the polygons for this scene
+ // Initialize all the polygons for this scene
InitPolygons(FROM_LE_32(ss->hPoly), FROM_LE_32(ss->numPoly), false);
- // Initialise the actors for this scene
+ // Initialize the actors for this scene
StartTaggedActors(FROM_LE_32(ss->hTaggedActor), FROM_LE_32(ss->numTaggedActor), true);
// Run the appropriate entrance code (if any)
diff --git a/engines/tinsel/scene.h b/engines/tinsel/scene.h
index 2ef7da1289..baaff27a3e 100644
--- a/engines/tinsel/scene.h
+++ b/engines/tinsel/scene.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Scene parsing defines
*/
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index 37c04abd22..b24d6bf9b8 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Process scheduler.
*/
diff --git a/engines/tinsel/sched.h b/engines/tinsel/sched.h
index bfeaa8750a..a1eafcdc47 100644
--- a/engines/tinsel/sched.h
+++ b/engines/tinsel/sched.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Data structures used by the process scheduler
*/
diff --git a/engines/tinsel/scn.cpp b/engines/tinsel/scn.cpp
index 20d75b6b93..70093447ff 100644
--- a/engines/tinsel/scn.cpp
+++ b/engines/tinsel/scn.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* A (some would say very) small collection of utility functions.
*/
diff --git a/engines/tinsel/scn.h b/engines/tinsel/scn.h
index c9cafd9eea..2e3a02cdda 100644
--- a/engines/tinsel/scn.h
+++ b/engines/tinsel/scn.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_SCN_H // prevent multiple includes
diff --git a/engines/tinsel/scroll.cpp b/engines/tinsel/scroll.cpp
index 3da970915f..d75e649be3 100644
--- a/engines/tinsel/scroll.cpp
+++ b/engines/tinsel/scroll.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Handles scrolling
*/
@@ -419,7 +416,7 @@ void ScrollProcess(CORO_PARAM, const void *) {
CORO_BEGIN_CODE(_ctx);
// In Tinsel v2, scenes may play movies, so the background may not always
- // already be initialised like it is in v1
+ // already be initialized like it is in v1
while (!GetBgObject())
CORO_SLEEP(1);
diff --git a/engines/tinsel/scroll.h b/engines/tinsel/scroll.h
index 438b049069..62562b20b2 100644
--- a/engines/tinsel/scroll.h
+++ b/engines/tinsel/scroll.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_SCROLL_H // prevent multiple includes
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index ec42ca5da4..bf48dd1511 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* sound functionality
*/
diff --git a/engines/tinsel/sound.h b/engines/tinsel/sound.h
index 2b0ef4599e..d7083b3b21 100644
--- a/engines/tinsel/sound.h
+++ b/engines/tinsel/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* This file contains the Sound Driver data structures etc.
*/
diff --git a/engines/tinsel/strres.cpp b/engines/tinsel/strres.cpp
index 2dc0e833d1..f3a7278993 100644
--- a/engines/tinsel/strres.cpp
+++ b/engines/tinsel/strres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* String resource managment routines
*/
diff --git a/engines/tinsel/strres.h b/engines/tinsel/strres.h
index 497259584c..a63824a863 100644
--- a/engines/tinsel/strres.h
+++ b/engines/tinsel/strres.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* String resource managment routines
*/
diff --git a/engines/tinsel/sysvar.cpp b/engines/tinsel/sysvar.cpp
index ad795fd219..88053f15c6 100644
--- a/engines/tinsel/sysvar.cpp
+++ b/engines/tinsel/sysvar.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* System variable handling.
*/
@@ -115,7 +112,7 @@ static SCNHANDLE systemStrings[SS_MAX_VALID]; // FIXME: Avoid non-const global v
//----------------- FUNCTIONS --------------------------------
/**
- * Initialises the system variable list
+ * Initializes the system variable list
*/
void InitSysVars() {
diff --git a/engines/tinsel/sysvar.h b/engines/tinsel/sysvar.h
index 4cdb1364b4..65bf558433 100644
--- a/engines/tinsel/sysvar.h
+++ b/engines/tinsel/sysvar.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* System variable handling.
*/
diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp
index 3652d6ed3e..ecb1e153f3 100644
--- a/engines/tinsel/text.cpp
+++ b/engines/tinsel/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Text utilities.
*/
@@ -107,7 +104,7 @@ int JustifyText(char *szStr, int xPos, const FONT *pFont, int mode) {
* @param mode Mode flags for the string
* @param sleepTime Sleep time between each character (if non-zero)
*/
-OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color,
+OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime) {
int xJustify; // x position of text after justification
int yOffset; // offset to next line of text
diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h
index ea804f58d7..4c80300c46 100644
--- a/engines/tinsel/text.h
+++ b/engines/tinsel/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Text utility defines
*/
@@ -98,7 +95,7 @@ struct TEXTOUT {
* @param mode mode flags for the string
* @param sleepTime Sleep time between each character (if non-zero)
*/
-OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color,
+OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime = 0);
OBJECT *ObjectTextOutIndirect( // output a string of text
diff --git a/engines/tinsel/timers.cpp b/engines/tinsel/timers.cpp
index c1a4cd0ff5..1c3ff9b260 100644
--- a/engines/tinsel/timers.cpp
+++ b/engines/tinsel/timers.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Handles timers.
*
* Note: As part of the transition to ScummVM, the ticks field of a timer has been changed
diff --git a/engines/tinsel/timers.h b/engines/tinsel/timers.h
index 1456d9a1d5..9bf85d9c35 100644
--- a/engines/tinsel/timers.h
+++ b/engines/tinsel/timers.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Handles timers.
*/
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index afd409ce27..7613c1a897 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Glitter library functions.
*
* In the main called only from PCODE.C
@@ -2752,7 +2749,7 @@ static void SetTag(CORO_PARAM, int tagno) {
}
/**
- * Initialise a timer.
+ * Initialize a timer.
*/
static void SetTimer(int timerno, int start, bool up, bool frame) {
StartTimer(timerno, start, up != 0, frame != 0);
@@ -3002,7 +2999,7 @@ static void StartProcess(CORO_PARAM, uint32 procID) {
}
/**
- * Initialise a timer.
+ * Initialize a timer.
*/
static void StartTimerFn(int timerno, int start, bool up, int fs) {
StartTimer(timerno, start, up, fs);
diff --git a/engines/tinsel/tinlib.h b/engines/tinsel/tinlib.h
index 7bd2a19d55..7c8c2ffbf6 100644
--- a/engines/tinsel/tinlib.h
+++ b/engines/tinsel/tinlib.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* Text utility defines
*/
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 20d4f1d31a..6c1898b08c 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug-channels.h"
#include "common/endian.h"
#include "common/error.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/fs.h"
#include "common/config-manager.h"
@@ -709,7 +705,7 @@ void LoadBasicChunks() {
int numObjects;
// Allocate RAM for savescene data
- InitialiseSaveScenes();
+ InitializeSaveScenes();
// CHUNK_TOTAL_ACTORS seems to be missing in the released version, hard coding a value
// TODO: Would be nice to just change 511 to MAX_SAVED_ALIVES
@@ -818,7 +814,7 @@ const char *TinselEngine::_textFiles[][3] = {
TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) :
- Engine(syst), _gameDescription(gameDesc) {
+ Engine(syst), _gameDescription(gameDesc), _random("tinsel") {
_vm = this;
_config = new Config(this);
@@ -909,8 +905,6 @@ Common::Error TinselEngine::run() {
_screenSurface.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
}
- g_eventRec.registerRandomSource(_random, "tinsel");
-
_console = new Console();
_scheduler = new Scheduler();
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index 35ea43074c..d0875f9fdf 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_H
diff --git a/engines/tinsel/token.cpp b/engines/tinsel/token.cpp
index fe152edcaa..c7490a100b 100644
--- a/engines/tinsel/token.cpp
+++ b/engines/tinsel/token.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
* To ensure exclusive use of resources and exclusive control responsibilities.
*/
diff --git a/engines/tinsel/token.h b/engines/tinsel/token.h
index b750b92ae4..8169ef1c7a 100644
--- a/engines/tinsel/token.h
+++ b/engines/tinsel/token.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TINSEL_TOKEN_H
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 856acbd986..23bd0f6487 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/toon/anim.h b/engines/toon/anim.h
index dfb6842b0e..13c501b910 100644
--- a/engines/toon/anim.h
+++ b/engines/toon/anim.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOON_ANIM_H
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index 026450d3c9..ae67d1900e 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
@@ -396,7 +393,6 @@ void AudioStreamInstance::decodeADPCM(uint8 *comp, int16 *dest, int32 packetSize
void AudioStreamInstance::play(bool fade, Audio::Mixer::SoundType soundType) {
debugC(1, kDebugAudio, "play(%d)", (fade) ? 1 : 0);
- Audio::SoundHandle soundHandle;
_stopped = false;
_fadingIn = fade;
_fadeTime = 0;
diff --git a/engines/toon/audio.h b/engines/toon/audio.h
index 5feae9c5a1..52ca21b075 100644
--- a/engines/toon/audio.h
+++ b/engines/toon/audio.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOON_AUDIO_H
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp
index 29a61ffd78..06c6e21d21 100644
--- a/engines/toon/character.cpp
+++ b/engines/toon/character.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/character.h b/engines/toon/character.h
index e870d81813..b48991732c 100644
--- a/engines/toon/character.h
+++ b/engines/toon/character.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_CHARACTER_H
diff --git a/engines/toon/console.cpp b/engines/toon/console.cpp
index 3c34792580..8037dca4cb 100644
--- a/engines/toon/console.cpp
+++ b/engines/toon/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "toon/console.h"
diff --git a/engines/toon/console.h b/engines/toon/console.h
index 0662f20533..25ce7627a1 100644
--- a/engines/toon/console.h
+++ b/engines/toon/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOON_CONSOLE_H
diff --git a/engines/toon/conversation.cpp b/engines/toon/conversation.cpp
index fc846288ef..01ee1efaed 100644
--- a/engines/toon/conversation.cpp
+++ b/engines/toon/conversation.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "toon/conversation.h"
diff --git a/engines/toon/conversation.h b/engines/toon/conversation.h
index 0380210e02..3e459a9734 100644
--- a/engines/toon/conversation.h
+++ b/engines/toon/conversation.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_CONVERSATION_H
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp
index ef023564bc..1056f6ec0d 100644
--- a/engines/toon/detection.cpp
+++ b/engines/toon/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -150,7 +147,7 @@ public:
ToonMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Toon Engine";
+ return "Toon";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/toon/drew.cpp b/engines/toon/drew.cpp
index 77333c4a9f..89438fb35c 100644
--- a/engines/toon/drew.cpp
+++ b/engines/toon/drew.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug.h"
diff --git a/engines/toon/drew.h b/engines/toon/drew.h
index f248e4aa51..3357b99846 100644
--- a/engines/toon/drew.h
+++ b/engines/toon/drew.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_DREW_H
diff --git a/engines/toon/flux.cpp b/engines/toon/flux.cpp
index 833fdbf5ce..b752e65c82 100644
--- a/engines/toon/flux.cpp
+++ b/engines/toon/flux.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/flux.h b/engines/toon/flux.h
index 136dedd415..c208bc5bda 100644
--- a/engines/toon/flux.h
+++ b/engines/toon/flux.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_FLUX_H
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 9367d79036..4c491ae2b3 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/font.h b/engines/toon/font.h
index 739d215e36..168c61f27e 100644
--- a/engines/toon/font.h
+++ b/engines/toon/font.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_FONT_H
diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp
index 1c1e23e39e..62458ad800 100644
--- a/engines/toon/hotspot.cpp
+++ b/engines/toon/hotspot.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/hotspot.h b/engines/toon/hotspot.h
index aabcd531fe..49ac1a4af8 100644
--- a/engines/toon/hotspot.h
+++ b/engines/toon/hotspot.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_HOTSPOT_H
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index 64b80c29b3..2318eaaac7 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/movie.h b/engines/toon/movie.h
index bed2ceceae..7e443fd8ab 100644
--- a/engines/toon/movie.h
+++ b/engines/toon/movie.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_MOVIE_H
diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp
index 26355863f6..c116d63663 100644
--- a/engines/toon/path.cpp
+++ b/engines/toon/path.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/path.h b/engines/toon/path.h
index 03d2b188e5..329127c9ce 100644
--- a/engines/toon/path.h
+++ b/engines/toon/path.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_PATH_H
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index ce28f9c68b..0257964fb5 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "toon/picture.h"
diff --git a/engines/toon/picture.h b/engines/toon/picture.h
index 6aca408364..23edbc91da 100644
--- a/engines/toon/picture.h
+++ b/engines/toon/picture.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_PICTURE_H
diff --git a/engines/toon/resource.cpp b/engines/toon/resource.cpp
index f9f65b423b..cef916c7de 100644
--- a/engines/toon/resource.cpp
+++ b/engines/toon/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "toon/resource.h"
diff --git a/engines/toon/resource.h b/engines/toon/resource.h
index d6ed29b81b..0cecad8187 100644
--- a/engines/toon/resource.h
+++ b/engines/toon/resource.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_RESOURCE_H
diff --git a/engines/toon/script.cpp b/engines/toon/script.cpp
index 8703666781..eed781295a 100644
--- a/engines/toon/script.cpp
+++ b/engines/toon/script.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/script.h b/engines/toon/script.h
index b6d28e1171..9dd00dca80 100644
--- a/engines/toon/script.h
+++ b/engines/toon/script.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_SCRIPT_H
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index 8f75097bd4..693f308707 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/script_func.h b/engines/toon/script_func.h
index 76b7b0ada1..ef1cb59f47 100644
--- a/engines/toon/script_func.h
+++ b/engines/toon/script_func.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef SCRIPT_FUNC_H
diff --git a/engines/toon/state.cpp b/engines/toon/state.cpp
index af37ea9e68..8e4abbd709 100644
--- a/engines/toon/state.cpp
+++ b/engines/toon/state.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/state.h b/engines/toon/state.h
index 63505fd5fb..4004b8b4f0 100644
--- a/engines/toon/state.h
+++ b/engines/toon/state.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_STATE_H
diff --git a/engines/toon/text.cpp b/engines/toon/text.cpp
index 94a3ea5aa7..0f72d58b3b 100644
--- a/engines/toon/text.cpp
+++ b/engines/toon/text.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/text.h b/engines/toon/text.h
index 9a35471e4f..b8f4a96a6a 100644
--- a/engines/toon/text.h
+++ b/engines/toon/text.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_TEXT_H
diff --git a/engines/toon/tools.cpp b/engines/toon/tools.cpp
index ff72e69543..c9aa470deb 100644
--- a/engines/toon/tools.cpp
+++ b/engines/toon/tools.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/debug.h"
diff --git a/engines/toon/tools.h b/engines/toon/tools.h
index 1434ca26c7..44c0fc4644 100644
--- a/engines/toon/tools.h
+++ b/engines/toon/tools.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_TOOLS_H
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 81c4d313e4..44c747c4c4 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#include "common/system.h"
@@ -28,7 +25,6 @@
#include "common/debug-channels.h"
#include "common/archive.h"
#include "common/config-manager.h"
-#include "common/EventRecorder.h"
#include "common/savefile.h"
#include "common/memstream.h"
@@ -783,8 +779,6 @@ Common::Error ToonEngine::run() {
if (!loadToonDat())
return Common::kUnknownError;
- g_eventRec.registerRandomSource(_rnd, "toon");
-
initGraphics(TOON_SCREEN_WIDTH, TOON_SCREEN_HEIGHT, true);
init();
@@ -818,7 +812,8 @@ Common::Error ToonEngine::run() {
}
ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription)
- : Engine(syst), _gameDescription(gameDescription), _language(gameDescription->language) {
+ : Engine(syst), _gameDescription(gameDescription),
+ _language(gameDescription->language), _rnd("toon") {
_system = syst;
_tickLength = 16;
_currentPicture = NULL;
@@ -2860,7 +2855,7 @@ void ToonEngine::playSFX(int32 id, int32 volume) {
}
void ToonEngine::playSoundWrong() {
- _audioManager->playSFX(rand() & 7, 128, true);
+ _audioManager->playSFX(randRange(0,7), 128, true);
}
void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) {
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index 373437d658..1eaa5022a9 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef TOON_TOON_H
diff --git a/engines/touche/console.cpp b/engines/touche/console.cpp
index adcabb2fc5..51ef5fc639 100644
--- a/engines/touche/console.cpp
+++ b/engines/touche/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "touche/console.h"
diff --git a/engines/touche/console.h b/engines/touche/console.h
index de14867b32..e3cdc9d48b 100644
--- a/engines/touche/console.h
+++ b/engines/touche/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOUCHE_CONSOLE_H
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index 06d15664a5..b7f9c092aa 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -159,7 +156,7 @@ public:
ToucheMetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
- return "Touche Engine";
+ return "Touche";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/touche/graphics.cpp b/engines/touche/graphics.cpp
index ab711beba0..6e565327ba 100644
--- a/engines/touche/graphics.cpp
+++ b/engines/touche/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/endian.h"
diff --git a/engines/touche/graphics.h b/engines/touche/graphics.h
index 9c928f983c..4b769b0a66 100644
--- a/engines/touche/graphics.h
+++ b/engines/touche/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOUCHE_GRAPHICS_H
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index eb10c61893..f469a95803 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/touche/midi.cpp b/engines/touche/midi.cpp
index c89375d876..da14baa484 100644
--- a/engines/touche/midi.cpp
+++ b/engines/touche/midi.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/touche/midi.h b/engines/touche/midi.h
index bde4950b93..24f9da0474 100644
--- a/engines/touche/midi.h
+++ b/engines/touche/midi.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOUCHE_MIDI_H
diff --git a/engines/touche/opcodes.cpp b/engines/touche/opcodes.cpp
index 5df0ca3548..18677eae26 100644
--- a/engines/touche/opcodes.cpp
+++ b/engines/touche/opcodes.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 93406dcb8b..8f4752e912 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp
index 42b68d015c..82ed03ad45 100644
--- a/engines/touche/saveload.cpp
+++ b/engines/touche/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/touche/staticres.cpp b/engines/touche/staticres.cpp
index 74aa7954de..f7b1482f80 100644
--- a/engines/touche/staticres.cpp
+++ b/engines/touche/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 15a2b1c53a..81d6adf581 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -18,16 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/events.h"
-#include "common/EventRecorder.h"
#include "common/fs.h"
#include "common/system.h"
#include "common/archive.h"
@@ -48,7 +44,7 @@
namespace Touche {
ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
- : Engine(system), _midiPlayer(0), _language(language) {
+ : Engine(system), _midiPlayer(0), _language(language), _rnd("touche") {
_saveLoadCurrentPage = 0;
_saveLoadCurrentSlot = 0;
_hideInventoryTexts = false;
@@ -87,8 +83,6 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
DebugMan.addDebugChannel(kDebugMenu, "Menu", "Menu debug level");
_console = new ToucheConsole(this);
-
- g_eventRec.registerRandomSource(_rnd, "touche");
}
ToucheEngine::~ToucheEngine() {
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 1580d072e6..c8d7504754 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TOUCHE_ENGINE_H
diff --git a/engines/tsage/blueforce_logic.cpp b/engines/tsage/blueforce_logic.cpp
new file mode 100644
index 0000000000..9813bef6f7
--- /dev/null
+++ b/engines/tsage/blueforce_logic.cpp
@@ -0,0 +1,120 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "tsage/blueforce_logic.h"
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+
+namespace tSage {
+
+void BlueForceGame::start() {
+ // Start the game
+ _globals->_sceneManager.changeScene(20);
+
+ _globals->_events.setCursor(CURSOR_WALK);
+}
+
+Scene *BlueForceGame::createScene(int sceneNumber) {
+ switch (sceneNumber) {
+ case 20:
+ case 50:
+ case 60:
+ error("Scene group 0 not implemented");
+ case 100:
+ case 109:
+ case 110:
+ case 114:
+ case 115:
+ case 125:
+ case 140:
+ case 150:
+ case 160:
+ case 180:
+ case 190:
+ error("Scene group 1 not implemented");
+ case 200:
+ case 210:
+ case 220:
+ case 225:
+ case 265:
+ case 270:
+ case 271:
+ case 280:
+ error("Scene group 2 not implemented");
+ case 300:
+ case 315:
+ case 325:
+ case 330:
+ case 340:
+ case 342:
+ case 350:
+ case 355:
+ case 360:
+ case 370:
+ case 380:
+ case 385:
+ case 390:
+ error("Scene group 3 not implemented");
+ case 410:
+ case 415:
+ case 440:
+ case 450:
+ error("Scene group 4 not implemented");
+ case 550:
+ case 551:
+ case 560:
+ case 570:
+ case 580:
+ case 590:
+ error("Scene group 5 not implemented");
+ case 600:
+ case 620:
+ case 666:
+ case 690:
+ error("Scene group 6 not implemented");
+ case 710:
+ error("Scene group 7 not implemented");
+ case 800:
+ case 810:
+ case 820:
+ case 830:
+ case 840:
+ case 850:
+ case 860:
+ case 870:
+ case 880:
+ error("Scene group 8 not implemented");
+ case 900:
+ case 910:
+ case 920:
+ case 930:
+ case 935:
+ case 940:
+ error("Scene group 9 not implemented");
+ default:
+ error("Unknown scene number - %d", sceneNumber);
+ break;
+ }
+}
+
+} // End of namespace tSage
diff --git a/engines/tsage/blueforce_logic.h b/engines/tsage/blueforce_logic.h
new file mode 100644
index 0000000000..9237e50a13
--- /dev/null
+++ b/engines/tsage/blueforce_logic.h
@@ -0,0 +1,42 @@
+/* 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 TSAGE_BLUEFORCE_LOGIC_H
+#define TSAGE_BLUEFORCE_LOGIC_H
+
+#include "common/scummsys.h"
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+
+namespace tSage {
+
+class BlueForceGame: public Game {
+public:
+ virtual void start();
+ virtual Scene *createScene(int sceneNumber);
+};
+
+} // End of namespace tSage
+
+#endif
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 789ec8fa8d..5fa36142e7 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/str-array.h"
@@ -421,8 +418,10 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
Event event;
while (!_vm->getEventManager()->shouldQuit()) {
while (!_globals->_events.getEvent(event, EVENT_KEYPRESS | EVENT_BUTTON_DOWN | EVENT_MOUSE_MOVE) &&
- !_vm->getEventManager()->shouldQuit())
- ;
+ !_vm->getEventManager()->shouldQuit()) {
+ g_system->delayMillis(10);
+ g_system->updateScreen();
+ }
if (_vm->getEventManager()->shouldQuit())
break;
diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h
index f8c5bc7b14..6876fa41cb 100644
--- a/engines/tsage/converse.h
+++ b/engines/tsage/converse.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_CONVERSE_H
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 8ad920e6fd..8c1bd2fd39 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -18,12 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
+#include "common/config-manager.h"
#include "engines/engine.h"
#include "graphics/palette.h"
#include "tsage/tsage.h"
@@ -2914,15 +2912,22 @@ void Region::uniteRect(const Rect &rect) {
void SceneRegions::load(int sceneNum) {
clear();
-
- byte *regionData = _resourceManager->getResource(RES_CONTROL, sceneNum, 9999, true);
+ bool altRegions = _vm->getFeatures() & GF_ALT_REGIONS;
+ byte *regionData = _resourceManager->getResource(RES_CONTROL, sceneNum, altRegions ? 1 : 9999, true);
if (regionData) {
int regionCount = READ_LE_UINT16(regionData);
for (int regionCtr = 0; regionCtr < regionCount; ++regionCtr) {
- int rlbNum = READ_LE_UINT16(regionData + regionCtr * 6 + 2);
+ int regionId = READ_LE_UINT16(regionData + regionCtr * 6 + 2);
- push_back(Region(sceneNum, rlbNum));
+ if (altRegions) {
+ // Load data from within this resource
+ uint32 dataOffset = READ_LE_UINT32(regionData + regionCtr * 6 + 4);
+ push_back(Region(regionId, regionData + dataOffset));
+ } else {
+ // Load region from a separate resource
+ push_back(Region(sceneNum, regionId));
+ }
}
DEALLOCATE(regionData);
@@ -3477,52 +3482,11 @@ void SceneHandler::postInit(SceneObjectList *OwnerList) {
void SceneHandler::process(Event &event) {
// Main keypress handler
- if ((event.eventType == EVENT_KEYPRESS) && !event.handled) {
- switch (event.kbd.keycode) {
- case Common::KEYCODE_F1:
- // F1 - Help
- MessageDialog::show((_vm->getFeatures() & GF_DEMO) ? DEMO_HELP_MSG : HELP_MSG, OK_BTN_STRING);
- break;
-
- case Common::KEYCODE_F2: {
- // F2 - Sound Options
- ConfigDialog *dlg = new ConfigDialog();
- dlg->runModal();
- delete dlg;
- _globals->_events.setCursorFromFlag();
- break;
- }
-
- case Common::KEYCODE_F3:
- // F3 - Quit
- _globals->_game->quitGame();
- event.handled = false;
- break;
-
- case Common::KEYCODE_F4:
- // F4 - Restart
- _globals->_game->restartGame();
- _globals->_events.setCursorFromFlag();
- break;
-
- case Common::KEYCODE_F7:
- // F7 - Restore
- _globals->_game->restoreGame();
- _globals->_events.setCursorFromFlag();
- break;
+ if (!event.handled) {
+ _globals->_game->processEvent(event);
- case Common::KEYCODE_F10:
- // F10 - Pause
- GfxDialog::setPalette();
- MessageDialog::show(GAME_PAUSED_MSG, OK_BTN_STRING);
+ if (event.eventType == EVENT_KEYPRESS)
_globals->_events.setCursorFromFlag();
- break;
-
- default:
- break;
- }
-
- _globals->_events.setCursorFromFlag();
}
// Check for displaying right-click dialog
@@ -3643,22 +3607,4 @@ void SceneHandler::saveListener(Serializer &ser) {
warning("TODO: SceneHandler::saveListener");
}
-/*--------------------------------------------------------------------------*/
-
-void Game::execute() {
- // Main game loop
- bool activeFlag = false;
- do {
- // Process all currently atcive game handlers
- activeFlag = false;
- for (SynchronizedList<GameHandler *>::iterator i = _handlers.begin(); i != _handlers.end(); ++i) {
- GameHandler *gh = *i;
- if (gh->_lockCtr.getCtr() == 0) {
- gh->execute();
- activeFlag = true;
- }
- }
- } while (activeFlag && !_vm->getEventManager()->shouldQuit());
-}
-
} // End of namespace tSage
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 001b478fc9..71130e5b0b 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_CORE_H
@@ -912,30 +909,6 @@ public:
static void saveListener(Serializer &ser);
};
-/*--------------------------------------------------------------------------*/
-
-class Game {
-protected:
- SynchronizedList<GameHandler *> _handlers;
-
- static bool notLockedFn(GameHandler *g);
- virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {}
-public:
- virtual ~Game() {}
-
- void addHandler(GameHandler *entry) { _handlers.push_back(entry); }
- void removeHandler(GameHandler *entry) { _handlers.remove(entry); }
-
- void execute();
- virtual void start() = 0;
- virtual void restart() {}
- virtual void restartGame() {}
- virtual void saveGame() {}
- virtual void restoreGame() {}
- virtual void quitGame() {}
- virtual void endGame(int resNum, int lineNum) {}
-};
-
} // End of namespace tSage
#endif
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index 7944bad776..5288c98b72 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/debugger.h"
@@ -66,13 +63,13 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
if (argc < 2) {
DebugPrintf("Usage: %s <scene number> [prior scene #]\n", argv[0]);
return true;
- } else {
- if (argc == 3)
- _globals->_sceneManager._sceneNumber = strToInt(argv[2]);
+ }
- _globals->_sceneManager.changeScene(strToInt(argv[1]));
- return false;
- }
+ if (argc == 3)
+ _globals->_sceneManager._sceneNumber = strToInt(argv[2]);
+
+ _globals->_sceneManager.changeScene(strToInt(argv[1]));
+ return false;
}
/**
@@ -380,7 +377,8 @@ bool Debugger::Cmd_MoveObject(int argc, const char **argv) {
RING_INVENTORY._jar._sceneNumber = sceneNum;
break;
default:
- DebugPrintf("Invlid object Id %s\n", argv[1]);
+ DebugPrintf("Invalid object Id %s\n", argv[1]);
+ break;
}
return true;
diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h
index eeb5bc86f6..3c14cd7bed 100644
--- a/engines/tsage/debugger.h
+++ b/engines/tsage/debugger.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_DEBUGGER_H
diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index ba7b459304..20c2002257 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -91,7 +88,7 @@ public:
}
virtual const char *getName() const {
- return "TsAGE Engine";
+ return "TsAGE";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index d165900d55..dc55f2a66d 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
namespace tSage {
@@ -112,7 +109,34 @@ static const tSageGameDescription gameDescriptions[] = {
GType_BlueForce,
GF_FLOPPY
},
-
+ // Blue Force floppy
+ {
+ {
+ "blueforce",
+ "Floppy",
+ AD_ENTRY1s("blue.rlb", "17c3993415e8a2cf93040eef7e88ec93", 1156508),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_BlueForce,
+ GF_FLOPPY
+ },
+ // Blue Force CD and First Wave use the same files
+ {
+ {
+ "blueforce",
+ "CD",
+ AD_ENTRY1s("blue.rlb", "ac29f38184cb3b874ea18523059872ba", 63863322),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_BlueForce,
+ GF_CD
+ },
{ AD_TABLE_END_MARKER, 0, 0 }
};
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index f8e35f74f9..759deebbef 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/translation.h"
@@ -73,12 +70,11 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String
int MessageDialog::show(const Common::String &message, const Common::String &btn1Message, const Common::String &btn2Message) {
// Ensure that the cursor is the arrow
- _globals->_events.pushCursor(CURSOR_ARROW);
- _globals->_events.showCursor();
+ _globals->_events.setCursor(CURSOR_ARROW);
int result = show2(message, btn1Message, btn2Message);
- _globals->_events.popCursor();
+ _globals->_events.setCursorFromFlag();
return result;
}
@@ -472,8 +468,10 @@ void InventoryDialog::execute() {
while (!_vm->getEventManager()->shouldQuit()) {
// Get events
Event event;
- while (!_globals->_events.getEvent(event) && !_vm->getEventManager()->shouldQuit())
- ;
+ while (!_globals->_events.getEvent(event) && !_vm->getEventManager()->shouldQuit()) {
+ g_system->delayMillis(10);
+ g_system->updateScreen();
+ }
if (_vm->getEventManager()->shouldQuit())
return;
diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h
index c24fa2dd3b..a50307f775 100644
--- a/engines/tsage/dialogs.h
+++ b/engines/tsage/dialogs.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_DIALOGS_H
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index e51c5da479..e889c56c4d 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/events.h"
@@ -38,7 +35,7 @@ namespace tSage {
EventsClass::EventsClass() {
_currentCursor = CURSOR_NONE;
- hideCursor();
+ _lastCursor = CURSOR_NONE;
_frameNumber = 0;
_priorFrameTime = 0;
_prevDelayFrame = 0;
@@ -140,17 +137,11 @@ bool EventsClass::getEvent(Event &evt, int eventMask) {
* @cursorType Specified cursor number
*/
void EventsClass::setCursor(CursorType cursorType) {
- _globals->clearFlag(122);
-
- if ((_currentCursor == cursorType) && CursorMan.isVisible())
+ if (cursorType == _lastCursor)
return;
- if (cursorType == CURSOR_NONE) {
- if (CursorMan.isVisible())
- CursorMan.showMouse(false);
- return;
- }
-
+ _lastCursor = cursorType;
+ _globals->clearFlag(122);
CursorMan.showMouse(true);
const byte *cursor;
@@ -158,10 +149,15 @@ void EventsClass::setCursor(CursorType cursorType) {
uint size;
switch (cursorType) {
- case OBJECT_STUNNER:
- // Stunner cursor
- cursor = _resourceManager->getSubResource(4, 1, 6, &size);
+ case CURSOR_NONE:
+ // No cursor
_globals->setFlag(122);
+
+ if (_vm->getFeatures() & GF_DEMO) {
+ CursorMan.showMouse(false);
+ return;
+ }
+ cursor = _resourceManager->getSubResource(4, 1, 6, &size);
break;
case CURSOR_LOOK:
@@ -215,8 +211,8 @@ void EventsClass::pushCursor(CursorType cursorType) {
uint size;
switch (cursorType) {
- case CURSOR_CROSSHAIRS:
- // Crosshairs cursor
+ case CURSOR_NONE:
+ // No cursor
cursor = _resourceManager->getSubResource(4, 1, 6, &size);
break;
@@ -273,19 +269,19 @@ void EventsClass::setCursor(Graphics::Surface &cursor, int transColor, const Com
}
void EventsClass::setCursorFromFlag() {
- setCursor(_globals->getFlag(122) ? CURSOR_CROSSHAIRS : _currentCursor);
+ setCursor(isCursorVisible() ? _currentCursor : CURSOR_NONE);
}
void EventsClass::showCursor() {
- CursorMan.showMouse(true);
+ setCursor(_currentCursor);
}
void EventsClass::hideCursor() {
- CursorMan.showMouse(false);
+ setCursor(CURSOR_NONE);
}
bool EventsClass::isCursorVisible() const {
- return CursorMan.isVisible();
+ return !_globals->getFlag(122);
}
/**
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index d2dbd9e058..9a7bdbe82c 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_EVENTS_H
@@ -80,6 +77,7 @@ public:
Common::Point _mousePos;
CursorType _currentCursor;
+ CursorType _lastCursor;
void setCursor(CursorType cursorType);
void pushCursor(CursorType cursorType);
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index c6e1344714..e629396501 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -18,13 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/globals.h"
#include "tsage/tsage.h"
+#include "tsage/blueforce_logic.h"
+#include "tsage/ringworld_demo.h"
#include "tsage/ringworld_logic.h"
namespace tSage {
@@ -52,8 +51,9 @@ static SavedObject *classFactoryProc(const Common::String &className) {
/*--------------------------------------------------------------------------*/
Globals::Globals() :
- _dialogCenter(160, 140),
- _gfxManagerInstance(_screenSurface) {
+ _dialogCenter(160, 140),
+ _gfxManagerInstance(_screenSurface),
+ _randomSource("tsage") {
reset();
_stripNum = 0;
@@ -64,6 +64,13 @@ Globals::Globals() :
_fontColors.background = 0;
_fontColors.foreground = 0;
_dialogCenter.y = 80;
+ } else if ((_vm->getGameID() == GType_Ringworld) && (_vm->getFeatures() & GF_CD)) {
+ _gfxFontNumber = 50;
+ _gfxColors.background = 53;
+ _gfxColors.foreground = 0;
+ _fontColors.background = 51;
+ _fontColors.foreground = 54;
+ warning("TODO: Check the 3 additional colors");
} else {
_gfxFontNumber = 50;
_gfxColors.background = 53;
@@ -84,11 +91,19 @@ Globals::Globals() :
_scrollFollower = NULL;
_inventory = NULL;
- if (!(_vm->getFeatures() & GF_DEMO)) {
- _inventory = new RingworldInvObjectList();
- _game = new RingworldGame();
- } else {
- _game = new RingworldDemoGame();
+ switch (_vm->getGameID()) {
+ case GType_Ringworld:
+ if (!(_vm->getFeatures() & GF_DEMO)) {
+ _inventory = new RingworldInvObjectList();
+ _game = new RingworldGame();
+ } else {
+ _game = new RingworldDemoGame();
+ }
+ break;
+
+ case GType_BlueForce:
+ _game = new BlueForceGame();
+ break;
}
}
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 3a6fab5b70..6b3df587b6 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_GLOBALS_H
@@ -76,15 +73,15 @@ public:
void reset();
void setFlag(int flagNum) {
- assert((flagNum > 0) && (flagNum < MAX_FLAGS));
+ assert((flagNum >= 0) && (flagNum < MAX_FLAGS));
_flags[flagNum] = true;
}
void clearFlag(int flagNum) {
- assert((flagNum > 0) && (flagNum < MAX_FLAGS));
+ assert((flagNum >= 0) && (flagNum < MAX_FLAGS));
_flags[flagNum] = false;
}
bool getFlag(int flagNum) const {
- assert((flagNum > 0) && (flagNum < MAX_FLAGS));
+ assert((flagNum >= 0) && (flagNum < MAX_FLAGS));
return _flags[flagNum];
}
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index c50da6beef..cc11343c9c 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/events.h"
@@ -673,12 +670,18 @@ void GfxElement::drawFrame() {
* @event Event to process
*/
bool GfxElement::focusedEvent(Event &event) {
+ Common::Point mousePos = event.mousePos;
bool highlightFlag = false;
- while (!_vm->getEventManager()->shouldQuit()) {
+ // HACK: It should use the GfxManager object to figure out the relative
+ // position, but for now this seems like the easiest way.
+ int xOffset = mousePos.x - _globals->_events._mousePos.x;
+ int yOffset = mousePos.y - _globals->_events._mousePos.y;
+
+ while (event.eventType != EVENT_BUTTON_UP && !_vm->getEventManager()->shouldQuit()) {
g_system->delayMillis(10);
- if (_bounds.contains(event.mousePos)) {
+ if (_bounds.contains(mousePos)) {
if (!highlightFlag) {
// First highlight call to show the highlight
highlightFlag = true;
@@ -690,8 +693,12 @@ bool GfxElement::focusedEvent(Event &event) {
highlight();
}
- if (_globals->_events.getEvent(event, EVENT_BUTTON_UP))
- break;
+ if (_globals->_events.getEvent(event, EVENT_MOUSE_MOVE | EVENT_BUTTON_UP)) {
+ if (event.eventType == EVENT_MOUSE_MOVE) {
+ mousePos.x = event.mousePos.x + xOffset;
+ mousePos.y = event.mousePos.y + yOffset;
+ }
+ }
}
if (highlightFlag) {
@@ -867,7 +874,7 @@ GfxDialog::~GfxDialog() {
void GfxDialog::setDefaults() {
GfxElement::setDefaults();
- // Initialise the embedded graphics manager
+ // Initialize the embedded graphics manager
_gfxManager.setDefaults();
// Figure out a rect needed for all the added elements
@@ -970,9 +977,10 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) {
// Event loop
GfxButton *selectedButton = NULL;
- while (!_vm->getEventManager()->shouldQuit()) {
+ bool breakFlag = false;
+ while (!_vm->getEventManager()->shouldQuit() && !breakFlag) {
Event event;
- while (_globals->_events.getEvent(event)) {
+ while (_globals->_events.getEvent(event) && !breakFlag) {
// Adjust mouse positions to be relative within the dialog
event.mousePos.x -= _gfxManager._bounds.left;
event.mousePos.y -= _gfxManager._bounds.top;
@@ -981,19 +989,25 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) {
if ((*i)->process(event))
selectedButton = static_cast<GfxButton *>(*i);
}
- }
- if (selectedButton)
- break;
- else if (!event.handled) {
- if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
- selectedButton = NULL;
- break;
- } else if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_RETURN)) {
- selectedButton = defaultButton;
+ if (selectedButton) {
+ breakFlag = true;
break;
+ } else if (!event.handled) {
+ if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
+ selectedButton = NULL;
+ breakFlag = true;
+ break;
+ } else if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_RETURN)) {
+ selectedButton = defaultButton;
+ breakFlag = true;
+ break;
+ }
}
}
+
+ g_system->delayMillis(10);
+ g_system->updateScreen();
}
_gfxManager.deactivate();
@@ -1195,7 +1209,7 @@ int GfxFont::getStringWidth(const char *s) {
/**
* Returns the maximum number of characters for words that will fit into a given width
*
- * @s Message to be analysed
+ * @s Message to be analyzed
* @maxWidth Maximum allowed width
*/
int GfxFont::getStringFit(const char *&s, int maxWidth) {
@@ -1241,7 +1255,7 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
* Fills out the passed rect with the dimensions of a given string word-wrapped to a
* maximum specified width
*
- * @s Message to be analysed
+ * @s Message to be analyzed
* @bounds Rectangle to put output size into
* @maxWidth Maximum allowed line width in pixels
*/
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index 8be4629493..b269520039 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef RING_GRAPHICS_H
@@ -43,8 +40,8 @@ class Region;
*/
class Rect : public Common::Rect, public Serialisable {
public:
- Rect() : Common::Rect() {};
- Rect(int16 x1, int16 y1, int16 x2, int16 y2) : Common::Rect(x1, y1, x2, y2) {};
+ Rect() : Common::Rect() {}
+ Rect(int16 x1, int16 y1, int16 x2, int16 y2) : Common::Rect(x1, y1, x2, y2) {}
void set(int16 x1, int16 y1, int16 x2, int16 y2);
void collapse(int dx, int dy);
@@ -63,7 +60,7 @@ public:
uint8 foreground;
uint8 background;
- GfxColors() : foreground(0), background(0) {};
+ GfxColors() : foreground(0), background(0) {}
};
class LineSlice {
@@ -95,8 +92,8 @@ public:
Graphics::Surface lockSurface();
void unlockSurface();
void create(int width, int height);
- void setBounds(const Rect &bounds) { _bounds = bounds; };
- const Rect &getBounds() const { return _bounds; };
+ void setBounds(const Rect &bounds) { _bounds = bounds; }
+ const Rect &getBounds() const { return _bounds; }
void copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Region *priorityRegion = NULL);
void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL) {
@@ -190,8 +187,8 @@ public:
virtual void setDefaults();
virtual void remove() { _owner = NULL; }
virtual void highlight();
- virtual void draw() {};
- virtual bool process(Event &event) { return false; };
+ virtual void draw() {}
+ virtual bool process(Event &event) { return false; }
virtual bool focusedEvent(Event &event);
};
@@ -232,7 +229,7 @@ private:
public:
Common::String _message;
public:
- GfxButton() : GfxElement() {};
+ GfxButton() : GfxElement() {}
virtual ~GfxButton() {}
void setText(const Common::String &s) {
@@ -274,7 +271,7 @@ public:
_surface.setBounds(_bounds);
return _surface.lockSurface();
}
- void unlockSurface() { _surface.unlockSurface(); };
+ void unlockSurface() { _surface.unlockSurface(); }
void fillArea(int xp, int yp, int color);
void fillRect(const Rect &bounds, int color);
void fillRect2(int xs, int ys, int width, int height, int color);
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index 2f9194a9ba..aefc8b0992 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -1,6 +1,7 @@
MODULE := engines/tsage
MODULE_OBJS := \
+ blueforce_logic.o \
converse.o \
core.o \
debugger.o \
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index 2b678a848a..676d319ba9 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/scummsys.h"
diff --git a/engines/tsage/resources.h b/engines/tsage/resources.h
index 7b518cabd6..efbb86b24e 100644
--- a/engines/tsage/resources.h
+++ b/engines/tsage/resources.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef RING_RESOURCES_H
diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp
index 29438c0347..3ad414fa20 100644
--- a/engines/tsage/ringworld_demo.cpp
+++ b/engines/tsage/ringworld_demo.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/ringworld_demo.h"
@@ -30,6 +27,80 @@
namespace tSage {
+void RingworldDemoGame::start() {
+ // Start the demo's single scene
+ _globals->_sceneManager.changeScene(1);
+
+ _globals->_events.setCursor(CURSOR_NONE);
+}
+
+Scene *RingworldDemoGame::createScene(int sceneNumber) {
+ // The demo only has a single scene, so ignore the scene number and always return it
+ return new RingworldDemoScene();
+}
+
+void RingworldDemoGame::quitGame() {
+ _globals->_events.setCursor(CURSOR_ARROW);
+ MessageDialog *dlg = new MessageDialog(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING);
+ dlg->draw();
+
+ GfxButton *selectedButton = dlg->execute(&dlg->_btn2);
+ bool exitFlag = selectedButton != &dlg->_btn2;
+
+ delete dlg;
+ _globals->_events.hideCursor();
+
+ if (exitFlag)
+ _vm->quitGame();
+}
+
+void RingworldDemoGame::pauseGame() {
+ _globals->_events.setCursor(CURSOR_ARROW);
+ MessageDialog *dlg = new MessageDialog(DEMO_PAUSED_MSG, EXIT_BTN_STRING, DEMO_RESUME_BTN_STRING);
+ dlg->draw();
+
+ GfxButton *selectedButton = dlg->execute(&dlg->_btn2);
+ bool exitFlag = selectedButton != &dlg->_btn2;
+
+ delete dlg;
+ _globals->_events.hideCursor();
+
+ if (exitFlag)
+ _vm->quitGame();
+}
+
+void RingworldDemoGame::processEvent(Event &event) {
+ if (event.eventType == EVENT_KEYPRESS) {
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_F1:
+ // F1 - Help
+ MessageDialog::show(DEMO_HELP_MSG, OK_BTN_STRING);
+ break;
+
+ case Common::KEYCODE_F2: {
+ // F2 - Sound Options
+ ConfigDialog *dlg = new ConfigDialog();
+ dlg->runModal();
+ delete dlg;
+ _globals->_events.setCursorFromFlag();
+ break;
+ }
+
+ case Common::KEYCODE_F3:
+ // F3 - Quit
+ quitGame();
+ event.handled = false;
+ break;
+
+ default:
+ break;
+ }
+ } else if (event.eventType == EVENT_BUTTON_DOWN) {
+ pauseGame();
+ event.handled = true;
+ }
+}
+
/*--------------------------------------------------------------------------
* Ringworld Demo scene
*
diff --git a/engines/tsage/ringworld_demo.h b/engines/tsage/ringworld_demo.h
index 63ffe56555..7492c1e871 100644
--- a/engines/tsage/ringworld_demo.h
+++ b/engines/tsage/ringworld_demo.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_DEMO_H
@@ -34,6 +31,15 @@
namespace tSage {
+class RingworldDemoGame: public Game {
+private:
+ void pauseGame();
+public:
+ virtual void start();
+ virtual Scene *createScene(int sceneNumber);
+ virtual void quitGame();
+ virtual void processEvent(Event &event);
+};
class RingworldDemoScene: public Scene {
public:
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index d334e0ce1f..95c9da9fe7 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -42,10 +39,7 @@
namespace tSage {
-Scene *SceneFactory::createScene(int sceneNumber) {
- if (_vm->getFeatures() & GF_DEMO)
- return new RingworldDemoScene();
-
+Scene *RingworldGame::createScene(int sceneNumber) {
switch (sceneNumber) {
/* Scene group 1 */
// Kziniti Palace (Introduction)
@@ -1328,10 +1322,9 @@ void RingworldGame::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String
}
void RingworldGame::start() {
- // Set some default flags and cursor
+ // Set some default flags
_globals->setFlag(12);
_globals->setFlag(34);
- _globals->_events.setCursor(CURSOR_WALK);
// Set the screen to scroll in response to the player moving off-screen
_globals->_scrollFollower = &_globals->_player;
@@ -1341,8 +1334,12 @@ void RingworldGame::start() {
RING_INVENTORY._scanner._sceneNumber = 1;
RING_INVENTORY._ring._sceneNumber = 1;
- // Switch to the title screen
- _globals->_sceneManager.setNewScene(1000);
+
+ if (ConfMan.hasKey("save_slot"))
+ _globals->_sceneHandler._loadGameSlot = ConfMan.getInt("save_slot");
+ else
+ // Switch to the title screen
+ _globals->_sceneManager.setNewScene(1000);
_globals->_events.showCursor();
}
@@ -1416,11 +1413,14 @@ void RingworldGame::endGame(int resNum, int lineNum) {
// Savegames exist, so prompt for Restore/Restart
bool breakFlag;
do {
- if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) {
+ if (_vm->shouldQuit()) {
+ breakFlag = true;
+ } else if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) {
+ restart();
breakFlag = true;
} else {
handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName);
- breakFlag = _globals->_sceneHandler._loadGameSlot > 0;
+ breakFlag = _globals->_sceneHandler._loadGameSlot >= 0;
}
} while (!breakFlag);
}
@@ -1428,16 +1428,52 @@ void RingworldGame::endGame(int resNum, int lineNum) {
_globals->_events.setCursorFromFlag();
}
-/*--------------------------------------------------------------------------*/
+void RingworldGame::processEvent(Event &event) {
+ if (event.eventType == EVENT_KEYPRESS) {
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_F1:
+ // F1 - Help
+ MessageDialog::show(HELP_MSG, OK_BTN_STRING);
+ break;
-void RingworldDemoGame::start() {
- // Start the demo's single scene
- _globals->_sceneManager.changeScene(1);
-
- _globals->_events.setCursor(CURSOR_NONE);
-}
+ case Common::KEYCODE_F2: {
+ // F2 - Sound Options
+ ConfigDialog *dlg = new ConfigDialog();
+ dlg->runModal();
+ delete dlg;
+ _globals->_events.setCursorFromFlag();
+ break;
+ }
-void RingworldDemoGame::restart() {
+ case Common::KEYCODE_F3:
+ // F3 - Quit
+ quitGame();
+ event.handled = false;
+ break;
+
+ case Common::KEYCODE_F4:
+ // F4 - Restart
+ restartGame();
+ _globals->_events.setCursorFromFlag();
+ break;
+
+ case Common::KEYCODE_F7:
+ // F7 - Restore
+ restoreGame();
+ _globals->_events.setCursorFromFlag();
+ break;
+
+ case Common::KEYCODE_F10:
+ // F10 - Pause
+ GfxDialog::setPalette();
+ MessageDialog::show(GAME_PAUSED_MSG, OK_BTN_STRING);
+ _globals->_events.setCursorFromFlag();
+ break;
+
+ default:
+ break;
+ }
+ }
}
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_logic.h b/engines/tsage/ringworld_logic.h
index e84779e6ad..19b0f10b42 100644
--- a/engines/tsage/ringworld_logic.h
+++ b/engines/tsage/ringworld_logic.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_LOGIC_H
@@ -454,21 +451,11 @@ public:
virtual void restoreGame();
virtual void quitGame();
virtual void endGame(int resNum, int lineNum);
-};
-class RingworldDemoGame: public Game {
-protected:
- virtual void restart();
-public:
- virtual void start();
- virtual void restartGame() {}
- virtual void saveGame() {}
- virtual void restoreGame() {}
- virtual void quitGame() {}
- virtual void endGame(int resNum, int lineNum) {}
+ virtual Scene *createScene(int sceneNumber);
+ virtual void processEvent(Event &event);
};
-
} // End of namespace tSage
#endif
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp
index e5ec60c690..b6daadbef7 100644
--- a/engines/tsage/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld_scenes1.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/ringworld_scenes1.h"
@@ -1762,6 +1759,8 @@ Scene50::Scene50() :
_item3(8, OBJECT_STUNNER, 50, 14, OBJECT_SCANNER, 50, 13, CURSOR_LOOK, 50, 3, LIST_END),
_item4(9, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_USE, 40, 41, CURSOR_LOOK, 50, 5, LIST_END),
_item5(10, OBJECT_SCANNER, 50, 17, OBJECT_STUNNER, 50, 18, CURSOR_LOOK, 50, 6, CURSOR_USE, 30, 8, LIST_END) {
+
+ _doorwayRect = Rect(80, 108, 160, 112);
}
void Scene50::postInit(SceneObjectList *OwnerList) {
@@ -1824,7 +1823,6 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
_item0.setBounds(Rect(200, 0, 320, 200));
_globals->_sceneItems.addItems(&_item3, &_item4, &_item5, &_item0, NULL);
- _doorwayRect = Rect(80, 108, 160, 112);
}
void Scene50::signal() {
@@ -1843,6 +1841,8 @@ void Scene50::signal() {
}
void Scene50::dispatch() {
+ Scene::dispatch();
+
if ((_sceneMode != 55) && _doorwayRect.contains(_globals->_player._position)) {
// Player in house doorway, start player moving to within
_globals->_player.disableControl();
diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h
index be6d8e6337..554b261f2c 100644
--- a/engines/tsage/ringworld_scenes1.h
+++ b/engines/tsage/ringworld_scenes1.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES1_H
@@ -443,7 +440,6 @@ class Scene95 : public Scene {
public:
Action1 _action1;
- int _field326;
SceneObject _object1, _object2, _object3;
SoundHandler _soundHandler;
diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
index 65e415748d..0b4186531d 100644
--- a/engines/tsage/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "graphics/cursorman.h"
@@ -52,7 +49,7 @@ void Object9350::draw() {
}
/*--------------------------------------------------------------------------
- * Scene 9100
+ * Scene 9100 - Near beach: Slave washing clothes
*
*--------------------------------------------------------------------------*/
void Scene9100::SceneHotspot1::doAction(int action) {
@@ -177,7 +174,7 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9150
+ * Scene 9150 - Castle: Outside the bulwarks
*
*--------------------------------------------------------------------------*/
void Scene9150::Object3::signal() {
@@ -297,7 +294,7 @@ void Scene9150::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9200
+ * Scene 9200 - Castle: Near the fountain
*
*--------------------------------------------------------------------------*/
void Scene9200::SceneHotspot1::doAction(int action) {
@@ -473,7 +470,7 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9300
+ * Scene 9300 - Castle: In front of a large guarded door
*
*--------------------------------------------------------------------------*/
void Scene9300::signal() {
@@ -540,7 +537,7 @@ void Scene9300::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9350
+ * Scene 9350 - Castle: In a hallway
*
*--------------------------------------------------------------------------*/
@@ -626,7 +623,7 @@ void Scene9350::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9360
+ * Scene 9360 - Castle: In a hallway
*
*--------------------------------------------------------------------------*/
@@ -704,7 +701,7 @@ void Scene9360::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9400
+ * Scene 9400 - Castle: Black-Smith room
*
*--------------------------------------------------------------------------*/
Scene9400::Scene9400() {
@@ -822,8 +819,14 @@ void Scene9400::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 9400, &_globals->_player, &_object1, &_object3, NULL);
}
+void Scene9400::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ if (s.getVersion() >= 3)
+ s.syncAsSint16LE(_field1032);
+}
+
/*--------------------------------------------------------------------------
- * Scene 9450
+ * Scene 9450 - Castle: Dining room
*
*--------------------------------------------------------------------------*/
void Scene9450::Object2::signal() {
@@ -1006,7 +1009,7 @@ void Scene9450::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9500
+ * Scene 9500 - Castle: Bedroom
*
*--------------------------------------------------------------------------*/
void Scene9500::Hotspot1::doAction(int action) {
@@ -1227,7 +1230,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9700
+ * Scene 9700 - Castle: Balcony
*
*--------------------------------------------------------------------------*/
void Scene9700::signal() {
@@ -1299,7 +1302,7 @@ void Scene9700::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9750
+ * Scene 9750 - Castle: In the garden
*
*--------------------------------------------------------------------------*/
void Scene9750::signal() {
@@ -1335,7 +1338,7 @@ void Scene9750::postInit(SceneObjectList *OwnerList) {
/*--------------------------------------------------------------------------
- * Scene 9850
+ * Scene 9850 - Castle: Dressing room
*
*--------------------------------------------------------------------------*/
void Scene9850::Object6::doAction(int action) {
@@ -1639,7 +1642,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9900
+ * Scene 9900 - Ending
*
*--------------------------------------------------------------------------*/
void Scene9900::strAction1::signal() {
@@ -1780,6 +1783,15 @@ void Scene9900::strAction2::dispatch() {
Action::dispatch();
}
+void Scene9900::strAction2::synchronize(Serializer &s) {
+ Action::synchronize(s);
+ if (s.getVersion() >= 3) {
+ s.syncAsSint16LE(_lineNum);
+ s.syncAsSint16LE(_txtArray1Index);
+ s.syncAsSint16LE(_var3);
+ }
+}
+
void Scene9900::strAction3::signal() {
const byte mask3[3] = {0xff, 0, 0};
const byte mask4[3] = {0, 0, 0};
@@ -1985,7 +1997,7 @@ void Scene9900::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 9999
+ * Scene 9999 - Space travel
*
*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h
index 93987aa64b..aa41555718 100644
--- a/engines/tsage/ringworld_scenes10.h
+++ b/engines/tsage/ringworld_scenes10.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES10_H
@@ -241,6 +238,7 @@ public:
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
virtual void dispatch();
+ virtual void synchronize(Serializer &s);
};
class Scene9450 : public Scene2 {
@@ -471,6 +469,7 @@ class Scene9900 : public Scene {
virtual void signal();
virtual void dispatch();
+ virtual void synchronize(Serializer &s);
};
class strAction3 : public Action {
diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index 6a8db81adf..4378eac724 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -113,6 +110,8 @@ void Scene1000::Action3::signal() {
setDelay(240);
break;
case 5: {
+ _globals->_player.enableControl();
+
const char *SEEN_INTRO = "seen_intro";
if (!ConfMan.hasKey(SEEN_INTRO) || !ConfMan.getBool(SEEN_INTRO)) {
// First time being played, so show the introduction
@@ -478,13 +477,14 @@ void Scene1001::Action1::signal() {
case 19: {
_globals->_soundHandler.startSound(91);
byte adjustData[4] = {0xff, 0xff, 0xff, 0};
- _globals->_scenePalette.fade(adjustData, true, 0);
+ _globals->_scenePalette.fade(adjustData, false, 0);
scene->_object1._strip = 7;
scene->_object1._frame = 1;
scene->_object1.setPosition(Common::Point(314, 112));
scene->_object1.addMover(NULL);
setDelay(2);
+ break;
}
case 20:
_globals->_scenePalette.loadPalette(16);
diff --git a/engines/tsage/ringworld_scenes2.h b/engines/tsage/ringworld_scenes2.h
index 75843d3570..7731b45ae8 100644
--- a/engines/tsage/ringworld_scenes2.h
+++ b/engines/tsage/ringworld_scenes2.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES2_H
diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index f788f9a28b..a19f15eca6 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -491,11 +488,11 @@ void Scene2100::Action1::signal() {
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
- if (!scene->_field1800)
+ if (!scene->_sitFl)
setDelay(1);
else {
setAction(&scene->_sequenceManager, this, 2102, &_globals->_player, NULL);
- scene->_field1800 = 0;
+ scene->_sitFl = 0;
}
break;
case 1: {
@@ -634,7 +631,7 @@ void Scene2100::Action4::signal() {
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
- if (!scene->_field1800)
+ if (!scene->_sitFl)
setDelay(1);
else
setAction(&scene->_sequenceManager, this, 2102, &_globals->_player, NULL);
@@ -658,6 +655,7 @@ void Scene2100::Action4::signal() {
}
void Scene2100::Action5::signal() {
+ // Quinn enters the cokpit after Seeker decided to enter the cave alone
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -1150,6 +1148,7 @@ void Scene2100::Action14::signal() {
case 12:
scene->_object3.setStrip(2);
setDelay(30);
+ break;
case 13:
scene->_object3.fixPriority(1);
scene->_soundHandler.startSound(162);
@@ -1403,6 +1402,7 @@ void Scene2100::Hotspot8::doAction(int action) {
}
void Scene2100::Hotspot10::doAction(int action) {
+ // Quinn's Console
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1410,13 +1410,15 @@ void Scene2100::Hotspot10::doAction(int action) {
SceneItem::display2(2100, 13);
break;
case CURSOR_USE:
- if (scene->_field1800) {
+ if (scene->_sitFl) {
_globals->_player.disableControl();
scene->_sceneMode = 2102;
scene->setAction(&scene->_sequenceManager, scene, 2102, &_globals->_player, NULL);
} else if (_globals->getFlag(13)) {
SceneItem::display2(2100, 28);
} else {
+ _globals->_player.disableControl();
+ scene->_sceneMode = 2101;
scene->setAction(&scene->_sequenceManager, scene, 2101, &_globals->_player, NULL);
}
break;
@@ -1473,24 +1475,23 @@ void Scene2100::Object2::doAction(int action) {
case CURSOR_TALK:
if (_globals->getFlag(72)) {
_globals->_player.disableControl();
- if (!_globals->getFlag(52))
+ if (!_globals->getFlag(52)) {
+ scene->_sceneMode = 2111;
scene->setAction(&scene->_sequenceManager, scene, 2111, NULL);
- else {
+ } else {
scene->_sceneMode = _globals->getFlag(53) ? 2112 : 2110;
scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, NULL);
}
- } else {
- if (_globals->getFlag(14))
+ } else if (_globals->getFlag(13)) {
+ SceneItem::display2(2100, 31);
+ } else if (_globals->getFlag(14)) {
SceneItem::display2(2100, 32);
- else {
+ } else {
_globals->setFlag(14);
_globals->_player.disableControl();
scene->_sceneMode = 2108;
scene->setAction(&scene->_sequenceManager, scene, 2109, NULL);
- }
}
-
- scene->setAction(&scene->_action4);
break;
default:
SceneHotspot::doAction(action);
@@ -1499,18 +1500,19 @@ void Scene2100::Object2::doAction(int action) {
}
void Scene2100::Object3::doAction(int action) {
+ // Miranda
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (action) {
case CURSOR_LOOK:
- if (!_globals->getFlag(59))
+ if (_globals->getFlag(59))
SceneItem::display2(2100, 34);
else
error("***I have no response.");
break;
case CURSOR_TALK:
- if (!_globals->getFlag(59)) {
+ if (_globals->getFlag(59)) {
_globals->_player.disableControl();
scene->_sceneMode = 2108;
scene->setAction(&scene->_sequenceManager, scene, 2108, NULL);
@@ -1536,6 +1538,14 @@ Scene2100::Scene2100() :
_hotspot12(0, CURSOR_LOOK, 2100, 24, CURSOR_USE, 2100, 25, LIST_END),
_hotspot13(0, CURSOR_LOOK, 2100, 17, LIST_END),
_hotspot15(0, CURSOR_LOOK, 2100, 22, CURSOR_USE, 2100, 23, LIST_END) {
+ _area1.setup(2153, 2, 1, 2100);
+ _area1._pt = Common::Point(200, 31);
+ _area2.setup(2153, 3, 1, 2150);
+ _area2._pt = Common::Point(200, 50);
+ _area3.setup(2153, 4, 1, 2320);
+ _area3._pt = Common::Point(200, 75);
+ _area4.setup(2153, 1, 1, OBJECT_TRANSLATOR);
+ _area4._pt = Common::Point(237, 77);
}
void Scene2100::postInit(SceneObjectList *OwnerList) {
@@ -1662,15 +1672,6 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
&_hotspot13, &_hotspot12, &_hotspot8, &_object1, &_hotspot2, &_hotspot3, &_hotspot4, &_hotspot5,
&_hotspot6, &_hotspot7, &_hotspot1, NULL);
- _area1.setup(2153, 2, 1, 2100);
- _area1._pt = Common::Point(200, 31);
- _area2.setup(2153, 3, 1, 2150);
- _area2._pt = Common::Point(200, 50);
- _area3.setup(2153, 4, 1, 2320);
- _area3._pt = Common::Point(200, 75);
- _area4.setup(2153, 1, 1, OBJECT_TRANSLATOR);
- _area4._pt = Common::Point(237, 77);
-
_globals->_player.postInit();
if (_globals->getFlag(13)) {
_globals->_player.setVisage(2170);
@@ -1685,7 +1686,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player._moveDiff.x = 4;
_globals->_player.changeZoom(-1);
_globals->_player.disableControl();
- _field1800 = 0;
+ _sitFl = 0;
switch (_globals->_sceneManager._previousScene) {
case 2120:
@@ -1750,6 +1751,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action14);
} else {
_globals->_player.disableControl();
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_sceneMode = 2104;
@@ -1820,7 +1822,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
- _field1800 = 1;
+ _sitFl = 1;
_object4.postInit();
_object4.setVisage(2102);
@@ -1854,7 +1856,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
- _field1800 = 1;
+ _sitFl = 1;
setAction(&_action16);
}
break;
@@ -1928,12 +1930,12 @@ void Scene2100::stripCallback(int v) {
void Scene2100::signal() {
switch (_sceneMode) {
case 2101:
- _field1800 = 1;
+ _sitFl = 1;
_globals->_player._uiEnabled = true;
_globals->_events.setCursor(CURSOR_USE);
break;
case 2102:
- _field1800 = 0;
+ _sitFl = 0;
_globals->_player.enableControl();
break;
case 2103:
@@ -1957,6 +1959,12 @@ void Scene2100::signal() {
}
}
+void Scene2100::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ if (s.getVersion() >= 3)
+ s.syncAsSint16LE(_sitFl);
+}
+
/*--------------------------------------------------------------------------
* Scene 2120 - Encyclopedia
*
@@ -2163,12 +2171,19 @@ void Scene2120::Action1::dispatch() {
/*--------------------------------------------------------------------------*/
+Scene2120::Scene2120(): Scene() {
+ _listRect = Rect(18, 48, 260, 177);
+ _dbMode = 0;
+ _prevDbMode = 0;
+ _visageVisable = false;
+ _subjectIndex = 0;
+}
+
void Scene2120::postInit(SceneObjectList *OwnerList) {
loadScene(2120);
setZoomPercents(0, 100, 200, 100);
_globals->_player.disableControl();
- _listRect = Rect(18, 48, 260, 177);
_subjectButton.setBounds(Rect(266, 13, 320, 56));
_nextPageButton.setBounds(Rect(266, 56, 320, 98));
_previousPageButton.setBounds(Rect(266, 98, 320, 140));
@@ -2185,11 +2200,6 @@ void Scene2120::postInit(SceneObjectList *OwnerList) {
_arrowHotspot._frame = 1;
_arrowHotspot.setPosition(Common::Point(400, 200));
- _dbMode = 0;
- _prevDbMode = 0;
- _visageVisable = false;
- _subjectIndex = 0;
-
setAction(&_action1);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
@@ -2471,6 +2481,17 @@ Scene2150::Scene2150() :
_hotspot8(16, CURSOR_LOOK, 2150, 8, LIST_END),
_hotspot9(0, CURSOR_LOOK, 2150, 9, CURSOR_USE, 2150, 13, LIST_END),
_hotspot11(0, CURSOR_LOOK, 2150, 12, LIST_END) {
+ _rect1 = Rect(260, 70, 270, 77);
+ _rect2 = Rect(222, 142, 252, 150);
+ _area1.setup(2153, 2, 1, 2100);
+ _area1._pt = Common::Point(200, 31);
+ _area2.setup(2153, 3, 1, 2150);
+ _area2._pt = Common::Point(200, 50);
+ _area3.setup(2153, 4, 1, 2320);
+ _area3._pt = Common::Point(200, 75);
+ _area4.setup(2153, 1, 1, 10);
+ _area4._pt = Common::Point(237, 77);
+
}
void Scene2150::postInit(SceneObjectList *OwnerList) {
@@ -2484,7 +2505,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot7.setVisage(2152);
_hotspot7._frame = 1;
_hotspot7._strip = 2;
- _hotspot7.animate(ANIM_MODE_8, NULL);
+ _hotspot7.animate(ANIM_MODE_8, 0, NULL);
_hotspot7.setPosition(Common::Point(122, 62));
_hotspot7.changeZoom(100);
_hotspot7.fixPriority(76);
@@ -2521,9 +2542,6 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot10.setStrip(5);
_hotspot10.setPosition(Common::Point(59, 56));
- _rect1 = Rect(260, 70, 270, 77);
- _rect2 = Rect(222, 142, 252, 150);
-
_globals->_player.postInit();
_globals->_player.setVisage(_globals->getFlag(13) ? 2170 : 0);
_globals->_player.animate(ANIM_MODE_1, NULL);
@@ -2539,15 +2557,6 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_globals->_sceneItems.addItems(&_hotspot1, &_hotspot2, &_hotspot3, &_hotspot4, &_hotspot5,
&_hotspot6, &_hotspot7, &_hotspot10, &_hotspot9, &_hotspot11, &_hotspot8, NULL);
- _area1.setup(2153, 2, 1, 2100);
- _area1._pt = Common::Point(200, 31);
- _area2.setup(2153, 3, 1, 2150);
- _area2._pt = Common::Point(200, 50);
- _area3.setup(2153, 4, 1, 2320);
- _area3._pt = Common::Point(200, 75);
- _area4.setup(2153, 1, 1, 10);
- _area4._pt = Common::Point(237, 77);
-
switch (_globals->_sceneManager._previousScene) {
case 2120:
_globals->_soundHandler.startSound(160);
@@ -4216,7 +4225,7 @@ void Scene2280::Hotspot18::doAction(int action) {
/*--------------------------------------------------------------------------*/
Scene2280::Scene2280() :
- _hotspot3(0, CURSOR_LOOK, 2280, 30, CURSOR_USE, 31, 0, LIST_END),
+ _hotspot3(0, CURSOR_LOOK, 2280, 30, CURSOR_USE, 2280, 31, LIST_END),
_hotspot5(0, CURSOR_LOOK, 2280, 35, CURSOR_USE, 2280, 36, LIST_END),
_hotspot6(0, CURSOR_LOOK, 2280, 19, CURSOR_USE, 2280, 20, LIST_END),
_hotspot9(0, CURSOR_LOOK, 2280, 5, CURSOR_USE, 2280, 6, LIST_END),
@@ -4366,6 +4375,7 @@ void Scene2280::synchronize(Serializer &s) {
*--------------------------------------------------------------------------*/
void Scene2300::Action1::signal() {
+ // Quinn and Seeker
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -4436,6 +4446,7 @@ void Scene2300::Action1::signal() {
break;
case 8:
_globals->_game->endGame(2300, 0);
+ remove();
break;
case 9:
if (scene->_hotspot5._mover)
@@ -4508,6 +4519,7 @@ void Scene2300::Action1::signal() {
}
void Scene2300::Action2::signal() {
+ // Miranda tearing cables
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -4574,6 +4586,7 @@ void Scene2300::Action2::signal() {
}
void Scene2300::Action3::signal() {
+ // Stunned Miranda
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -4626,6 +4639,7 @@ void Scene2300::Action3::signal() {
}
void Scene2300::Action4::signal() {
+ // Ennemies coming
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -4664,6 +4678,7 @@ void Scene2300::Action4::signal() {
/*--------------------------------------------------------------------------*/
void Scene2300::Hotspot5::doAction(int action) {
+ // Ennemies
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -4686,6 +4701,7 @@ void Scene2300::Hotspot5::doAction(int action) {
}
void Scene2300::Hotspot7::doAction(int action) {
+ // Miranda
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -4851,6 +4867,14 @@ Scene2310::Scene2310() {
_pageList[18].set(18, 2, 3, 0, 1, 4);
_pageList[19].set(19, 3, 0, 1, 4, 2);
_pageList[20].set(20, 4, 0, 3, 1, 2);
+
+ _rectList[0].set(135, 70, 151, 140);
+ _rectList[1].set(151, 70, 167, 140);
+ _rectList[2].set(167, 70, 183, 140);
+ _rectList[3].set(183, 70, 199, 140);
+ _rectList[4].set(199, 70, 215, 140);
+
+ _wireIndex = 5;
}
void Scene2310::postInit(SceneObjectList *OwnerList) {
@@ -4867,16 +4891,9 @@ void Scene2310::postInit(SceneObjectList *OwnerList) {
_wireList[idx].setPosition(pointList[idx]);
}
- _rectList[0].set(135, 70, 151, 140);
- _rectList[1].set(151, 70, 167, 140);
- _rectList[2].set(167, 70, 183, 140);
- _rectList[3].set(183, 70, 199, 140);
- _rectList[4].set(199, 70, 215, 140);
-
_globals->_player.disableControl();
_globals->_events.setCursor(CURSOR_WALK);
- _wireIndex = 5;
if (_vm->getFeatures() & GF_CD)
_pageIndex = _globals->_randomSource.getRandomNumber(14) + 2;
else
@@ -5156,6 +5173,7 @@ void Scene2320::Action3::signal() {
}
void Scene2320::Action4::signal() {
+ // Fly Cycle actions
Scene2320 *scene = (Scene2320 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -5222,11 +5240,13 @@ void Scene2320::Action4::signal() {
setDelay(13);
break;
case 9:
- if (!_globals->getFlag(109)) {
- SceneItem::display2(2320, 19);
- } else {
- _globals->_sceneManager.changeScene(7600);
- }
+ // Quinn sits in the flycycle
+ scene->_hotspot16.hide();
+ _globals->_player.setVisage(2323);
+ _globals->_player.setPosition(Common::Point(303, 176));
+ _globals->_player.setStrip(2);
+ _globals->_player.setFrame(1);
+ _globals->_player.animate(ANIM_MODE_5, this);
break;
case 10:
if (_globals->getFlag(109)) {
@@ -5283,6 +5303,7 @@ void Scene2320::Action4::signal() {
break;
}
case 18: {
+ scene->_hotspot16.fixPriority(149);
Common::Point pt(320, 202);
PlayerMover *mover = new PlayerMover();
scene->_hotspot16.addMover(mover, &pt, this);
@@ -5582,6 +5603,7 @@ void Scene2320::Hotspot8::doAction(int action) {
}
void Scene2320::Hotspot10::doAction(int action) {
+ // Seeker
Scene2320 *scene = (Scene2320 *)_globals->_sceneManager._scene;
switch (action) {
@@ -5675,6 +5697,7 @@ void Scene2320::Hotspot12::doAction(int action) {
}
void Scene2320::Hotspot14::doAction(int action) {
+ // Right Console
Scene2320 *scene = (Scene2320 *)_globals->_sceneManager._scene;
switch (action) {
@@ -5727,6 +5750,7 @@ void Scene2320::Hotspot14::doAction(int action) {
}
void Scene2320::Hotspot15::doAction(int action) {
+ // Left console (Flycycle console)
Scene2320 *scene = (Scene2320 *)_globals->_sceneManager._scene;
switch (action) {
@@ -5755,6 +5779,14 @@ Scene2320::Scene2320() :
_hotspot4(0, CURSOR_LOOK, 2320, 14, LIST_END),
_hotspot13(0, CURSOR_LOOK, 2320, 12, LIST_END)
{
+ _area1.setup(2153, 2, 1, 2100);
+ _area1._pt = Common::Point(200, 31);
+ _area2.setup(2153, 3, 1, 2150);
+ _area2._pt = Common::Point(200, 50);
+ _area3.setup(2153, 4, 1, 2320);
+ _area3._pt = Common::Point(200, 75);
+ _area4.setup(2153, 1, 1, 10);
+ _area4._pt = Common::Point(237, 77);
}
void Scene2320::postInit(SceneObjectList *OwnerList) {
@@ -5807,15 +5839,6 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_sceneItems.push_back(&_hotspot8);
}
- _area1.setup(2153, 2, 1, 2100);
- _area1._pt = Common::Point(200, 31);
- _area2.setup(2153, 3, 1, 2150);
- _area2._pt = Common::Point(200, 50);
- _area3.setup(2153, 4, 1, 2320);
- _area3._pt = Common::Point(200, 75);
- _area4.setup(2153, 1, 1, 10);
- _area4._pt = Common::Point(237, 77);
-
if (_globals->getFlag(43)) {
_hotspot11.postInit();
_hotspot11.setVisage(2705);
@@ -5891,7 +5914,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl();
_globals->_player.animate(ANIM_MODE_NONE, NULL);
- _globals->_player.setObjectWrapper(new SceneObjectWrapper());
+ _globals->_player.setObjectWrapper(NULL);
_globals->_player.setVisage(2347);
_globals->_player.setStrip(2);
_globals->_player.setFrame(5);
diff --git a/engines/tsage/ringworld_scenes3.h b/engines/tsage/ringworld_scenes3.h
index a25bf8834b..cc237a1f91 100644
--- a/engines/tsage/ringworld_scenes3.h
+++ b/engines/tsage/ringworld_scenes3.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES3_H
@@ -281,13 +278,14 @@ public:
Action15 _action15;
Action16 _action16;
Action17 _action17;
- int _field1800;
+ int _sitFl;
SceneArea _area1, _area2, _area3, _area4;
Scene2100();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void stripCallback(int v);
virtual void signal();
+ virtual void synchronize(Serializer &s);
};
class Scene2120 : public Scene {
@@ -323,6 +321,7 @@ public:
int _subjectIndex;
int _lineOffset;
+ Scene2120();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void synchronize(Serializer &s);
};
diff --git a/engines/tsage/ringworld_scenes4.cpp b/engines/tsage/ringworld_scenes4.cpp
index c42b7819f2..883da9b5b1 100644
--- a/engines/tsage/ringworld_scenes4.cpp
+++ b/engines/tsage/ringworld_scenes4.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
diff --git a/engines/tsage/ringworld_scenes4.h b/engines/tsage/ringworld_scenes4.h
index 53ea7be491..389c67b83a 100644
--- a/engines/tsage/ringworld_scenes4.h
+++ b/engines/tsage/ringworld_scenes4.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES4_H
diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp
index dd9c33f0e5..8cdb0a46fb 100644
--- a/engines/tsage/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld_scenes5.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -325,6 +322,7 @@ void Scene4000::Action7::signal() {
}
void Scene4000::Action8::signal() {
+ // Climb down right Chimney using a rope
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -338,7 +336,7 @@ void Scene4000::Action8::signal() {
case 1:
_globals->_player.setVisage(4008);
_globals->_player.setStrip(5);
- _globals->_player.setPriority(16);
+ _globals->_player.fixPriority(16);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(283, 52));
_globals->_player.animate(ANIM_MODE_5, this);
@@ -988,7 +986,6 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.enableControl();
if (RING_INVENTORY._ladder._sceneNumber != 4000) {
- _hotspot8.postInit();
_hotspot8.setVisage(4017);
_hotspot8.animate(ANIM_MODE_1, NULL);
_hotspot8.setPosition(Common::Point(199, 188));
@@ -1008,8 +1005,9 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_olo.setObjectWrapper(new SceneObjectWrapper());
_olo.setPosition(Common::Point(219, 150));
+ _sceneMode = 4010;
_globals->_player.disableControl();
- setAction(&_sequenceManager1, this, 4010, &_globals->_player, NULL);
+ setAction(&_sequenceManager1, this, 4010, &_globals->_player, &_olo, NULL);
}
if (_globals->_stripNum == 4000) {
@@ -1136,6 +1134,10 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
void Scene4000::signal() {
switch (_sceneMode) {
+ case 4010:
+ _globals->setFlag(38);
+ _olo.remove();
+ // Deliberate fall-through
case 4001:
_globals->_player.enableControl();
break;
@@ -1168,10 +1170,6 @@ void Scene4000::signal() {
case 4009:
_globals->_sceneManager.changeScene(2200);
break;
- case 4010:
- _globals->setFlag(38);
- _olo.remove();
- break;
case 4012:
_globals->_player.checkAngle(&_theTech);
_globals->_sceneManager.changeScene(4025);
@@ -1461,7 +1459,7 @@ void Scene4025::Hole::doAction(int action) {
void Scene4025::Peg::synchronize(Serializer &s) {
SceneObject::synchronize(s);
s.syncAsSint16LE(_field88);
- SYNC_POINTER(_armStrip);
+ s.syncAsSint16LE(_armStrip);
}
void Scene4025::Peg::doAction(int action) {
@@ -1830,10 +1828,10 @@ Scene4045::Scene4045() :
_hotspot7(9, CURSOR_LOOK, 4045, 0, CURSOR_USE, 4045, 15, LIST_END),
_hotspot8(10, CURSOR_LOOK, 4045, 2, LIST_END),
_hotspot9(11, CURSOR_LOOK, 4045, 3, CURSOR_USE, 4045, 15, LIST_END),
- _hotspot10(12, CURSOR_LOOK, 4045, 4, CURSOR_USE, 4045, 19, LIST_END),
+ _hotspot10(12, CURSOR_LOOK, 4045, 4, CURSOR_USE, 4100, 19, LIST_END),
_hotspot11(13, CURSOR_LOOK, 4045, 6, CURSOR_USE, 4045, 15, LIST_END),
- _hotspot12(14, CURSOR_LOOK, 4045, 7, CURSOR_USE, 4045, 29, LIST_END),
- _hotspot13(15, CURSOR_LOOK, 4045, 8, CURSOR_USE, 4045, 19, LIST_END),
+ _hotspot12(14, CURSOR_LOOK, 4045, 7, CURSOR_USE, 4150, 29, LIST_END),
+ _hotspot13(15, CURSOR_LOOK, 4045, 8, CURSOR_USE, 4100, 19, LIST_END),
_hotspot14(0, CURSOR_LOOK, 4045, 10, LIST_END) {
_hotspot14.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
@@ -2001,7 +1999,7 @@ void Scene4045::dispatch() {
}
/*--------------------------------------------------------------------------
- * Scene 4000 - Village - Temple
+ * Scene 4050 - Village - Outside
*
*--------------------------------------------------------------------------*/
@@ -2715,6 +2713,10 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
setAction(&_action4);
_globals->clearFlag(43);
+ } else {
+ // Workaround: In the original, the mouse is hidden when Quinn
+ // goes back to scene 4150 then to scene 4100. This enables everything.
+ _globals->_player.enableControl();
}
_globals->_player.setPosition(Common::Point(252, 139));
@@ -2981,7 +2983,7 @@ Scene4150::Scene4150() :
_hotspot11(0, CURSOR_LOOK, 4150, 6, CURSOR_USE, 4150, 29, LIST_END),
_hotspot12(0, CURSOR_LOOK, 4150, 7, CURSOR_USE, 4150, 29, LIST_END),
_hotspot17(0, CURSOR_LOOK, 4150, 10, CURSOR_USE, 4150, 27, OBJECT_STUNNER, 4150, 32, LIST_END),
- _hotspot18(0, CURSOR_LOOK, 4150, 11, CURSOR_USE, 4150, 32, OBJECT_STUNNER, 4150, 27, LIST_END),
+ _hotspot18(0, CURSOR_LOOK, 4150, 11, CURSOR_USE, 4150, 27, OBJECT_STUNNER, 4150, 32, LIST_END),
_hotspot19(0, CURSOR_LOOK, 4150, 12, CURSOR_USE, 4150, 29, LIST_END),
_hotspot20(0, CURSOR_LOOK, 4150, 13, CURSOR_USE, 4150, 29, LIST_END),
_hotspot21(0, CURSOR_LOOK, 4150, 13, CURSOR_USE, 4150, 29, LIST_END),
@@ -3091,6 +3093,7 @@ void Scene4150::dispatch() {
if (!_action && (_globals->_player._position.x >= 316)) {
_globals->_soundHandler.proc1(NULL);
+ _soundHandler.proc1(NULL);
_globals->_player.disableControl();
_sceneMode = 4152;
setAction(&_sequenceManager, this, 4152, &_globals->_player, NULL);
diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h
index 6c44395f9c..a2991c7283 100644
--- a/engines/tsage/ringworld_scenes5.h
+++ b/engines/tsage/ringworld_scenes5.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES5_H
@@ -300,8 +297,8 @@ public:
DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10;
DisplayHotspot _hotspot11, _hotspot12, _hotspot13, _hotspot14;
Action1 _action1;
- Action _action2;
- Action _action3;
+ Action2 _action2;
+ Action3 _action3;
Scene4045();
virtual void postInit(SceneObjectList *OwnerList = NULL);
diff --git a/engines/tsage/ringworld_scenes6.cpp b/engines/tsage/ringworld_scenes6.cpp
index 973104a952..6c4b62ccd7 100644
--- a/engines/tsage/ringworld_scenes6.cpp
+++ b/engines/tsage/ringworld_scenes6.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/ringworld_scenes6.h"
@@ -135,6 +132,7 @@ void Scene5000::Action2::signal() {
ADD_MOVER(_globals->_player, 213, 98);
break;
case 4:
+ _globals->_player.fixPriority(20);
ADD_MOVER(_globals->_player, 215, 115);
break;
case 5:
@@ -218,7 +216,7 @@ void Scene5000::Action3::signal() {
break;
case 4:
scene->_hotspot7.fixPriority(19);
- ADD_MOVER(scene->_hotspot7, 213, 98);
+ ADD_MOVER(scene->_hotspot7, 215, 115);
break;
case 5:
scene->_hotspot7.changeZoom(46);
@@ -714,6 +712,7 @@ void Scene5100::Action2::signal() {
}
void Scene5100::Action3::signal() {
+ // Quinns shots flesheater
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -748,7 +747,7 @@ void Scene5100::Action3::signal() {
scene->_hotspot2.setAction(NULL);
scene->_hotspot3.setStrip2(1);
- ADD_PLAYER_MOVER_THIS(scene->_hotspot3, 1200, 100);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot3, 1200, 100);
} else {
scene->_hotspot3.setVisage(5130);
scene->_hotspot3._strip = 1;
@@ -809,6 +808,7 @@ void Scene5100::Action4::signal() {
}
void Scene5100::Action5::signal() {
+ // Quinns forgot the statis box in the throne room, and goes back
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -945,6 +945,7 @@ void Scene5100::Hotspot9::doAction(int action) {
}
void Scene5100::Hotspot17::doAction(int action) {
+ // Rock blocking pit entrance
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1390,8 +1391,7 @@ void Scene5100::dispatch() {
if (_globals->getFlag(61) && !_globals->getFlag(62) &&
((_globals->_player._position.x - _hotspot2._position.x) < 160) &&
- (_globals->_sceneManager._previousScene != 5200) &&
- (_globals->_sceneManager._previousScene != 5150)) {
+ (_globals->_sceneManager._previousScene != 5200) && (_sceneMode != 5150)) {
setAction(NULL);
_sceneMode = 5150;
_soundHandler.startSound(208);
@@ -1747,6 +1747,7 @@ void Scene5200::dispatch() {
*--------------------------------------------------------------------------*/
void Scene5300::Action1::signal() {
+ // Seeker waking up
Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -1780,7 +1781,8 @@ void Scene5300::Action1::signal() {
_globals->_player.enableControl();
remove();
} else {
- _globals->getFlag(60);
+ _globals->setFlag(60);
+ scene->_hotspot2._numFrames = 10;
if (_globals->getFlag(67)) {
scene->_sceneMode = 5310;
@@ -1858,8 +1860,8 @@ void Scene5300::Hotspot1::doAction(int action) {
break;
}
}
-
void Scene5300::Hotspot2::doAction(int action) {
+ // Seeker
Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1886,11 +1888,17 @@ void Scene5300::Hotspot2::doAction(int action) {
_globals->_player.disableControl();
if (RING_INVENTORY._stasisBox._sceneNumber != 1) {
+ scene->_sceneMode = 5316;
scene->setAction(&scene->_sequenceManager, scene, 5316, NULL);
} else {
_globals->setFlag(60);
- scene->_sceneMode = _globals->getFlag(67) ? 5315 : 5347;
- scene->setAction(&scene->_sequenceManager, scene, 5315, this);
+ if (_globals->getFlag(67)) {
+ scene->_sceneMode = 5315;
+ scene->setAction(&scene->_sequenceManager, scene, 5315, this, NULL);
+ } else {
+ scene->_sceneMode = 5347;
+ scene->setAction(&scene->_sequenceManager, scene, 5347, NULL);
+ }
}
}
break;
@@ -1927,6 +1935,7 @@ void Scene5300::Hotspot2::doAction(int action) {
}
void Scene5300::Hotspot5::doAction(int action) {
+ // Sharp bone
Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -2071,6 +2080,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl();
if (_globals->getFlag(107) && _globals->getFlag(106)) {
+ _hotspot2.setVisage(2806);
_hotspot2.postInit();
_hotspot2.setObjectWrapper(new SceneObjectWrapper());
_hotspot2.animate(ANIM_MODE_1, NULL);
@@ -2178,7 +2188,7 @@ void Scene5300::signal() {
setAction(&_sequenceManager, this, 5315, &_hotspot2, NULL);
break;
case 5315:
- _globals->_stripNum = 5315;
+ _globals->_stripNum = 5302;
_globals->_sceneManager.changeScene(5100);
break;
}
diff --git a/engines/tsage/ringworld_scenes6.h b/engines/tsage/ringworld_scenes6.h
index 0d81bb3b78..6ac73d4bff 100644
--- a/engines/tsage/ringworld_scenes6.h
+++ b/engines/tsage/ringworld_scenes6.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES6_H
diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp
index 43bff50b47..934c7494fa 100644
--- a/engines/tsage/ringworld_scenes8.cpp
+++ b/engines/tsage/ringworld_scenes8.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "graphics/cursorman.h"
@@ -37,12 +34,21 @@ void NamedHotspotMult::synchronize(Serializer &s) {
s.syncAsSint16LE(_lookLineNum);
}
+void SceneObject7700::synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
+ if (s.getVersion() >= 3) {
+ s.syncAsSint16LE(_lookLineNum);
+ s.syncAsSint16LE(_defltLineNum);
+ }
+}
+
/*--------------------------------------------------------------------------
- * Scene 7000
+ * Scene 7000 - Landing near beach
*
*--------------------------------------------------------------------------*/
void Scene7000::Action1::signal() {
+ // Quinn walks from the lander to the seaside (action6) then discuss with Skeenar
Scene7000 *scene = (Scene7000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -114,12 +120,13 @@ void Scene7000::Action3::dispatch() {
Action::dispatch();
if (_actionIndex == 4)
- scene->_object4.setPosition(scene->_object3._position);
+ scene->_object4.setPosition(Common::Point(scene->_object3._position.x, scene->_object3._position.y + 15));
}
/*--------------------------------------------------------------------------*/
void Scene7000::Action3::signal() {
+ // Lander is landing
Scene7000 *scene = (Scene7000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -255,6 +262,7 @@ void Scene7000::Action5::signal() {
/*--------------------------------------------------------------------------*/
void Scene7000::Action6::signal() {
+ // Quinn walks from the lander to the seaside
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
@@ -356,6 +364,7 @@ void Scene7000::Hotspot1::doAction(int action) {
/*--------------------------------------------------------------------------*/
void Scene7000::Object1::doAction(int action) {
+ // Skeenar
Scene7000 *scene = (Scene7000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -434,10 +443,10 @@ void Scene7000::Object1::doAction(int action) {
scene->_sceneMode = 7005;
scene->setAction(&scene->_sequenceManager, scene, 7013, NULL);
} else if (_globals->getFlag(13)) {
- _globals->_sceneManager._sceneNumber = 7002;
+ scene->_sceneMode = 7002;
scene->setAction(&scene->_sequenceManager, scene, 7014, NULL);
} else {
- _globals->_sceneManager._sceneNumber = 7002;
+ scene->_sceneMode = 7002;
scene->setAction(&scene->_sequenceManager, scene, 7002, NULL);
}
break;
@@ -647,7 +656,7 @@ void Scene7000::signal() {
/*--------------------------------------------------------------------------
- * Scene 7100
+ * Scene 7100 - Underwater: swimming
*
*--------------------------------------------------------------------------*/
@@ -1131,7 +1140,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_globals->_soundHandler.startSound(270);
}
/*--------------------------------------------------------------------------
- * Scene 7200
+ * Scene 7200 - Underwater: Entering the cave
*
*--------------------------------------------------------------------------*/
@@ -1297,7 +1306,7 @@ void Scene7200::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 7300
+ * Scene 7300 - Underwater: Lord Poria
*
*--------------------------------------------------------------------------*/
@@ -1492,7 +1501,7 @@ void Scene7300::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 7600
+ * Scene 7600 - Floating Buildings: Outside
*
*--------------------------------------------------------------------------*/
@@ -1597,7 +1606,7 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
}
/*--------------------------------------------------------------------------
- * Scene 7700
+ * Scene 7700 - Floating Buildings: In the lab
*
*--------------------------------------------------------------------------*/
@@ -2523,4 +2532,13 @@ Scene7700::Scene7700() {
_prof._state = 0;
}
+void Scene7700::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ if (s.getVersion() >= 3) {
+ s.syncAsSint16LE(_field977);
+ s.syncAsSint16LE(_field979);
+ s.syncAsSint16LE(_field97B);
+ }
+}
+
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h
index 713520c6a0..8b183e895f 100644
--- a/engines/tsage/ringworld_scenes8.h
+++ b/engines/tsage/ringworld_scenes8.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_RINGWORLD_SCENES8_H
@@ -48,11 +45,7 @@ class SceneObject7700 : public SceneObjectExt {
public:
int _lookLineNum, _defltLineNum;
- virtual void synchronize(Serializer &s) {
- SceneObject::synchronize(s);
- s.syncAsSint16LE(_lookLineNum);
- s.syncAsSint16LE(_defltLineNum);
- }
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneObject7700"; }
};
@@ -489,6 +482,7 @@ public:
virtual void signal();
virtual void process(Event &event);
virtual void dispatch();
+ virtual void synchronize(Serializer &s);
};
} // End of namespace tSage
diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index a0091bfd6a..56df32146a 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/savefile.h"
@@ -67,14 +64,12 @@ Saver::~Saver() {
void Serializer::syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion,
Common::Serializer::Version maxVersion) {
- int idx;
+ int idx = 0;
assert(ptr);
if (isSaving()) {
// Get the object index for the given pointer and write it out
- if (!*ptr) {
- idx = 0;
- } else {
+ if (*ptr) {
idx = _saver->blockIndexOf(*ptr);
assert(idx > 0);
}
@@ -211,6 +206,7 @@ Common::Error Saver::restore(int slot) {
// Final post-restore notifications
_macroRestoreFlag = false;
_loadNotifiers.notify(false);
+ _globals->_events.setCursor(_globals->_player._uiEnabled ? CURSOR_WALK : CURSOR_NONE);
return Common::kNoError;
}
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h
index cf7d087e6e..51b7696590 100644
--- a/engines/tsage/saveload.h
+++ b/engines/tsage/saveload.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_SAVELOAD_H
@@ -36,7 +33,7 @@ namespace tSage {
typedef void (*SaveNotifierFn)(bool postFlag);
-#define TSAGE_SAVEGAME_VERSION 2
+#define TSAGE_SAVEGAME_VERSION 3
class SavedObject;
@@ -118,7 +115,7 @@ template<typename T>
class SynchronizedList : public Common::List<T> {
public:
void synchronize(Serializer &s) {
- int entryCount;
+ int entryCount = 0;
if (s.isLoading()) {
this->clear();
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index f554d546f6..4625661b62 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/scenes.h"
@@ -130,7 +127,7 @@ void SceneManager::sceneChange() {
}
Scene *SceneManager::getNewScene() {
- return SceneFactory::createScene(_nextSceneNumber);
+ return _globals->_game->createScene(_nextSceneNumber);
}
void SceneManager::fadeInIfNecessary() {
@@ -230,6 +227,11 @@ void SceneManager::setBgOffset(const Common::Point &pt, int loadCount) {
void SceneManager::listenerSynchronize(Serializer &s) {
s.validate("SceneManager");
+ if (s.isLoading() && !_globals->_sceneManager._scene)
+ // Loading a savegame straight from the launcher, so instantiate a blank placeholder scene
+ // in order for the savegame loading to work correctly
+ _globals->_sceneManager._scene = new Scene();
+
_altSceneObjects.synchronize(s);
s.syncAsSint32LE(_sceneNumber);
s.syncAsUint16LE(_globals->_sceneManager._scene->_activeScreenNumber);
@@ -322,7 +324,7 @@ void Scene::loadSceneData(int sceneNum) {
// Load the priority regions
_priorities.load(sceneNum);
- // Initialise the section enabled list
+ // Initialize the section enabled list
Common::set_to(&_enabledSections[0], &_enabledSections[16 * 16], 0xffff);
_globals->_sceneOffset.x = (_sceneBounds.left / 160) * 160;
@@ -461,36 +463,54 @@ void Scene::drawAltObjects() {
}
void Scene::setZoomPercents(int yStart, int minPercent, int yEnd, int maxPercent) {
- int var_6 = 0;
+ int currDiff = 0;
int v = 0;
while (v < yStart)
_zoomPercents[v++] = minPercent;
int diff1 = ABS(maxPercent - minPercent);
int diff2 = ABS(yEnd - yStart);
- int var_8 = MAX(diff1, diff2);
-
- while (var_8-- != 0) {
- _zoomPercents[v] = minPercent;
- if (diff2 <= diff1) {
- ++minPercent;
- var_6 += diff2;
- if (var_6 >= diff1) {
- var_6 -= diff1;
- ++v;
- }
- } else {
- ++v;
- var_6 += diff1;
- if (var_6 >= diff2) {
- var_6 -= diff2;
- ++minPercent;
- }
- }
+ int remainingDiff = MAX(diff1, diff2);
+
+ while (remainingDiff-- != 0) {
+ _zoomPercents[v] = minPercent;
+ if (diff2 <= diff1) {
+ ++minPercent;
+ currDiff += diff2;
+ if (currDiff >= diff1) {
+ currDiff -= diff1;
+ ++v;
+ }
+ } else {
+ ++v;
+ currDiff += diff1;
+ if (currDiff >= diff2) {
+ currDiff -= diff2;
+ ++minPercent;
+ }
+ }
}
while (yEnd < 256)
_zoomPercents[yEnd++] = minPercent;
}
+/*--------------------------------------------------------------------------*/
+
+void Game::execute() {
+ // Main game loop
+ bool activeFlag = false;
+ do {
+ // Process all currently atcive game handlers
+ activeFlag = false;
+ for (SynchronizedList<GameHandler *>::iterator i = _handlers.begin(); i != _handlers.end(); ++i) {
+ GameHandler *gh = *i;
+ if (gh->_lockCtr.getCtr() == 0) {
+ gh->execute();
+ activeFlag = true;
+ }
+ }
+ } while (activeFlag && !_vm->getEventManager()->shouldQuit());
+}
+
} // End of namespace tSage
diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h
index 11637de1a7..b3c009c4fe 100644
--- a/engines/tsage/scenes.h
+++ b/engines/tsage/scenes.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_SCENES_H
@@ -111,6 +108,30 @@ public:
static void loadNotifier(bool postFlag);
};
+class Game {
+protected:
+ SynchronizedList<GameHandler *> _handlers;
+
+ static bool notLockedFn(GameHandler *g);
+ virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {}
+public:
+ virtual ~Game() {}
+
+ void addHandler(GameHandler *entry) { _handlers.push_back(entry); }
+ void removeHandler(GameHandler *entry) { _handlers.remove(entry); }
+
+ void execute();
+ virtual void start() = 0;
+ virtual void restart() {}
+ virtual void restartGame() {}
+ virtual void saveGame() {}
+ virtual void restoreGame() {}
+ virtual void quitGame() {}
+ virtual void endGame(int resNum, int lineNum) {}
+ virtual Scene *createScene(int sceneNumber) = 0;
+ virtual void processEvent(Event &event) {}
+};
+
} // End of namespace tSage
#endif
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 9d50316baf..defec1cebd 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/core.h"
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 45815de69f..03ae77b703 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_SOUND_H
diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp
index bc85718035..9f36268ce3 100644
--- a/engines/tsage/staticres.cpp
+++ b/engines/tsage/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tsage/staticres.h"
@@ -115,6 +112,10 @@ const char *SCENE6100_VERY_WELL = "Very well. I will retrieve the stasis box and
Wait for it's return in the lander bay.";
const char *DEMO_HELP_MSG = " Help...\rF2 - Sound Options\rF3 - Exit demo\r\rPress ENTER\rto continue";
-const char *DEMO_PAUSED_MSG = " demo is paused";
+const char *DEMO_PAUSED_MSG = "Ringworld\x14 demo is paused";
+const char *DEMO_EXIT_MSG = "Press ENTER to resume the Ringworld\x14 demo. Press ESC to exit";
+const char *EXIT_BTN_STRING = "Exit";
+const char *DEMO_BTN_STRING = "Demo";
+const char *DEMO_RESUME_BTN_STRING = "Resume";
} // End of namespace tSage
diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h
index 0db349f8a7..fa93511779 100644
--- a/engines/tsage/staticres.h
+++ b/engines/tsage/staticres.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_STATICRES_H
@@ -82,6 +79,12 @@ extern const char *SCENE6100_VERY_WELL;
// Demo messages
extern const char *DEMO_HELP_MSG;
extern const char *DEMO_PAUSED_MSG;
+extern const char *DEMO_HELP_MSG;
+extern const char *DEMO_PAUSED_MSG;
+extern const char *DEMO_EXIT_MSG;
+extern const char *EXIT_BTN_STRING;
+extern const char *DEMO_BTN_STRING;
+extern const char *DEMO_RESUME_BTN_STRING;
} // End of namespace tSage
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 8813fc7e45..6fae9785c0 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/debug-channels.h"
@@ -63,7 +60,7 @@ bool TSageEngine::hasFeature(EngineFeature f) const {
(f == kSupportsSavingDuringRuntime);
}
-void TSageEngine::initialise() {
+void TSageEngine::initialize() {
_saver = new Saver();
// Set up the resource manager
@@ -71,16 +68,22 @@ void TSageEngine::initialise() {
if (_vm->getFeatures() & GF_DEMO) {
// Add the single library file associated with the demo
_resourceManager->addLib(getPrimaryFilename());
- } else {
+ } else if (_vm->getGameID() == GType_Ringworld) {
_resourceManager->addLib("RING.RLB");
_resourceManager->addLib("TSAGE.RLB");
+ } else if (_vm->getGameID() == GType_BlueForce) {
+ _resourceManager->addLib("BLUE.RLB");
+ if (_vm->getFeatures() & GF_FLOPPY) {
+ _resourceManager->addLib("FILES.RLB");
+ _resourceManager->addLib("TSAGE.RLB");
+ }
}
_globals = new Globals();
_globals->gfxManager().setDefaults();
}
-void TSageEngine::deinitialise() {
+void TSageEngine::deinitialize() {
delete _globals;
delete _resourceManager;
delete _saver;
@@ -88,12 +91,12 @@ void TSageEngine::deinitialise() {
Common::Error TSageEngine::run() {
// Basic initialisation
- initialise();
+ initialize();
_globals->_sceneHandler.registerHandler();
_globals->_game->execute();
- deinitialise();
+ deinitialize();
return Common::kNoError;
}
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index 06c66d8f42..e3d37257cd 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TSAGE_H
@@ -89,8 +86,8 @@ public:
virtual Common::Error saveGameState(int slot, const char *desc);
Common::String generateSaveName(int slot);
- void initialise();
- void deinitialise();
+ void initialize();
+ void deinitialize();
};
extern TSageEngine *_vm;
diff --git a/engines/tucker/console.cpp b/engines/tucker/console.cpp
index 34be3dd9fd..e0f2debc30 100644
--- a/engines/tucker/console.cpp
+++ b/engines/tucker/console.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tucker/console.h"
diff --git a/engines/tucker/console.h b/engines/tucker/console.h
index fe91c1bb70..6be56d5594 100644
--- a/engines/tucker/console.h
+++ b/engines/tucker/console.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TUCKER_CONSOLE_H
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp
index 7404abc2e7..9b466d682d 100644
--- a/engines/tucker/detection.cpp
+++ b/engines/tucker/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -146,7 +143,7 @@ public:
}
virtual const char *getName() const {
- return "Tucker Engine";
+ return "Tucker";
}
virtual const char *getOriginalCopyright() const {
diff --git a/engines/tucker/graphics.cpp b/engines/tucker/graphics.cpp
index 163719197d..e6fb70ac16 100644
--- a/engines/tucker/graphics.cpp
+++ b/engines/tucker/graphics.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tucker/graphics.h"
diff --git a/engines/tucker/graphics.h b/engines/tucker/graphics.h
index c5b723e632..2b4a57d65d 100644
--- a/engines/tucker/graphics.h
+++ b/engines/tucker/graphics.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TUCKER_GRAPHICS_H
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp
index ee117d233d..70b17e4191 100644
--- a/engines/tucker/locations.cpp
+++ b/engines/tucker/locations.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tucker/tucker.h"
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index aeb4399dee..467500b121 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/file.h"
diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp
index 52c6bf19ce..754e8deae9 100644
--- a/engines/tucker/saveload.cpp
+++ b/engines/tucker/saveload.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/savefile.h"
diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp
index d747b346ee..23ae3380cd 100644
--- a/engines/tucker/sequences.cpp
+++ b/engines/tucker/sequences.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/engines/tucker/staticres.cpp b/engines/tucker/staticres.cpp
index aec0c999b4..ef778b6f54 100644
--- a/engines/tucker/staticres.cpp
+++ b/engines/tucker/staticres.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "tucker/tucker.h"
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index ed3046867b..2bd7c47b62 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/config-manager.h"
@@ -44,7 +41,7 @@
namespace Tucker {
TuckerEngine::TuckerEngine(OSystem *system, Common::Language language, uint32 flags)
- : Engine(system), _gameLang(language), _gameFlags(flags) {
+ : Engine(system), _gameLang(language), _gameFlags(flags), _rnd("tucker") {
_console = new TuckerConsole(this);
}
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index 532892fd48..b011d65cbb 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef TUCKER_ENGINE_H
diff --git a/engines/util.h b/engines/util.h
index 5bfc4f8ad9..53899cb341 100644
--- a/engines/util.h
+++ b/engines/util.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef ENGINES_UTIL_H