[Scummvm-cvs-logs] SF.net SVN: scummvm:[43250] scummvm/branches/gsoc2009-16bit
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Tue Aug 11 04:04:24 CEST 2009
Revision: 43250
http://scummvm.svn.sourceforge.net/scummvm/?rev=43250&view=rev
Author: Kirben
Date: 2009-08-11 02:04:17 +0000 (Tue, 11 Aug 2009)
Log Message:
-----------
Merged revisions 43066,43068,43088,43093,43095,43097,43101-43102,43107,43112,43114,43117,43119-43120,43122-43123,43126,43131,43139,43143,43145,43147,43150,43152,43155-43156,43163,43165,43167,43171-43172,43178-43179,43183,43186-43200,43202,43205-43223,43227-43235,43237-43241 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r43066 | dreammaster | 2009-08-05 20:44:37 +1000 (Wed, 05 Aug 2009) | 1 line
Bugfix for music not being stopped when music volume is set to zero
........
r43068 | scott_t | 2009-08-05 23:57:40 +1000 (Wed, 05 Aug 2009) | 1 line
T7G: Fix bug #2831041 by implementing opcode responsible for starting music partway through a video
........
r43088 | knakos | 2009-08-07 04:05:50 +1000 (Fri, 07 Aug 2009) | 1 line
overload showMouse to kill mouse shadows in kyra
........
r43093 | dreammaster | 2009-08-07 19:25:06 +1000 (Fri, 07 Aug 2009) | 1 line
Bugfix for #2831159 - Palace guards saying !!HIGH STRING!!
........
r43095 | knakos | 2009-08-07 20:44:34 +1000 (Fri, 07 Aug 2009) | 1 line
hint backend about virtual keyboard on save, in LoK
........
r43097 | knakos | 2009-08-07 21:05:58 +1000 (Fri, 07 Aug 2009) | 1 line
show VK in gui_v2 games of kyra
........
r43101 | dhewg | 2009-08-08 04:16:58 +1000 (Sat, 08 Aug 2009) | 3 lines
Merge creation of Info.plist into update-version.pl.
This fixes the static version info after branching (#2820503).
........
r43102 | knakos | 2009-08-08 05:33:39 +1000 (Sat, 08 Aug 2009) | 1 line
mouse up events need the same lovin' as mouse down events do. don't underestimate 'em. fixes bug #2833549
........
r43107 | drmccoy | 2009-08-08 12:23:04 +1000 (Sat, 08 Aug 2009) | 1 line
When opening a data stream, don't read the whole file into memory if not necessary. This vastly improves the loading times of Gob3 on small devices
........
r43112 | dreammaster | 2009-08-08 19:34:23 +1000 (Sat, 08 Aug 2009) | 1 line
Commit of dhewg's patch to fix screen refreshes on the Wii
........
r43114 | knakos | 2009-08-08 19:38:12 +1000 (Sat, 08 Aug 2009) | 1 line
forward port of wince 3.0 fix for paths from branch 0.13.0, r39978
........
r43117 | dhewg | 2009-08-08 21:30:56 +1000 (Sat, 08 Aug 2009) | 1 line
tweaked the mapped keys to reintroduce SHIFT for mass adding games
........
r43119 | lordhoto | 2009-08-08 21:42:29 +1000 (Sat, 08 Aug 2009) | 1 line
Add workaround for bug #2820054 "DW1: No intro music at first start on Wii", which actually happened on all systems, when using the multilanguage version.
........
r43120 | lordhoto | 2009-08-08 21:51:15 +1000 (Sat, 08 Aug 2009) | 1 line
Fix for bug #2412336 "DW2: Voices cut off" (commit on behalf of dreammaster)
........
r43122 | lordhoto | 2009-08-08 22:00:34 +1000 (Sat, 08 Aug 2009) | 1 line
Formatting fix.
........
r43123 | lordhoto | 2009-08-08 22:22:34 +1000 (Sat, 08 Aug 2009) | 1 line
Change workaround for bug #2820054 to apply for all GRA versions.
........
r43126 | lordhoto | 2009-08-08 23:57:21 +1000 (Sat, 08 Aug 2009) | 1 line
Fix XMIDI looping implementation. Now for example the music in the ferret village of ITE plays fine.
........
r43131 | sev | 2009-08-09 04:01:44 +1000 (Sun, 09 Aug 2009) | 2 lines
Implement FR#2821534: "GUI: Mute All disable volume sliders"
........
r43139 | sev | 2009-08-09 06:08:22 +1000 (Sun, 09 Aug 2009) | 2 lines
Add DS version of Atari MM from Bug #2834054
........
r43143 | sev | 2009-08-09 06:16:58 +1000 (Sun, 09 Aug 2009) | 2 lines
Patch #2832247: "GMM: Enable loading & deleting of unnamed savegames"
........
r43145 | sev | 2009-08-09 06:49:13 +1000 (Sun, 09 Aug 2009) | 2 lines
Fix bug #2825565: "Unable to select subtitles in Atlantis and Simon 1"
........
r43147 | drmccoy | 2009-08-09 07:43:07 +1000 (Sun, 09 Aug 2009) | 1 line
Changed the scroll-handling to be more like the original. This fixes bug #2832362 ("GOB3: Scrolling locked after cutscene")
........
r43150 | dreammaster | 2009-08-09 11:05:47 +1000 (Sun, 09 Aug 2009) | 1 line
Changed subtitles display speed to also include the time taken to say voice samples (if voices are turned on). This means subtitles will display for the same time irrespective of whether voices are on or not
........
r43152 | Kirben | 2009-08-09 11:20:08 +1000 (Sun, 09 Aug 2009) | 1 line
Fix bug #2834254 - ELVIRA: Buggy scroll arrows when mixing spells.
........
r43155 | dreammaster | 2009-08-09 11:45:39 +1000 (Sun, 09 Aug 2009) | 1 line
Slight adjustment to Spanish font lookup table, based on mac_es's description of character lookup problems
........
r43156 | Kirben | 2009-08-09 11:55:34 +1000 (Sun, 09 Aug 2009) | 1 line
Fix bug #2834252 - ELVIRA1 Problem with 8-character-long save names.
........
r43163 | Kirben | 2009-08-09 17:16:08 +1000 (Sun, 09 Aug 2009) | 1 line
Fix bug #2834260 - ELVIRA1: Graphic glitch when bird takes off.
........
r43165 | Kirben | 2009-08-09 20:28:11 +1000 (Sun, 09 Aug 2009) | 1 line
Fix glitch when removing arrows from spell book in Elvira 1.
........
r43167 | djwillis | 2009-08-09 22:12:24 +1000 (Sun, 09 Aug 2009) | 1 line
GP2X: Commit local version of backend, contains a 'fix' to work around a GP2X SDL 'feature' that was removing the ability to disable aspect ratio correction. Also misc cleanup and changes to default volume levels to cut down on sample clipping.
........
r43171 | dreammaster | 2009-08-09 22:23:01 +1000 (Sun, 09 Aug 2009) | 1 line
Removed redundant code related to Midi handling
........
r43172 | lordhoto | 2009-08-10 01:37:00 +1000 (Mon, 10 Aug 2009) | 1 line
Fix for bug #2834250 "GUI: Incorrect behavior of sliders".
........
r43178 | knakos | 2009-08-10 04:34:08 +1000 (Mon, 10 Aug 2009) | 1 line
removing support for flac (good riddance) and mpeg2
........
r43179 | knakos | 2009-08-10 04:37:29 +1000 (Mon, 10 Aug 2009) | 1 line
update news files for 1.0.0rc1 release
........
r43183 | lordhoto | 2009-08-10 05:11:10 +1000 (Mon, 10 Aug 2009) | 1 line
Cleanup AMIGA graphics conversion.
........
r43186 | lordhoto | 2009-08-10 08:46:25 +1000 (Mon, 10 Aug 2009) | 1 line
Create a "Font" interface and create a "DOSFont" implementation for handling DOS version fonts.
........
r43187 | lordhoto | 2009-08-10 08:46:43 +1000 (Mon, 10 Aug 2009) | 1 line
Add support for the font format used in Kyrandia 1 Amiga. (font colors are wrong though)
........
r43188 | lordhoto | 2009-08-10 09:23:48 +1000 (Mon, 10 Aug 2009) | 1 line
Unbreak basic Kyra1 amiga in game support, by disabling some palette code for the amiga version.
........
r43189 | lordhoto | 2009-08-10 09:32:52 +1000 (Mon, 10 Aug 2009) | 1 line
Clear the destination page for bitmap loading, this fixes graphics artifacts in Kyra1 amiga.
........
r43190 | waltervn | 2009-08-10 11:08:20 +1000 (Mon, 10 Aug 2009) | 3 lines
SCI: Added detection entries for French versions of Eco Quest 1/2 (reported
by Strangerke).
........
r43191 | lordhoto | 2009-08-10 11:32:22 +1000 (Mon, 10 Aug 2009) | 1 line
Disable menu text fading in kyra1 amiga for now.
........
r43192 | lordhoto | 2009-08-10 11:32:39 +1000 (Mon, 10 Aug 2009) | 1 line
Initial support for correct colors in the interface of Kyra1 AMIGA.
........
r43193 | lordhoto | 2009-08-10 11:32:59 +1000 (Mon, 10 Aug 2009) | 1 line
Fix inventory background color.
........
r43194 | lordhoto | 2009-08-10 11:33:18 +1000 (Mon, 10 Aug 2009) | 1 line
Fix text color in character speeches in Kyra1 amiga.
........
r43195 | lordhoto | 2009-08-10 11:33:36 +1000 (Mon, 10 Aug 2009) | 1 line
Fix interface text color.
........
r43196 | lordhoto | 2009-08-10 11:33:56 +1000 (Mon, 10 Aug 2009) | 1 line
Enable interface text fading in Kyra1 amiga again.
........
r43197 | lordhoto | 2009-08-10 11:34:14 +1000 (Mon, 10 Aug 2009) | 1 line
Use interface palette for mouse cursor in Kyra1 amiga, when it's enabled.
........
r43198 | lordhoto | 2009-08-10 11:34:29 +1000 (Mon, 10 Aug 2009) | 1 line
Cleanup.
........
r43199 | lordhoto | 2009-08-10 11:34:46 +1000 (Mon, 10 Aug 2009) | 1 line
Remove dead code.
........
r43200 | lordhoto | 2009-08-10 12:32:19 +1000 (Mon, 10 Aug 2009) | 1 line
Fix bug when setting up mouse cursor with inventory palette.
........
r43202 | athrxx | 2009-08-10 20:25:53 +1000 (Mon, 10 Aug 2009) | 1 line
LOL: fix main menu in floppy version
........
r43205 | lordhoto | 2009-08-10 23:46:17 +1000 (Mon, 10 Aug 2009) | 1 line
Made font color configuration independend from font style configuration.
........
r43206 | lordhoto | 2009-08-11 00:05:14 +1000 (Tue, 11 Aug 2009) | 1 line
Rename 'font_color' attribute for 'text' draw step to 'text_color'.
........
r43207 | lordhoto | 2009-08-11 00:35:28 +1000 (Tue, 11 Aug 2009) | 1 line
Fix copyright string displaying in Kyra1 amiga. Unlike the DOS version it does not use a second print for creating a shadow look.
........
r43208 | lordhoto | 2009-08-11 02:42:39 +1000 (Tue, 11 Aug 2009) | 4 lines
- Fix extraction of Kyra 1 amiga string tables in kyra.dat
- Fix "taken" string offsets in kyra.dat
- Add temporary workaround for only one "taken" string being present in Kyra 1 amiga.
- Update kyra.dat
........
r43209 | lordhoto | 2009-08-11 03:14:03 +1000 (Tue, 11 Aug 2009) | 1 line
Fix GUI strings in Kyrandia 1 Amiga.
........
r43210 | lordhoto | 2009-08-11 03:14:22 +1000 (Tue, 11 Aug 2009) | 1 line
Implement item to item name list index mapping for Kyrandia 1 Amiga.
........
r43211 | lordhoto | 2009-08-11 03:17:19 +1000 (Tue, 11 Aug 2009) | 1 line
Typo.
........
r43212 | lordhoto | 2009-08-11 04:01:28 +1000 (Tue, 11 Aug 2009) | 1 line
Fix GUI font colors and text drawing in Kyrandia 1 Amiga.
........
r43213 | lordhoto | 2009-08-11 04:03:37 +1000 (Tue, 11 Aug 2009) | 1 line
Fix GUI button outline colors in Kyra1 Amiga.
........
r43214 | tramboi | 2009-08-11 04:03:54 +1000 (Tue, 11 Aug 2009) | 2 lines
Option "desired_screen_aspect_ratio" for fullscreen mode in the SDL backend
Shortcoming: the picture is not centered
........
r43215 | lordhoto | 2009-08-11 04:04:53 +1000 (Tue, 11 Aug 2009) | 1 line
Fix GUI menu colors for Kyrandia 1 Amiga.
........
r43216 | lordhoto | 2009-08-11 04:13:01 +1000 (Tue, 11 Aug 2009) | 1 line
Remove unused variables.
........
r43217 | waltervn | 2009-08-11 04:37:47 +1000 (Tue, 11 Aug 2009) | 2 lines
SCI: Improved multilanguage support for SCI1 and SCI1.1.
........
r43218 | waltervn | 2009-08-11 04:43:15 +1000 (Tue, 11 Aug 2009) | 2 lines
SCI: Fix warnings.
........
r43219 | waltervn | 2009-08-11 04:59:59 +1000 (Tue, 11 Aug 2009) | 2 lines
SCI: Fix vmvars debug command.
........
r43220 | lordhoto | 2009-08-11 05:08:00 +1000 (Tue, 11 Aug 2009) | 2 lines
- Fix AMIGA to DOS palette conversion
- Amiga version uses 13 instead of 12 palette buffers
........
r43221 | lordhoto | 2009-08-11 05:09:13 +1000 (Tue, 11 Aug 2009) | 1 line
Fix incorrect converted colors in Kyra1 Amiga speech text color setup.
........
r43222 | lordhoto | 2009-08-11 05:10:11 +1000 (Tue, 11 Aug 2009) | 1 line
Implement differences for Kyrandia 1 Amiga in o1_setCustomPaletteRange.
........
r43223 | sev | 2009-08-11 05:31:08 +1000 (Tue, 11 Aug 2009) | 2 lines
Add support for Italian MM NES
........
r43227 | strangerke | 2009-08-11 06:57:26 +1000 (Tue, 11 Aug 2009) | 1 line
gob - Add a workaround for files (at least in Playtoons) that are tested on CD only, with the '@' symbol
........
r43228 | strangerke | 2009-08-11 06:58:13 +1000 (Tue, 11 Aug 2009) | 1 line
gob - Add 2 files tested and used by Playtoons and Playtoons CK
........
r43229 | waltervn | 2009-08-11 07:30:16 +1000 (Tue, 11 Aug 2009) | 2 lines
SCI: Added several debug command aliases.
........
r43230 | lordhoto | 2009-08-11 08:18:18 +1000 (Tue, 11 Aug 2009) | 1 line
Cleanup.
........
r43231 | lordhoto | 2009-08-11 08:18:33 +1000 (Tue, 11 Aug 2009) | 1 line
Fix o1_makeAmuletAppear for Kyrandia 1 Amiga.
........
r43232 | lordhoto | 2009-08-11 08:18:47 +1000 (Tue, 11 Aug 2009) | 1 line
Fix WSA movies for final sequence of Kyrandia 1 Amiga. (this is just a theoretical fix, the game isn't yet playable till then)
........
r43233 | lordhoto | 2009-08-11 08:54:25 +1000 (Tue, 11 Aug 2009) | 1 line
Proper implementation of o1_fadeSpecialPalette for Kyrandia 1 Amiga.
........
r43234 | lordhoto | 2009-08-11 08:54:45 +1000 (Tue, 11 Aug 2009) | 1 line
Fix cauldron water color in Zanthia's home in Kyrandia 1 Amiga.
........
r43235 | mthreepwood | 2009-08-11 09:01:11 +1000 (Tue, 11 Aug 2009) | 1 line
Provide a better detection method for Indy3 Mac sound effects. This fixes sounds such as the music that plays when Indy uses the whip on the hook in the giant cork. This also is a proper fix for bug #1852635 -- Sound 54 is actually not a sound effect.
........
r43237 | lordhoto | 2009-08-11 09:34:35 +1000 (Tue, 11 Aug 2009) | 1 line
Implement different in Kyrandia 1 Amiga in o1_setFireberryGlowPalette.
........
r43238 | lordhoto | 2009-08-11 09:35:16 +1000 (Tue, 11 Aug 2009) | 1 line
Fix yet another inventory background color glitch in Kyrandia 1 Amiga.
........
r43239 | lordhoto | 2009-08-11 10:14:24 +1000 (Tue, 11 Aug 2009) | 1 line
Fix a little graphics bug in Kyrandia 1 Amiga, when jewels are enabled.
........
r43240 | lordhoto | 2009-08-11 10:14:40 +1000 (Tue, 11 Aug 2009) | 1 line
Disable Kyragem fading for Kyrandia 1 Amiga.
........
r43241 | lordhoto | 2009-08-11 10:14:54 +1000 (Tue, 11 Aug 2009) | 1 line
Fix regression introduced with r41081.
........
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/Makefile.common
scummvm/branches/gsoc2009-16bit/NEWS
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/events.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-common.h
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-hw.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.h
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/graphics.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/module.mk
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
scummvm/branches/gsoc2009-16bit/backends/platform/wii/osystem_events.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/wince/Makefile
scummvm/branches/gsoc2009-16bit/backends/platform/wince/README-WinCE.txt
scummvm/branches/gsoc2009-16bit/backends/platform/wince/missing/missing.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.h
scummvm/branches/gsoc2009-16bit/base/commandLine.cpp
scummvm/branches/gsoc2009-16bit/dists/engine-data/kyra.dat
scummvm/branches/gsoc2009-16bit/dists/wii/READMII
scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h
scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp
scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.cpp
scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.h
scummvm/branches/gsoc2009-16bit/engines/cruise/staticres.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/dataio.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/dataio.h
scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/game.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/game.h
scummvm/branches/gsoc2009-16bit/engines/gob/hotspots.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/inter_v2.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/inter_v4.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/inter_v6.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/mult_v2.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/save/saveload_playtoons.cpp
scummvm/branches/gsoc2009-16bit/engines/gob/util.cpp
scummvm/branches/gsoc2009-16bit/engines/groovie/music.cpp
scummvm/branches/gsoc2009-16bit/engines/groovie/music.h
scummvm/branches/gsoc2009-16bit/engines/groovie/script.cpp
scummvm/branches/gsoc2009-16bit/engines/groovie/script.h
scummvm/branches/gsoc2009-16bit/engines/kyra/gui.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/gui_v2.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/items_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h
scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/scene_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/screen.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/screen.h
scummvm/branches/gsoc2009-16bit/engines/kyra/screen_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/screen_lok.h
scummvm/branches/gsoc2009-16bit/engines/kyra/script_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/seqplayer.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/sequences_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/staticres.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/text.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/text.h
scummvm/branches/gsoc2009-16bit/engines/kyra/text_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/wsamovie.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/wsamovie.h
scummvm/branches/gsoc2009-16bit/engines/sci/console.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/detection.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/game.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kernel.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kernel.h
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kmisc.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kstring.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/message.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/state.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/state.h
scummvm/branches/gsoc2009-16bit/engines/sci/engine/vm.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/detection_tables.h
scummvm/branches/gsoc2009-16bit/engines/scumm/file_nes.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/file_nes.h
scummvm/branches/gsoc2009-16bit/engines/scumm/scumm-md5.h
scummvm/branches/gsoc2009-16bit/engines/scumm/sound.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/background.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/bmv.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/dw.h
scummvm/branches/gsoc2009-16bit/engines/tinsel/graphics.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/music.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/palette.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/pcode.cpp
scummvm/branches/gsoc2009-16bit/engines/tinsel/tinlib.cpp
scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.cpp
scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.h
scummvm/branches/gsoc2009-16bit/gui/ThemeParser.cpp
scummvm/branches/gsoc2009-16bit/gui/ThemeParser.h
scummvm/branches/gsoc2009-16bit/gui/options.cpp
scummvm/branches/gsoc2009-16bit/gui/saveload.cpp
scummvm/branches/gsoc2009-16bit/gui/themes/default.inc
scummvm/branches/gsoc2009-16bit/gui/themes/scummclassic/THEMERC
scummvm/branches/gsoc2009-16bit/gui/themes/scummclassic/classic_gfx.stx
scummvm/branches/gsoc2009-16bit/gui/themes/scummclassic.zip
scummvm/branches/gsoc2009-16bit/gui/themes/scummmodern/THEMERC
scummvm/branches/gsoc2009-16bit/gui/themes/scummmodern/scummmodern_gfx.stx
scummvm/branches/gsoc2009-16bit/gui/themes/scummmodern.zip
scummvm/branches/gsoc2009-16bit/ports.mk
scummvm/branches/gsoc2009-16bit/sound/midiparser_xmidi.cpp
scummvm/branches/gsoc2009-16bit/tools/create_kyradat/amiga.h
scummvm/branches/gsoc2009-16bit/tools/create_kyradat/create_kyradat.cpp
scummvm/branches/gsoc2009-16bit/tools/scumm-md5.txt
scummvm/branches/gsoc2009-16bit/tools/update-version.pl
Added Paths:
-----------
scummvm/branches/gsoc2009-16bit/dists/iphone/Info.plist
scummvm/branches/gsoc2009-16bit/dists/macosx/Info.plist
Property Changed:
----------------
scummvm/branches/gsoc2009-16bit/
scummvm/branches/gsoc2009-16bit/backends/fs/ds/
scummvm/branches/gsoc2009-16bit/backends/platform/ds/
scummvm/branches/gsoc2009-16bit/dists/macosx/
Property changes on: scummvm/branches/gsoc2009-16bit
___________________________________________________________________
Modified: svnmerge-integrated
- /scummvm/trunk:1-43057 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703
+ /scummvm/trunk:1-43243 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703
Modified: svn:mergeinfo
- /scummvm/trunk:42578-43056
+ /scummvm/trunk:42578-43056,43066-43241
Modified: scummvm/branches/gsoc2009-16bit/Makefile.common
===================================================================
--- scummvm/branches/gsoc2009-16bit/Makefile.common 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/Makefile.common 2009-08-11 02:04:17 UTC (rev 43250)
@@ -148,25 +148,6 @@
######################################################################
-# Create the files that depend on the version
-######################################################################
-
-VERSION_FILES = \
- $(srcdir)/dists/iphone/Info.plist \
- $(srcdir)/dists/macosx/Info.plist
-
-$(VERSION_FILES): %: %.in
- @echo "Creating $@"
- @cat $< | sed \
- -e "s/@VER_MAJOR@/$(VER_MAJOR)/g" \
- -e "s/@VER_MINOR@/$(VER_MINOR)/g" \
- -e "s/@VER_PATCH@/$(VER_PATCH)/g" \
- -e "s/@VER_EXTRA@/$(VER_EXTRA)/g" \
- -e "s/@VERSION@/$(VERSION)/g" \
- > $@
-
-
-######################################################################
# Distribution settings
######################################################################
Modified: scummvm/branches/gsoc2009-16bit/NEWS
===================================================================
--- scummvm/branches/gsoc2009-16bit/NEWS 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/NEWS 2009-08-11 02:04:17 UTC (rev 43250)
@@ -58,6 +58,11 @@
- Added support for PC Speaker based music and sound effects.
- Added support for 16 color dithering in Kyrandia PC-9801.
+ WinCE port:
+ - Speed optimized versions of low-res Smartphone and 2x scalers.
+ - New aspect correction scaler for VGA (or higher) devices.
+ - Dropped support for MPEG-2 and FLAC.
+
0.13.1 (2009-04-27)
AGOS:
- Fixed crash after OmniTV video is played in The Feeble Files.
Property changes on: scummvm/branches/gsoc2009-16bit/backends/fs/ds
___________________________________________________________________
Modified: svn:mergeinfo
- /scummvm/branches/branch-0-13-0/backends/fs/ds:35922-39517
/scummvm/trunk/backends/fs/ds:42578-43056
+ /scummvm/branches/branch-0-13-0/backends/fs/ds:35922-39517
/scummvm/trunk/backends/fs/ds:42578-43056,43066-43241
Property changes on: scummvm/branches/gsoc2009-16bit/backends/platform/ds
___________________________________________________________________
Modified: svn:mergeinfo
- /scummvm/branches/branch-0-13-0/backends/platform/ds:35922-39516
/scummvm/trunk/backends/platform/ds:42578-43056
+ /scummvm/branches/branch-0-13-0/backends/platform/ds:35922-39516
/scummvm/trunk/backends/platform/ds:42578-43056,43066-43241
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/events.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/events.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/events.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -93,7 +93,7 @@
if (!_overlayVisible) {
event.mouse.x /= _videoMode.scaleFactor;
event.mouse.y /= _videoMode.scaleFactor;
- if (_videoMode.aspectRatio)
+ if (_videoMode.aspectRatioCorrection)
event.mouse.y = aspect2Real(event.mouse.y);
}
}
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-common.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-common.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-common.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -42,18 +42,7 @@
}
enum {
- GFX_NORMAL = 0,
- GFX_DOUBLESIZE = 1,
- GFX_TRIPLESIZE = 2,
- GFX_2XSAI = 3,
- GFX_SUPER2XSAI = 4,
- GFX_SUPEREAGLE = 5,
- GFX_ADVMAME2X = 6,
- GFX_ADVMAME3X = 7,
- GFX_HQ2X = 8,
- GFX_HQ3X = 9,
- GFX_TV2X = 10,
- GFX_DOTMATRIX = 11
+ GFX_NORMAL = 0
};
@@ -248,7 +237,7 @@
bool setup;
bool fullscreen;
- bool aspectRatio;
+ bool aspectRatioCorrection;
int mode;
int scaleFactor;
@@ -274,16 +263,11 @@
bool _modeChanged;
int _screenChangeCount;
- /** True if aspect ratio correction is enabled. */
- bool _adjustAspectRatio;
-
- /** True if zoom on mouse is enabled. (only set by > 240 high games) */
+ /* True if zoom on mouse is enabled. (only set by > 240 high games) */
bool _adjustZoomOnMouse;
- //_adjustZoomOnMouse = false;
enum {
NUM_DIRTY_RECT = 100,
-
MAX_MOUSE_W = 80,
MAX_MOUSE_H = 80,
MAX_SCALING = 3
@@ -332,7 +316,7 @@
// mouse
KbdMouse _km;
bool _mouseVisible;
- bool _mouseDrawn;
+ bool _mouseNeedsRedraw;
byte *_mouseData;
SDL_Rect _mouseBackup;
MousePos _mouseCurState;
@@ -419,7 +403,7 @@
bool saveScreenshot(const char *filename);
int effectiveScreenHeight() const {
- return (_videoMode.aspectRatio ? real2Aspect(_videoMode.screenHeight) : _videoMode.screenHeight)
+ return (_videoMode.aspectRatioCorrection ? real2Aspect(_videoMode.screenHeight) : _videoMode.screenHeight)
* _videoMode.scaleFactor;
}
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-hw.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-hw.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-hw.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -56,7 +56,7 @@
VOLUME_UP = 2,
VOLUME_CHANGE_RATE = 8,
VOLUME_MIN = 0,
- VOLUME_INITIAL = 70,
+ VOLUME_INITIAL = 60,
VOLUME_MAX = 100
};
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -37,7 +37,7 @@
#include <unistd.h>
#include <string.h>
-#include "gp2x-mem.h"
+#include "backends/platform/gp2x/gp2x-mem.h"
void SetClock (unsigned c)
{
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x-mem.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -35,7 +35,6 @@
extern "C" {
#endif
-
// Use Squidge's MMU patch rather then myown (his is neater).
// The effect if not that great but cacheing the upper RAM is no bad thing (tm) ;).
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/gp2x.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -131,8 +131,6 @@
ConfMan.registerDefault("savepath", savePath);
- _savefile = new DefaultSaveFileManager(savePath);
-
#ifdef DUMP_STDOUT
// The GP2X has a serial console but most users do not use this so we
// output all our STDOUT and STDERR to files for debug purposes.
@@ -186,9 +184,9 @@
ConfMan.registerDefault("aspect_ratio", true);
/* Up default volume values as we use a seperate system level volume anyway. */
- ConfMan.registerDefault("music_volume", 220);
- ConfMan.registerDefault("sfx_volume", 220);
- ConfMan.registerDefault("speech_volume", 220);
+ ConfMan.registerDefault("music_volume", 192);
+ ConfMan.registerDefault("sfx_volume", 192);
+ ConfMan.registerDefault("speech_volume", 192);
ConfMan.registerDefault("autosave_period", 3 * 60); // Trigger autosave every 3 minutes - On low batts 4 mins is about your warning time.
memset(&_oldVideoMode, 0, sizeof(_oldVideoMode));
@@ -199,7 +197,7 @@
_videoMode.mode = GFX_NORMAL;
_videoMode.scaleFactor = 1;
_scalerProc = Normal1x;
- _videoMode.aspectRatio = ConfMan.getBool("aspect_ratio");
+ _videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio");
_scalerType = 0;
_modeFlags = 0;
_adjustZoomOnMouse = false;
@@ -210,17 +208,13 @@
_joystick = SDL_JoystickOpen(joystick_num);
}
+ _savefile = new DefaultSaveFileManager();
// Create and hook up the mixer, if none exists yet (we check for this to
// allow subclasses to provide their own).
if (_mixer == 0) {
setupMixer();
}
- // Setup the keymapper with backend's set of keys
- // NOTE: must be done before creating TimerManager
- // to avoid race conditions in creating EventManager
- setupKeymapper();
-
// Create and hook up the timer manager, if none exists yet (we check for
// this to allow subclasses to provide their own).
if (_timer == 0) {
@@ -241,27 +235,6 @@
/* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */
GP2X_HW::mixerMoveVolume(0);
- // Set Default hardware mixer volume to a plesent level.
- // This is done to 'reset' volume level if set by other apps.
-
- //if (SDL_GP2X_MouseType() == 0) {
- // // No mouse, F100 default state.
- // _gp2xInputType = 0;
- // displayMessageOnOSD("F100 GP2X Found");
- //}
-
- //if (SDL_GP2X_MouseType() == 1) {
- // // USB mouse found.
- // _gp2xInputType = 1;
- // displayMessageOnOSD("USB Mouse Found");
- //}
-
- //if (SDL_GP2X_MouseType() == 2) {
- // // F200 touch screen found. - F200 default state.
- // _gp2xInputType = 2;
- // displayMessageOnOSD("Touch Screen Found");
- //}
-
OSystem::initBackend();
_inited = true;
@@ -275,7 +248,7 @@
_overlayscreen(0), _tmpscreen2(0),
_samplesPerSec(0),
_cdrom(0), _scalerProc(0), _modeChanged(false), _screenChangeCount(0), _dirtyChecksums(0),
- _mouseVisible(false), _mouseDrawn(false), _mouseData(0), _mouseSurface(0),
+ _mouseVisible(false), _mouseNeedsRedraw(false), _mouseData(0), _mouseSurface(0),
_mouseOrigSurface(0), _cursorTargetScale(1), _cursorPaletteDisabled(true),
_joystick(0),
_currentShakePos(0), _newShakePos(0),
@@ -434,7 +407,7 @@
case kFeatureFullscreenMode:
return false;
case kFeatureAspectRatioCorrection:
- return _videoMode.aspectRatio;
+ return _videoMode.aspectRatioCorrection;
case kFeatureAutoComputeDirtyRects:
return _modeFlags & DF_WANT_RECT_OPTIM;
default:
@@ -458,12 +431,12 @@
free(_cursorPalette);
free(_mouseData);
- delete _savefile;
delete _timer;
SDL_ShowCursor(SDL_ENABLE);
SDL_Quit();
delete getEventManager();
+ delete _savefile;
#ifdef DUMP_STDOUT
printf("%s\n", "Debug: STDOUT and STDERR text files closed.");
@@ -610,7 +583,7 @@
_samplesPerSec = SAMPLES_PER_SEC;
//Quick EVIL Hack - DJWillis
- _samplesPerSec = 11025;
+// _samplesPerSec = 11025;
// Determine the sample buffer size. We want it to store enough data for
// about 1/16th of a second. Note that it must be a power of two.
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/graphics.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/graphics.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -37,7 +37,7 @@
#include "graphics/surface.h"
static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
- {"GP2X Graphics Mode", "1x", GFX_NORMAL},
+ {"Fullscreen", "1x", GFX_NORMAL},
{0, 0, 0}
};
@@ -50,14 +50,7 @@
};
static const int s_gfxModeSwitchTable[][4] = {
- { GFX_NORMAL, GFX_DOUBLESIZE, GFX_TRIPLESIZE, -1 },
- { GFX_NORMAL, GFX_ADVMAME2X, GFX_ADVMAME3X, -1 },
- { GFX_NORMAL, GFX_HQ2X, GFX_HQ3X, -1 },
- { GFX_NORMAL, GFX_2XSAI, -1, -1 },
- { GFX_NORMAL, GFX_SUPER2XSAI, -1, -1 },
- { GFX_NORMAL, GFX_SUPEREAGLE, -1, -1 },
- { GFX_NORMAL, GFX_TV2X, -1, -1 },
- { GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
+ { GFX_NORMAL }
};
static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY);
@@ -95,10 +88,10 @@
errors |= kTransactionFullscreenFailed;
_videoMode.fullscreen = _oldVideoMode.fullscreen;
- } else if (_videoMode.aspectRatio != _oldVideoMode.aspectRatio) {
+ } else if (_videoMode.aspectRatioCorrection != _oldVideoMode.aspectRatioCorrection) {
errors |= kTransactionAspectRatioFailed;
- _videoMode.aspectRatio = _oldVideoMode.aspectRatio;
+ _videoMode.aspectRatioCorrection = _oldVideoMode.aspectRatioCorrection;
} else if (_videoMode.mode != _oldVideoMode.mode) {
errors |= kTransactionModeSwitchFailed;
@@ -114,7 +107,7 @@
}
if (_videoMode.fullscreen == _oldVideoMode.fullscreen &&
- _videoMode.aspectRatio == _oldVideoMode.aspectRatio &&
+ _videoMode.aspectRatioCorrection == _oldVideoMode.aspectRatioCorrection &&
_videoMode.mode == _oldVideoMode.mode &&
_videoMode.screenWidth == _oldVideoMode.screenWidth &&
_videoMode.screenHeight == _oldVideoMode.screenHeight) {
@@ -190,45 +183,6 @@
case GFX_NORMAL:
newScaleFactor = 1;
break;
-#ifndef DISABLE_SCALERS
- case GFX_DOUBLESIZE:
- newScaleFactor = 2;
- break;
- case GFX_TRIPLESIZE:
- newScaleFactor = 3;
- break;
-
- case GFX_2XSAI:
- newScaleFactor = 2;
- break;
- case GFX_SUPER2XSAI:
- newScaleFactor = 2;
- break;
- case GFX_SUPEREAGLE:
- newScaleFactor = 2;
- break;
- case GFX_ADVMAME2X:
- newScaleFactor = 2;
- break;
- case GFX_ADVMAME3X:
- newScaleFactor = 3;
- break;
-#ifndef DISABLE_HQ_SCALERS
- case GFX_HQ2X:
- newScaleFactor = 2;
- break;
- case GFX_HQ3X:
- newScaleFactor = 3;
- break;
-#endif
- case GFX_TV2X:
- newScaleFactor = 2;
- break;
- case GFX_DOTMATRIX:
- newScaleFactor = 2;
- break;
-#endif // DISABLE_SCALERS
-
default:
warning("unknown gfx mode %d", mode);
return false;
@@ -246,7 +200,6 @@
return true;
}
-
void OSystem_GP2X::setGraphicsModeIntern() {
Common::StackLock lock(_graphicsMutex);
ScalerProc *newScalerProc = 0;
@@ -255,45 +208,7 @@
case GFX_NORMAL:
newScalerProc = Normal1x;
break;
-#ifndef DISABLE_SCALERS
- case GFX_DOUBLESIZE:
- newScalerProc = Normal2x;
- break;
- case GFX_TRIPLESIZE:
- newScalerProc = Normal3x;
- break;
- case GFX_2XSAI:
- newScalerProc = _2xSaI;
- break;
- case GFX_SUPER2XSAI:
- newScalerProc = Super2xSaI;
- break;
- case GFX_SUPEREAGLE:
- newScalerProc = SuperEagle;
- break;
- case GFX_ADVMAME2X:
- newScalerProc = AdvMame2x;
- break;
- case GFX_ADVMAME3X:
- newScalerProc = AdvMame3x;
- break;
-#ifndef DISABLE_HQ_SCALERS
- case GFX_HQ2X:
- newScalerProc = HQ2x;
- break;
- case GFX_HQ3X:
- newScalerProc = HQ3x;
- break;
-#endif
- case GFX_TV2X:
- newScalerProc = TV2x;
- break;
- case GFX_DOTMATRIX:
- newScalerProc = DotMatrix;
- break;
-#endif // DISABLE_SCALERS
-
default:
error("Unknown gfx mode %d", _videoMode.mode);
}
@@ -353,18 +268,28 @@
_videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)
- _videoMode.aspectRatio = false;
+ _videoMode.aspectRatioCorrection = false;
- if (_videoMode.aspectRatio)
+ if (_videoMode.aspectRatioCorrection)
_videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
hwW = _videoMode.screenWidth * _videoMode.scaleFactor;
- hwH = effectiveScreenHeight();
+ if (_videoMode.screenHeight == 200) {
+ hwH = 240;
+ } else if (_videoMode.screenHeight == 400) {
+ hwH = 480;
+ } else {
+ hwH = _videoMode.screenHeight;
+ }
+
+ printf ("Game Screen Height: %d\n", hwH);
+
//
- // Create the surface that contains the 8 bit game data
+ // Create the surface that contains the game data
//
- _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight, 8, 0, 0, 0, 0);
+
+ _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, hwH, 8, 0, 0, 0, 0);
if (_screen == NULL)
error("allocating _screen failed");
@@ -372,9 +297,7 @@
// Create the surface that contains the scaled graphics in 16 bit mode
//
- _hwscreen = SDL_SetVideoMode(hwW, hwH, 16,
- _videoMode.fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
- );
+ _hwscreen = SDL_SetVideoMode(hwW, hwH, 16, SDL_SWSURFACE | SDL_NOFRAME | SDL_FULLSCREEN);
if (_hwscreen == NULL) {
// DON'T use error(), as this tries to bring up the debug
// console, which WON'T WORK now that _hwscreen is hosed.
@@ -395,12 +318,6 @@
// Create the surface used for the graphics in 16 bit before scaling, and also the overlay
//
- // Distinguish 555 and 565 mode
- if (_hwscreen->format->Rmask == 0x7C00)
- InitScalers(555);
- else
- InitScalers(565);
-
// Need some extra bytes around when using 2xSaI
_tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth + 3, _videoMode.screenHeight + 3,
16,
@@ -462,6 +379,12 @@
_km.delay_time = 25;
_km.last_time = 0;
+ // Distinguish 555 and 565 mode
+ if (_hwscreen->format->Rmask == 0x7C00)
+ InitScalers(555);
+ else
+ InitScalers(565);
+
return true;
}
@@ -571,7 +494,7 @@
if (_currentShakePos != _newShakePos) {
SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor};
- if (_videoMode.aspectRatio && !_overlayVisible)
+ if (_videoMode.aspectRatioCorrection && !_overlayVisible)
blackrect.h = real2Aspect(blackrect.h - 1) + 1;
SDL_FillRect(_hwscreen, &blackrect, 0);
@@ -627,6 +550,11 @@
scale1 = 1;
}
+ // Add the area covered by the mouse cursor to the list of dirty rects if
+ // we have to redraw the mouse.
+ if (_mouseNeedsRedraw)
+ undrawMouse();
+
// Force a full redraw if requested
if (_forceFull) {
_numDirtyRects = 1;
@@ -634,12 +562,10 @@
_dirtyRectList[0].y = 0;
_dirtyRectList[0].w = width;
_dirtyRectList[0].h = height;
- } else
- undrawMouse();
+ }
// Only draw anything if necessary
- if (_numDirtyRects > 0) {
-
+ if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
SDL_Rect *r;
SDL_Rect dst;
uint32 srcPitch, dstPitch;
@@ -647,7 +573,7 @@
for (r = _dirtyRectList; r != lastRect; ++r) {
dst = *r;
- dst.x++; // Shift rect by one since 2xSai needs to acces the data around
+ dst.x++; // Shift rect by one since 2xSai needs to access the data around
dst.y++; // any pixel to scale it, and we want to avoid mem access crashes.
if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0)
@@ -674,7 +600,7 @@
orig_dst_y = dst_y;
dst_y = dst_y * scale1;
- if (_videoMode.aspectRatio && !_overlayVisible)
+ if (_videoMode.aspectRatioCorrection && !_overlayVisible)
dst_y = real2Aspect(dst_y);
assert(scalerProc != NULL);
@@ -687,10 +613,8 @@
r->w = r->w * scale1;
r->h = dst_h * scale1;
-#ifndef DISABLE_SCALERS
- if (_videoMode.aspectRatio && orig_dst_y < height && !_overlayVisible)
+ if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
-#endif
}
SDL_UnlockSurface(srcSurf);
SDL_UnlockSurface(_hwscreen);
@@ -710,14 +634,11 @@
// Finally, blit all our changes to the screen
SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
- } else {
- drawMouse();
- if (_numDirtyRects)
- SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
}
_numDirtyRects = 0;
_forceFull = false;
+ _mouseNeedsRedraw = false;
}
bool OSystem_GP2X::saveScreenshot(const char *filename) {
@@ -740,18 +661,14 @@
}
void OSystem_GP2X::setAspectRatioCorrection(bool enable) {
- if ((_videoMode.screenHeight == 200 && _videoMode.aspectRatio != enable) ||
- _transactionMode == kTransactionActive) {
+ Common::StackLock lock(_graphicsMutex);
- Common::StackLock lock(_graphicsMutex);
+ if (_oldVideoMode.setup && _oldVideoMode.aspectRatioCorrection == enable)
+ return;
- if (_oldVideoMode.setup && _oldVideoMode.aspectRatio == enable)
- return;
-
- if (_transactionMode == kTransactionActive) {
- _videoMode.aspectRatio = enable;
- _transactionDetails.needHotswap = true;
- }
+ if (_transactionMode == kTransactionActive) {
+ _videoMode.aspectRatioCorrection = enable;
+ _transactionDetails.needHotswap = true;
}
}
@@ -776,12 +693,12 @@
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
-// assert(x >= 0 && x < _screenWidth);
-// assert(y >= 0 && y < _screenHeight);
-// assert(h > 0 && y + h <= _screenHeight);
-// assert(w > 0 && x + w <= _screenWidth);
+ assert(x >= 0 && x < _videoMode.screenWidth);
+ assert(y >= 0 && y < _videoMode.screenHeight);
+ assert(h > 0 && y + h <= _videoMode.screenHeight);
+ assert(w > 0 && x + w <= _videoMode.screenWidth);
- if (((long)src & 3) == 0 && pitch == _videoMode.screenWidth && x == 0 && y == 0 &&
+ if (IS_ALIGNED(src, 4) && pitch == _videoMode.screenWidth && x == 0 && y == 0 &&
w == _videoMode.screenWidth && h == _videoMode.screenHeight && _modeFlags & DF_WANT_RECT_OPTIM) {
/* Special, optimized case for full screen updates.
* It tries to determine what areas were actually changed,
@@ -923,7 +840,7 @@
h = height - y;
}
- if (_videoMode.aspectRatio && !_overlayVisible && !realCoordinates) {
+ if (_videoMode.aspectRatioCorrection && !_overlayVisible && !realCoordinates) {
makeRectStretchable(x, y, w, h);
}
@@ -982,7 +899,7 @@
void OSystem_GP2X::addDirtyRgnAuto(const byte *buf) {
assert(buf);
- assert(((long)buf & 3) == 0);
+ assert(IS_ALIGNED(buf, 4));
/* generate a table of the checksums */
makeChecksums(buf);
@@ -1115,7 +1032,7 @@
// Since resolution could change, put mouse to adjusted position
// Fixes bug #1349059
x = _mouseCurState.x * _videoMode.scaleFactor;
- if (_videoMode.aspectRatio)
+ if (_videoMode.aspectRatioCorrection)
y = real2Aspect(_mouseCurState.y) * _videoMode.scaleFactor;
else
y = _mouseCurState.y * _videoMode.scaleFactor;
@@ -1139,7 +1056,7 @@
// Fixes bug #1349059
x = _mouseCurState.x / _videoMode.scaleFactor;
y = _mouseCurState.y / _videoMode.scaleFactor;
- if (_videoMode.aspectRatio)
+ if (_videoMode.aspectRatioCorrection)
y = aspect2Real(y);
warpMouse(x, y);
@@ -1172,7 +1089,7 @@
(byte *)_overlayscreen->pixels, _overlayscreen->pitch, _videoMode.screenWidth, _videoMode.screenHeight);
#ifndef DISABLE_SCALERS
- if (_videoMode.aspectRatio)
+ if (_videoMode.aspectRatioCorrection)
stretch200To240((uint8 *)_overlayscreen->pixels, _overlayscreen->pitch,
_videoMode.overlayWidth, _videoMode.screenHeight * _videoMode.scaleFactor, 0, 0, 0);
#endif
@@ -1259,12 +1176,14 @@
bool last = _mouseVisible;
_mouseVisible = visible;
+ _mouseNeedsRedraw = true;
return last;
}
void OSystem_GP2X::setMousePos(int x, int y) {
if (x != _mouseCurState.x || y != _mouseCurState.y) {
+ _mouseNeedsRedraw = true;
_mouseCurState.x = x;
_mouseCurState.y = y;
}
@@ -1273,7 +1192,7 @@
void OSystem_GP2X::warpMouse(int x, int y) {
int y1 = y;
- if (_adjustAspectRatio && !_overlayVisible)
+ if (_videoMode.aspectRatioCorrection && !_overlayVisible)
y1 = real2Aspect(y);
if (_mouseCurState.x != x || _mouseCurState.y != y) {
@@ -1342,6 +1261,8 @@
if (!_mouseOrigSurface || !_mouseData)
return;
+ _mouseNeedsRedraw = true;
+
w = _mouseCurState.w;
h = _mouseCurState.h;
@@ -1422,7 +1343,7 @@
int rH1 = rH; // store original to pass to aspect-correction function later
- if (_videoMode.aspectRatio && _cursorTargetScale == 1) {
+ if (_videoMode.aspectRatioCorrection && _cursorTargetScale == 1) {
rH = real2Aspect(rH - 1) + 1;
_mouseCurState.rHotY = real2Aspect(_mouseCurState.rHotY);
}
@@ -1453,20 +1374,17 @@
ScalerProc *scalerProc;
- // If possible, use the same scaler for the cursor as for the rest of
- // the game. This only works well with the non-blurring scalers so we
- // actually only use the 1x, 1.5x, 2x and AdvMame scalers.
-
- if (_cursorTargetScale == 1 && (_videoMode.mode == GFX_DOUBLESIZE || _videoMode.mode == GFX_TRIPLESIZE))
- scalerProc = _scalerProc;
- else
+ if (_cursorTargetScale == 1 && _videoMode.screenWidth > 320) {
+ scalerProc = scalersMagn[_cursorTargetScale + 1][_videoMode.scaleFactor + 1];
+ } else {
scalerProc = scalersMagn[_cursorTargetScale - 1][_videoMode.scaleFactor - 1];
+ }
scalerProc((byte *)_mouseOrigSurface->pixels + _mouseOrigSurface->pitch + 2,
_mouseOrigSurface->pitch, (byte *)_mouseSurface->pixels, _mouseSurface->pitch,
_mouseCurState.w, _mouseCurState.h);
- if (_videoMode.aspectRatio && _cursorTargetScale == 1)
+ if (_videoMode.aspectRatioCorrection && _cursorTargetScale == 1)
cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
SDL_UnlockSurface(_mouseSurface);
@@ -1506,9 +1424,8 @@
// When we switch bigger overlay off mouse jumps. Argh!
// This is intended to prevent undrawing offscreen mouse
- if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight)) {
+ if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight))
return;
- }
if (_mouseBackup.w != 0 && _mouseBackup.h != 0)
addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h);
@@ -1575,7 +1492,7 @@
dst.y += _currentShakePos;
}
- if (_videoMode.aspectRatio && !_overlayVisible)
+ if (_videoMode.aspectRatioCorrection && !_overlayVisible)
dst.y = real2Aspect(dst.y);
dst.x = scale * dst.x - _mouseCurState.rHotX;
@@ -1584,7 +1501,6 @@
dst.h = _mouseCurState.rH;
// Hacking about with the zoom around mouse pointer stuff.
-
if (_adjustZoomOnMouse == true){
zoomdst.w = (tmpScreenWidth / 2);
@@ -1623,7 +1539,6 @@
SDL_GP2X_Display(&zoomdst);
};
-
// Note that SDL_BlitSurface() and addDirtyRect() will both perform any
// clipping necessary
@@ -1730,10 +1645,10 @@
// Ctrl-Alt-a toggles aspect ratio correction
if (key.keysym.sym == 'a') {
beginGFXTransaction();
- setFeatureState(kFeatureAspectRatioCorrection, !_videoMode.aspectRatio);
+ setFeatureState(kFeatureAspectRatioCorrection, !_videoMode.aspectRatioCorrection);
endGFXTransaction();
char buffer[128];
- if (_videoMode.aspectRatio)
+ if (_videoMode.aspectRatioCorrection)
sprintf(buffer, "Enabled aspect ratio correction\n%d x %d -> %d x %d",
_videoMode.screenWidth, _videoMode.screenHeight,
_hwscreen->w, _hwscreen->h
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/module.mk
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/module.mk 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/gp2x/module.mk 2009-08-11 02:04:17 UTC (rev 43250)
@@ -6,8 +6,6 @@
events.o \
graphics.o \
gp2x.o \
-# gp2x-options.o \
-# overload_help.o \
MODULE_DIRS += \
backends/platform/gp2x/
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -475,12 +475,54 @@
_dirtyChecksums = (uint32 *)calloc(_cksumNum * 2, sizeof(uint32));
}
+
+static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &width, int &height) {
+ assert(&width != &height);
+
+ if (desiredAspectRatio.isAuto())
+ return;
+
+ int kw = desiredAspectRatio.kw();
+ int kh = desiredAspectRatio.kh();
+
+ const int w = width;
+ const int h = height;
+
+ SDL_Rect const* const*availableModes = SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_SWSURFACE); //TODO : Maybe specify a pixel format
+ assert(availableModes);
+
+ const SDL_Rect *bestMode = NULL;
+ uint bestMetric = (uint)-1; // Metric is wasted space
+ while (const SDL_Rect *mode = *availableModes++) {
+ if (mode->w < w)
+ continue;
+ if (mode->h < h)
+ continue;
+ if (mode->h * kw != mode->w * kh)
+ continue;
+ //printf("%d %d\n", mode->w, mode->h);
+
+ uint metric = mode->w * mode->h - w * h;
+ if (metric > bestMetric)
+ continue;
+
+ bestMetric = metric;
+ bestMode = mode;
+ }
+
+ if (!bestMode) {
+ warning("Unable to enforce the desired aspect ratio!");
+ return;
+ }
+ //printf("%d %d\n", bestMode->w, bestMode->h);
+ width = bestMode->w;
+ height = bestMode->h;
+}
+
bool OSystem_SDL::loadGFXMode() {
assert(_inited);
_forceFull = true;
- int hwW, hwH;
-
#if !defined(__MAEMO__) && !defined(GP2XWIZ)
_videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
_videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
@@ -491,11 +533,11 @@
if (_videoMode.aspectRatioCorrection)
_videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
- hwW = _videoMode.screenWidth * _videoMode.scaleFactor;
- hwH = effectiveScreenHeight();
+ _videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
+ _videoMode.hardwareHeight = effectiveScreenHeight();
#else
- hwW = _videoMode.overlayWidth;
- hwH = _videoMode.overlayHeight;
+ _videoMode.hardwareWidth = _videoMode.overlayWidth;
+ _videoMode.hardwareHeight = _videoMode.overlayHeight;
#endif
//
@@ -521,7 +563,11 @@
// Create the surface that contains the scaled graphics in 16 bit mode
//
- _hwscreen = SDL_SetVideoMode(hwW, hwH, 16,
+ if(_videoMode.fullscreen) {
+ fixupResolutionForAspectRatio(_videoMode.desiredAspectRatio, _videoMode.hardwareWidth, _videoMode.hardwareHeight);
+ }
+
+ _hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
_videoMode.fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
);
if (_hwscreen == NULL) {
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -85,6 +85,31 @@
return interval;
}
+AspectRatio::AspectRatio(int w, int h) {
+ // TODO : Validation and so on...
+ // Currently, we just ensure the program don't instantiate non-supported aspect ratios
+ _kw = w;
+ _kh = h;
+}
+
+static const size_t AR_COUNT = 4;
+static const char* desiredAspectRatioAsStrings[AR_COUNT] = { "auto", "4/3", "16/9", "16/10" };
+static const AspectRatio desiredAspectRatios[AR_COUNT] = { AspectRatio(0, 0), AspectRatio(4,3), AspectRatio(16,9), AspectRatio(16,10) };
+static AspectRatio getDesiredAspectRatio() {
+ //TODO : We could parse an arbitrary string, if we code enough proper validation
+ Common::String desiredAspectRatio = ConfMan.get("desired_screen_aspect_ratio");
+
+ for (size_t i = 0; i < AR_COUNT; i++) {
+ assert(desiredAspectRatioAsStrings[i] != NULL);
+
+ if (!scumm_stricmp(desiredAspectRatio.c_str(), desiredAspectRatioAsStrings[i])) {
+ return desiredAspectRatios[i];
+ }
+ }
+ // TODO : Report a warning
+ return AspectRatio(0, 0);
+}
+
void OSystem_SDL::initBackend() {
assert(!_inited);
@@ -124,6 +149,7 @@
_videoMode.mode = GFX_DOUBLESIZE;
_videoMode.scaleFactor = 2;
_videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio");
+ _videoMode.desiredAspectRatio = getDesiredAspectRatio();
_scalerProc = Normal2x;
#else // for small screen platforms
_videoMode.mode = GFX_NORMAL;
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -70,7 +70,19 @@
GFX_DOTMATRIX = 11
};
+class AspectRatio {
+ int _kw, _kh;
+public:
+ AspectRatio() { _kw = _kh = 0; }
+ AspectRatio(int w, int h);
+
+ bool isAuto() const { return (_kw | _kh) == 0; }
+
+ int kw() const { return _kw; }
+ int kh() const { return _kh; }
+};
+
class OSystem_SDL : public BaseBackend {
public:
OSystem_SDL();
@@ -284,6 +296,7 @@
bool fullscreen;
bool aspectRatioCorrection;
+ AspectRatio desiredAspectRatio;
int mode;
int scaleFactor;
@@ -293,6 +306,7 @@
#ifdef ENABLE_RGB_COLOR
Graphics::PixelFormat format;
#endif
+ int hardwareWidth, hardwareHeight;
};
VideoState _videoMode, _oldVideoMode;
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/wii/osystem_events.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/wii/osystem_events.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/wii/osystem_events.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -316,20 +316,28 @@
#endif
if (bd || bu) {
- PAD_EVENT(PADS_Z, Common::KEYCODE_RETURN, Common::ASCII_RETURN, 0);
- PAD_EVENT(PADS_X, Common::KEYCODE_ESCAPE, Common::ASCII_ESCAPE, 0);
- PAD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.', 0);
- PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, 0);
- PAD_EVENT(PADS_UP, Common::KEYCODE_F5, Common::ASCII_F5, Common::KBD_CTRL);
- PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, 0);
- //PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, 0);
+ byte flags = 0;
+ if (bh & PADS_UP) {
+ PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, Common::KBD_CTRL);
+
+ flags = Common::KBD_SHIFT;
+ }
+
if (bd & PADS_RIGHT) {
event.type = Common::EVENT_PREDICTIVE_DIALOG;
return true;
}
+ PAD_EVENT(PADS_Z, Common::KEYCODE_RETURN, Common::ASCII_RETURN, flags);
+ PAD_EVENT(PADS_X, Common::KEYCODE_ESCAPE, Common::ASCII_ESCAPE, flags);
+ PAD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.', flags);
+ PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, flags);
+ PAD_EVENT(PADS_UP, Common::KEYCODE_LSHIFT, 0, flags);
+ PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, flags);
+ //PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, 0);
+
if ((bd | bu) & (PADS_A | PADS_B)) {
if (bd & PADS_A)
event.type = Common::EVENT_LBUTTONDOWN;
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/wince/Makefile
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/wince/Makefile 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/wince/Makefile 2009-08-11 02:04:17 UTC (rev 43250)
@@ -50,10 +50,10 @@
## Pick which libraries you want to use here
USE_MAD = 1
-USE_MPEG2 = 1
+#USE_MPEG2 = 1
#USE_TREMOR = 1
USE_TREMOLO = 1
-USE_FLAC = 1
+#USE_FLAC = 1
USE_ZLIB = 1
########################################################################
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/wince/README-WinCE.txt
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/wince/README-WinCE.txt 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/wince/README-WinCE.txt 2009-08-11 02:04:17 UTC (rev 43250)
@@ -1,6 +1,6 @@
ScummVM Windows CE FAQ
Last updated: $Date$
-Release version: 0.13.0
+Release version: 1.0.0rc1
------------------------------------------------------------------------
New in this version
@@ -20,6 +20,18 @@
and this will fail on many devices (file under the not enough memory
category).
+From this version on, we're dropping support for FLAC and MPEG-2. The first
+is a pain to maintain, while the second has been gradually phased out in
+scummvm. Be sure to update your add-on packs and/or recompress your sound.
+
+This is still a 2-binary distribution. Here's what engines are compiled in
+the two executables:
+scummvm1.exe:
+ - scumm, sword1, sword2, queen, sky, lure, agi, touche, tinsel, cruise
+scummvm2.exe:
+ - gob, cine, saga, kyra, agos, parallaction, drascula, groovie, tucker, made
+
+
------------------------------------------------------------------------
This document is intended to give common answers to specific ScummVM
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/wince/missing/missing.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/wince/missing/missing.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/wince/missing/missing.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -42,6 +42,7 @@
#endif
#include "time.h"
#include "dirent.h"
+#include "common/debug.h"
char *strdup(const char *strSource);
@@ -182,11 +183,19 @@
HANDLE h = FindFirstFile(fname, &ffd);
FindClose(h);
- if (h == INVALID_HANDLE_VALUE)
- return -1; //Can't find file
+ if (h == INVALID_HANDLE_VALUE) {
+ // WORKAROUND: WinCE 3.0 doesn't find paths ending in '\'
+ if (path[strlen(path)-1] == '\\') {
+ char p2[MAX_PATH];
+ strncpy(p2, path, strlen(path)-1);
+ p2[strlen(path) - 1]= '\0';
+ return _access(p2, mode);
+ } else
+ return -1; //Can't find file
+ }
- if (ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) {
- // WORKAROUND: WinCE (or the emulator) sometimes returns bogus direcotry
+ if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ // WORKAROUND: WinCE (or the emulator) sometimes returns bogus directory
// hits for files that don't exist. TRIPLE checking for the same fname
// seems to weed out those false positives.
// Exhibited in kyra engine.
@@ -206,7 +215,7 @@
return 0;
case 06: //Check Read & Write permission
case 02: //Check Write permission
- return ffd.dwFileAttributes&FILE_ATTRIBUTE_READONLY?-1:0;
+ return ffd.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? -1 : 0;
case 04: //Check Read permission
return 0; //Assume always have read permission
}
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -1934,8 +1934,7 @@
_mouseData = (byte *) malloc(w * h);
memcpy(_mouseData, buf, w * h);
- if (w > _mouseBackupDim || h > _mouseBackupDim)
- {
+ if (w > _mouseBackupDim || h > _mouseBackupDim) {
// mouse has been undrawn, adjust sprite backup area
free(_mouseBackupOld);
free(_mouseBackupToolbar);
@@ -2050,7 +2049,6 @@
if (_mouseNeedsRedraw)
return;
- _mouseNeedsRedraw = true;
int old_mouse_x = _mouseCurState.x - _mouseHotspotX;
int old_mouse_y = _mouseCurState.y - _mouseHotspotY;
@@ -2101,8 +2099,24 @@
addDirtyRect(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h);
SDL_UnlockSurface(_overlayVisible ? _overlayscreen : _screen);
+
+ _mouseNeedsRedraw = true;
}
+bool OSystem_WINCE3::showMouse(bool visible) {
+ if (_mouseVisible == visible)
+ return visible;
+
+ if (visible == false)
+ undrawMouse();
+
+ bool last = _mouseVisible;
+ _mouseVisible = visible;
+ _mouseNeedsRedraw = true;
+
+ return last;
+}
+
void OSystem_WINCE3::drawToolbarMouse(SDL_Surface *surf, bool draw) {
if (!_mouseData || !_usesEmulatedMouse) return;
@@ -2457,9 +2471,12 @@
}
if (_toolbarHandler.action(event.mouse.x, event.mouse.y, false)) {
- if (!_toolbarHandler.drawn())
+ if (!_toolbarHandler.drawn()) {
_toolbarHighDrawn = false;
internUpdateScreen();
+ }
+ return false;
+
}
return true;
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/wince/wince-sdl.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -94,6 +94,7 @@
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); // overloaded by CE backend
void undrawMouse();
void blitCursor();
+ bool showMouse(bool visible);
void setMousePos(int x, int y);
void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME)
void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
Modified: scummvm/branches/gsoc2009-16bit/base/commandLine.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/base/commandLine.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/base/commandLine.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -157,6 +157,7 @@
ConfMan.registerDefault("aspect_ratio", false);
ConfMan.registerDefault("gfx_mode", "normal");
ConfMan.registerDefault("render_mode", "default");
+ ConfMan.registerDefault("desired_screen_aspect_ratio", "auto");
// Sound & Music
ConfMan.registerDefault("music_volume", 192);
Modified: scummvm/branches/gsoc2009-16bit/dists/engine-data/kyra.dat
===================================================================
(Binary files differ)
Copied: scummvm/branches/gsoc2009-16bit/dists/iphone/Info.plist (from rev 43241, scummvm/trunk/dists/iphone/Info.plist)
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/iphone/Info.plist (rev 0)
+++ scummvm/branches/gsoc2009-16bit/dists/iphone/Info.plist 2009-08-11 02:04:17 UTC (rev 43250)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>ScummVM</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.scummvm.scummvm</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>ScummVM</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.1.0svn</string>
+ <key>CFBundleVersion</key>
+ <string>svn</string>
+ <key>CFBundleIconFile</key>
+ <string>icon.png</string>
+ <key>UIPrerenderedIcon</key>
+ <true/>
+</dict>
+</plist>
Property changes on: scummvm/branches/gsoc2009-16bit/dists/macosx
___________________________________________________________________
Deleted: svn:ignore
- Info.plist
Copied: scummvm/branches/gsoc2009-16bit/dists/macosx/Info.plist (from rev 43241, scummvm/trunk/dists/macosx/Info.plist)
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/macosx/Info.plist (rev 0)
+++ scummvm/branches/gsoc2009-16bit/dists/macosx/Info.plist 2009-08-11 02:04:17 UTC (rev 43250)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>ScummVM</string>
+ <key>CFBundleExecutable</key>
+ <string>scummvm</string>
+ <key>CFBundleGetInfoString</key>
+ <string>1.1.0svn, Copyright 2001-2008 The ScummVM team</string>
+ <key>CFBundleIconFile</key>
+ <string>scummvm.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.scummvm.scummvm</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>ScummVM</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.1.0svn</string>
+ <key>CFBundleVersion</key>
+ <string>1.1.0svn</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright 2001-2008 The ScummVM team</string>
+</dict>
+</plist>
Modified: scummvm/branches/gsoc2009-16bit/dists/wii/READMII
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/wii/READMII 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/dists/wii/READMII 2009-08-11 02:04:17 UTC (rev 43250)
@@ -44,10 +44,9 @@
plus: "." (skip current line of text)
2: enter
home: f5 (scummvm menu)
- dpad up: shift (mass add for the gui)
- dpad down: "0"
- dpad left: "y"
- dpad right: "n"
+ dpad up: shift (mass add for the gui, combined with home: GMM)
+ dpad down: virtual keyboard
+ dpad right: predictive dialog (only in AGI games)
gamecube pad
@@ -58,10 +57,9 @@
y: "." (skip current line of text)
z: enter
start: f5 (scummvm menu)
- dpad up: shift (mass add for the gui)
- dpad down: "0"
- dpad left: "y"
- dpad right: "n"
+ dpad up: shift (mass add for the gui, combined with start: GMM)
+ dpad down: virtual keyboard
+ dpad right: predictive dialog (only in AGI games)
DISPLAY SETUP
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -1600,7 +1600,7 @@
Common::RU_RUS,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NOSUBTITLES
+ GUIO_NONE
},
GType_SIMON1,
@@ -1625,7 +1625,7 @@
Common::FR_FRA,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NOSUBTITLES
+ GUIO_NONE
},
GType_SIMON1,
@@ -1675,7 +1675,7 @@
Common::HB_ISR,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NOSUBTITLES
+ GUIO_NONE
},
GType_SIMON1,
@@ -1700,7 +1700,7 @@
Common::IT_ITA,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NOSUBTITLES
+ GUIO_NONE
},
GType_SIMON1,
@@ -1726,7 +1726,7 @@
Common::IT_ITA,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO_NOSUBTITLES
+ GUIO_NONE
},
GType_SIMON1,
@@ -1751,7 +1751,7 @@
Common::ES_ESP,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NOSUBTITLES
+ GUIO_NONE
},
GType_SIMON1,
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -860,16 +860,16 @@
x = 30;
y = 151;
if (num != 2) {
- y = window->height * 4 + window->y - 19;
- x = window->width + window->x;
+ y = window->y + window->height * 4 - 19;
+ x = window->x + window->width;
}
drawArrow(x, y, 16);
ha = findEmptyHitArea();
_scrollUpHitArea = ha - _hitAreas;
- ha->x = 30 * 8;
- ha->y = 151;
+ ha->x = x * 8;
+ ha->y = y;
ha->width = 16;
ha->height = 19;
ha->flags = kBFBoxInUse;
@@ -881,16 +881,16 @@
x = 30;
y = 170;
if (num != 2) {
- y = window->height * 4;
- x = window->width + window->x;
+ y = window->y + window->height * 4;
+ x = window->x + window->width;
}
drawArrow(x, y, -16);
ha = findEmptyHitArea();
_scrollDownHitArea = ha - _hitAreas;
- ha->x = 30 * 8;
- ha->y = 170;
+ ha->x = x * 8;
+ ha->y = y;
ha->width = 16;
ha->height = 19;
ha->flags = kBFBoxInUse;
@@ -956,7 +956,8 @@
for (h = 0; h < 19; h++) {
for (w = 0; w < 16; w++) {
- dst[w] = src[w] + 16;
+ if (src[w])
+ dst[w] = src[w] + 16;
}
src += dir;
@@ -984,8 +985,8 @@
void AGOSEngine::removeArrows(WindowBlock *window, uint num) {
if (num != 2) {
- uint y = window->height * 4 + window->y - 19;
- uint x = window->width + window->x;
+ uint y = window->y + window->height * 4 - 19;
+ uint x = (window->x + window->width) * 8;
restoreBlock(x, y, x + 16, y + 38);
} else {
colorBlock(window, 240, 151, 16, 38);
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -283,7 +283,7 @@
const char *message1;
int i = 0, numSaveGames;
char *name;
- char buf[8];
+ char buf[10];
numSaveGames = countSaveGames();
@@ -312,7 +312,7 @@
for (; *message1; message1++)
windowPutChar(window, *message1);
- memset(buf, 0, 8);
+ memset(buf, 0, 10);
name = buf;
_saveGameNameLen = 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -1258,7 +1258,7 @@
dst += screen->pitch;
}
_system->unlockScreen();
- } else if (num == 4) {
+ } else {
const uint16 *vlut = &_videoWindows[num * 4];
uint16 xoffs = (vlut[0] - _videoWindows[16]) * 16;
uint16 yoffs = (vlut[1] - _videoWindows[17]);
Modified: scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -124,18 +124,6 @@
// another bit of video init
readVolCnf();
-
- // Setup mixer
-// _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
-// _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
-
- int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
- _mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
- _adlib = (midiDriver == MD_ADLIB);
-
- _driver = MidiDriver::createMidi(midiDriver);
- if (_mt32)
- _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
}
void CruiseEngine::deinitialise() {
Modified: scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/cruise/cruise.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -56,9 +56,7 @@
private:
bool _preLoad;
Debugger *_debugger;
- MidiDriver *_driver;
PCSound *_sound;
- bool _mt32, _adlib;
Common::StringList _langStrings;
CursorType _savedCursor;
uint32 lastTick, lastTickDebug;
@@ -89,8 +87,6 @@
Common::Language getLanguage() const;
Common::Platform getPlatform() const;
PCSound &sound() { return *_sound; }
- bool mt32() const { return _mt32; }
- bool adlib() const { return _adlib; }
virtual GUI::Debugger *getDebugger() { return _debugger; }
virtual void pauseEngine(bool pause);
const char *langString(LangStringId langId) { return _langStrings[(int)langId].c_str(); }
Modified: scummvm/branches/gsoc2009-16bit/engines/cruise/staticres.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/cruise/staticres.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/cruise/staticres.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -182,7 +182,7 @@
-1, -1, -1,
0x72, 0x80
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0x7f, 0x79, 0x7b, 0x81, 0x82, 0x83,
-1, -1,
0x7d,
@@ -218,7 +218,7 @@
0x67,
-1,
0x68,
- -1, -1, -1, -1
+ -1, -1, -1
};
//
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/dataio.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/dataio.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/dataio.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -35,21 +35,22 @@
DataStream::DataStream(DataIO &io, int16 handle, uint32 dSize, bool dispose) {
_io = &io;
- _handle = handle;
- _size = dSize;
+
+ _handle = handle;
+ _size = dSize;
_dispose = dispose;
- _data = 0;
+ _data = 0;
_stream = 0;
}
DataStream::DataStream(byte *buf, uint32 dSize, bool dispose) {
- _data = buf;
- _size = dSize;
- _stream = new Common::MemoryReadStream(_data, _size);
+ _data = buf;
+ _size = dSize;
+ _stream = new Common::MemoryReadStream(_data, _size);
_dispose = dispose;
- _io = 0;
+ _io = 0;
_handle = -1;
}
@@ -84,7 +85,7 @@
bool DataStream::seek(int32 offset, int whence) {
if (_stream)
return _stream->seek(offset, whence);
- else if ((_handle < 50) || (_handle >= 128))
+ else if (!_io->isDataFileChunk(_handle))
return _io->file_getHandle(_handle)->seek(offset, whence);
else {
_io->seekChunk(_handle, offset, whence);
@@ -103,7 +104,7 @@
if (_stream)
return _stream->read(dataPtr, dataSize);
- if ((_handle < 50) || (_handle >= 128))
+ if (!_io->isDataFileChunk(_handle))
return _io->file_getHandle(_handle)->read((byte *) dataPtr, dataSize);
byte *data = (byte *) dataPtr;
@@ -111,7 +112,7 @@
while (dataSize > 0x3FFF) {
_io->readChunk(_handle, (byte *) data, 0x3FFF);
dataSize -= 0x3FFF;
- data += 0x3FFF;
+ data += 0x3FFF;
haveRead += 0x3FFF;
}
_io->readChunk(_handle, (byte *) data, dataSize);
@@ -121,11 +122,10 @@
DataIO::DataIO(GobEngine *vm) : _vm(vm) {
for (int i = 0; i < MAX_DATA_FILES; i++) {
- _dataFiles[i] = 0;
- _numDataChunks[i] = 0;
+ _dataFiles[i] = 0;
+ _numDataChunks[i] = 0;
_dataFileHandles[i] = -1;
}
- _packedSize = 0;
}
DataIO::~DataIO() {
@@ -136,6 +136,46 @@
}
}
+bool DataIO::isDataFileChunk(int16 handle) const {
+ return (handle >= 50) && (handle < 128);
+}
+
+bool DataIO::isPacked(int16 handle) const {
+ if (!isDataFileChunk(handle))
+ return false;
+
+ return _chunk[getIndex(handle)]->packed != 0;
+}
+
+int DataIO::getFile(int16 handle) const {
+ if (!isDataFileChunk(handle))
+ return -1;
+
+ return (handle - 50) / 10;
+}
+
+int DataIO::getSlot(int16 handle) const {
+ if (!isDataFileChunk(handle))
+ return -1;
+
+ return (handle - 50) % 10;
+}
+
+int DataIO::getIndex(int16 handle) const {
+ if (!isDataFileChunk(handle))
+ return -1;
+
+ return getIndex(getFile(handle), getSlot(handle));
+}
+
+int DataIO::getIndex(int file, int slot) const {
+ return file * MAX_SLOT_COUNT + slot;
+}
+
+int16 DataIO::getHandle(int file, int slot) const {
+ return file * 10 + slot + 50;
+}
+
int32 DataIO::unpackData(byte *src, byte *dest) {
uint32 realSize;
uint32 counter;
@@ -222,13 +262,11 @@
}
int16 DataIO::getChunk(const char *chunkName) {
- int16 slot;
- struct ChunkDesc *dataDesc;
-
for (int16 file = 0; file < MAX_DATA_FILES; file++) {
if (_dataFiles[file] == 0)
return -1;
+ int16 slot;
for (slot = 0; slot < MAX_SLOT_COUNT; slot++)
if (_chunkPos[file * MAX_SLOT_COUNT + slot] == -1)
break;
@@ -238,59 +276,55 @@
return -1;
}
- dataDesc = _dataFiles[file];
+ ChunkDesc *dataDesc = _dataFiles[file];
for (uint16 chunk = 0; chunk < _numDataChunks[file]; chunk++, dataDesc++) {
if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0)
continue;
- _isCurrentSlot[file * MAX_SLOT_COUNT + slot] = false;
- _chunkSize[file * MAX_SLOT_COUNT + slot] = dataDesc->size;
- _chunkOffset[file * MAX_SLOT_COUNT + slot] = dataDesc->offset;
- _chunkPos[file * MAX_SLOT_COUNT + slot] = 0;
- return file * 10 + slot + 50;
+ int index = getIndex(file, slot);
+
+ _isCurrentSlot[index] = false;
+ _chunk [index] = dataDesc;
+ _chunkPos [index] = 0;
+
+ return getHandle(file, slot);
}
}
return -1;
}
char DataIO::freeChunk(int16 handle) {
- if ((handle >= 50) && (handle < 128)) {
- handle -= 50;
- _chunkPos[(handle / 10) * MAX_SLOT_COUNT + (handle % 10)] = -1;
+ if (isDataFileChunk(handle)) {
+ _chunkPos[getIndex(handle)] = -1;
return 0;
}
return 1;
}
int32 DataIO::readChunk(int16 handle, byte *buf, uint16 size) {
- int16 file;
- int16 slot;
- int16 i;
- int32 offset;
-
- if ((handle < 50) || (handle >= 128))
+ if (!isDataFileChunk(handle))
return -2;
- file = (handle - 50) / 10;
- slot = (handle - 50) % 10;
- int index = file * MAX_SLOT_COUNT + slot;
+ int file = getFile(handle);
+ int slot = getSlot(handle);
+ int index = getIndex(file, slot);
- _chunkPos[index] = CLIP<int32>(_chunkPos[index], 0, _chunkSize[index]);
+ _chunkPos[index] = CLIP<int32>(_chunkPos[index], 0, _chunk[index]->size);
if (!_isCurrentSlot[index]) {
- for (i = 0; i < MAX_SLOT_COUNT; i++)
+ for (int16 i = 0; i < MAX_SLOT_COUNT; i++)
_isCurrentSlot[file * MAX_SLOT_COUNT + i] = false;
- offset = _chunkOffset[index] + _chunkPos[index];
+ int32 offset = _chunk[index]->offset + _chunkPos[index];
- debugC(7, kDebugFileIO, "seek: %d, %d", _chunkOffset[index], _chunkPos[index]);
+ debugC(7, kDebugFileIO, "seek: %d, %d", _chunk[index]->offset, _chunkPos[index]);
file_getHandle(_dataFileHandles[file])->seek(offset, SEEK_SET);
}
_isCurrentSlot[index] = true;
- if ((_chunkPos[index] + size) > (_chunkSize[index]))
- size = _chunkSize[index] - _chunkPos[index];
+ if ((_chunkPos[index] + size) > (int32) (_chunk[index]->size))
+ size = _chunk[index]->size - _chunkPos[index];
file_getHandle(_dataFileHandles[file])->read(buf, size);
_chunkPos[index] += size;
@@ -298,15 +332,12 @@
}
int16 DataIO::seekChunk(int16 handle, int32 pos, int16 from) {
- int16 file;
- int16 slot;
-
- if ((handle < 50) || (handle >= 128))
+ if (!isDataFileChunk(handle))
return -1;
- file = (handle - 50) / 10;
- slot = (handle - 50) % 10;
- int index = file * MAX_SLOT_COUNT + slot;
+ int file = getFile(handle);
+ int slot = getSlot(handle);
+ int index = getIndex(file, slot);
_isCurrentSlot[index] = false;
if (from == SEEK_SET)
@@ -314,50 +345,45 @@
else if (from == SEEK_CUR)
_chunkPos[index] += pos;
else if (from == SEEK_END)
- _chunkPos[index] = _chunkSize[index] - pos;
+ _chunkPos[index] = _chunk[index]->size - pos;
return _chunkPos[index];
}
uint32 DataIO::getChunkPos(int16 handle) const {
- int16 file;
- int16 slot;
-
- if ((handle < 50) || (handle >= 128))
+ if (!isDataFileChunk(handle))
return 0xFFFFFFFF;
- file = (handle - 50) / 10;
- slot = (handle - 50) % 10;
+ int file = getFile(handle);
+ int slot = getSlot(handle);
return _chunkPos[file * MAX_SLOT_COUNT + slot];
}
-int32 DataIO::getChunkSize(const char *chunkName) {
- int16 file;
- struct ChunkDesc *dataDesc;
- int16 slot;
- int32 realSize;
-
- for (file = 0; file < MAX_DATA_FILES; file++) {
+int32 DataIO::getChunkSize(const char *chunkName, int32 &packSize) {
+ for (int16 file = 0; file < MAX_DATA_FILES; file++) {
if (_dataFiles[file] == 0)
return -1;
- dataDesc = _dataFiles[file];
+ ChunkDesc *dataDesc = _dataFiles[file];
for (uint16 chunk = 0; chunk < _numDataChunks[file]; chunk++, dataDesc++) {
if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0)
continue;
if (dataDesc->packed == 0) {
- _packedSize = -1;
+ packSize = -1;
return dataDesc->size;
}
- for (slot = 0; slot < MAX_SLOT_COUNT; slot++)
+ for (int16 slot = 0; slot < MAX_SLOT_COUNT; slot++)
_isCurrentSlot[slot] = false;
+ int32 realSize;
+
file_getHandle(_dataFileHandles[file])->seek(dataDesc->offset, SEEK_SET);
realSize = file_getHandle(_dataFileHandles[file])->readUint32LE();
- _packedSize = dataDesc->size;
+ packSize = dataDesc->size;
+
return realSize;
}
}
@@ -365,10 +391,7 @@
}
void DataIO::openDataFile(const char *src, bool itk) {
- ChunkDesc *dataDesc;
char path[128];
- int16 file;
- char *fakeTotPtr;
strncpy0(path, src, 127);
if (!strchr(path, '.')) {
@@ -376,6 +399,7 @@
strcat(path, ".stk");
}
+ int16 file;
for (file = 0; file < MAX_DATA_FILES; file++)
if (_dataFiles[file] == 0)
break;
@@ -388,17 +412,17 @@
if (_dataFileHandles[file] == -1)
error("DataIO::openDataFile(): Can't open data file \"%s\"", path);
- _dataFileItk[file] = itk;
+ _dataFileItk [file] = itk;
_numDataChunks[file] = file_getHandle(_dataFileHandles[file])->readUint16LE();
debugC(7, kDebugFileIO, "DataChunks: %d [for %s]", _numDataChunks[file], path);
- dataDesc = new ChunkDesc[_numDataChunks[file]];
+ ChunkDesc *dataDesc = new ChunkDesc[_numDataChunks[file]];
_dataFiles[file] = dataDesc;
for (int i = 0; i < _numDataChunks[file]; i++) {
file_getHandle(_dataFileHandles[file])->read(dataDesc[i].chunkName, 13);
- dataDesc[i].size = file_getHandle(_dataFileHandles[file])->readUint32LE();
+ dataDesc[i].size = file_getHandle(_dataFileHandles[file])->readUint32LE();
dataDesc[i].offset = file_getHandle(_dataFileHandles[file])->readUint32LE();
dataDesc[i].packed = file_getHandle(_dataFileHandles[file])->readByte();
@@ -410,7 +434,7 @@
Util::replaceChar(dataDesc[i].chunkName, (char) 0x92, 'T');
// Geisha use 0ot files, which are compressed TOT files without the packed byte set.
- fakeTotPtr = strstr(dataDesc[i].chunkName, "0OT");
+ char *fakeTotPtr = strstr(dataDesc[i].chunkName, "0OT");
if (fakeTotPtr != 0) {
strncpy(fakeTotPtr, "TOT", 3);
dataDesc[i].packed = 1;
@@ -436,33 +460,29 @@
}
byte *DataIO::getUnpackedData(const char *name) {
- int32 realSize;
- int16 chunk;
- byte *unpackBuf;
- byte *packBuf;
- byte *ptr;
- int32 sizeLeft;
+ int32 realSize, packSize;
- realSize = getChunkSize(name);
- if ((_packedSize == -1) || (realSize == -1))
+ realSize = getChunkSize(name, packSize);
+
+ if ((packSize == -1) || (realSize == -1))
return 0;
- chunk = getChunk(name);
+ int16 chunk = getChunk(name);
if (chunk == -1)
return 0;
- unpackBuf = new byte[realSize];
+ byte *unpackBuf = new byte[realSize];
assert(unpackBuf);
- packBuf = new byte[_packedSize];
+ byte *packBuf = new byte[packSize];
assert(packBuf);
- sizeLeft = _packedSize;
- ptr = packBuf;
+ int32 sizeLeft = packSize;
+ byte *ptr = packBuf;
while (sizeLeft > 0x4000) {
readChunk(chunk, ptr, 0x4000);
sizeLeft -= 0x4000;
- ptr += 0x4000;
+ ptr += 0x4000;
}
readChunk(chunk, ptr, sizeLeft);
freeChunk(chunk);
@@ -478,9 +498,7 @@
}
int16 DataIO::openData(const char *path) {
- int16 handle;
-
- handle = getChunk(path);
+ int16 handle = getChunk(path);
if (handle >= 0)
return handle;
@@ -492,7 +510,6 @@
return false;
int16 handle = openData(path);
-
if (handle < 0)
return false;
@@ -510,9 +527,7 @@
}
uint32 DataIO::getPos(int16 handle) {
- uint32 resPos;
-
- resPos = getChunkPos(handle);
+ uint32 resPos = getChunkPos(handle);
if (resPos != 0xFFFFFFFF)
return resPos;
@@ -520,9 +535,7 @@
}
void DataIO::seekData(int16 handle, int32 pos, int16 from) {
- int32 resPos;
-
- resPos = seekChunk(handle, pos, from);
+ int32 resPos = seekChunk(handle, pos, from);
if (resPos != -1)
return;
@@ -530,9 +543,7 @@
}
int32 DataIO::readData(int16 handle, byte *buf, uint16 size) {
- int32 res;
-
- res = readChunk(handle, buf, size);
+ int16 res = readChunk(handle, buf, size);
if (res >= 0)
return res;
@@ -541,45 +552,42 @@
int32 DataIO::getDataSize(const char *name) {
char buf[128];
- int32 chunkSz;
- Common::File file;
strncpy0(buf, name, 127);
- chunkSz = getChunkSize(buf);
- if (chunkSz >= 0)
- return chunkSz;
+ int32 chunkSize, packSize;
+ chunkSize = getChunkSize(buf, packSize);
+ if (chunkSize >= 0)
+ return chunkSize;
+
+ Common::File file;
if (!file.open(buf))
error("DataIO::getDataSize(): Can't find data \"%s\"", name);
- chunkSz = file.size();
+ chunkSize = file.size();
file.close();
- return chunkSz;
+ return chunkSize;
}
byte *DataIO::getData(const char *path) {
- byte *data;
- byte *ptr;
- int32 size;
- int16 handle;
-
- data = getUnpackedData(path);
+ byte *data = getUnpackedData(path);
if (data)
return data;
- size = getDataSize(path);
+ int32 size = getDataSize(path);
+
data = new byte[size];
assert(data);
- handle = openData(path);
+ int16 handle = openData(path);
- ptr = data;
+ byte *ptr = data;
while (size > 0x4000) {
readData(handle, ptr, 0x4000);
size -= 0x4000;
- ptr += 0x4000;
+ ptr += 0x4000;
}
readData(handle, ptr, size);
closeData(handle);
@@ -588,12 +596,26 @@
DataStream *DataIO::getDataStream(const char *path) {
if (!existData(path))
+ return 0;
+
+ int16 handle = openData(path);
+ if (handle < 0)
return 0;
- uint32 size = getDataSize(path);
- byte *data = getData(path);
+ if (isDataFileChunk(handle) && isPacked(handle)) {
+ // It's a packed chunk in the data files, packed,
+ // so we have to read it in completely and unpack it
- return new DataStream(data, size);
+ closeData(handle);
+
+ uint32 size = getDataSize(path);
+ byte *data = getData(path);
+
+ return new DataStream(data, size);
+
+ } else
+ // Otherwise, we can just return a stream
+ return openAsStream(handle, true);
}
} // End of namespace Gob
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/dataio.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/dataio.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/dataio.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -26,16 +26,14 @@
#ifndef GOB_DATAIO_H
#define GOB_DATAIO_H
-
#include "common/endian.h"
-
#include "common/file.h"
namespace Gob {
-#define MAX_FILES 30
-#define MAX_DATA_FILES 8
-#define MAX_SLOT_COUNT 8
+#define MAX_FILES 30
+#define MAX_DATA_FILES 8
+#define MAX_SLOT_COUNT 8
class DataIO;
@@ -56,20 +54,20 @@
private:
DataIO *_io;
- int16 _handle;
- uint32 _size;
- byte *_data;
+ int16 _handle;
+ uint32 _size;
+ byte *_data;
+ bool _dispose;
Common::MemoryReadStream *_stream;
- bool _dispose;
};
class DataIO {
public:
struct ChunkDesc {
- char chunkName[13];
+ char chunkName[13];
uint32 size;
uint32 offset;
- byte packed;
+ byte packed;
ChunkDesc() : size(0), offset(0), packed(0) { chunkName[0] = 0; }
};
@@ -77,10 +75,13 @@
void openDataFile(const char *src, bool itk = 0);
void closeDataFile(bool itk = 0);
+
byte *getUnpackedData(const char *name);
- void closeData(int16 handle);
+
+ void closeData(int16 handle);
int16 openData(const char *path);
- bool existData(const char *path);
+ bool existData(const char *path);
+
DataStream *openAsStream(int16 handle, bool dispose = false);
int32 getDataSize(const char *name);
@@ -92,34 +93,47 @@
protected:
Common::File _filesHandles[MAX_FILES];
- struct ChunkDesc *_dataFiles[MAX_DATA_FILES];
- uint16 _numDataChunks[MAX_DATA_FILES];
- int16 _dataFileHandles[MAX_DATA_FILES];
- bool _dataFileItk[MAX_DATA_FILES];
- int32 _chunkPos[MAX_SLOT_COUNT * MAX_DATA_FILES];
- int32 _chunkOffset[MAX_SLOT_COUNT * MAX_DATA_FILES];
- int32 _chunkSize[MAX_SLOT_COUNT * MAX_DATA_FILES];
- bool _isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES];
- int32 _packedSize;
+ ChunkDesc *_dataFiles [MAX_DATA_FILES];
+ uint16 _numDataChunks [MAX_DATA_FILES];
+ int16 _dataFileHandles[MAX_DATA_FILES];
+ bool _dataFileItk [MAX_DATA_FILES];
+
+ ChunkDesc *_chunk [MAX_SLOT_COUNT * MAX_DATA_FILES];
+ int32 _chunkPos [MAX_SLOT_COUNT * MAX_DATA_FILES];
+ bool _isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES];
+
class GobEngine *_vm;
+ bool isDataFileChunk(int16 handle) const;
+ bool isPacked (int16 handle) const;
+
+ int getFile (int16 handle) const;
+ int getSlot (int16 handle) const;
+ int getIndex(int16 handle) const;
+
+ int getIndex (int file, int slot) const;
+ int16 getHandle(int file, int slot) const;
+
int16 file_open(const char *path);
Common::File *file_getHandle(int16 handle);
const Common::File *file_getHandle(int16 handle) const;
int16 getChunk(const char *chunkName);
- char freeChunk(int16 handle);
+ char freeChunk(int16 handle);
int32 readChunk(int16 handle, byte *buf, uint16 size);
int16 seekChunk(int16 handle, int32 pos, int16 from);
+
uint32 getChunkPos(int16 handle) const;
- int32 getChunkSize(const char *chunkName);
+ int32 getChunkSize(const char *chunkName, int32 &packSize);
+
uint32 getPos(int16 handle);
- void seekData(int16 handle, int32 pos, int16 from);
+ void seekData(int16 handle, int32 pos, int16 from);
+
int32 readData(int16 handle, byte *buf, uint16 size);
-friend class DataStream;
+ friend class DataStream;
};
} // End of namespace Gob
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/draw_v2.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -46,6 +46,8 @@
}
void Draw_v2::initScreen() {
+ _vm->_game->_preventScroll = false;
+
_scrollOffsetX = 0;
_scrollOffsetY = 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/game.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/game.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -181,11 +181,13 @@
_handleMouse = 0;
_forceHandleMouse = 0;
- _menuLevel = 0;
_noScroll = true;
_preventScroll = false;
- _scrollHandleMouse = false;
+ _wantScroll = false;
+ _wantScrollX = 0;
+ _wantScrollY = 0;
+
_tempStr[0] = 0;
_numEnvironments = 0;
@@ -360,9 +362,7 @@
_vm->_scenery->_pCaptureCounter = oldCaptureCounter;
_script->seek(_script->getFunctionOffset(skipPlay + 1));
- _menuLevel++;
_vm->_inter->callSub(2);
- _menuLevel--;
if (_vm->_inter->_terminate != 0)
_vm->_inter->_terminate = 2;
@@ -439,22 +439,27 @@
_vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(slot));
}
-void Game::evaluateScroll(int16 x, int16 y) {
- if (_preventScroll || !_scrollHandleMouse || (_menuLevel > 0))
+void Game::wantScroll(int16 x, int16 y) {
+ _wantScroll = true;
+ _wantScrollX = x;
+ _wantScrollY = y;
+}
+
+void Game::evaluateScroll() {
+ if (_noScroll || _preventScroll || !_wantScroll)
return;
- if (_noScroll ||
- ((_vm->_global->_videoMode != 0x14) && (_vm->_global->_videoMode != 0x18)))
+ if ((_vm->_global->_videoMode != 0x14) && (_vm->_global->_videoMode != 0x18))
return;
- if ((x == 0) && (_vm->_draw->_scrollOffsetX > 0)) {
+ if ((_wantScrollX == 0) && (_vm->_draw->_scrollOffsetX > 0)) {
uint16 off;
off = MIN(_vm->_draw->_cursorWidth, _vm->_draw->_scrollOffsetX);
off = MAX(off / 2, 1);
_vm->_draw->_scrollOffsetX -= off;
_vm->_video->dirtyRectsAll();
- } else if ((y == 0) && (_vm->_draw->_scrollOffsetY > 0)) {
+ } else if ((_wantScrollY == 0) && (_vm->_draw->_scrollOffsetY > 0)) {
uint16 off;
off = MIN(_vm->_draw->_cursorHeight, _vm->_draw->_scrollOffsetY);
@@ -463,9 +468,9 @@
_vm->_video->dirtyRectsAll();
}
- int16 cursorRight = x + _vm->_draw->_cursorWidth;
- int16 screenRight = _vm->_draw->_scrollOffsetX + _vm->_width;
- int16 cursorBottom = y + _vm->_draw->_cursorHeight;
+ int16 cursorRight = _wantScrollX + _vm->_draw->_cursorWidth;
+ int16 screenRight = _vm->_draw->_scrollOffsetX + _vm->_width;
+ int16 cursorBottom = _wantScrollY + _vm->_draw->_cursorHeight;
int16 screenBottom = _vm->_draw->_scrollOffsetY + _vm->_height;
if ((cursorRight >= _vm->_width) &&
@@ -479,7 +484,7 @@
_vm->_draw->_scrollOffsetX += off;
_vm->_video->dirtyRectsAll();
- _vm->_util->setMousePos(_vm->_width - _vm->_draw->_cursorWidth, y);
+ _vm->_util->setMousePos(_vm->_width - _vm->_draw->_cursorWidth, _wantScrollY);
} else if ((cursorBottom >= (_vm->_height - _vm->_video->_splitHeight2)) &&
(screenBottom < _vm->_video->_surfHeight)) {
uint16 off;
@@ -491,11 +496,13 @@
_vm->_draw->_scrollOffsetY += off;
_vm->_video->dirtyRectsAll();
- _vm->_util->setMousePos(x, _vm->_height - _vm->_video->_splitHeight2 -
- _vm->_draw->_cursorHeight);
+ _vm->_util->setMousePos(_wantScrollX,
+ _vm->_height - _vm->_video->_splitHeight2 - _vm->_draw->_cursorHeight);
}
_vm->_util->setScrollOffset();
+
+ _wantScroll = false;
}
int16 Game::checkKeys(int16 *pMouseX, int16 *pMouseY,
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/game.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/game.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/game.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -82,8 +82,11 @@
bool _noScroll;
bool _preventScroll;
- bool _scrollHandleMouse;
+ bool _wantScroll;
+ int16 _wantScrollX;
+ int16 _wantScrollY;
+
byte _handleMouse;
char _forceHandleMouse;
@@ -99,7 +102,8 @@
void freeSoundSlot(int16 slot);
- void evaluateScroll(int16 x, int16 y);
+ void wantScroll(int16 x, int16 y);
+ void evaluateScroll();
int16 checkKeys(int16 *pMousex = 0, int16 *pMouseY = 0,
MouseButtons *pButtons = 0, char handleMouse = 0);
@@ -109,8 +113,6 @@
void switchTotSub(int16 index, int16 skipPlay);
protected:
- uint32 _menuLevel;
-
char _tempStr[256];
// Capture
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/hotspots.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/hotspots.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/hotspots.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -628,8 +628,6 @@
}
uint16 Hotspots::check(uint8 handleMouse, int16 delay, uint16 &id, uint16 &index) {
- _vm->_game->_scrollHandleMouse = handleMouse != 0;
-
if (delay >= -1) {
_currentKey = 0;
_currentId = 0;
@@ -679,6 +677,9 @@
_vm->_video->waitRetrace();
}
+ if (handleMouse)
+ _vm->_game->evaluateScroll();
+
// Update keyboard and mouse state
key = _vm->_game->checkKeys(&_vm->_global->_inter_mouseX,
&_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons, handleMouse);
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/inter_v2.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/inter_v2.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -935,6 +935,8 @@
offsetY = _vm->_game->_script->readValExpr();
if (offsetX == -1) {
+ _vm->_game->_preventScroll = !_vm->_game->_preventScroll;
+
WRITE_VAR(2, _vm->_draw->_scrollOffsetX);
WRITE_VAR(3, _vm->_draw->_scrollOffsetY);
} else {
@@ -996,11 +998,8 @@
close = false;
}
- if (startFrame >= 0) {
- _vm->_game->_preventScroll = true;
+ if (startFrame >= 0)
_vm->_vidPlayer->primaryPlay(startFrame, lastFrame, breakKey, palCmd, palStart, palEnd, 0);
- _vm->_game->_preventScroll = false;
- }
if (close)
_vm->_vidPlayer->primaryClose();
@@ -1306,8 +1305,14 @@
char *file = _vm->_game->_script->getResultStr();
+ // WORKAROUND: In some games (at least all the Playtoons), some files are
+ // read on CD (and only on CD). "@:\" is replaced by the CD drive letter.
+ // As the files are copied on the HDD, those characters are skipped.
+ if (strncmp(file, "@:\\", 3) ==0 )
+ file += 3;
+
// WORKAROUND: For some reason, the variable indicating which TOT to load next
- // is overwritten in the guard house card game in Woodruff
+ // is overwritten in the guard house card game in Woodruff.
if ((_vm->getGameType() == kGameTypeWoodruff) && !scumm_stricmp(file, "6.TOT"))
strcpy(file, "EMAP2011.TOT");
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/inter_v4.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/inter_v4.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/inter_v4.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -233,11 +233,8 @@
return;
}
- if (startFrame >= 0) {
- _vm->_game->_preventScroll = true;
+ if (startFrame >= 0)
_vm->_vidPlayer->primaryPlay(startFrame, lastFrame, breakKey, palCmd, palStart, palEnd, 0);
- _vm->_game->_preventScroll = false;
- }
if (close)
_vm->_vidPlayer->primaryClose();
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/inter_v6.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/inter_v6.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -164,12 +164,9 @@
return;
}
- if (startFrame >= 0) {
- _vm->_game->_preventScroll = true;
+ if (startFrame >= 0)
_vm->_vidPlayer->primaryPlay(startFrame, lastFrame, breakKey,
palCmd, palStart, palEnd, 0, -1, false, -1, true);
- _vm->_game->_preventScroll = false;
- }
if (close)
_vm->_vidPlayer->primaryClose();
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/mult_v2.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/mult_v2.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/mult_v2.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -1105,8 +1105,6 @@
int16 baseFrame, palFrame, lastFrame;
uint16 flags;
- _vm->_game->_preventScroll = true;
-
if (_vm->_draw->_renderFlags & 0x100) {
x = VAR(55);
y = VAR(56);
@@ -1115,7 +1113,6 @@
if (key.imdFile == -1) {
_vm->_vidPlayer->primaryClose();
- _vm->_game->_preventScroll = false;
return;
}
@@ -1131,15 +1128,12 @@
if ((palFrame != -1) && (lastFrame != -1))
if ((lastFrame - palFrame) < startFrame)
if (!(key.flags & 0x4000)) {
- _vm->_game->_preventScroll = false;
_vm->_vidPlayer->primaryClose();
return;
}
- if (!_vm->_vidPlayer->primaryOpen(imdFile, x, y, flags)) {
- _vm->_game->_preventScroll = false;
+ if (!_vm->_vidPlayer->primaryOpen(imdFile, x, y, flags))
return;
- }
if (palFrame == -1)
palFrame = 0;
@@ -1265,9 +1259,6 @@
}
}
- if (!hasImds && (_vm->_draw->_showCursor == 3))
- _vm->_game->_preventScroll = false;
-
doSoundAnim(stop, frame);
WRITE_VAR(22, frame);
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/save/saveload_playtoons.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/save/saveload_playtoons.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/save/saveload_playtoons.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -47,6 +47,8 @@
{ "titre.007", kSaveModeExists, 0, 0}, // Playtoons CK 2 empty title (???)
{ "titre.008", kSaveModeExists, 0, 0}, // Playtoons CK 3 empty title (???)
{ "mdo.def", kSaveModeExists, 0, 0},
+ { "dan.itk", kSaveModeNone, 0, 0},
+ { "did.inf", kSaveModeSave, 0, 0},
};
SaveLoad::SaveMode SaveLoad_Playtoons::getSaveMode(const char *fileName) const {
Modified: scummvm/branches/gsoc2009-16bit/engines/gob/util.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/gob/util.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/gob/util.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -141,7 +141,8 @@
y -= _vm->_video->_screenDeltaY;
_vm->_util->setMousePos(x, y);
- _vm->_game->evaluateScroll(x, y);
+
+ _vm->_game->wantScroll(x, y);
}
}
Modified: scummvm/branches/gsoc2009-16bit/engines/groovie/music.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/groovie/music.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/groovie/music.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -35,7 +35,7 @@
MusicPlayer::MusicPlayer(GroovieEngine *vm) :
_vm(vm), _isPlaying(false), _backgroundFileRef(0), _gameVolume(100),
- _prevCDtrack(0) {
+ _prevCDtrack(0), _backgroundDelay(0) {
}
void MusicPlayer::playSong(uint32 fileref) {
@@ -56,6 +56,18 @@
_backgroundFileRef = fileref;
}
+void MusicPlayer::frameTick() {
+ if (_backgroundDelay > 0) {
+ _backgroundDelay--;
+ if (_backgroundDelay == 0)
+ playSong(_backgroundFileRef);
+ }
+}
+
+void MusicPlayer::setBackgroundDelay(uint16 delay) {
+ _backgroundDelay = delay;
+}
+
void MusicPlayer::playCD(uint8 track) {
int startms = 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/groovie/music.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/groovie/music.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/groovie/music.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -44,6 +44,9 @@
void playCD(uint8 track);
void startBackground();
+ void frameTick();
+ void setBackgroundDelay(uint16 delay);
+
// Volume
void setUserVolume(uint16 volume);
void setGameVolume(uint16 volume, uint16 time);
@@ -55,6 +58,8 @@
uint32 _backgroundFileRef;
uint8 _prevCDtrack;
+ uint16 _backgroundDelay;
+
// Volume fading
uint32 _fadingStartTime;
uint16 _fadingStartVolume;
Modified: scummvm/branches/gsoc2009-16bit/engines/groovie/script.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/groovie/script.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/groovie/script.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -579,6 +579,7 @@
// Video available, play one frame
if (_videoFile) {
bool endVideo = _vm->_videoPlayer->playFrame();
+ _vm->_musicPlayer->frameTick();
if (endVideo) {
// Close the file
@@ -1506,6 +1507,14 @@
_vm->_musicPlayer->playCD(val);
}
+void Script::o_musicdelay() {
+ uint16 delay = readScript16bits();
+
+ debugScript(1, true, "MUSICDELAY %d", delay);
+
+ _vm->_musicPlayer->setBackgroundDelay(delay);
+}
+
void Script::o_hotspot_outrect() {
uint16 left = readScript16bits();
uint16 top = readScript16bits();
@@ -1687,8 +1696,8 @@
&Script::o_nop8,
&Script::o_getcd, // 0x4C
&Script::o_playcd,
+ &Script::o_musicdelay,
&Script::o_nop16,
- &Script::o_nop16,
&Script::o_nop16, // 0x50
&Script::o_nop16,
//&Script::o_nop8,
Modified: scummvm/branches/gsoc2009-16bit/engines/groovie/script.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/groovie/script.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/groovie/script.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -220,6 +220,7 @@
void o_sethotspotleft();
void o_getcd();
void o_playcd();
+ void o_musicdelay();
void o_hotspot_outrect();
void o_stub56();
void o_stub59();
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/gui.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/gui.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/gui.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -95,7 +95,8 @@
if (_vm->gameFlags().gameID == GI_LOL) {
printMenuText(getMenuTitle(menu), textX, textY, menu.textColor, 0, 9);
} else {
- printMenuText(getMenuTitle(menu), textX - 1, textY + 1, defaultColor1(), defaultColor2(), 0);
+ if (_vm->gameFlags().platform != Common::kPlatformAmiga)
+ printMenuText(getMenuTitle(menu), textX - 1, textY + 1, defaultColor1(), defaultColor2(), 0);
printMenuText(getMenuTitle(menu), textX, textY, menu.textColor, 0, 0);
}
@@ -142,7 +143,9 @@
else
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 8);
} else {
- printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
+ if (_vm->gameFlags().platform != Common::kPlatformAmiga)
+ printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
+
if (i == menu.highlightedItem)
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 0);
else
@@ -158,7 +161,8 @@
menu.item[i].labelY = menu.item[i].y + 3;
printMenuText(getMenuItemLabel(menu.item[i]), menu.x + menu.item[i].labelX, menu.y + menu.item[i].labelY, menu.item[i].textColor, 0, 10);
} else {
- printMenuText(getMenuItemLabel(menu.item[i]), menu.x + menu.item[i].labelX - 1, menu.y + menu.item[i].labelY + 1, defaultColor1(), 0, 0);
+ if (_vm->gameFlags().platform != Common::kPlatformAmiga)
+ printMenuText(getMenuItemLabel(menu.item[i]), menu.x + menu.item[i].labelX - 1, menu.y + menu.item[i].labelY + 1, defaultColor1(), 0, 0);
printMenuText(getMenuItemLabel(menu.item[i]), menu.x + menu.item[i].labelX, menu.y + menu.item[i].labelY, menu.item[i].textColor, 0, 0);
}
}
@@ -253,7 +257,8 @@
textY++;
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 8);
} else {
- printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
+ if (_vm->gameFlags().platform != Common::kPlatformAmiga)
+ printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 0);
}
}
@@ -278,7 +283,8 @@
textY++;
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 8);
} else {
- printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
+ if (_vm->gameFlags().platform != Common::kPlatformAmiga)
+ printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 0);
}
}
@@ -324,7 +330,10 @@
return 0;
_screen->hideMouse();
- _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 0xF8);
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 17);
+ else
+ _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 0xF8);
_screen->showMouse();
return 0;
@@ -335,7 +344,10 @@
return 0;
_screen->hideMouse();
- _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xF9, 0xFA);
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 31, 18);
+ else
+ _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xF9, 0xFA);
_screen->showMouse();
return 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -56,10 +56,10 @@
return 0;
} else {
_screen->hideMouse();
- _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12);
+ _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12);
snd_playSoundEffect(0x35);
setMouseItem(inventoryItem);
- updateSentenceCommand(_itemList[inventoryItem], _takenList[0], 179);
+ updateSentenceCommand(_itemList[getItemListIndex(inventoryItem)], _takenList[0], 179);
_itemInHand = inventoryItem;
_screen->showMouse();
_currentCharacter->inventoryItems[itemOffset] = 0xFF;
@@ -68,10 +68,14 @@
if (inventoryItem != 0xFF) {
snd_playSoundEffect(0x35);
_screen->hideMouse();
- _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12);
+ _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12);
_screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0);
setMouseItem(inventoryItem);
- updateSentenceCommand(_itemList[inventoryItem], _takenList[1], 179);
+ // TODO: Proper support for both taken strings in Amiga version
+ if (_flags.platform == Common::kPlatformAmiga)
+ updateSentenceCommand(_itemList[getItemListIndex(inventoryItem)], _takenList[0], 179);
+ else
+ updateSentenceCommand(_itemList[getItemListIndex(inventoryItem)], _takenList[1], 179);
_screen->showMouse();
_currentCharacter->inventoryItems[itemOffset] = _itemInHand;
_itemInHand = inventoryItem;
@@ -80,7 +84,7 @@
_screen->hideMouse();
_screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0);
_screen->setMouseCursor(1, 1, _shapes[0]);
- updateSentenceCommand(_itemList[_itemInHand], _placedList[0], 179);
+ updateSentenceCommand(_itemList[getItemListIndex(_itemInHand)], _placedList[0], 179);
_screen->showMouse();
_currentCharacter->inventoryItems[itemOffset] = _itemInHand;
_itemInHand = -1;
@@ -365,6 +369,10 @@
offsetOptions = 10;
offsetOn = 0;
walkspeedGarbageOffset = 0;
+ } else if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
+ // English Amiga version
+ offsetOptions = 8;
+ walkspeedGarbageOffset = 2;
}
assert(offset + 27 < _vm->_guiStringsSize);
@@ -448,8 +456,14 @@
_vm->snd_playSoundEffect(0x36);
return 0;
}
- // XXX
- _screen->setPaletteIndex(0xFE, 60, 60, 0);
+
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
+ _screen->setPaletteIndex(0x10, 0x3F, 0x3F, 0x3F);
+ _screen->setInterfacePalette(_screen->getPalette(1), 0x3F, 0x3F, 0x3F);
+ } else {
+ _screen->setPaletteIndex(0xFE, 60, 60, 0);
+ }
+
for (int i = 0; i < 6; i++) {
_menuButtonData[i].data0Val1 = _menuButtonData[i].data1Val1 = _menuButtonData[i].data2Val1 = 4;
_menuButtonData[i].data0Callback = _redrawShadedButtonFunctor;
@@ -681,6 +695,7 @@
}
int GUI_LoK::saveGame(Button *button) {
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
updateMenuButton(button);
_vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot;
@@ -729,6 +744,7 @@
}
}
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
return 0;
}
@@ -921,6 +937,9 @@
menu.item[3].itemString = "ERROR";
}
} else {
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ clickableOffset = 5;
+
menu.item[4].enabled = 0;
menu.item[4].labelString = 0;
}
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/gui_v2.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/gui_v2.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -661,7 +661,9 @@
initMenu(_savenameMenu);
_screen->fillRect(0x26, 0x5B, 0x11F, 0x66, textFieldColor2());
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
const char *desc = nameInputProcess(_saveDescription, 0x27, 0x5C, textFieldColor1(), textFieldColor2(), textFieldColor3(), 0x50);
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
restorePage1(_vm->_screenBuffer);
backUpPage1(_vm->_screenBuffer);
if (desc) {
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/items_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/items_lok.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/items_lok.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -414,7 +414,7 @@
if (unk1 == 0 && unk2 != 0) {
assert(_itemList && _droppedList);
- updateSentenceCommand(_itemList[item], _droppedList[0], 179);
+ updateSentenceCommand(_itemList[getItemListIndex(item)], _droppedList[0], 179);
}
return 1;
@@ -434,7 +434,7 @@
setMouseItem(_itemInHand);
assert(_itemList && _takenList);
- updateSentenceCommand(_itemList[_itemInHand], _takenList[1], 179);
+ updateSentenceCommand(_itemList[getItemListIndex(_itemInHand)], _takenList[1], 179);
_screen->showMouse();
clickEventHandler2();
}
@@ -693,7 +693,7 @@
if (itemPos != -1) {
restoreItemRect1(x, y);
- _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0);
+ _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0);
backUpItemRect1(x, y);
}
@@ -715,7 +715,7 @@
} else {
_characterList[0].inventoryItems[itemPos] = 0xFF;
_screen->hideMouse();
- _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0);
+ _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0);
_screen->showMouse();
}
_screen->showMouse();
@@ -879,7 +879,7 @@
_screen->_curPage = page;
_screen->hideMouse();
for (int i = 0; i < 10; ++i) {
- _screen->fillRect(_itemPosX[i], _itemPosY[i], _itemPosX[i] + 15, _itemPosY[i] + 15, 12, page);
+ _screen->fillRect(_itemPosX[i], _itemPosY[i], _itemPosX[i] + 15, _itemPosY[i] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12, page);
if (_currentCharacter->inventoryItems[i] != 0xFF) {
uint8 item = _currentCharacter->inventoryItems[i];
_screen->drawShape(page, _shapes[216+item], _itemPosX[i], _itemPosY[i], 0, 0);
@@ -910,5 +910,62 @@
_screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]);
}
+int KyraEngine_LoK::getItemListIndex(uint16 item) {
+ if (_flags.platform != Common::kPlatformAmiga)
+ return item;
+
+ // "Unknown item" is at 81.
+ if (item == 0xFFFF || item == 0xFF)
+ return 81;
+ // The first item names are mapped directly
+ else if (item <= 28)
+ return item;
+ // There's only one string for "Fireberries"
+ else if (item >= 29 && item <= 33)
+ return 29;
+ // Correct offsets
+ else if (item >= 34 && item <= 59)
+ return item - 4;
+ // There's only one string for "Red Potion"
+ else if (item >= 60 && item <= 61)
+ return 56;
+ // There's only one string for "Blue Potion"
+ else if (item >= 62 && item <= 63)
+ return 57;
+ // There's only one string for "Yellow Potion"
+ else if (item >= 64 && item <= 65)
+ return 58;
+ // Correct offsets
+ else if (item >= 66 && item <= 69)
+ return item - 7;
+ // There's only one string for "Fresh Water"
+ else if (item >= 70 && item <= 71)
+ return 63;
+ // There's only one string for "Salt Water"
+ else if (item >= 72 && item <= 73)
+ return 64;
+ // There's only one string for "Mineral Water"
+ else if (item >= 74 && item <= 75)
+ return 65;
+ // There's only one string for "Magical Water"
+ else if (item >= 76 && item <= 77)
+ return 66;
+ // There's only one string for "Empty Flask"
+ else if (item >= 78 && item <= 79)
+ return 67;
+ // There's only one string for "Scroll"
+ else if (item >= 80 && item <= 89)
+ return 68;
+ // There's only one string for "Parchment scrap"
+ else if (item >= 90 && item <= 94)
+ return 69;
+ // Correct offsets
+ else if (item >= 95)
+ return item - 25;
+
+ // This should never happen, but still GCC warns about it.
+ return 81;
+}
+
} // end of namespace Kyra
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -363,6 +363,9 @@
loadMainScreen();
_screen->loadPalette("PALETTE.COL", _screen->getPalette(0));
+ if (_flags.platform == Common::kPlatformAmiga)
+ _screen->loadPaletteTable("PALETTE.DAT", 6);
+
// XXX
_animator->initAnimStateList();
setCharactersInDefaultScene();
@@ -664,7 +667,7 @@
currentRoom->itemsTable[item] = 0xFF;
setMouseItem(item2);
assert(_itemList && _takenList);
- updateSentenceCommand(_itemList[item2], _takenList[0], 179);
+ updateSentenceCommand(_itemList[getItemListIndex(item2)], _takenList[0], 179);
_itemInHand = item2;
_screen->showMouse();
clickEventHandler2();
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h 2009-08-11 02:04:17 UTC (rev 43250)
@@ -289,6 +289,8 @@
void removeHandItem();
void setMouseItem(uint16 item);
+ int getItemListIndex(uint16 item);
+
// -> graphics effects
void wipeDownMouseItem(int xpos, int ypos);
void itemSpecialFX(int x, int y, int item);
@@ -520,35 +522,35 @@
const uint8 *_seq_Demo4;
const uint8 *_seq_Reunion;
- const char * const*_seq_WSATable;
- const char * const*_seq_CPSTable;
- const char * const*_seq_COLTable;
- const char * const*_seq_textsTable;
+ const char * const *_seq_WSATable;
+ const char * const *_seq_CPSTable;
+ const char * const *_seq_COLTable;
+ const char * const *_seq_textsTable;
int _seq_WSATable_Size;
int _seq_CPSTable_Size;
int _seq_COLTable_Size;
int _seq_textsTable_Size;
- const char * const*_itemList;
- const char * const*_takenList;
- const char * const*_placedList;
- const char * const*_droppedList;
- const char * const*_noDropList;
- const char * const*_putDownFirst;
- const char * const*_waitForAmulet;
- const char * const*_blackJewel;
- const char * const*_poisonGone;
- const char * const*_healingTip;
- const char * const*_thePoison;
- const char * const*_fluteString;
- const char * const*_wispJewelStrings;
- const char * const*_magicJewelString;
- const char * const*_flaskFull;
- const char * const*_fullFlask;
- const char * const*_veryClever;
- const char * const*_homeString;
- const char * const*_newGameString;
+ const char * const *_itemList;
+ const char * const *_takenList;
+ const char * const *_placedList;
+ const char * const *_droppedList;
+ const char * const *_noDropList;
+ const char * const *_putDownFirst;
+ const char * const *_waitForAmulet;
+ const char * const *_blackJewel;
+ const char * const *_poisonGone;
+ const char * const *_healingTip;
+ const char * const *_thePoison;
+ const char * const *_fluteString;
+ const char * const *_wispJewelStrings;
+ const char * const *_magicJewelString;
+ const char * const *_flaskFull;
+ const char * const *_fullFlask;
+ const char * const *_veryClever;
+ const char * const *_homeString;
+ const char * const *_newGameString;
int _itemList_Size;
int _takenList_Size;
@@ -570,13 +572,13 @@
int _homeString_Size;
int _newGameString_Size;
- const char * const*_characterImageTable;
+ const char * const *_characterImageTable;
int _characterImageTableSize;
- const char * const*_guiStrings;
+ const char * const *_guiStrings;
int _guiStringsSize;
- const char * const*_configStrings;
+ const char * const *_configStrings;
int _configStringsSize;
Shape *_defaultShapeTable;
@@ -614,16 +616,16 @@
Room *_roomTable;
int _roomTableSize;
- const char * const*_roomFilenameTable;
+ const char * const *_roomFilenameTable;
int _roomFilenameTableSize;
const uint8 *_amuleteAnim;
- const uint8 * const*_specialPalettes;
+ const uint8 * const *_specialPalettes;
- const char *const *_soundFiles;
+ const char * const *_soundFiles;
int _soundFilesSize;
- const char *const *_soundFilesIntro;
+ const char * const *_soundFilesIntro;
int _soundFilesIntroSize;
const int32 *_cdaTrackTable;
int _cdaTrackTableSize;
@@ -646,6 +648,9 @@
static const uint16 _amuletY[];
static const uint16 _amuletX2[];
static const uint16 _amuletY2[];
+
+ // special palette handling for AMIGA
+ void setupZanthiaPalette(int pal);
protected:
void setupOpcodeTable();
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -730,7 +730,7 @@
// 16 color mode
{
{ 0, 0, 0, 0, 0 },
- { 0x01, 0x04, 0x0C, 0x03, 0x00, 0xC1, 0xE1 },
+ { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xC1, 0xE1 },
{ 0xCC, 0xDD, 0xDD, 0xDD },
Screen::FID_9_FNT, 1
}
@@ -738,6 +738,9 @@
int dataIndex = _flags.use16ColorMode ? 1 : 0;
+ if (!_flags.isTalkie)
+ --data[dataIndex].menuTable[3];
+
if (hasSave)
++data[dataIndex].menuTable[3];
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp 2009-08-11 01:47:29 UTC (rev 43249)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp 2009-08-11 02:04:17 UTC (rev 43250)
@@ -177,8 +177,8 @@
seq_createAmuletJewel(i-0x55, 10, 1, 1);
}
}
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 10, 8);
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 8, 0);
+
+ _screen->copyRegion(8, 8, 8, 8, 304, 212, 10, 0);
}
setHandItem(_itemInHand);
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list