[Scummvm-cvs-logs] SF.net SVN: scummvm:[43343] scummvm/branches/gsoc2009-16bit
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Thu Aug 13 02:32:15 CEST 2009
Revision: 43343
http://scummvm.svn.sourceforge.net/scummvm/?rev=43343&view=rev
Author: Kirben
Date: 2009-08-13 00:32:15 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
Merged revisions 43245-43249,43251-43252,43257,43260,43262-43264,43266,43268-43270,43272-43280,43282-43285,43287,43289-43290,43292,43294,43299,43301,43303-43304,43307,43314,43318,43320-43326,43329,43332 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r43245 | lordhoto | 2009-08-11 11:24:15 +1000 (Tue, 11 Aug 2009) | 1 line
Some fixes for the Kyrandia 1 Amiga outro.
........
r43246 | lordhoto | 2009-08-11 11:24:40 +1000 (Tue, 11 Aug 2009) | 1 line
Finally fixed the string extraction for Kyrandia 1 Amiga. This should make the intro/outro strings work fine again.
........
r43247 | lordhoto | 2009-08-11 11:24:56 +1000 (Tue, 11 Aug 2009) | 1 line
Some changes to get the Kyrandia 1 Amiga credits to show up at least.
........
r43248 | lordhoto | 2009-08-11 11:31:34 +1000 (Tue, 11 Aug 2009) | 1 line
Fix in-game GUI text input field colors for Kyrandia 1 Amiga.
........
r43249 | lordhoto | 2009-08-11 11:47:29 +1000 (Tue, 11 Aug 2009) | 1 line
Fix crash when using Will-O-Wisp in the grotto.
........
r43251 | lordhoto | 2009-08-11 12:12:09 +1000 (Tue, 11 Aug 2009) | 1 line
Disable "Screen_LoK::fadeSpecialPalette" for Kyrandia 1 Amiga, like the original does.
........
r43252 | lordhoto | 2009-08-11 12:12:24 +1000 (Tue, 11 Aug 2009) | 1 line
Implement palette differences for seq_playDrinkPotionAnim.
........
r43257 | anotherguest | 2009-08-11 17:52:59 +1000 (Tue, 11 Aug 2009) | 1 line
Updated with m4.dat file
........
r43260 | anotherguest | 2009-08-11 18:01:41 +1000 (Tue, 11 Aug 2009) | 1 line
Updated actions to support tinsel and made (from CE version)
........
r43262 | anotherguest | 2009-08-11 19:57:44 +1000 (Tue, 11 Aug 2009) | 1 line
Enable virtual keyboard support, since qvga gfx is now supported.
........
r43263 | anotherguest | 2009-08-11 20:18:10 +1000 (Tue, 11 Aug 2009) | 1 line
Include vkeybd default pack into installation file
........
r43264 | Hkz | 2009-08-11 20:28:15 +1000 (Tue, 11 Aug 2009) | 1 line
Maniac Mansion NES: added workaround to fix dirty screen when loading a narrow room from a full width room
........
r43266 | Hkz | 2009-08-11 20:51:49 +1000 (Tue, 11 Aug 2009) | 1 line
code formatting fixes
........
r43268 | waltervn | 2009-08-11 22:57:51 +1000 (Tue, 11 Aug 2009) | 2 lines
SCI: Turn off logging in debugger.
........
r43269 | athrxx | 2009-08-12 00:34:33 +1000 (Wed, 12 Aug 2009) | 1 line
LOL: some minor fixes
........
r43270 | Kirben | 2009-08-12 00:42:44 +1000 (Wed, 12 Aug 2009) | 1 line
Add option to disable later games (Feeble Files, Puzzle Pack) in AGOS game engine, which require higher resolution.
........
r43272 | lordhoto | 2009-08-12 01:34:13 +1000 (Wed, 12 Aug 2009) | 1 line
Fix Kallak's note displaying in Kyrandia 1 Amiga and Kyrandia 1 DOS CD.
........
r43273 | lordhoto | 2009-08-12 01:34:28 +1000 (Wed, 12 Aug 2009) | 1 line
Implement differences in seq_winterScroll1 for Kyrandia 1 Amiga.
........
r43274 | lordhoto | 2009-08-12 01:34:55 +1000 (Wed, 12 Aug 2009) | 3 lines
- Yet another minor difference in seq_winterScroll2
- Fix wrong offsets of flasks strings for Kyrandia 1 Amiga in kyra.dat
- Increase kyra.dat version
........
r43275 | lordhoto | 2009-08-12 01:35:13 +1000 (Wed, 12 Aug 2009) | 1 line
Fix bug in Amiga specific bits of o1_fadeSpecialPalette, this should make the cauldron water change color correctly.
........
r43276 | lordhoto | 2009-08-12 01:35:30 +1000 (Wed, 12 Aug 2009) | 1 line
Fix AGOS compilation.
........
r43277 | lordhoto | 2009-08-12 02:18:01 +1000 (Wed, 12 Aug 2009) | 1 line
Fix graphics glitch in Darm's abode in Kyrandia 1 Amiga.
........
r43278 | lordhoto | 2009-08-12 02:18:43 +1000 (Wed, 12 Aug 2009) | 1 line
Fix thumbnails for savegames made via the in-game GUI of Kyrandia 1 Amiga.
........
r43279 | lordhoto | 2009-08-12 02:46:20 +1000 (Wed, 12 Aug 2009) | 1 line
Cleanup.
........
r43280 | lordhoto | 2009-08-12 02:46:38 +1000 (Wed, 12 Aug 2009) | 1 line
Enable dirty rect handling for the Amiga version again.
........
r43282 | buddha_ | 2009-08-12 03:44:06 +1000 (Wed, 12 Aug 2009) | 1 line
Fix compilation on MSVC8/9 after r43270: Add ENABLE_AGOS2 and ENABLE_PN to global Visual Studio properties.
........
r43283 | lordhoto | 2009-08-12 04:16:21 +1000 (Wed, 12 Aug 2009) | 1 line
Don't allow menu / inventory usage in o1_waitForConfirmationMouseClick, just like the original does. This prevents creating bad saves like in bug #2835715 "KYRA: GFX glitch in Amiga version at the bridge".
........
r43284 | lordhoto | 2009-08-12 04:17:07 +1000 (Wed, 12 Aug 2009) | 1 line
Fix for bug #2835715 "KYRA: GFX glitch in Amiga version at the bridge", which was caused by featuring restoring of Brandon's position on save load, which the original did not support.
........
r43285 | lordhoto | 2009-08-12 04:17:53 +1000 (Wed, 12 Aug 2009) | 1 line
Fix graphical glitches when loading saves where Brandon is in Will-O-Wisp form.
........
r43287 | dhewg | 2009-08-12 05:11:26 +1000 (Wed, 12 Aug 2009) | 1 line
Fixed an endian bug in the ADPCM decoder (#2211901).
........
r43289 | waltervn | 2009-08-12 06:18:15 +1000 (Wed, 12 Aug 2009) | 2 lines
SCI: Added a crude speed throttler.
........
r43290 | lordhoto | 2009-08-12 07:53:06 +1000 (Wed, 12 Aug 2009) | 1 line
Mention support for Kyrandia 1 Amiga in 1.1.0.
........
r43292 | Kirben | 2009-08-12 09:40:07 +1000 (Wed, 12 Aug 2009) | 1 line
vc22_setPaletteOld was renamed to vc22_setPalette, since function was virtualized.
........
r43294 | Kirben | 2009-08-12 10:53:35 +1000 (Wed, 12 Aug 2009) | 1 line
Fix building with specific games disabled in MSVC.
........
r43299 | Kirben | 2009-08-12 11:21:25 +1000 (Wed, 12 Aug 2009) | 1 line
Fix bug #2835822 - SSPP: Sounds from DIMP appearing randomly in other games.
........
r43301 | Kirben | 2009-08-12 11:35:42 +1000 (Wed, 12 Aug 2009) | 1 line
Update status of Amiga version of The Legend of Kyrandia.
........
r43303 | Kirben | 2009-08-12 11:44:17 +1000 (Wed, 12 Aug 2009) | 1 line
Update status of The Legend of Kyrandia.
........
r43304 | Kirben | 2009-08-12 12:24:03 +1000 (Wed, 12 Aug 2009) | 1 line
Enable Personal Nightmare by default.
........
r43307 | sev | 2009-08-12 14:36:01 +1000 (Wed, 12 Aug 2009) | 2 lines
Fix formatting
........
r43314 | dhewg | 2009-08-12 17:37:45 +1000 (Wed, 12 Aug 2009) | 1 line
Removed duplicated functions.
........
r43318 | lordhoto | 2009-08-13 00:02:18 +1000 (Thu, 13 Aug 2009) | 1 line
Change SJIS code guard to also check whether dynamic plugins are enabled.
........
r43320 | lordhoto | 2009-08-13 03:10:47 +1000 (Thu, 13 Aug 2009) | 1 line
Implement difference for the Kyrandia 1 Amiga version in TextDisplayer::printCharacterText.
........
r43321 | lordhoto | 2009-08-13 03:11:04 +1000 (Thu, 13 Aug 2009) | 1 line
Cleanup.
........
r43322 | lordhoto | 2009-08-13 03:13:46 +1000 (Thu, 13 Aug 2009) | 1 line
Oops forgot a "{".
........
r43323 | lordhoto | 2009-08-13 04:05:41 +1000 (Thu, 13 Aug 2009) | 1 line
Further cleaning up credits player code for Kyra1.
........
r43324 | lordhoto | 2009-08-13 04:06:32 +1000 (Thu, 13 Aug 2009) | 1 line
Fix graphics glitch in credits of Kyrandia 1 German.
........
r43325 | lordhoto | 2009-08-13 04:07:27 +1000 (Thu, 13 Aug 2009) | 1 line
Add a slight paranoia check to drawCharANSI.
........
r43326 | lordhoto | 2009-08-13 04:08:01 +1000 (Thu, 13 Aug 2009) | 1 line
Put some more IHNM / SAGA2 specific code into compile guards.
........
r43329 | lordhoto | 2009-08-13 08:05:09 +1000 (Thu, 13 Aug 2009) | 1 line
Implement special Kyrandia 1 Amiga credits text scroller.
........
r43332 | lordhoto | 2009-08-13 09:16:35 +1000 (Thu, 13 Aug 2009) | 1 line
Properly respect users sfx/music config settings for MIDI output.
........
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/NEWS
scummvm/branches/gsoc2009-16bit/README
scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
scummvm/branches/gsoc2009-16bit/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
scummvm/branches/gsoc2009-16bit/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
scummvm/branches/gsoc2009-16bit/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
scummvm/branches/gsoc2009-16bit/backends/platform/symbian/mmp/scummvm_base.mmp.in
scummvm/branches/gsoc2009-16bit/backends/platform/symbian/src/SymbianActions.cpp
scummvm/branches/gsoc2009-16bit/configure
scummvm/branches/gsoc2009-16bit/dists/engine-data/kyra.dat
scummvm/branches/gsoc2009-16bit/dists/msvc8/ScummVM_Global.vsprops
scummvm/branches/gsoc2009-16bit/dists/msvc8/agos.vcproj
scummvm/branches/gsoc2009-16bit/dists/msvc9/ScummVM_Global.vsprops
scummvm/branches/gsoc2009-16bit/dists/msvc9/agos.vcproj
scummvm/branches/gsoc2009-16bit/engines/agos/agos.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/agos.h
scummvm/branches/gsoc2009-16bit/engines/agos/animation.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/animation.h
scummvm/branches/gsoc2009-16bit/engines/agos/charset.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/cursor.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/debug.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/detection.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h
scummvm/branches/gsoc2009-16bit/engines/agos/draw.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/event.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/feeble.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/gfx.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/input.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/module.mk
scummvm/branches/gsoc2009-16bit/engines/agos/oracle.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/pn.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/res.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/rooms.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/script_ff.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/script_pn.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/script_pp.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/string.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/subroutine.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/verb.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/vga_e2.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/vga_ff.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/vga_pn.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/vga_s1.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/window.cpp
scummvm/branches/gsoc2009-16bit/engines/engines.mk
scummvm/branches/gsoc2009-16bit/engines/kyra/gui_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/lol.h
scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_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/script_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/sequences_lok.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/sound_midi.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/sprites_lol.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/staticres.cpp
scummvm/branches/gsoc2009-16bit/engines/kyra/text.cpp
scummvm/branches/gsoc2009-16bit/engines/saga/displayinfo.h
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kernel.h
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kevent.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/kgraphics.cpp
scummvm/branches/gsoc2009-16bit/engines/sci/engine/scriptdebug.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/gfx.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/animation_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/animation_he.h
scummvm/branches/gsoc2009-16bit/engines/scumm/he/cup_player_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/floodfill_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/logic_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/logic_he.h
scummvm/branches/gsoc2009-16bit/engines/scumm/he/palette_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v100he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v71he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v72he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v80he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/script_v90he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/sound_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/sprite_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/wiz_he.cpp
scummvm/branches/gsoc2009-16bit/graphics/sjis.h
scummvm/branches/gsoc2009-16bit/sound/adpcm.cpp
scummvm/branches/gsoc2009-16bit/tools/create_kyradat/amiga.h
scummvm/branches/gsoc2009-16bit/tools/create_kyradat/create_kyradat.cpp
Added Paths:
-----------
scummvm/branches/gsoc2009-16bit/engines/agos/input_pn.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/string_pn.cpp
scummvm/branches/gsoc2009-16bit/engines/agos/verb_pn.cpp
Property Changed:
----------------
scummvm/branches/gsoc2009-16bit/
scummvm/branches/gsoc2009-16bit/backends/fs/ds/
scummvm/branches/gsoc2009-16bit/backends/platform/ds/
Property changes on: scummvm/branches/gsoc2009-16bit
___________________________________________________________________
Modified: svnmerge-integrated
- /scummvm/trunk:1-43243 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703
+ /scummvm/trunk:1-43336 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703
Modified: svn:mergeinfo
- /scummvm/trunk:42578-43056,43066-43241
+ /scummvm/trunk:42578-43056,43066-43241,43245-43332
Modified: scummvm/branches/gsoc2009-16bit/NEWS
===================================================================
--- scummvm/branches/gsoc2009-16bit/NEWS 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/NEWS 2009-08-13 00:32:15 UTC (rev 43343)
@@ -6,6 +6,7 @@
- Added support for a custom SJIS font for FM-TOWNS and PC98 games.
KYRA:
+ - Added support for the Amiga version of The Legend of Kyrandia.
- Adapted KYRA to support the custom SJIS font.
1.0.0 (2009-??-??)
Modified: scummvm/branches/gsoc2009-16bit/README
===================================================================
--- scummvm/branches/gsoc2009-16bit/README 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/README 2009-08-13 00:32:15 UTC (rev 43343)
@@ -769,7 +769,9 @@
original game.
The Legend of Kyrandia:
- - Amiga versions aren't supported
+ - No music or sound effects in the Amiga and Macintosh floppy versions.
+ - Macintosh CD is using included DOS music and sound effects.
+ - PC-9821 version lacks support for sound effects.
Humongous Entertainment games:
- Only the original load and save interface can be used.
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,43066-43241
+ /scummvm/branches/branch-0-13-0/backends/fs/ds:35922-39517
/scummvm/trunk/backends/fs/ds:42578-43056,43066-43241,43245-43332
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,43066-43241
+ /scummvm/branches/branch-0-13-0/backends/platform/ds:35922-39516
/scummvm/trunk/backends/platform/ds:42578-43056,43066-43241,43245-43332
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -563,7 +563,7 @@
// Create the surface that contains the scaled graphics in 16 bit mode
//
- if(_videoMode.fullscreen) {
+ if (_videoMode.fullscreen) {
fixupResolutionForAspectRatio(_videoMode.desiredAspectRatio, _videoMode.hardwareWidth, _videoMode.hardwareHeight);
}
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/symbian/BuildPackageUpload_AllVersions.pl 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/symbian/BuildPackageUpload_AllVersions.pl 2009-08-13 00:32:15 UTC (rev 43343)
@@ -59,6 +59,7 @@
# these macros are always defined:
$ExtraMacros = "MACRO NONSTANDARD_PORT\n";
+$ExtraMacros .= "MACRO ENABLE_VKEYBD\n";
$ExtraMacros .= "MACRO DISABLE_FANCY_THEMES\n";
$ExtraMacros .= "MACRO DISABLE_SCALERS\n";
$ExtraMacros .= "MACRO DISABLE_HQ_SCALERS\n";
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg 2009-08-13 00:32:15 UTC (rev 43343)
@@ -63,6 +63,8 @@
"..\..\..\..\dists\engine-data\igor.tbl"-"c:\data\scummvm\igor.tbl"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\data\scummvm\lure.dat"
"..\..\..\..\dists\engine-data\drascula.dat"-"c:\data\scummvm\drascula.dat"
+"..\..\..\..\dists\engine-data\m4.dat"-"c:\data\scummvm\m4.dat"
+"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\data\scummvm\vkeybd_default.zip"
; Config/log files: 'empty' will automagically be removed on uninstall
""-"c:\data\scummvm\scummvm.ini",FILENULL
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg 2009-08-13 00:32:15 UTC (rev 43343)
@@ -60,7 +60,8 @@
"..\..\..\..\dists\engine-data\igor.tbl"-"c:\shared\scummvm\igor.tbl"
"..\..\..\..\dists\engine-data\lure.dat"-"c:\shared\scummvm\lure.dat"
"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
-
+"..\..\..\..\dists\engine-data\m4.dat"-"c:\shared\scummvm\m4.dat"
+"..\..\..\vkeybd\packs\vkeybd_default.zip"-"c:\shared\scummvm\vkeybd_default.zip"
; Config/log files: 'empty' will automagically be removed on uninstall
""-"c:\shared\scummvm\scummvm.ini",FILENULL
""-"c:\shared\scummvm\scummvm.stdout.txt",FILENULL
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/symbian/mmp/scummvm_base.mmp.in
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/symbian/mmp/scummvm_base.mmp.in 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/symbian/mmp/scummvm_base.mmp.in 2009-08-13 00:32:15 UTC (rev 43343)
@@ -117,4 +117,9 @@
SOURCE backends\keymapper\keymap.cpp
SOURCE backends\keymapper\keymapper.cpp
SOURCE backends\keymapper\remap-dialog.cpp
-
+// Source files for virtual keyboard
+SOURCE backends\vkeybd\image-map.cpp
+SOURCE backends\vkeybd\polygon.cpp
+SOURCE backends\vkeybd\virtual-keyboard-gui.cpp
+SOURCE backends\vkeybd\virtual-keyboard-parser.cpp
+SOURCE backends\vkeybd\virtual-keyboard.cpp
Modified: scummvm/branches/gsoc2009-16bit/backends/platform/symbian/src/SymbianActions.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/symbian/src/SymbianActions.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/symbian/src/SymbianActions.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -163,7 +163,9 @@
bool is_drascula = (strncmp(gameid.c_str(), "drascula",8) == 0);
bool is_tucker = (gameid == "tucker");
bool is_groovie = (gameid == "groovie");
+ bool is_tinsel = (gameid == "tinsel");
bool is_cruise = (gameid == "cruise");
+ bool is_made = (gameid == "made");
Actions::initInstanceGame();
@@ -194,6 +196,8 @@
_key_action[ACTION_SAVE].setKey(Common::ASCII_ESCAPE, Common::KEYCODE_ESCAPE);
} else if (is_parallaction) {
_key_action[ACTION_SAVE].setKey('s', Common::KEYCODE_s);
+ } else if (is_tinsel) {
+ _key_action[ACTION_SAVE].setKey(Common::ASCII_F1, SDLK_F1);
} else {
_key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); // F5 key
}
@@ -202,9 +206,9 @@
_action_enabled[ACTION_QUIT] = true;
// Skip text
- if (!is_cine && !is_parallaction && !is_groovie)
+ if (!is_cine && !is_parallaction && !is_groovie && !is_cruise && !is_made)
_action_enabled[ACTION_SKIP_TEXT] = true;
- if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob ||
+ if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_tinsel ||
is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula || is_tucker)
_key_action[ACTION_SKIP_TEXT].setKey(Common::KEYCODE_ESCAPE, Common::KEYCODE_ESCAPE); // Escape key
else {
Modified: scummvm/branches/gsoc2009-16bit/configure
===================================================================
--- scummvm/branches/gsoc2009-16bit/configure 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/configure 2009-08-13 00:32:15 UTC (rev 43343)
@@ -70,8 +70,8 @@
add_engine scumm_7_8 "v7 & v8 games" yes
add_engine he "HE71+ games" yes
add_engine agi "AGI" yes
-add_engine agos "AGOS" yes "pn"
-add_engine pn "Personal Nightmare" no
+add_engine agos "AGOS" yes "agos2"
+add_engine agos2 "AGOS 2 games" yes
add_engine cine "Cinematique evo 1" yes
add_engine cruise "Cinematique evo 2" yes
add_engine drascula "Drascula: The Vampire Strikes Back" yes
Modified: scummvm/branches/gsoc2009-16bit/dists/engine-data/kyra.dat
===================================================================
(Binary files differ)
Modified: scummvm/branches/gsoc2009-16bit/dists/msvc8/ScummVM_Global.vsprops
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc8/ScummVM_Global.vsprops 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc8/ScummVM_Global.vsprops 2009-08-13 00:32:15 UTC (rev 43343)
@@ -10,7 +10,7 @@
Name="VCCLCompilerTool"
DisableSpecificWarnings="4068;4100;4103;4121;4127;4189;4201;4221;4244;4250;4310;4351;4355;4510;4511;4512;4610;4701;4702;4706;4800;4996"
AdditionalIncludeDirectories="../..;../../engines"
- PreprocessorDefinitions="USE_NASM;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LOL;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_IHNM;ENABLE_SAGA2;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE;ENABLE_RGB_COLOR;ENABLE_KEYMAPPER"
+ PreprocessorDefinitions="USE_NASM;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_AGOS2;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LOL;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_IHNM;ENABLE_SAGA2;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE;ENABLE_RGB_COLOR;ENABLE_KEYMAPPER"
ExceptionHandling="0"
RuntimeTypeInfo="false"
WarningLevel="4"
Modified: scummvm/branches/gsoc2009-16bit/dists/msvc8/agos.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc8/agos.vcproj 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc8/agos.vcproj 2009-08-13 00:32:15 UTC (rev 43343)
@@ -35,6 +35,7 @@
<File RelativePath="..\..\engines\agos\gfx.cpp" />
<File RelativePath="..\..\engines\agos\icons.cpp" />
<File RelativePath="..\..\engines\agos\input.cpp" />
+ <File RelativePath="..\..\engines\agos\input_pn.cpp" />
<File RelativePath="..\..\engines\agos\intern.h" />
<File RelativePath="..\..\engines\agos\items.cpp" />
<File RelativePath="..\..\engines\agos\menus.cpp" />
@@ -60,8 +61,10 @@
<File RelativePath="..\..\engines\agos\sound.cpp" />
<File RelativePath="..\..\engines\agos\sound.h" />
<File RelativePath="..\..\engines\agos\string.cpp" />
+ <File RelativePath="..\..\engines\agos\string_pn.cpp" />
<File RelativePath="..\..\engines\agos\subroutine.cpp" />
<File RelativePath="..\..\engines\agos\verb.cpp" />
+ <File RelativePath="..\..\engines\agos\verb_pn.cpp" />
<File RelativePath="..\..\engines\agos\vga.cpp" />
<File RelativePath="..\..\engines\agos\vga.h" />
<File RelativePath="..\..\engines\agos\vga_e2.cpp" />
Modified: scummvm/branches/gsoc2009-16bit/dists/msvc9/ScummVM_Global.vsprops
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc9/ScummVM_Global.vsprops 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc9/ScummVM_Global.vsprops 2009-08-13 00:32:15 UTC (rev 43343)
@@ -10,7 +10,7 @@
Name="VCCLCompilerTool"
DisableSpecificWarnings="4068;4100;4103;4121;4127;4189;4201;4221;4244;4250;4310;4351;4355;4510;4511;4512;4610;4701;4702;4706;4800;4996"
AdditionalIncludeDirectories="../..;../../engines"
- PreprocessorDefinitions="USE_NASM;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LOL;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_IHNM;ENABLE_SAGA2;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE"
+ PreprocessorDefinitions="USE_NASM;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_AGOS2;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LOL;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_IHNM;ENABLE_SAGA2;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE"
ExceptionHandling="0"
RuntimeTypeInfo="false"
WarningLevel="4"
Modified: scummvm/branches/gsoc2009-16bit/dists/msvc9/agos.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc9/agos.vcproj 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc9/agos.vcproj 2009-08-13 00:32:15 UTC (rev 43343)
@@ -36,6 +36,7 @@
<File RelativePath="..\..\engines\agos\gfx.cpp" />
<File RelativePath="..\..\engines\agos\icons.cpp" />
<File RelativePath="..\..\engines\agos\input.cpp" />
+ <File RelativePath="..\..\engines\agos\input_pn.cpp" />
<File RelativePath="..\..\engines\agos\intern.h" />
<File RelativePath="..\..\engines\agos\items.cpp" />
<File RelativePath="..\..\engines\agos\menus.cpp" />
@@ -61,8 +62,10 @@
<File RelativePath="..\..\engines\agos\sound.cpp" />
<File RelativePath="..\..\engines\agos\sound.h" />
<File RelativePath="..\..\engines\agos\string.cpp" />
+ <File RelativePath="..\..\engines\agos\string_pn.cpp" />
<File RelativePath="..\..\engines\agos\subroutine.cpp" />
<File RelativePath="..\..\engines\agos\verb.cpp" />
+ <File RelativePath="..\..\engines\agos\verb_pn.cpp" />
<File RelativePath="..\..\engines\agos\vga.cpp" />
<File RelativePath="..\..\engines\agos\vga.h" />
<File RelativePath="..\..\engines\agos\vga_e2.cpp" />
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/agos.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/agos.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/agos.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -59,6 +59,7 @@
"MUSIC", // speech_filename
};
+#ifdef ENABLE_AGOS2
AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system)
: AGOSEngine_Feeble(system) {
@@ -72,6 +73,7 @@
_startSecondCount = 0;
_tSecondCount = 0;
}
+#endif
AGOSEngine_Simon2::AGOSEngine_Simon2(OSystem *system)
: AGOSEngine_Simon1(system) {
@@ -696,6 +698,7 @@
3, 2, 14, 129,
};
+#ifdef ENABLE_AGOS2
void AGOSEngine_PuzzlePack::setupGame() {
gss = &puzzlepack_settings;
_numVideoOpcodes = 85;
@@ -712,6 +715,7 @@
AGOSEngine::setupGame();
}
+#endif
void AGOSEngine_Simon2::setupGame() {
gss = &simon2_settings;
@@ -828,7 +832,6 @@
AGOSEngine::setupGame();
}
-#ifdef ENABLE_PN
void AGOSEngine_PN::setupGame() {
gss = &simon1_settings;
_numVideoOpcodes = 57;
@@ -840,7 +843,6 @@
AGOSEngine::setupGame();
}
-#endif
void AGOSEngine::setupGame() {
allocItemHeap();
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/agos.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/agos.h 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/agos.h 2009-08-13 00:32:15 UTC (rev 43343)
@@ -34,14 +34,13 @@
#include "common/stack.h"
#include "common/util.h"
+#ifdef ENABLE_AGOS2
#include "agos/animation.h"
+#endif
#include "agos/midi.h"
#include "agos/sound.h"
#include "agos/vga.h"
-// TODO: Replace with more portable code
-#include <setjmp.h>
-
namespace AGOS {
uint fileReadItemID(Common::SeekableReadStream *in);
@@ -892,6 +891,7 @@
void vc19_loop();
void vc20_setRepeat();
void vc21_endRepeat();
+ virtual void vc22_setPalette();
void vc23_setPriority();
void vc24_setSpriteXY();
void vc25_halt_sprite();
@@ -904,7 +904,7 @@
void vc33_setMouseOn();
void vc34_setMouseOff();
void vc35_clearWindow();
- void vc36_setWindowImage();
+ virtual void vc36_setWindowImage();
void vc38_ifVarNotZero();
void vc39_setVar();
void vc40_scrollRight();
@@ -924,7 +924,6 @@
// Video Script Opcodes, Elvira 1
void vc17_waitEnd();
- void vc22_setPaletteOld();
void vc32_saveScreen();
void vc37_pokePalette();
@@ -962,10 +961,9 @@
void vc45_setSpriteX();
void vc46_setSpriteY();
void vc47_addToVar();
- void vc48_setPathFinder();
+ virtual void vc48_setPathFinder();
void vc59_ifSpeech();
void vc61_setMaskImage();
- void vc22_setPaletteNew();
// Video Script Opcodes, Simon 2
void vc56_delayLong();
@@ -1264,7 +1262,6 @@
virtual char *genSaveName(int slot);
};
-#ifdef ENABLE_PN
class AGOSEngine_PN : public AGOSEngine {
virtual Common::Error go();
@@ -1366,9 +1363,6 @@
int _tagOfActiveDoline; ///< tag of the active doline "instance"
int _dolineReturnVal;
- jmp_buf _loadfail;
-
-
byte *_dataBase, *_textBase;
uint32 _dataBaseSize, _textBaseSize;
@@ -1515,7 +1509,6 @@
const OpcodeEntryPN *_opcodesPN;
};
-#endif
class AGOSEngine_Elvira1 : public AGOSEngine {
public:
@@ -1771,6 +1764,8 @@
virtual void executeOpcode(int opcode);
+ virtual void vc22_setPalette();
+
// Opcodes, Simon 1
void os1_animate();
void os1_pauseGame();
@@ -1875,6 +1870,7 @@
virtual char *genSaveName(int slot);
};
+#ifdef ENABLE_AGOS2
class AGOSEngine_Feeble : public AGOSEngine_Simon2 {
public:
AGOSEngine_Feeble(OSystem *system);
@@ -1886,6 +1882,9 @@
virtual void executeOpcode(int opcode);
+ virtual void vc36_setWindowImage();
+ virtual void vc48_setPathFinder();
+
void off_chance();
void off_jumpOut();
void off_addTextBox();
@@ -2092,6 +2091,7 @@
virtual char *genSaveName(int slot);
};
+#endif
} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/animation.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/animation.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/animation.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,8 +25,11 @@
+#ifdef ENABLE_AGOS2
+
#include "common/endian.h"
#include "common/events.h"
+#include "common/file.h"
#include "common/system.h"
#include "graphics/cursorman.h"
@@ -541,3 +544,5 @@
}
} // End of namespace AGOS
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/animation.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/animation.h 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/animation.h 2009-08-13 00:32:15 UTC (rev 43343)
@@ -23,12 +23,11 @@
*
*/
+#ifdef ENABLE_AGOS2
+
#ifndef AGOS_ANIMATION_H
#define AGOS_ANIMATION_H
-#include "common/file.h"
-#include "common/stream.h"
-
#include "graphics/video/dxa_decoder.h"
#include "graphics/video/smk_decoder.h"
#include "sound/mixer.h"
@@ -115,3 +114,5 @@
} // End of namespace AGOS
#endif
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/charset.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/charset.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/charset.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -34,6 +34,7 @@
namespace AGOS {
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::doOutput(const byte *src, uint len) {
if (_textWindow == NULL)
return;
@@ -64,6 +65,7 @@
}
}
}
+#endif
void AGOSEngine::doOutput(const byte *src, uint len) {
uint idx;
@@ -484,13 +486,11 @@
_textWindow = openWindow(8, 144, 24, 6, 1, 0, 15);
}
-#ifdef ENABLE_PN
void AGOSEngine_PN::windowPutChar(WindowBlock *window, byte c, byte b) {
if (_mousePrintFG || _wiped)
return;
AGOSEngine::windowPutChar(window, c, b);
}
-#endif
void AGOSEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
byte width = 6;
@@ -573,6 +573,7 @@
}
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::windowNewLine(WindowBlock *window) {
if (_noOracleScroll == 0) {
if (window->height < window->textRow + 30) {
@@ -603,6 +604,7 @@
window->textColumnOffset = 0;
window->textLength = 0;
}
+#endif
void AGOSEngine::windowNewLine(WindowBlock *window) {
window->textColumn = 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/cursor.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/cursor.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/cursor.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -348,6 +348,7 @@
0,0,10,7,10,6,10,5,10,4,10,3,10,4,10,5,10,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
+#ifdef ENABLE_AGOS2
void AGOSEngine_PuzzlePack::handleMouseMoved() {
uint x;
@@ -379,6 +380,7 @@
drawMousePointer();
}
+#endif
void AGOSEngine_Simon1::handleMouseMoved() {
uint x;
@@ -474,7 +476,6 @@
_litBoxFlag = 0;
}
-#ifdef ENABLE_PN
void AGOSEngine_PN::handleMouseMoved() {
if (_mouseHideCount) {
CursorMan.showMouse(false);
@@ -539,7 +540,6 @@
_needHitAreaRecalc = 0;
_litBoxFlag = 0;
}
-#endif
void AGOSEngine::handleMouseMoved() {
uint x;
@@ -638,6 +638,7 @@
_videoLockOut &= ~1;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_PuzzlePack::initMouse() {
if (getGameId() == GID_DIMP) {
AGOSEngine_Simon1::initMouse();
@@ -652,48 +653,12 @@
// TODO: Add larger cursor
AGOSEngine_Simon1::initMouse();
}
-
-static const byte mouseCursorPalette[] = {
- 0x00, 0x00, 0x00, 0x00, // Black
- 0xFF, 0xFF, 0xFF, 0x00, // White
-};
-
void AGOSEngine_Feeble::initMouse() {
_maxCursorWidth = 40;
_maxCursorHeight = 40;
_mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1);
}
-void AGOSEngine_Simon1::initMouse() {
- AGOSEngine::initMouse();
-
- const uint16 *src = _common_mouseInfo;
- for (int i = 0; i < 16; i++) {
- for (int j = 0; j < 16; j++) {
- if (src[0] & (1 << (15 - (j % 16)))) {
- if (src[1] & (1 << (15 - (j % 16)))) {
- _mouseData[16 * i + j] = 1;
- } else {
- _mouseData[16 * i + j] = 0;
- }
- }
- }
- src += 2;
- }
-
- CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF);
-}
-
-void AGOSEngine::initMouse() {
- _maxCursorWidth = 16;
- _maxCursorHeight = 16;
- _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1);
-
- memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight);
-
- CursorMan.replaceCursorPalette(mouseCursorPalette, 0, ARRAYSIZE(mouseCursorPalette) / 4);
-}
-
void AGOSEngine_PuzzlePack::loadMouseImage() {
loadZone(_variableArray[500]);
VgaPointersEntry *vpe = &_vgaBufferPointers[_variableArray[500]];
@@ -793,7 +758,43 @@
CursorMan.replaceCursor(_mouseData, _maxCursorWidth, _maxCursorHeight, hotspotX, hotspotY, 0);
}
}
+#endif
+void AGOSEngine_Simon1::initMouse() {
+ AGOSEngine::initMouse();
+
+ const uint16 *src = _common_mouseInfo;
+ for (int i = 0; i < 16; i++) {
+ for (int j = 0; j < 16; j++) {
+ if (src[0] & (1 << (15 - (j % 16)))) {
+ if (src[1] & (1 << (15 - (j % 16)))) {
+ _mouseData[16 * i + j] = 1;
+ } else {
+ _mouseData[16 * i + j] = 0;
+ }
+ }
+ }
+ src += 2;
+ }
+
+ CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF);
+}
+
+static const byte mouseCursorPalette[] = {
+ 0x00, 0x00, 0x00, 0x00, // Black
+ 0xFF, 0xFF, 0xFF, 0x00, // White
+};
+
+void AGOSEngine::initMouse() {
+ _maxCursorWidth = 16;
+ _maxCursorHeight = 16;
+ _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1);
+
+ memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight);
+
+ CursorMan.replaceCursorPalette(mouseCursorPalette, 0, ARRAYSIZE(mouseCursorPalette) / 4);
+}
+
void AGOSEngine::drawMousePointer() {
if (getGameType() == GType_SIMON2) {
CursorMan.replaceCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7);
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/debug.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/debug.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/debug.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -26,6 +26,8 @@
// AGOS debug functions
+#include "common/file.h"
+
#include "agos/debug.h"
#include "agos/agos.h"
#include "agos/intern.h"
@@ -323,6 +325,7 @@
}
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::dumpVgaFile(const byte *vga) {
const byte *pp;
const byte *p;
@@ -352,6 +355,7 @@
p += sizeof(ImageHeader_Feeble);
}
}
+#endif
void AGOSEngine_Simon1::dumpVgaFile(const byte *vga) {
const byte *pp;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/detection.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/detection.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/detection.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -72,11 +72,13 @@
{"waxworks", "Waxworks"},
{"simon1", "Simon the Sorcerer 1"},
{"simon2", "Simon the Sorcerer 2"},
+#ifdef ENABLE_AGOS2
{"feeble", "The Feeble Files"},
{"dimp", "Demon in my Pocket"},
{"jumble", "Jumble"},
{"puzzle", "NoPatience"},
{"swampy", "Swampy Adventures"},
+#endif
{0, 0}
};
@@ -138,11 +140,9 @@
bool res = true;
switch (gd->gameType) {
-#ifdef ENABLE_PN
case AGOS::GType_PN:
*engine = new AGOS::AGOSEngine_PN(syst);
break;
-#endif
case AGOS::GType_ELVIRA1:
*engine = new AGOS::AGOSEngine_Elvira1(syst);
break;
@@ -158,6 +158,7 @@
case AGOS::GType_SIMON2:
*engine = new AGOS::AGOSEngine_Simon2(syst);
break;
+#ifdef ENABLE_AGOS2
case AGOS::GType_FF:
if (gd->features & GF_DEMO)
*engine = new AGOS::AGOSEngine_FeebleDemo(syst);
@@ -167,6 +168,7 @@
case AGOS::GType_PP:
*engine = new AGOS::AGOSEngine_PuzzlePack(syst);
break;
+#endif
default:
res = false;
error("AGOS engine: unknown gameType");
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/detection_tables.h 2009-08-13 00:32:15 UTC (rev 43343)
@@ -2335,6 +2335,7 @@
GF_TALKIE
},
+#ifdef ENABLE_AGOS2
// The Feeble Files - English DOS Demo
{
{
@@ -2807,6 +2808,7 @@
GID_SWAMPY,
GF_OLD_BUNDLE | GF_TALKIE
},
+#endif
{ AD_TABLE_END_MARKER, 0, 0, 0 }
};
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/draw.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/draw.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/draw.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -46,6 +46,7 @@
return (byte *)_scaleBuf->pixels;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::animateSpritesByY() {
VgaSprite *vsp;
VgaPointersEntry *vpe;
@@ -147,6 +148,7 @@
_displayScreen = true;
}
+#endif
void AGOSEngine::animateSprites() {
VgaSprite *vsp;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/event.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/event.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/event.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -552,11 +552,13 @@
} while (cur < start + amount && !shouldQuit());
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_PuzzlePack::timerProc() {
_lastTickCount = _system->getMillis();
AGOSEngine_Feeble::timerProc();
- dimpIdle();
+ if (getGameId() == GID_DIMP)
+ dimpIdle();
}
void AGOSEngine_Feeble::timerProc() {
@@ -609,8 +611,8 @@
_videoLockOut &= ~2;
}
+#endif
-#ifdef ENABLE_PN
void AGOSEngine_PN::timerProc() {
if (_videoLockOut & 0x80E9 || _videoLockOut & 2)
return;
@@ -649,7 +651,6 @@
_videoLockOut &= ~2;
}
-#endif
void AGOSEngine::timerProc() {
if (_videoLockOut & 0x80E9 || _videoLockOut & 2)
@@ -677,6 +678,7 @@
_videoLockOut &= ~2;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_PuzzlePack::dimpIdle() {
int z, n;
@@ -758,5 +760,6 @@
}
}
}
+#endif
} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/feeble.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/feeble.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/feeble.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -23,6 +23,10 @@
*
*/
+
+
+#ifdef ENABLE_AGOS2
+
#include "common/config-manager.h"
#include "agos/intern.h"
@@ -383,3 +387,5 @@
}
} // End of namespace AGOS
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/gfx.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/gfx.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/gfx.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -226,6 +226,7 @@
return (state->draw_width != 0 && state->draw_height != 0);
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY) {
Common::Rect srcRect, dstRect;
float factor, xscale;
@@ -461,6 +462,7 @@
} while (--state->draw_height);
}
}
+#endif
void AGOSEngine_Simon1::drawMaskedImage(VC10_state *state) {
if (getGameType() == GType_SIMON1 && (_windowNum == 3 || _windowNum == 4 || _windowNum >= 10)) {
@@ -1260,7 +1262,6 @@
_vcPtr = vc_ptr_org;
}
-#ifdef ENABLE_PN
void AGOSEngine_PN::setWindowImageEx(uint16 mode, uint16 vga_res) {
if (!_initMouse) {
_initMouse = 1;
@@ -1268,7 +1269,6 @@
}
setWindowImage(mode, vga_res);
}
-#endif
void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vgaSpriteId) {
_window3Flag = 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/icons.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -374,6 +374,7 @@
_videoLockOut &= ~0x8000;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::drawIconArray(uint num, Item *itemRef, int line, int classMask) {
Item *item_ptr_org = itemRef;
WindowBlock *window;
@@ -477,6 +478,7 @@
window->iconPtr->upArrow = _scrollUpHitArea;
window->iconPtr->downArrow = _scrollDownHitArea;
}
+#endif
void AGOSEngine::drawIconArray(uint num, Item *itemRef, int line, int classMask) {
Item *item_ptr_org = itemRef;
@@ -581,6 +583,7 @@
}
}
+#ifdef ENABLE_AGOS2
uint AGOSEngine_Feeble::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
HitArea *ha = findEmptyHitArea();
@@ -596,6 +599,7 @@
return ha - _hitAreas;
}
+#endif
uint AGOSEngine_Simon2::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
HitArea *ha = findEmptyHitArea();
@@ -683,6 +687,7 @@
return ha - _hitAreas;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::addArrows(WindowBlock *window, uint8 num) {
HitArea *ha;
@@ -712,6 +717,7 @@
ha->window = window;
ha->verb = 1;
}
+#endif
void AGOSEngine_Simon2::addArrows(WindowBlock *window, uint8 num) {
HitArea *ha;
@@ -1040,7 +1046,6 @@
0x3C, 0x89, 0xC3, 0x00, 0x88, 0x88, 0x18, 0x03, 0x86, 0x23, 0x0C, 0x00
};
-#ifdef ENABLE_PN
// Personal Nightmare specific
void AGOSEngine_PN::drawIconHitBar() {
Graphics::Surface *screen = _system->lockScreen();
@@ -1120,6 +1125,5 @@
}
}
}
-#endif
} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/input.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/input.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/input.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -624,143 +624,4 @@
return verbCode;
}
-#ifdef ENABLE_PN
-// Personal Nightmare specific
-void AGOSEngine_PN::clearInputLine() {
- _inputting = false;
- _inputReady = false;
- clearWindow(_windowArray[2]);
-}
-
-void AGOSEngine_PN::handleKeyboard() {
- if (!_inputReady)
- return;
-
- if (_hitCalled != 0) {
- mouseHit();
- }
-
- int16 chr = -1;
- if (_mouseString) {
- const char *strPtr = _mouseString;
- while (*strPtr != 0 && *strPtr != 13)
- addChar(*strPtr++);
- _mouseString = 0;
-
- chr = *strPtr;
- if (chr == 13) {
- addChar(13);
- }
- }
- if (_mouseString1 && chr != 13) {
- const char *strPtr = _mouseString1;
- while (*strPtr != 13)
- addChar(*strPtr++);
- _mouseString1 = 0;
-
- chr = *strPtr;
- if (chr == 13) {
- addChar(13);
- }
- }
- if (chr == -1) {
- if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || _keyPressed.keycode == Common::KEYCODE_RETURN) {
- chr = _keyPressed.keycode;
- addChar(chr);
- } else if (!(_videoLockOut & 0x10)) {
- chr = _keyPressed.ascii;
- if (chr >= 32)
- addChar(chr);
- }
- }
-
- if (chr == 13) {
- _mouseString = 0;
- _mouseString1 = 0;
- _mousePrintFG = 0;
- _inputReady = false;
- }
-
- _keyPressed.reset();
-}
-
-void AGOSEngine_PN::interact(char *buffer, uint8 size) {
- if (!_inputting) {
- memset(_keyboardBuffer, 0, sizeof(_keyboardBuffer));
- _intputCounter = 0;
- _inputMax = size;
- _inputWindow = _windowArray[_curWindow];
- windowPutChar(_inputWindow, 128);
- windowPutChar(_inputWindow, 8);
- _inputting = true;
- _inputReady = true;
- }
-
- while (!shouldQuit() && _inputReady) {
- if (!_noScanFlag && _scanFlag) {
- buffer[0] = 1;
- buffer[1] = 0;
- _scanFlag = 0;
- break;
- }
- delay(1);
- }
-
- if (!_inputReady) {
- memcpy(buffer, _keyboardBuffer, size);
- _inputting = false;
- }
-}
-
-void AGOSEngine_PN::addChar(uint8 chr) {
- if (chr == 13) {
- _keyboardBuffer[_intputCounter++] = chr;
- windowPutChar(_inputWindow, 13);
- } else if (chr == 8 && _intputCounter) {
- clearCursor(_inputWindow);
- windowPutChar(_inputWindow, 8);
- windowPutChar(_inputWindow, 128);
- windowPutChar(_inputWindow, 8);
-
- _keyboardBuffer[--_intputCounter] = 0;
- } else if (chr >= 32 && _intputCounter < _inputMax) {
- _keyboardBuffer[_intputCounter++] = chr;
-
- clearCursor(_inputWindow);
- windowPutChar(_inputWindow, chr);
- windowPutChar(_inputWindow, 128);
- windowPutChar(_inputWindow, 8);
- }
-}
-
-void AGOSEngine_PN::clearCursor(WindowBlock *window) {
- byte oldTextColor = window->textColor;
-
- window->textColor = window->fillColor;
- windowPutChar(window, 128);
- window->textColor = oldTextColor;
-
- windowPutChar(window, 8);
-}
-
-bool AGOSEngine_PN::processSpecialKeys() {
- if (shouldQuit())
- _exitCutscene = true;
-
- switch (_keyPressed.keycode) {
- case Common::KEYCODE_ESCAPE:
- _exitCutscene = true;
- break;
- case Common::KEYCODE_PAUSE:
- pause();
- break;
- default:
- break;
- }
-
- _keyPressed.reset();
- return false;
-}
-#endif
-
} // End of namespace AGOS
Copied: scummvm/branches/gsoc2009-16bit/engines/agos/input_pn.cpp (from rev 43332, scummvm/trunk/engines/agos/input_pn.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/input_pn.cpp (rev 0)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/input_pn.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -0,0 +1,169 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+
+#include "agos/agos.h"
+#include "agos/intern.h"
+
+namespace AGOS {
+
+void AGOSEngine_PN::clearInputLine() {
+ _inputting = false;
+ _inputReady = false;
+ clearWindow(_windowArray[2]);
+}
+
+void AGOSEngine_PN::handleKeyboard() {
+ if (!_inputReady)
+ return;
+
+ if (_hitCalled != 0) {
+ mouseHit();
+ }
+
+ int16 chr = -1;
+ if (_mouseString) {
+ const char *strPtr = _mouseString;
+ while (*strPtr != 0 && *strPtr != 13)
+ addChar(*strPtr++);
+ _mouseString = 0;
+
+ chr = *strPtr;
+ if (chr == 13) {
+ addChar(13);
+ }
+ }
+ if (_mouseString1 && chr != 13) {
+ const char *strPtr = _mouseString1;
+ while (*strPtr != 13)
+ addChar(*strPtr++);
+ _mouseString1 = 0;
+
+ chr = *strPtr;
+ if (chr == 13) {
+ addChar(13);
+ }
+ }
+ if (chr == -1) {
+ if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || _keyPressed.keycode == Common::KEYCODE_RETURN) {
+ chr = _keyPressed.keycode;
+ addChar(chr);
+ } else if (!(_videoLockOut & 0x10)) {
+ chr = _keyPressed.ascii;
+ if (chr >= 32)
+ addChar(chr);
+ }
+ }
+
+ if (chr == 13) {
+ _mouseString = 0;
+ _mouseString1 = 0;
+ _mousePrintFG = 0;
+ _inputReady = false;
+ }
+
+ _keyPressed.reset();
+}
+
+void AGOSEngine_PN::interact(char *buffer, uint8 size) {
+ if (!_inputting) {
+ memset(_keyboardBuffer, 0, sizeof(_keyboardBuffer));
+ _intputCounter = 0;
+ _inputMax = size;
+ _inputWindow = _windowArray[_curWindow];
+ windowPutChar(_inputWindow, 128);
+ windowPutChar(_inputWindow, 8);
+ _inputting = true;
+ _inputReady = true;
+ }
+
+ while (!shouldQuit() && _inputReady) {
+ if (!_noScanFlag && _scanFlag) {
+ buffer[0] = 1;
+ buffer[1] = 0;
+ _scanFlag = 0;
+ break;
+ }
+ delay(1);
+ }
+
+ if (!_inputReady) {
+ memcpy(buffer, _keyboardBuffer, size);
+ _inputting = false;
+ }
+}
+
+void AGOSEngine_PN::addChar(uint8 chr) {
+ if (chr == 13) {
+ _keyboardBuffer[_intputCounter++] = chr;
+ windowPutChar(_inputWindow, 13);
+ } else if (chr == 8 && _intputCounter) {
+ clearCursor(_inputWindow);
+ windowPutChar(_inputWindow, 8);
+ windowPutChar(_inputWindow, 128);
+ windowPutChar(_inputWindow, 8);
+
+ _keyboardBuffer[--_intputCounter] = 0;
+ } else if (chr >= 32 && _intputCounter < _inputMax) {
+ _keyboardBuffer[_intputCounter++] = chr;
+
+ clearCursor(_inputWindow);
+ windowPutChar(_inputWindow, chr);
+ windowPutChar(_inputWindow, 128);
+ windowPutChar(_inputWindow, 8);
+ }
+}
+
+void AGOSEngine_PN::clearCursor(WindowBlock *window) {
+ byte oldTextColor = window->textColor;
+
+ window->textColor = window->fillColor;
+ windowPutChar(window, 128);
+ window->textColor = oldTextColor;
+
+ windowPutChar(window, 8);
+}
+
+bool AGOSEngine_PN::processSpecialKeys() {
+ if (shouldQuit())
+ _exitCutscene = true;
+
+ switch (_keyPressed.keycode) {
+ case Common::KEYCODE_ESCAPE:
+ _exitCutscene = true;
+ break;
+ case Common::KEYCODE_PAUSE:
+ pause();
+ break;
+ default:
+ break;
+ }
+
+ _keyPressed.reset();
+ return false;
+}
+
+} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/module.mk
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/module.mk 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/module.mk 2009-08-13 00:32:15 UTC (rev 43343)
@@ -2,7 +2,6 @@
MODULE_OBJS := \
agos.o \
- animation.o \
charset.o \
charset-fontdata.o \
contain.o \
@@ -12,15 +11,14 @@
detection.o \
draw.o \
event.o \
- feeble.o \
gfx.o \
icons.o \
input.o \
+ input_pn.o \
items.o \
menus.o \
midi.o \
midiparser_s1d.o \
- oracle.o \
pn.o \
res.o \
res_ami.o \
@@ -28,28 +26,37 @@
rooms.o \
saveload.o \
script.o \
+ script_pn.o \
script_e1.o \
script_e2.o \
- script_pn.o \
script_ww.o \
script_s1.o \
script_s2.o \
- script_ff.o \
- script_pp.o \
sound.o \
string.o \
+ string_pn.o \
subroutine.o \
verb.o \
+ verb_pn.o \
vga.o \
+ vga_pn.o \
vga_e2.o \
- vga_pn.o \
vga_ww.o \
vga_s1.o \
vga_s2.o \
- vga_ff.o \
window.o \
zones.o
+ifdef ENABLE_AGOS2
+MODULE_OBJS += \
+ animation.o \
+ feeble.o \
+ oracle.o \
+ script_ff.o \
+ script_pp.o \
+ vga_ff.o
+endif
+
# This module can be built as a plugin
ifeq ($(ENABLE_AGOS), DYNAMIC_PLUGIN)
PLUGIN := 1
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/oracle.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/oracle.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/oracle.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#ifdef ENABLE_AGOS2
+
#include "common/savefile.h"
#include "common/system.h"
@@ -520,3 +522,5 @@
}
} // End of namespace AGOS
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/pn.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/pn.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/pn.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -23,8 +23,6 @@
*
*/
-#ifdef ENABLE_PN
-
#include "common/config-manager.h"
#include "agos/intern.h"
@@ -297,5 +295,3 @@
}
} // End of namespace AGOS
-
-#endif
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/res.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/res.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/res.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -39,26 +39,28 @@
namespace AGOS {
+#ifdef ENABLE_AGOS2
uint16 AGOSEngine_Feeble::to16Wrapper(uint value) {
return TO_LE_16(value);
}
+uint16 AGOSEngine_Feeble::readUint16Wrapper(const void *src) {
+ return READ_LE_UINT16(src);
+}
+
+uint32 AGOSEngine_Feeble::readUint32Wrapper(const void *src) {
+ return READ_LE_UINT32(src);
+}
+#endif
+
uint16 AGOSEngine::to16Wrapper(uint value) {
return TO_BE_16(value);
}
-uint16 AGOSEngine_Feeble::readUint16Wrapper(const void *src) {
- return READ_LE_UINT16(src);
-}
-
uint16 AGOSEngine::readUint16Wrapper(const void *src) {
return READ_BE_UINT16(src);
}
-uint32 AGOSEngine_Feeble::readUint32Wrapper(const void *src) {
- return READ_LE_UINT32(src);
-}
-
uint32 AGOSEngine::readUint32Wrapper(const void *src) {
return READ_BE_UINT32(src);
}
@@ -150,7 +152,6 @@
return itemArrayInited;
}
-#ifdef ENABLE_PN
void AGOSEngine_PN::loadGamePcFile() {
Common::File in;
@@ -190,7 +191,6 @@
error("Unknown compression format");
}
}
-#endif
void AGOSEngine::loadGamePcFile() {
Common::File in;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/rooms.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/rooms.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/rooms.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#include "common/file.h"
+
#include "agos/agos.h"
#include "agos/intern.h"
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/saveload.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -23,6 +23,7 @@
*
*/
+#include "common/file.h"
#include "common/savefile.h"
#include "common/system.h"
@@ -72,6 +73,7 @@
return i;
}
+#ifdef ENABLE_AGOS2
char *AGOSEngine_PuzzlePack::genSaveName(int slot) {
static char buf[20];
@@ -88,6 +90,7 @@
sprintf(buf, "feeble.%.3d", slot);
return buf;
}
+#endif
char *AGOSEngine_Simon2::genSaveName(int slot) {
static char buf[20];
@@ -1548,7 +1551,6 @@
return result;
}
-#ifdef ENABLE_PN
// Personal Nightmare specific
bool AGOSEngine_PN::badload(int8 errorNum) {
if (errorNum == -2)
@@ -1672,6 +1674,5 @@
ct++;
}
}
-#endif
} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/script_ff.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/script_ff.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/script_ff.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#ifdef ENABLE_AGOS2
+
#include "common/system.h"
#include "agos/animation.h"
@@ -675,3 +677,5 @@
}
} // End of namespace AGOS
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/script_pn.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/script_pn.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/script_pn.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -23,8 +23,6 @@
*
*/
-#ifdef ENABLE_PN
-
#include "agos/agos.h"
#include "agos/vga.h"
@@ -1119,5 +1117,3 @@
}
} // End of namespace AGOS
-
-#endif
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/script_pp.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/script_pp.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/script_pp.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#ifdef ENABLE_AGOS2
+
#include "common/system.h"
#include "agos/agos.h"
@@ -457,3 +459,5 @@
}
} // End of namespace AGOS
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/string.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/string.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/string.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#include "common/file.h"
+
#include "agos/agos.h"
#include "agos/intern.h"
@@ -560,6 +562,7 @@
}
}
+#ifdef ENABLE_AGOS2
// The Feeble Files specific
void AGOSEngine_Feeble::printScreenText(uint vgaSpriteId, uint color, const char *string, int16 x, int16 y, int16 width) {
char convertedString[320];
@@ -693,6 +696,7 @@
printInteractText(num, string);
}
+#endif
// Waxworks specific
uint16 AGOSEngine_Waxworks::getBoxSize() {
@@ -951,648 +955,4 @@
changeWindow(0);
}
-#ifdef ENABLE_PN
-// Personal Nightmare specific
-uint32 AGOSEngine_PN::ftext(uint32 base, int n) {
- uint32 b = base;
- int ct = n;
- while (ct) {
- while(_textBase[b++])
- ;
- ct--;
- }
- return b;
-}
-
-char *AGOSEngine_PN::unctok(char *c, int n) {
- int x;
- uint8 *tokbase;
- tokbase = _textBase + getlong(30);
- x = n;
- while (x-=(*tokbase++ > 127))
- ;
- while (*tokbase < 128)
- *c++=*tokbase++;
- *c++ = *tokbase & 127;
- *c = 0;
- return c;
-}
-
-void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
- if (x > _textBaseSize)
- error("UNCOMSTR: TBASE over-run");
- while (_textBase[x]) {
- if (_textBase[x] < 244) {
- c = unctok(c, _textBase[x]);
- } else {
- c = unctok(c, (_textBase[x] - 244) * 254 + _textBase[x + 1] - 1);
- x++;
- }
- x++;
- }
- *c++ = 13;
- *c = 0;
-}
-
-static const char *objectNames[30] = {
- "\0",
- "Take \0",
- "Inventory\r",
- "Open \0",
- "Close \0",
- "Lock \0",
- "Unlock \0",
- "Examine \0",
- "Look in \0",
- "Exits \r",
- "Look\r",
- "Wait\r",
- "Pause\r",
- "\0",
- "Save\r",
- "Restore\r",
- "\0",
- "N\r",
- "NE\r",
- "E\r",
- "SE\r",
- "S\r",
- "SW\r",
- "W\r",
- "NW\r",
- "INVENTORY\r",
- "ROOM DESCRIPTION\r",
- "x\r",
- "MORE\r",
- "CLOSE\r"
-};
-
-void AGOSEngine_PN::getObjectName(char *v, uint16 x) {
- if (x & 0x8000) {
- x &= ~0x8000;
- if (x > getptr(51))
- error("getObjectName: Object %d out of range", x);
- uncomstr(v, ftext(getlong(27), x * _dataBase[47]));
- } else {
- assert(x < 30);
- strcpy(v, objectNames[x]);
- }
-}
-
-void AGOSEngine_PN::pcl(const char *s) {
- strcat(_sb, s);
- if (strchr(s, '\n') == 0) {
- for (char *str = _sb; *str; str++)
- windowPutChar(_windowArray[_curWindow], *str);
- strcpy(_sb, "");
- }
-}
-
-void AGOSEngine_PN::pcf(uint8 ch) {
- int ct = 0;
- if (ch == '[')
- ch = '\n';
- if (ch == 0)
- return; /* Trap any C EOS chrs */
- if (ch == 255) {
- _bp = 0;
- _xofs = 0;
- return; /* pcf(255) initialises the routine */
- } /* pcf(254) flushes its working _buffer */
- if (ch != 254) {
- if ((ch != 32) || (_bp + _xofs != 50))
- _buffer[_bp++] = ch;
- }
- if ((ch != 254) && (!isspace(ch)) && (_bp < 60))
- return;
- /* We know have a case of needing to print the text */
- if (_bp + _xofs > 50) {
- pcl("\n");
- if (_buffer[0] == ' ')
- ct = 1; /* Skip initial space */
- /* Note ' ' will give a single start of line space */
- _xofs = 0;
- }
- _buffer[_bp] = 0;
- pcl(_buffer + ct);
- _xofs += _bp;
- _bp = 0;
- if (ch == '\n')
- _xofs = 0; /* At Newline! */
-}
-
-void AGOSEngine_PN::patok(int n) {
- int x;
- uint8 *tokbase;
- tokbase = _textBase + getlong(30);
- x = n;
- while (x -= (*tokbase++ > 127))
- ;
- while (*tokbase < 128)
- pcf(*tokbase++);
- pcf((uint8)(*tokbase & 127));
-}
-
-void AGOSEngine_PN::pmesd(int n) {
- ptext(ftext(getlong(24), n));
-}
-
-void AGOSEngine_PN::plocd(int n, int m) {
- if (n > getptr(53))
- error("Location out of range");
- ptext(ftext(getlong(21), n * _dataBase[48] + m));
-}
-
-void AGOSEngine_PN::pobjd(int n, int m) {
- if (n > getptr(51))
- error("Object out of range");
- ptext(ftext(getlong(27), n * _dataBase[47] + m));
-}
-
-void AGOSEngine_PN::ptext(uint32 tptr) {
- if (tptr > _textBaseSize)
- error("ptext: attempt to print beyond end of TBASE");
-
- while (_textBase[tptr]) {
- if (_textBase[tptr] < 244) {
- patok(_textBase[tptr++]);
- } else {
- patok((_textBase[tptr] - 244) * 254 + _textBase[tptr + 1] - 1);
- tptr += 2;
- }
- }
-}
-
-const uint8 characters[11][80] = {
-// PETERMASON
- {
- 118, 225,
- 91, 118,
- 94, 124,
- 236, 161,
- 241, 166,
- 168, 4,
- 138, 46,
- 139, 46,
- 249, 50,
- 38, 56,
- 80, 59,
- 149, 69,
- 37, 77,
- 93, 93,
- 86, 95,
- 0,
- 0,
- 58, 130,
- 62, 178,
- 83, 95,
- 0,
- 121, 58,
- 122, 59,
- 126, 60,
- 124, 61,
- 240, 62,
- 123, 63,
- 0
- },
-// JBLANDFORD
- {
- 0,
- 0,
- 0,
- 0
- },
-// SBLANDFORD
- {
- 120, 223,
- 94, 126,
- 112, 134,
- 45, 152,
- 241, 166,
- 168, 3,
- 150, 26,
- 220, 29,
- 138, 42,
- 139, 47,
- 249, 50,
- 38, 56,
- 230, 64,
- 37, 77,
- 93, 94,
- 86, 96,
- 0,
- 0,
- 58, 129,
- 59, 112,
- 83, 96,
- 81, 106,
- 62, 169,
- 0,
- 121, 54,
- 122, 55,
- 119, 56,
- 118, 57,
- 0
- },
-// MRJONES
- {
- 121, 218,
- 91, 118,
- 253, 121,
- 154, 138,
- 235, 173,
- 236, 161,
- 241, 165,
- 168, 0,
- 150, 21,
- 36, 33,
- 138, 42,
- 249, 50,
- 80, 60,
- 4, 60,
- 37, 78,
- 68, 33,
- 93, 92,
- 101, 109,
- 0,
- 36, 35,
- 68, 90,
- 0,
- 58, 128,
- 59, 111,
- 62, 182,
- 0,
- 122, 13,
- 126, 14,
- 124, 15,
- 240, 16,
- 120, 17,
- 119, 18,
- 118, 19,
- 52, 20,
- 125, 21,
- 127, 22,
- 123, 23,
- 117, 24,
- 0
- },
-// MRSJONES
- {
- 122, 219,
- 91, 119,
- 253, 123,
- 112, 136,
- 154, 137,
- 95, 142,
- 45, 152,
- 109, 155,
- 235, 160,
- 168, 1,
- 151, 13,
- 145, 15,
- 150, 22,
- 220, 28,
- 36, 33,
- 138, 43,
- 13, 51,
- 80, 59,
- 230, 64,
- 149, 69,
- 86, 100,
- 0,
- 36, 36,
- 0,
- 58, 127,
- 62, 179,
- 83, 100,
- 81, 102,
- 0,
- 121, 25,
- 126, 26,
- 124, 27,
- 120, 28,
- 119, 29,
- 118, 30,
- 52, 31,
- 125, 32,
- 127, 33,
- 123, 34,
- 117, 35,
- 0
- },
-// MRROBERTS
- {
- 123, 229,
- 91, 117,
- 253, 120,
- 94, 125,
- 112, 134,
- 109, 156,
- 235, 172,
- 236, 162,
- 241, 165,
- 168, 3,
- 36, 33,
- 249, 50,
- 38, 56,
- 80, 58,
- 37, 75,
- 34, 81,
- 68, 33,
- 101, 109,
- 0,
- 36, 40,
- 68, 88,
- 0,
- 59, 111,
- 62, 181,
- 0,
- 0
- },
-// POSTMISTRESS
- {
- 124, 221,
- 91, 119,
- 253, 122,
- 112, 136,
- 95, 142,
- 130, 149,
- 109, 155,
- 235, 176,
- 220, 29,
- 36, 33,
- 138, 43,
- 13, 51,
- 80, 57,
- 149, 68,
- 37, 73,
- 34, 33,
- 68, 33,
- 86, 100,
- 0,
- 36, 39,
- 34, 80,
- 68, 86,
- 0,
- 58, 130,
- 62, 181,
- 83, 100,
- 81, 103,
- 0,
- 121, 41,
- 122, 42,
- 126, 43,
- 240, 44,
- 120, 45,
- 119, 46,
- 118, 47,
- 52, 48,
- 123, 49,
- 83, 50,
- 117, 51,
- 0
- },
-// MWILLIAMS
- {
- 125, 227,
- 94, 124,
- 95, 141,
- 241, 166,
- 168, 4,
- 150, 26,
- 38, 54,
- 4, 60,
- 230, 65,
- 149, 68,
- 37, 76,
- 101, 109,
- 0,
- 230, 63,
- 0,
- 59, 112,
- 62, 183,
- 0,
- 240, 71,
- 120, 72,
- 118, 73,
- 52, 74,
- 117, 75,
- 0
- },
-// TONY
- {
- 126, 220,
- 95, 143,
- 130, 149,
- 45, 153,
- 109, 154,
- 235, 158,
- 241, 166,
- 168, 2,
- 145, 15,
- 150, 24,
- 220, 20,
- 36, 20,
- 4, 60,
- 37, 79,
- 86, 97,
- 0,
- 150, 23,
- 220, 27,
- 36, 34,
- 0,
- 83, 97,
- 0,
- 121, 36,
- 122, 37,
- 124, 38,
- 240, 39,
- 52, 40,
- 0
- },
-// PIG
- {
- 127, 228,
- 112, 133,
- 45, 153,
- 235, 157,
- 236, 163,
- 241, 165,
- 36, 33,
- 80, 58,
- 34, 81,
- 68, 33,
- 86, 98,
- 0,
- 36, 37,
- 68, 90,
- 0,
- 62, 184,
- 83, 98,
- 0,
- 121, 76,
- 122, 77,
- 126, 78,
- 124, 79,
- 240, 80,
- 120, 81,
- 118, 82,
- 52, 83,
- 125, 84,
- 123, 85,
- 83, 86,
- 117, 87,
- 0
- },
-// JUDY
- {
- 0,
- 0,
- 0,
- 240, 52,
- 117, 53,
- 0
- }
-};
-
-void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1, uint16 &msgNum2) {
- const uint8 *ptr;
- uint16 num;
-
- msgNum1 = 0;
- msgNum2 = 0;
-
- if (charNum == 83)
- charNum += 45;
-
- if (charNum < 118 || charNum > 128) {
- return;
- }
-
- ptr = characters[charNum - 118];
-
- while ((num = *ptr++) != 0) {
- if (num == objNum) {
- msgNum1 = *ptr++;
- msgNum1 += 400;
-
- while ((num = *ptr++) != 0)
- ptr++;
- break;
- }
- ptr++;
- }
-
- while ((num = *ptr++) != 0) {
- if (num == objNum) {
- msgNum2 = *ptr++;
- msgNum2 += 400;
-
- if (msgNum1 == 569)
- msgNum1 += 400;
- if (msgNum2 == 0)
- msgNum2 = msgNum1;
- return;
- }
- ptr++;
- }
-
- if (objNum >= 200)
- msgNum1 = 0;
-
- objNum -= 200;
- while ((num = *ptr++) != 0) {
- if (num == objNum) {
- msgNum1 = *ptr++;
- msgNum1 += 400;
-
- if (msgNum1 == 569)
- msgNum1 += 400;
- if (msgNum2 == 0)
- msgNum2 = msgNum1;
- return;
- }
- ptr++;
- }
-
- objNum += 200;
- while ((num = *ptr++) != 0) {
- if (num == objNum) {
- msgNum1 = *ptr++;
- msgNum1 += 200;
-
- if (msgNum1 == 569)
- msgNum1 += 400;
- if (msgNum2 == 0)
- msgNum2 = msgNum1;
- return;
- }
- ptr++;
- }
-
- if (msgNum1 == 569)
- msgNum1 += 400;
- if (msgNum2 == 0)
- msgNum2 = msgNum1;
-}
-
-char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
- char *origPtr, *strPtr1 = msg;
- uint8 count;
-
- getObjectName(strPtr1, num);
- if (!(num & 0x8000)) {
- return msg;
- }
-
- if (strPtr1[0] == 0x41 || strPtr1[0] == 0x61) {
- if (strPtr1[1] != 0x20)
- strPtr1 += 2;
- } else if (strPtr1[0] == 0x54 || strPtr1[0] == 0x74) {
- if (strPtr1[1] == 0x68 &&
- strPtr1[2] == 0x65 &&
- strPtr1[3] == 0x20)
- strPtr1 += 4;
- }
-
- origPtr = strPtr1;
- while (*strPtr1 != 13)
- strPtr1++;
-
- strPtr1[0] = 32;
- strPtr1[1] = 13;
- strPtr1[2] = 0;
-
- if (_videoLockOut & 0x10) {
- strPtr1 = origPtr;
- count = 6;
- while (*strPtr1) {
- if (*strPtr1 == 32) {
- count = 6;
- } else {
- count--;
- if (count == 0) {
- char *tmpPtr = strPtr1;
- char *strPtr2 = strPtr1;
-
- while (*strPtr2 != 0 && *strPtr2 != 32)
- strPtr2++;
-
- while (*strPtr2) {
- *strPtr1++ = *strPtr2++;
- }
- *strPtr1++ = *strPtr2++;
-
- strPtr1 = tmpPtr;
- count = 6;
- }
- }
- strPtr1++;
- }
- }
-
- return origPtr;
-}
-#endif
-
} // End of namespace AGOS
Copied: scummvm/branches/gsoc2009-16bit/engines/agos/string_pn.cpp (from rev 43332, scummvm/trunk/engines/agos/string_pn.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/string_pn.cpp (rev 0)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/string_pn.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -0,0 +1,674 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+
+#include "agos/agos.h"
+#include "agos/intern.h"
+
+namespace AGOS {
+
+uint32 AGOSEngine_PN::ftext(uint32 base, int n) {
+ uint32 b = base;
+ int ct = n;
+ while (ct) {
+ while(_textBase[b++])
+ ;
+ ct--;
+ }
+ return b;
+}
+
+char *AGOSEngine_PN::unctok(char *c, int n) {
+ int x;
+ uint8 *tokbase;
+ tokbase = _textBase + getlong(30);
+ x = n;
+ while (x-=(*tokbase++ > 127))
+ ;
+ while (*tokbase < 128)
+ *c++=*tokbase++;
+ *c++ = *tokbase & 127;
+ *c = 0;
+ return c;
+}
+
+void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
+ if (x > _textBaseSize)
+ error("UNCOMSTR: TBASE over-run");
+ while (_textBase[x]) {
+ if (_textBase[x] < 244) {
+ c = unctok(c, _textBase[x]);
+ } else {
+ c = unctok(c, (_textBase[x] - 244) * 254 + _textBase[x + 1] - 1);
+ x++;
+ }
+ x++;
+ }
+ *c++ = 13;
+ *c = 0;
+}
+
+static const char *objectNames[30] = {
+ "\0",
+ "Take \0",
+ "Inventory\r",
+ "Open \0",
+ "Close \0",
+ "Lock \0",
+ "Unlock \0",
+ "Examine \0",
+ "Look in \0",
+ "Exits \r",
+ "Look\r",
+ "Wait\r",
+ "Pause\r",
+ "\0",
+ "Save\r",
+ "Restore\r",
+ "\0",
+ "N\r",
+ "NE\r",
+ "E\r",
+ "SE\r",
+ "S\r",
+ "SW\r",
+ "W\r",
+ "NW\r",
+ "INVENTORY\r",
+ "ROOM DESCRIPTION\r",
+ "x\r",
+ "MORE\r",
+ "CLOSE\r"
+};
+
+void AGOSEngine_PN::getObjectName(char *v, uint16 x) {
+ if (x & 0x8000) {
+ x &= ~0x8000;
+ if (x > getptr(51))
+ error("getObjectName: Object %d out of range", x);
+ uncomstr(v, ftext(getlong(27), x * _dataBase[47]));
+ } else {
+ assert(x < 30);
+ strcpy(v, objectNames[x]);
+ }
+}
+
+void AGOSEngine_PN::pcl(const char *s) {
+ strcat(_sb, s);
+ if (strchr(s, '\n') == 0) {
+ for (char *str = _sb; *str; str++)
+ windowPutChar(_windowArray[_curWindow], *str);
+ strcpy(_sb, "");
+ }
+}
+
+void AGOSEngine_PN::pcf(uint8 ch) {
+ int ct = 0;
+ if (ch == '[')
+ ch = '\n';
+ if (ch == 0)
+ return; /* Trap any C EOS chrs */
+ if (ch == 255) {
+ _bp = 0;
+ _xofs = 0;
+ return; /* pcf(255) initialises the routine */
+ } /* pcf(254) flushes its working _buffer */
+ if (ch != 254) {
+ if ((ch != 32) || (_bp + _xofs != 50))
+ _buffer[_bp++] = ch;
+ }
+ if ((ch != 254) && (!isspace(ch)) && (_bp < 60))
+ return;
+ /* We know have a case of needing to print the text */
+ if (_bp + _xofs > 50) {
+ pcl("\n");
+ if (_buffer[0] == ' ')
+ ct = 1; /* Skip initial space */
+ /* Note ' ' will give a single start of line space */
+ _xofs = 0;
+ }
+ _buffer[_bp] = 0;
+ pcl(_buffer + ct);
+ _xofs += _bp;
+ _bp = 0;
+ if (ch == '\n')
+ _xofs = 0; /* At Newline! */
+}
+
+void AGOSEngine_PN::patok(int n) {
+ int x;
+ uint8 *tokbase;
+ tokbase = _textBase + getlong(30);
+ x = n;
+ while (x -= (*tokbase++ > 127))
+ ;
+ while (*tokbase < 128)
+ pcf(*tokbase++);
+ pcf((uint8)(*tokbase & 127));
+}
+
+void AGOSEngine_PN::pmesd(int n) {
+ ptext(ftext(getlong(24), n));
+}
+
+void AGOSEngine_PN::plocd(int n, int m) {
+ if (n > getptr(53))
+ error("Location out of range");
+ ptext(ftext(getlong(21), n * _dataBase[48] + m));
+}
+
+void AGOSEngine_PN::pobjd(int n, int m) {
+ if (n > getptr(51))
+ error("Object out of range");
+ ptext(ftext(getlong(27), n * _dataBase[47] + m));
+}
+
+void AGOSEngine_PN::ptext(uint32 tptr) {
+ if (tptr > _textBaseSize)
+ error("ptext: attempt to print beyond end of TBASE");
+
+ while (_textBase[tptr]) {
+ if (_textBase[tptr] < 244) {
+ patok(_textBase[tptr++]);
+ } else {
+ patok((_textBase[tptr] - 244) * 254 + _textBase[tptr + 1] - 1);
+ tptr += 2;
+ }
+ }
+}
+
+const uint8 characters[11][80] = {
+// PETERMASON
+ {
+ 118, 225,
+ 91, 118,
+ 94, 124,
+ 236, 161,
+ 241, 166,
+ 168, 4,
+ 138, 46,
+ 139, 46,
+ 249, 50,
+ 38, 56,
+ 80, 59,
+ 149, 69,
+ 37, 77,
+ 93, 93,
+ 86, 95,
+ 0,
+ 0,
+ 58, 130,
+ 62, 178,
+ 83, 95,
+ 0,
+ 121, 58,
+ 122, 59,
+ 126, 60,
+ 124, 61,
+ 240, 62,
+ 123, 63,
+ 0
+ },
+// JBLANDFORD
+ {
+ 0,
+ 0,
+ 0,
+ 0
+ },
+// SBLANDFORD
+ {
+ 120, 223,
+ 94, 126,
+ 112, 134,
+ 45, 152,
+ 241, 166,
+ 168, 3,
+ 150, 26,
+ 220, 29,
+ 138, 42,
+ 139, 47,
+ 249, 50,
+ 38, 56,
+ 230, 64,
+ 37, 77,
+ 93, 94,
+ 86, 96,
+ 0,
+ 0,
+ 58, 129,
+ 59, 112,
+ 83, 96,
+ 81, 106,
+ 62, 169,
+ 0,
+ 121, 54,
+ 122, 55,
+ 119, 56,
+ 118, 57,
+ 0
+ },
+// MRJONES
+ {
+ 121, 218,
+ 91, 118,
+ 253, 121,
+ 154, 138,
+ 235, 173,
+ 236, 161,
+ 241, 165,
+ 168, 0,
+ 150, 21,
+ 36, 33,
+ 138, 42,
+ 249, 50,
+ 80, 60,
+ 4, 60,
+ 37, 78,
+ 68, 33,
+ 93, 92,
+ 101, 109,
+ 0,
+ 36, 35,
+ 68, 90,
+ 0,
+ 58, 128,
+ 59, 111,
+ 62, 182,
+ 0,
+ 122, 13,
+ 126, 14,
+ 124, 15,
+ 240, 16,
+ 120, 17,
+ 119, 18,
+ 118, 19,
+ 52, 20,
+ 125, 21,
+ 127, 22,
+ 123, 23,
+ 117, 24,
+ 0
+ },
+// MRSJONES
+ {
+ 122, 219,
+ 91, 119,
+ 253, 123,
+ 112, 136,
+ 154, 137,
+ 95, 142,
+ 45, 152,
+ 109, 155,
+ 235, 160,
+ 168, 1,
+ 151, 13,
+ 145, 15,
+ 150, 22,
+ 220, 28,
+ 36, 33,
+ 138, 43,
+ 13, 51,
+ 80, 59,
+ 230, 64,
+ 149, 69,
+ 86, 100,
+ 0,
+ 36, 36,
+ 0,
+ 58, 127,
+ 62, 179,
+ 83, 100,
+ 81, 102,
+ 0,
+ 121, 25,
+ 126, 26,
+ 124, 27,
+ 120, 28,
+ 119, 29,
+ 118, 30,
+ 52, 31,
+ 125, 32,
+ 127, 33,
+ 123, 34,
+ 117, 35,
+ 0
+ },
+// MRROBERTS
+ {
+ 123, 229,
+ 91, 117,
+ 253, 120,
+ 94, 125,
+ 112, 134,
+ 109, 156,
+ 235, 172,
+ 236, 162,
+ 241, 165,
+ 168, 3,
+ 36, 33,
+ 249, 50,
+ 38, 56,
+ 80, 58,
+ 37, 75,
+ 34, 81,
+ 68, 33,
+ 101, 109,
+ 0,
+ 36, 40,
+ 68, 88,
+ 0,
+ 59, 111,
+ 62, 181,
+ 0,
+ 0
+ },
+// POSTMISTRESS
+ {
+ 124, 221,
+ 91, 119,
+ 253, 122,
+ 112, 136,
+ 95, 142,
+ 130, 149,
+ 109, 155,
+ 235, 176,
+ 220, 29,
+ 36, 33,
+ 138, 43,
+ 13, 51,
+ 80, 57,
+ 149, 68,
+ 37, 73,
+ 34, 33,
+ 68, 33,
+ 86, 100,
+ 0,
+ 36, 39,
+ 34, 80,
+ 68, 86,
+ 0,
+ 58, 130,
+ 62, 181,
+ 83, 100,
+ 81, 103,
+ 0,
+ 121, 41,
+ 122, 42,
+ 126, 43,
+ 240, 44,
+ 120, 45,
+ 119, 46,
+ 118, 47,
+ 52, 48,
+ 123, 49,
+ 83, 50,
+ 117, 51,
+ 0
+ },
+// MWILLIAMS
+ {
+ 125, 227,
+ 94, 124,
+ 95, 141,
+ 241, 166,
+ 168, 4,
+ 150, 26,
+ 38, 54,
+ 4, 60,
+ 230, 65,
+ 149, 68,
+ 37, 76,
+ 101, 109,
+ 0,
+ 230, 63,
+ 0,
+ 59, 112,
+ 62, 183,
+ 0,
+ 240, 71,
+ 120, 72,
+ 118, 73,
+ 52, 74,
+ 117, 75,
+ 0
+ },
+// TONY
+ {
+ 126, 220,
+ 95, 143,
+ 130, 149,
+ 45, 153,
+ 109, 154,
+ 235, 158,
+ 241, 166,
+ 168, 2,
+ 145, 15,
+ 150, 24,
+ 220, 20,
+ 36, 20,
+ 4, 60,
+ 37, 79,
+ 86, 97,
+ 0,
+ 150, 23,
+ 220, 27,
+ 36, 34,
+ 0,
+ 83, 97,
+ 0,
+ 121, 36,
+ 122, 37,
+ 124, 38,
+ 240, 39,
+ 52, 40,
+ 0
+ },
+// PIG
+ {
+ 127, 228,
+ 112, 133,
+ 45, 153,
+ 235, 157,
+ 236, 163,
+ 241, 165,
+ 36, 33,
+ 80, 58,
+ 34, 81,
+ 68, 33,
+ 86, 98,
+ 0,
+ 36, 37,
+ 68, 90,
+ 0,
+ 62, 184,
+ 83, 98,
+ 0,
+ 121, 76,
+ 122, 77,
+ 126, 78,
+ 124, 79,
+ 240, 80,
+ 120, 81,
+ 118, 82,
+ 52, 83,
+ 125, 84,
+ 123, 85,
+ 83, 86,
+ 117, 87,
+ 0
+ },
+// JUDY
+ {
+ 0,
+ 0,
+ 0,
+ 240, 52,
+ 117, 53,
+ 0
+ }
+};
+
+void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1, uint16 &msgNum2) {
+ const uint8 *ptr;
+ uint16 num;
+
+ msgNum1 = 0;
+ msgNum2 = 0;
+
+ if (charNum == 83)
+ charNum += 45;
+
+ if (charNum < 118 || charNum > 128) {
+ return;
+ }
+
+ ptr = characters[charNum - 118];
+
+ while ((num = *ptr++) != 0) {
+ if (num == objNum) {
+ msgNum1 = *ptr++;
+ msgNum1 += 400;
+
+ while ((num = *ptr++) != 0)
+ ptr++;
+ break;
+ }
+ ptr++;
+ }
+
+ while ((num = *ptr++) != 0) {
+ if (num == objNum) {
+ msgNum2 = *ptr++;
+ msgNum2 += 400;
+
+ if (msgNum1 == 569)
+ msgNum1 += 400;
+ if (msgNum2 == 0)
+ msgNum2 = msgNum1;
+ return;
+ }
+ ptr++;
+ }
+
+ if (objNum >= 200)
+ msgNum1 = 0;
+
+ objNum -= 200;
+ while ((num = *ptr++) != 0) {
+ if (num == objNum) {
+ msgNum1 = *ptr++;
+ msgNum1 += 400;
+
+ if (msgNum1 == 569)
+ msgNum1 += 400;
+ if (msgNum2 == 0)
+ msgNum2 = msgNum1;
+ return;
+ }
+ ptr++;
+ }
+
+ objNum += 200;
+ while ((num = *ptr++) != 0) {
+ if (num == objNum) {
+ msgNum1 = *ptr++;
+ msgNum1 += 200;
+
+ if (msgNum1 == 569)
+ msgNum1 += 400;
+ if (msgNum2 == 0)
+ msgNum2 = msgNum1;
+ return;
+ }
+ ptr++;
+ }
+
+ if (msgNum1 == 569)
+ msgNum1 += 400;
+ if (msgNum2 == 0)
+ msgNum2 = msgNum1;
+}
+
+char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
+ char *origPtr, *strPtr1 = msg;
+ uint8 count;
+
+ getObjectName(strPtr1, num);
+ if (!(num & 0x8000)) {
+ return msg;
+ }
+
+ if (strPtr1[0] == 0x41 || strPtr1[0] == 0x61) {
+ if (strPtr1[1] != 0x20)
+ strPtr1 += 2;
+ } else if (strPtr1[0] == 0x54 || strPtr1[0] == 0x74) {
+ if (strPtr1[1] == 0x68 &&
+ strPtr1[2] == 0x65 &&
+ strPtr1[3] == 0x20)
+ strPtr1 += 4;
+ }
+
+ origPtr = strPtr1;
+ while (*strPtr1 != 13)
+ strPtr1++;
+
+ strPtr1[0] = 32;
+ strPtr1[1] = 13;
+ strPtr1[2] = 0;
+
+ if (_videoLockOut & 0x10) {
+ strPtr1 = origPtr;
+ count = 6;
+ while (*strPtr1) {
+ if (*strPtr1 == 32) {
+ count = 6;
+ } else {
+ count--;
+ if (count == 0) {
+ char *tmpPtr = strPtr1;
+ char *strPtr2 = strPtr1;
+
+ while (*strPtr2 != 0 && *strPtr2 != 32)
+ strPtr2++;
+
+ while (*strPtr2) {
+ *strPtr1++ = *strPtr2++;
+ }
+ *strPtr1++ = *strPtr2++;
+
+ strPtr1 = tmpPtr;
+ count = 6;
+ }
+ }
+ strPtr1++;
+ }
+ }
+
+ return origPtr;
+}
+
+} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/subroutine.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/subroutine.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/subroutine.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#include "common/file.h"
+
#include "agos/agos.h"
#include "agos/intern.h"
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/verb.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/verb.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/verb.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -203,6 +203,7 @@
"", "", "", "komu ?"
};
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::clearName() {
stopAnimateSimon2(2, 6);
_lastNameOn = NULL;
@@ -210,6 +211,7 @@
_mouseAnim = 1;
return;
}
+#endif
void AGOSEngine_Simon2::clearName() {
if (getBitFlag(79)) {
@@ -530,6 +532,7 @@
_needHitAreaRecalc++;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_PuzzlePack::resetVerbs() {
_verbHitArea = 300;
}
@@ -559,6 +562,7 @@
setVerb(NULL);
}
}
+#endif
void AGOSEngine::resetVerbs() {
if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2)
@@ -590,6 +594,7 @@
}
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::setVerb(HitArea *ha) {
int cursor = _mouseCursor;
if (_noRightClick)
@@ -616,6 +621,7 @@
_needHitAreaRecalc++;
_verbHitArea = cursor + 300;
}
+#endif
void AGOSEngine::setVerb(HitArea *ha) {
HitArea *tmp = _currentVerbBox;
@@ -654,9 +660,11 @@
_currentVerbBox = ha;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::hitarea_leave(HitArea *ha, bool state) {
invertBox(ha, state);
}
+#endif
void AGOSEngine::hitarea_leave(HitArea *ha, bool state) {
if (getGameType() == GType_SIMON2) {
@@ -917,6 +925,7 @@
_lastNameOn = ha;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::invertBox(HitArea *ha, bool state) {
if (getBitFlag(205) || getBitFlag(206)) {
if (state != 0) {
@@ -959,6 +968,7 @@
}
}
}
+#endif
void AGOSEngine::invertBox(HitArea *ha, byte a, byte b, byte c, byte d) {
byte *src, color;
@@ -1027,257 +1037,4 @@
_videoLockOut &= ~0x8000;
}
-#ifdef ENABLE_PN
-// Personal Nightmare specific
-void AGOSEngine_PN::boxController(uint x, uint y, uint mode) {
- HitArea *best_ha;
- HitArea *ha = _hitAreaList;
-
- best_ha = NULL;
-
- do {
- if (!(ha->flags & kOBFBoxDisabled)) {
- if (x >= ha->x && y >= ha->y && x - ha->x < ha->width && y - ha->y < ha->height &&
- best_ha == NULL) {
- best_ha = ha;
- } else {
- if (ha->flags & kOBFBoxSelected) {
- hitarea_leave(ha , true);
- ha->flags &= ~kOBFBoxSelected;
- }
- }
- } else {
- ha->flags &= ~kOBFBoxSelected;
- }
- } while (ha++, ha->id != 0xFFFF);
-
- if (mode != 0) {
- _lastHitArea = best_ha;
- }
-
- if (best_ha == NULL) {
- return;
- }
-
- if (best_ha->flags & kOBFInvertTouch && !(best_ha->flags & kOBFBoxSelected)) {
- hitarea_leave(best_ha, false);
- best_ha->flags |= kOBFBoxSelected;
- }
-}
-
-void AGOSEngine_PN::mouseHit() {
- if (_hitCalled == 5) {
- execMouseHit(NULL);
- } else {
- boxController(_mouse.x, _mouse.y, 1);
- if (_hitCalled == 4 || _lastHitArea != 0) {
- execMouseHit(_lastHitArea);
- }
- }
- _hitCalled = 0;
- _oneClick = 0;
-}
-
-void AGOSEngine_PN::execMouseHit(HitArea *ha) {
- if (_hitCalled == 1) {
- if (ha->flags & kOBFUseMessageList)
- hitBox11(ha);
- else if (ha->flags & kOBFMoreBox)
- hitBox9(ha);
- else if (ha->flags & kOBFExit)
- hitBox7(ha);
- else if (ha->flags & kOBFUseEmptyLine)
- hitBox2(ha);
- else
- hitBox1(ha);
- } else if (_hitCalled == 2) {
- if (ha->flags & (kOBFObject | kOBFInventoryBox | kOBFRoomBox))
- hitBox3(ha);
- else if (ha->flags & kOBFUseMessageList)
- hitBox11(ha);
- else if (ha->flags & kOBFMoreBox)
- hitBox9(ha);
- else if (ha->flags & kOBFExit)
- hitBox7(ha);
- else if (ha->flags & kOBFUseEmptyLine)
- hitBox2(ha);
- else
- hitBox1(ha);
- } else if (_hitCalled == 3) {
- if ((ha->flags & kOBFDraggable) && !_dragFlag) {
- _dragFlag = true;
- _dragStore = ha;
- _needHitAreaRecalc++;
- }
- } else if (_hitCalled == 4) {
- _dragFlag = false;
- _hitCalled = 0;
- _oneClick = 0;
- _dragCount = 0;
- _needHitAreaRecalc++;
- if (ha != 0) {
- if (ha->flags & kOBFInventoryBox)
- hitBox5(ha);
- else if (ha->flags & kOBFRoomBox)
- hitBox6(ha);
- else if (_videoLockOut & 10)
- hitBox8(ha);
- }
- } else {
- _hitCalled = 0;
- if (_mouseString == 0) {
- _mouseString = (const char *)"\r";
- }
- }
-}
-
-void AGOSEngine_PN::hitBox1(HitArea *ha) {
- if (_mouseString)
- return;
-
- _mouseString = getMessage(_objectName1, ha->msg1);
- if (_intputCounter) {
- char *msgPtr = getMessage(_objectName1, ha->msg1);
- while (*msgPtr != 13)
- msgPtr++;
- *msgPtr = 0;
- } else if (!(ha->flags & kOBFNoShowName)) {
- _mousePrintFG++;
- _mouseString1 = _mouseString;
- _mouseString = (const char*)"showname \0";
-
- }
-}
-
-void AGOSEngine_PN::hitBox2(HitArea *ha) {
- if (!_intputCounter)
- hitBox1(ha);
-}
-
-void AGOSEngine_PN::hitBox3(HitArea *ha) {
- if (!_intputCounter)
- hitBox4(ha);
-}
-
-void AGOSEngine_PN::hitBox4(HitArea *ha) {
- if (_mouseString)
- return;
-
- uint16 num = ha->msg1 & ~0x8000;
- if ((_videoLockOut & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) &&
- !testContainer(num)) {
- return;
- }
-
- _mouseString = getMessage(_objectName2, ha->msg2);
- _mouseString1 = getMessage(_objectName1, ha->msg1);
- _mousePrintFG++;
-}
-
-void AGOSEngine_PN::hitBox5(HitArea *ha) {
- if (_intputCounter || _mouseString)
- return;
-
- if (_dragStore && (_dragStore->flags & kOBFInventoryBox))
- return;
-
- _mousePrintFG++;
- _mouseString = (const char *)"take \0";
- _mouseString1 = getMessage(_objectName1, _dragStore->msg1);
-
- if (_dragStore->flags & kOBFRoomBox)
- _mouseString1 = (const char *)"all\r";
-}
-
-void AGOSEngine_PN::hitBox6(HitArea *ha) {
- if (_intputCounter || _mouseString)
- return;
-
- if (_dragStore->flags & kOBFRoomBox)
- return;
-
- _mousePrintFG++;
- _mouseString = (const char *)"drop \0";
- _mouseString1 = getMessage(_objectName1, _dragStore->msg1);
-
- if (_dragStore->flags & kOBFInventoryBox)
- _mouseString1 = (const char *)"all\r";
-}
-
-void AGOSEngine_PN::hitBox7(HitArea *ha) {
- if (_intputCounter) {
- if (!(ha->flags & kOBFUseEmptyLine)) {
- hitBox1(ha);
- }
- return;
- }
-
- if (_mouseString)
- return;
-
- _mousePrintFG++;
- _mouseString1 = getMessage(_objectName1, ha->msg1);
-
- uint16 num = ha->msg1 & ~0x8000;
- uint16 state = getptr(_quickptr[0] + num * _quickshort[0] + 2);
- if (state == 3) {
- _mouseString = (const char *)"unlock \0";
- } else if (state == 2) {
- _mouseString = (const char *)"open \0";
- } else {
- _mouseString = (const char *)"go through \0";
- }
-}
-
-void AGOSEngine_PN::hitBox8(HitArea *ha) {
- char *msgPtr, *tmpPtr;
-
- if (_intputCounter || _mouseString)
- return;
-
- if (_dragStore == ha)
- return;
-
- uint16 num = ha->msg1 & ~0x8000;
- if (!testSeen(num))
- return;
-
- msgPtr = getMessage(_objectName1, ha->msg1);
- sprintf(_inMessage, " in %s", msgPtr);
- _mouseString1 = _inMessage;
-
- msgPtr = getMessage(_objectName1, _dragStore->msg1);
- *(tmpPtr = strchr(msgPtr, 13)) = 0;
- sprintf(_placeMessage, "put %s", msgPtr);
- _mouseString = _placeMessage;
-}
-
-void AGOSEngine_PN::hitBox9(HitArea *ha) {
- if (_objectCountS == _objects) {
- _objectCountS = -1;
- }
- iconPage();
-}
-
-static const char *messageList[9] = {
- "North\r",
- "East\r",
- "South\r",
- "West\r",
- "Up\r",
- "Down\r",
- "Push grey button\r",
- "Push red button\r",
- "Go under car\r"
-};
-
-void AGOSEngine_PN::hitBox11(HitArea *ha) {
- if (_intputCounter || _mouseString)
- return;
-
- _mouseString = messageList[ha->msg1];
- _mousePrintFG++;
-}
-#endif
-
} // End of namespace AGOS
Copied: scummvm/branches/gsoc2009-16bit/engines/agos/verb_pn.cpp (from rev 43332, scummvm/trunk/engines/agos/verb_pn.cpp)
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/verb_pn.cpp (rev 0)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/verb_pn.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -0,0 +1,284 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+// Verb and hitarea handling
+
+
+#include "agos/agos.h"
+#include "agos/intern.h"
+
+namespace AGOS {
+
+void AGOSEngine_PN::boxController(uint x, uint y, uint mode) {
+ HitArea *best_ha;
+ HitArea *ha = _hitAreaList;
+
+ best_ha = NULL;
+
+ do {
+ if (!(ha->flags & kOBFBoxDisabled)) {
+ if (x >= ha->x && y >= ha->y && x - ha->x < ha->width && y - ha->y < ha->height &&
+ best_ha == NULL) {
+ best_ha = ha;
+ } else {
+ if (ha->flags & kOBFBoxSelected) {
+ hitarea_leave(ha , true);
+ ha->flags &= ~kOBFBoxSelected;
+ }
+ }
+ } else {
+ ha->flags &= ~kOBFBoxSelected;
+ }
+ } while (ha++, ha->id != 0xFFFF);
+
+ if (mode != 0) {
+ _lastHitArea = best_ha;
+ }
+
+ if (best_ha == NULL) {
+ return;
+ }
+
+ if (best_ha->flags & kOBFInvertTouch && !(best_ha->flags & kOBFBoxSelected)) {
+ hitarea_leave(best_ha, false);
+ best_ha->flags |= kOBFBoxSelected;
+ }
+}
+
+void AGOSEngine_PN::mouseHit() {
+ if (_hitCalled == 5) {
+ execMouseHit(NULL);
+ } else {
+ boxController(_mouse.x, _mouse.y, 1);
+ if (_hitCalled == 4 || _lastHitArea != 0) {
+ execMouseHit(_lastHitArea);
+ }
+ }
+ _hitCalled = 0;
+ _oneClick = 0;
+}
+
+void AGOSEngine_PN::execMouseHit(HitArea *ha) {
+ if (_hitCalled == 1) {
+ if (ha->flags & kOBFUseMessageList)
+ hitBox11(ha);
+ else if (ha->flags & kOBFMoreBox)
+ hitBox9(ha);
+ else if (ha->flags & kOBFExit)
+ hitBox7(ha);
+ else if (ha->flags & kOBFUseEmptyLine)
+ hitBox2(ha);
+ else
+ hitBox1(ha);
+ } else if (_hitCalled == 2) {
+ if (ha->flags & (kOBFObject | kOBFInventoryBox | kOBFRoomBox))
+ hitBox3(ha);
+ else if (ha->flags & kOBFUseMessageList)
+ hitBox11(ha);
+ else if (ha->flags & kOBFMoreBox)
+ hitBox9(ha);
+ else if (ha->flags & kOBFExit)
+ hitBox7(ha);
+ else if (ha->flags & kOBFUseEmptyLine)
+ hitBox2(ha);
+ else
+ hitBox1(ha);
+ } else if (_hitCalled == 3) {
+ if ((ha->flags & kOBFDraggable) && !_dragFlag) {
+ _dragFlag = true;
+ _dragStore = ha;
+ _needHitAreaRecalc++;
+ }
+ } else if (_hitCalled == 4) {
+ _dragFlag = false;
+ _hitCalled = 0;
+ _oneClick = 0;
+ _dragCount = 0;
+ _needHitAreaRecalc++;
+ if (ha != 0) {
+ if (ha->flags & kOBFInventoryBox)
+ hitBox5(ha);
+ else if (ha->flags & kOBFRoomBox)
+ hitBox6(ha);
+ else if (_videoLockOut & 10)
+ hitBox8(ha);
+ }
+ } else {
+ _hitCalled = 0;
+ if (_mouseString == 0) {
+ _mouseString = (const char *)"\r";
+ }
+ }
+}
+
+void AGOSEngine_PN::hitBox1(HitArea *ha) {
+ if (_mouseString)
+ return;
+
+ _mouseString = getMessage(_objectName1, ha->msg1);
+ if (_intputCounter) {
+ char *msgPtr = getMessage(_objectName1, ha->msg1);
+ while (*msgPtr != 13)
+ msgPtr++;
+ *msgPtr = 0;
+ } else if (!(ha->flags & kOBFNoShowName)) {
+ _mousePrintFG++;
+ _mouseString1 = _mouseString;
+ _mouseString = (const char*)"showname \0";
+
+ }
+}
+
+void AGOSEngine_PN::hitBox2(HitArea *ha) {
+ if (!_intputCounter)
+ hitBox1(ha);
+}
+
+void AGOSEngine_PN::hitBox3(HitArea *ha) {
+ if (!_intputCounter)
+ hitBox4(ha);
+}
+
+void AGOSEngine_PN::hitBox4(HitArea *ha) {
+ if (_mouseString)
+ return;
+
+ uint16 num = ha->msg1 & ~0x8000;
+ if ((_videoLockOut & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) &&
+ !testContainer(num)) {
+ return;
+ }
+
+ _mouseString = getMessage(_objectName2, ha->msg2);
+ _mouseString1 = getMessage(_objectName1, ha->msg1);
+ _mousePrintFG++;
+}
+
+void AGOSEngine_PN::hitBox5(HitArea *ha) {
+ if (_intputCounter || _mouseString)
+ return;
+
+ if (_dragStore && (_dragStore->flags & kOBFInventoryBox))
+ return;
+
+ _mousePrintFG++;
+ _mouseString = (const char *)"take \0";
+ _mouseString1 = getMessage(_objectName1, _dragStore->msg1);
+
+ if (_dragStore->flags & kOBFRoomBox)
+ _mouseString1 = (const char *)"all\r";
+}
+
+void AGOSEngine_PN::hitBox6(HitArea *ha) {
+ if (_intputCounter || _mouseString)
+ return;
+
+ if (_dragStore->flags & kOBFRoomBox)
+ return;
+
+ _mousePrintFG++;
+ _mouseString = (const char *)"drop \0";
+ _mouseString1 = getMessage(_objectName1, _dragStore->msg1);
+
+ if (_dragStore->flags & kOBFInventoryBox)
+ _mouseString1 = (const char *)"all\r";
+}
+
+void AGOSEngine_PN::hitBox7(HitArea *ha) {
+ if (_intputCounter) {
+ if (!(ha->flags & kOBFUseEmptyLine)) {
+ hitBox1(ha);
+ }
+ return;
+ }
+
+ if (_mouseString)
+ return;
+
+ _mousePrintFG++;
+ _mouseString1 = getMessage(_objectName1, ha->msg1);
+
+ uint16 num = ha->msg1 & ~0x8000;
+ uint16 state = getptr(_quickptr[0] + num * _quickshort[0] + 2);
+ if (state == 3) {
+ _mouseString = (const char *)"unlock \0";
+ } else if (state == 2) {
+ _mouseString = (const char *)"open \0";
+ } else {
+ _mouseString = (const char *)"go through \0";
+ }
+}
+
+void AGOSEngine_PN::hitBox8(HitArea *ha) {
+ char *msgPtr, *tmpPtr;
+
+ if (_intputCounter || _mouseString)
+ return;
+
+ if (_dragStore == ha)
+ return;
+
+ uint16 num = ha->msg1 & ~0x8000;
+ if (!testSeen(num))
+ return;
+
+ msgPtr = getMessage(_objectName1, ha->msg1);
+ sprintf(_inMessage, " in %s", msgPtr);
+ _mouseString1 = _inMessage;
+
+ msgPtr = getMessage(_objectName1, _dragStore->msg1);
+ *(tmpPtr = strchr(msgPtr, 13)) = 0;
+ sprintf(_placeMessage, "put %s", msgPtr);
+ _mouseString = _placeMessage;
+}
+
+void AGOSEngine_PN::hitBox9(HitArea *ha) {
+ if (_objectCountS == _objects) {
+ _objectCountS = -1;
+ }
+ iconPage();
+}
+
+static const char *messageList[9] = {
+ "North\r",
+ "East\r",
+ "South\r",
+ "West\r",
+ "Up\r",
+ "Down\r",
+ "Push grey button\r",
+ "Push red button\r",
+ "Go under car\r"
+};
+
+void AGOSEngine_PN::hitBox11(HitArea *ha) {
+ if (_intputCounter || _mouseString)
+ return;
+
+ _mouseString = messageList[ha->msg1];
+ _mousePrintFG++;
+}
+
+} // End of namespace AGOS
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/vga.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -106,7 +106,7 @@
op[20] = &AGOSEngine::vc19_loop;
op[21] = &AGOSEngine::vc20_setRepeat;
op[22] = &AGOSEngine::vc21_endRepeat;
- op[23] = &AGOSEngine::vc22_setPaletteOld;
+ op[23] = &AGOSEngine::vc22_setPalette;
op[24] = &AGOSEngine::vc23_setPriority;
op[25] = &AGOSEngine::vc24_setSpriteXY;
op[26] = &AGOSEngine::vc25_halt_sprite;
@@ -918,7 +918,7 @@
0x77, 0x55, 0x00,
};
-void AGOSEngine::vc22_setPaletteOld() {
+void AGOSEngine::vc22_setPalette() {
byte *offs, *palptr, *src;
uint16 b, num;
@@ -1302,12 +1302,7 @@
_displayScreen = false;
uint16 vga_res = vcReadNextWord();
uint16 windowNum = vcReadNextWord();
-
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- fillBackGroundFromFront();
- } else {
- setWindowImage(windowNum, vga_res);
- }
+ setWindowImage(windowNum, vga_res);
}
void AGOSEngine::vc37_pokePalette() {
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/vga_e2.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/vga_e2.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/vga_e2.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -40,7 +40,7 @@
op[17] = &AGOSEngine::vc17_waitEnd;
op[19] = &AGOSEngine::vc19_loop;
- op[22] = &AGOSEngine::vc22_setPaletteOld;
+ op[22] = &AGOSEngine::vc22_setPalette;
op[28] = &AGOSEngine::vc28_playSFX;
op[32] = &AGOSEngine::vc32_saveScreen;
op[37] = &AGOSEngine::vc37_pokePalette;
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/vga_ff.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/vga_ff.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/vga_ff.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -25,6 +25,8 @@
+#ifdef ENABLE_AGOS2
+
#include "agos/agos.h"
#include "agos/intern.h"
@@ -68,6 +70,57 @@
}
}
+void AGOSEngine_Feeble::vc36_setWindowImage() {
+ _displayScreen = false;
+ vcReadNextWord();
+ vcReadNextWord();
+ fillBackGroundFromFront();
+}
+
+void AGOSEngine_Feeble::vc48_setPathFinder() {
+ uint16 a = (uint16)_variableArrayPtr[12];
+ const uint16 *p = _pathFindArray[a - 1];
+
+ VgaSprite *vsp = findCurSprite();
+ int16 x, y, ydiff;
+ int16 x1, y1, x2, y2;
+ uint pos = 0;
+
+ x = vsp->x;
+ while (x >= (int16)readUint16Wrapper(p + 2)) {
+ p += 2;
+ pos++;
+ }
+
+ x1 = readUint16Wrapper(p);
+ y1 = readUint16Wrapper(p + 1);
+ x2 = readUint16Wrapper(p + 2);
+ y2 = readUint16Wrapper(p + 3);
+
+ if (x2 != 9999) {
+ ydiff = y2 - y1;
+ if (ydiff < 0) {
+ ydiff = -ydiff;
+ x = vsp->x & 7;
+ ydiff *= x;
+ ydiff /= 8;
+ ydiff = -ydiff;
+ } else {
+ x = vsp->x & 7;
+ ydiff *= x;
+ ydiff /= 8;
+ }
+ y1 += ydiff;
+ }
+
+ y = vsp->y;
+ vsp->y = y1;
+ checkScrollY(y1 - y, y1);
+
+ _variableArrayPtr[11] = x1;
+ _variableArrayPtr[13] = pos;
+}
+
void AGOSEngine::vc75_setScale() {
_baseY = vcReadNextWord();
_scale = vcReadNextWord() / 1000000.0f;
@@ -435,3 +488,5 @@
}
} // End of namespace AGOS
+
+#endif // ENABLE_AGOS2
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/vga_pn.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/vga_pn.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/vga_pn.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -23,8 +23,6 @@
*
*/
-#ifdef ENABLE_PN
-
#include "agos/agos.h"
#include "agos/intern.h"
#include "agos/vga.h"
@@ -57,7 +55,7 @@
op[20] = &AGOSEngine::vc19_loop;
op[21] = &AGOSEngine::vc20_setRepeat;
op[22] = &AGOSEngine::vc21_endRepeat;
- op[23] = &AGOSEngine::vc22_setPaletteOld;
+ op[23] = &AGOSEngine::vc22_setPalette;
op[24] = &AGOSEngine::vc23_setPriority;
op[25] = &AGOSEngine::vc24_setSpriteXY;
op[26] = &AGOSEngine::vc25_halt_sprite;
@@ -219,5 +217,3 @@
}
} // End of namespace AGOS
-
-#endif
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/vga_s1.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/vga_s1.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/vga_s1.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -36,7 +36,7 @@
op[11] = &AGOSEngine::vc11_clearPathFinder;
op[17] = &AGOSEngine::vc17_setPathfinderItem;
- op[22] = &AGOSEngine::vc22_setPaletteNew;
+ op[22] = &AGOSEngine::vc22_setPalette;
op[32] = &AGOSEngine::vc32_copyVar;
op[37] = &AGOSEngine::vc37_addToSpriteY;
op[48] = &AGOSEngine::vc48_setPathFinder;
@@ -96,7 +96,7 @@
0xFF, 0xFF, 0x77,
};
-void AGOSEngine::vc22_setPaletteNew() {
+void AGOSEngine_Simon1::vc22_setPalette() {
byte *offs, *palptr = 0, *src;
uint16 a = 0, b, num, palSize = 0;
@@ -186,73 +186,32 @@
uint16 a = (uint16)_variableArrayPtr[12];
const uint16 *p = _pathFindArray[a - 1];
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- VgaSprite *vsp = findCurSprite();
- int16 x, y, ydiff;
- int16 x1, y1, x2, y2;
- uint pos = 0;
+ uint b = (uint16)_variableArray[13];
+ p += b * 2 + 1;
+ int c = _variableArray[14];
- x = vsp->x;
- while (x >= (int16)readUint16Wrapper(p + 2)) {
- p += 2;
- pos++;
- }
+ int step;
+ int y1, y2;
+ int16 *vp;
- x1 = readUint16Wrapper(p);
- y1 = readUint16Wrapper(p + 1);
- x2 = readUint16Wrapper(p + 2);
- y2 = readUint16Wrapper(p + 3);
+ step = 2;
+ if (c < 0) {
+ c = -c;
+ step = -2;
+ }
- if (x2 != 9999) {
- ydiff = y2 - y1;
- if (ydiff < 0) {
- ydiff = -ydiff;
- x = vsp->x & 7;
- ydiff *= x;
- ydiff /= 8;
- ydiff = -ydiff;
- } else {
- x = vsp->x & 7;
- ydiff *= x;
- ydiff /= 8;
- }
- y1 += ydiff;
- }
+ vp = &_variableArray[20];
- y = vsp->y;
- vsp->y = y1;
- checkScrollY(y1 - y, y1);
+ do {
+ y2 = readUint16Wrapper(p);
+ p += step;
+ y1 = readUint16Wrapper(p) - y2;
- _variableArrayPtr[11] = x1;
- _variableArrayPtr[13] = pos;
- } else {
- uint b = (uint16)_variableArray[13];
- p += b * 2 + 1;
- int c = _variableArray[14];
+ vp[0] = y1 / 2;
+ vp[1] = y1 - (y1 / 2);
- int step;
- int y1, y2;
- int16 *vp;
-
- step = 2;
- if (c < 0) {
- c = -c;
- step = -2;
- }
-
- vp = &_variableArray[20];
-
- do {
- y2 = readUint16Wrapper(p);
- p += step;
- y1 = readUint16Wrapper(p) - y2;
-
- vp[0] = y1 / 2;
- vp[1] = y1 - (y1 / 2);
-
- vp += 2;
- } while (--c);
- }
+ vp += 2;
+ } while (--c);
}
void AGOSEngine::vc59_ifSpeech() {
Modified: scummvm/branches/gsoc2009-16bit/engines/agos/window.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/agos/window.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/agos/window.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -122,6 +122,7 @@
window->scrollY = 0;
}
+#ifdef ENABLE_AGOS2
void AGOSEngine_Feeble::colorWindow(WindowBlock *window) {
byte *dst;
uint16 h, w;
@@ -140,6 +141,7 @@
_videoLockOut &= ~0x8000;
}
+#endif
void AGOSEngine::colorWindow(WindowBlock *window) {
uint16 y, h;
Modified: scummvm/branches/gsoc2009-16bit/engines/engines.mk
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/engines.mk 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/engines.mk 2009-08-13 00:32:15 UTC (rev 43343)
@@ -21,8 +21,8 @@
DEFINES += -DENABLE_AGOS=$(ENABLE_AGOS)
MODULES += engines/agos
-ifdef ENABLE_PN
-DEFINES += -DENABLE_PN
+ifdef ENABLE_AGOS2
+DEFINES += -DENABLE_AGOS2
endif
endif
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/gui_lok.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -208,9 +208,29 @@
uint8 *screen = new uint8[Screen::SCREEN_W*Screen::SCREEN_H];
if (screen) {
_screen->queryPageFromDisk("SEENPAGE.TMP", 0, screen);
+ uint8 screenPal[768];
- uint8 screenPal[768];
- _screen->getRealPalette(2, screenPal);
+ if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
+ _screen->getRealPalette(0, &screenPal[ 0]);
+ _screen->getRealPalette(1, &screenPal[96]);
+
+ // Set the interface palette text color to white
+ screenPal[96 + 16 * 3 + 0] = 0xFF;
+ screenPal[96 + 16 * 3 + 1] = 0xFF;
+ screenPal[96 + 16 * 3 + 2] = 0xFF;
+
+ if (_screen->isInterfacePaletteEnabled()) {
+ for (int y = 0; y < 64; ++y) {
+ for (int x = 0; x < 320; ++x) {
+ screen[(y + 136) * Screen::SCREEN_W + x] += 32;
+ }
+ }
+ }
+
+ } else {
+ _screen->getRealPalette(2, screenPal);
+ }
+
::createThumbnail(&dst, screen, Screen::SCREEN_W, Screen::SCREEN_H, screenPal);
}
delete[] screen;
@@ -371,8 +391,11 @@
walkspeedGarbageOffset = 0;
} else if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
// English Amiga version
- offsetOptions = 8;
+ offset = 23;
+ offsetOn = 23;
+ offsetOptions = 32;
walkspeedGarbageOffset = 2;
+ offsetMainMenu = 23;
}
assert(offset + 27 < _vm->_guiStringsSize);
@@ -653,12 +676,12 @@
}
void GUI_LoK::redrawTextfield() {
- _screen->fillRect(38, 91, 287, 102, 250);
+ _screen->fillRect(38, 91, 287, 102, _vm->gameFlags().platform == Common::kPlatformAmiga ? 18 : 250);
_text->printText(_savegameName, 38, 92, 253, 0, 0);
_screen->_charWidth = -2;
int width = _screen->getTextWidth(_savegameName);
- _screen->fillRect(39 + width, 93, 45 + width, 100, 254);
+ _screen->fillRect(39 + width, 93, 45 + width, 100, _vm->gameFlags().platform == Common::kPlatformAmiga ? 31 : 254);
_screen->_charWidth = 0;
_screen->updateScreen();
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/kyra_lok.h 2009-08-13 00:32:15 UTC (rev 43343)
@@ -192,6 +192,7 @@
// -> credits
void seq_playCredits();
+ void seq_playCreditsAmiga();
public:
// delay
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/lol.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -160,7 +160,7 @@
_flyingObjects = 0;
_monsters = 0;
_lastMouseRegion = 0;
- _objectLastDirection = _monsterCountUnk = _monsterShiftAlt = 0;
+ _objectLastDirection = _monsterStepCounter = _monsterStepMode = 0;
_monsterCurBlock = 0;
_seqWindowX1 = _seqWindowY1 = _seqWindowX2 = _seqWindowY2 = _seqTrigger = 0;
_spsWindowX = _spsWindowY = _spsWindowW = _spsWindowH = 0;
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/lol.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/lol.h 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/lol.h 2009-08-13 00:32:15 UTC (rev 43343)
@@ -1296,8 +1296,8 @@
uint8 _monsterAnimType[3];
uint16 _monsterCurBlock;
int _objectLastDirection;
- int _monsterCountUnk;
- int _monsterShiftAlt;
+ int _monsterStepCounter;
+ int _monsterStepMode;
const uint16 *_monsterModifiers;
int _monsterModifiersSize;
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/saveload_lok.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -182,10 +182,27 @@
}
setHandItem(_itemInHand);
- _animator->setBrandonAnimSeqSize(3, 48);
+
+ // Will-O-Wisp uses a different shape size than Brandon's usual
+ // shape, thus we need to setup the correct size depending on
+ // his state over here. This fixes graphics glitches when loading
+ // saves, where Brandon is transformed into the Will-O-Wisp.
+ if (_brandonStatusBit & 2)
+ _animator->setBrandonAnimSeqSize(5, 48);
+ else
+ _animator->setBrandonAnimSeqSize(3, 48);
+
redrawInventory(0);
- _brandonPosX = brandonX;
- _brandonPosY = brandonY;
+
+ _brandonPosX = _brandonPosY = -1;
+
+ // Unlike the original we did restore Brandon's position in the scene screen on load.
+ // This appereantly caused graphics gliches in some scenes. For example bug #2835715
+ // ("KYRA: GFX glitch in Amiga version at the bridge") is caused by this feature.
+ // Thus we disable that for now.
+ //_brandonPosX = brandonX;
+ //_brandonPosY = brandonY;
+
enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
_animator->animRefreshNPC(0);
Modified: scummvm/branches/gsoc2009-16bit/engines/kyra/screen.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/kyra/screen.cpp 2009-08-13 00:26:41 UTC (rev 43342)
+++ scummvm/branches/gsoc2009-16bit/engines/kyra/screen.cpp 2009-08-13 00:32:15 UTC (rev 43343)
@@ -79,6 +79,7 @@
_useOverlays = false;
_useSJIS = false;
_use16ColorMode = _vm->gameFlags().use16ColorMode;
+ _isAmiga = (_vm->gameFlags().platform == Common::kPlatformAmiga);
if (_vm->gameFlags().useHiResOverlay) {
_useOverlays = true;
@@ -110,8 +111,8 @@
memset(_shapePages, 0, sizeof(_shapePages));
- const int paletteCount = (_vm->gameFlags().platform == Common::kPlatformAmiga) ? 13 : 4;
- const int numColors = _use16ColorMode ? 16 : ((_vm->gameFlags().platform == Common::kPlatformAmiga) ? 32 : 256);
+ const int paletteCount = _isAmiga ? 13 : 4;
+ const int numColors = _use16ColorMode ? 16 : (_isAmiga ? 32 : 256);
_interfacePaletteEnabled = false;
@@ -205,6 +206,8 @@
void Screen::updateScreen() {
if (_useOverlays)
updateDirtyRectsOvl();
+ else if (_isAmiga && _interfacePaletteEnabled)
+ updateDirtyRectsAmiga();
else
updateDirtyRects();
@@ -219,30 +222,86 @@
}
void Screen::updateDirtyRects() {
- // TODO: Enable dirty rect handling for the AMIGA version
- if (_forceFullUpdate || _vm->gameFlags().platform == Common::kPlatformAmiga) {
- if (_interfacePaletteEnabled) {
- _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, 136);
+ if (_forceFullUpdate) {
+ _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, SCREEN_H);
+ } else {
+ const byte *page0 = getCPagePtr(0);
+ Common::List<Common::Rect>::iterator it;
+ for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
+ _system->copyRectToScreen(page0 + it->top * SCREEN_W + it->left, SCREEN_W, it->left, it->top, it->width(), it->height());
+ }
+ }
+ _forceFullUpdate = false;
+ _dirtyRects.clear();
+}
- // Page 8 is not used by Kyra 1 AMIGA, thus we can use it to adjust the colors
- copyRegion(0, 136, 0, 0, 320, 64, 0, 8, CR_NO_P_CHECK);
+void Screen::updateDirtyRectsAmiga() {
+ if (_forceFullUpdate) {
+ _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, 136);
- uint8 *dst = getPagePtr(8);
- for (int y = 0; y < 64; ++y)
- for (int x = 0; x < 320; ++x)
- *dst++ += 32;
+ // Page 8 is not used by Kyra 1 AMIGA, thus we can use it to adjust the colors
+ copyRegion(0, 136, 0, 0, 320, 64, 0, 8, CR_NO_P_CHECK);
- _system->copyRectToScreen(getCPagePtr(8), SCREEN_W, 0, 136, SCREEN_W, 64);
- } else {
- _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, SCREEN_H);
- }
+ uint8 *dst = getPagePtr(8);
+ for (int y = 0; y < 64; ++y)
+ for (int x = 0; x < 320; ++x)
+ *dst++ += 32;
+
+ _system->copyRectToScreen(getCPagePtr(8), SCREEN_W, 0, 136, SCREEN_W, 64);
} else {
const byte *page0 = getCPagePtr(0);
Common::List<Common::Rect>::iterator it;
+
for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
- _system->copyRectToScreen(page0 + it->top * SCREEN_W + it->left, SCREEN_W, it->left, it->top, it->width(), it->height());
+ if (it->bottom <= 136) {
+ _system->copyRectToScreen(page0 + it->top * SCREEN_W + it->left, SCREEN_W, it->left, it->top, it->width(), it->height());
+ } else {
+ // Check whether the rectangle is part of both the screen and the interface
+ if (it->top < 136) {
+ // The rectangle covers both screen part and interface part
+
+ const int screenHeight = 136 - it->top;
+ const int interfaceHeight = it->bottom - 136;
+
+ const int width = it->width();
+ const int lineAdd = SCREEN_W - width;
+
+ // Copy the screen part verbatim
+ _system->copyRectToScreen(page0 + it->top * SCREEN_W + it->left, SCREEN_W, it->left, it->top, width, screenHeight);
+
+ // Adjust the interface part
+ copyRegion(it->left, 136, 0, 0, width, interfaceHeight, 0, 8, Screen::CR_NO_P_CHECK);
+
+ uint8 *dst = getPagePtr(8);
+ for (int y = 0; y < interfaceHeight; ++y) {
+ for (int x = 0; x < width; ++x)
+ *dst++ += 32;
+ dst += lineAdd;
+ }
+
+ _system->copyRectToScreen(getCPagePtr(8), SCREEN_W, it->left, 136, width, interfaceHeight);
+ } else {
+ // The rectangle only covers the interface part
+
+ const int width = it->width();
+ const int height = it->height();
+ const int lineAdd = SCREEN_W - width;
+
+ copyRegion(it->left, it->top, 0, 0, width, height, 0, 8, Screen::CR_NO_P_CHECK);
+
+ uint8 *dst = getPagePtr(8);
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x)
+ *dst++ += 32;
+ dst += lineAdd;
+ }
+
+ _system->copyRectToScreen(getCPagePtr(8), SCREEN_W, it->left, it->top, width, height);
+ }
+ }
}
}
+
_forceFullUpdate = false;
_dirtyRects.clear();
}
@@ -606,7 +665,7 @@
}
void Screen::getRealPalette(int num, uint8 *dst) {
- const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256);
+ const int colors = _isAmiga ? 32 : 256;
const uint8 *palData = getPalette(num).getData();
if (!palData) {
@@ -649,7 +708,7 @@
}
void Screen::setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b) {
- if (_vm->gameFlags().platform != Common::kPlatformAmiga)
+ if (!_isAmiga)
return;
uint8 screenPal[32 * 4];
@@ -1001,7 +1060,7 @@
Font *&fnt = _fonts[fontId];
if (!fnt) {
- if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ if (_isAmiga)
fnt = new AMIGAFont();
else
fnt = new DOSFont();
@@ -1131,6 +1190,8 @@
const int charWidth = fnt->getCharWidth(c);
const int charHeight = fnt->getHeight();
+ if (x < 0 || y < 0)
+ return;
if (x + charWidth > SCREEN_W || y + charHeight > SCREEN_H)
return;
@@ -2785,7 +2846,7 @@
error("Unhandled bitmap compression %d", compType);
}
- if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
+ if (_isAmiga) {
if (!scumm_stricmp(ext, "MSC"))
Screen::convertAmigaMsc(dstData);
else
@@ -2806,7 +2867,7 @@
debugC(3, kDebugLevelScreen, "Screen::loadPalette('%s', %p)", filename, (const void *)&pal);
- if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+ if (_isAmiga)
pal.loadAmigaPalette(*stream, 0, stream->size() / Palette::kAmigaBytesPerColor);
@@ 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