Commit Graph

19356 Commits

Author SHA1 Message Date
Torbjörn Andersson
6b8a3dba70 TOON: Attempt to fix crash when Bricabrac puts on his glasses
This was a regression in r54223, and it's the most direct fix I can
think of. The problem seems to be that sys_Cmd_Remove_Scene_Anim()
clears the character's _animationInstance while character::playAnim()
is waiting "for the character to be ready".

My fix was to treat _animationInstance NULL as another sign that the
wait is over, but maybe the real fix is for sys_Cmd_Remove_Scene_Anim()
to do more than just clear the variable, e.g. stop the script or
something like that?

svn-id: r54549
2010-11-28 20:53:57 +00:00
Thierry Crozat
16c73378b9 i18N: Add a few strings to translate in the SCUMM help dialog.
svn-id: r54547
2010-11-28 19:23:02 +00:00
Arnaud Boutonné
54b756e1ba HUGO: Modify or suppress some obsolete comments and warnings
svn-id: r54530
2010-11-28 16:38:01 +00:00
Filippos Karapetis
0b5f6d4c97 SCI: Fixed bug #3034471 - "SCI, Castlebrain/Amiga: Invisible text in word search"
Fixed some endianness issues in Amiga versions, thanks to wjp. Amiga
versions expect a BE VM, thus we adjust accordingly in the places
where memory is accessed directly (i.e. kStrAt, kMemory and all places
that set/get characters from memory)

svn-id: r54521
2010-11-28 14:57:56 +00:00
Arnaud Boutonné
5f7ac43a24 HUGO: Add F4/F5 keys to save/restoreGame
Currently, it only saves/restores slot #0, no selection
screen is displayed

svn-id: r54515
2010-11-27 23:09:19 +00:00
Matthew Hoops
3d4ca8e405 MOHAWK: Add an isPlaying() and stopSound(id) function to Sound (for LB and others)
svn-id: r54514
2010-11-27 21:36:04 +00:00
Filippos Karapetis
c76422412d SCI: Compensate for buggy KQ5CD saved games (before r54510)
svn-id: r54513
2010-11-27 18:46:12 +00:00
Filippos Karapetis
0312235f67 SCI: Removed bogus warning
svn-id: r54512
2010-11-27 18:27:02 +00:00
Filippos Karapetis
91e42bbcb9 SCI: Reverted changes to savegame.cpp made in r54510, as that still occurs
svn-id: r54511
2010-11-27 18:23:39 +00:00
Filippos Karapetis
3485d433c5 SCI: Fixed bug #3034713 - "ICEMAN Demo: Fails to find base object"
This could happen because objects in scripts can be in the wrong order.
Same thing happens in the French and German version of KQ5 (bug #3035396).
Removed the scriptObjRemove() method, which is in fact a hack.

svn-id: r54510
2010-11-27 18:08:47 +00:00
Filippos Karapetis
49afe9ccff SCI: Fix for bug #3119713 - "PQ2: song-specific reverb changes are ignored" (thanks to waltervn)
svn-id: r54509
2010-11-27 17:29:42 +00:00
Arnaud Boutonné
8b7c42f0b0 TOOLS: Fix 'Boat' bug in H1 Dos
H1 Dos is now completable

svn-id: r54507
2010-11-27 16:48:38 +00:00
Torbjörn Andersson
83206e20cb HUGO: Fix warning
svn-id: r54506
2010-11-27 08:27:13 +00:00
Arnaud Boutonné
b70aa0d419 HUGO: Add Win save/restore behavior to the Dos versions
(useful to debug the lake screen)

svn-id: r54505
2010-11-26 23:57:39 +00:00
Arnaud Boutonné
fd6157e778 HUGO: Avoid using 'short' in function definition
svn-id: r54504
2010-11-26 23:30:31 +00:00
Arnaud Boutonné
bab5aa433b HUGO: Get rid of initial savegame
svn-id: r54503
2010-11-26 23:17:16 +00:00
Arnaud Boutonné
a0cc07268d HUGO: Clean up Scheduler
svn-id: r54502
2010-11-26 22:15:31 +00:00
Matthew Hoops
73ee52c670 MOHAWK: Fix non-LZ compressed old Mohawk bitmaps (thanks, fuzzie)
svn-id: r54501
2010-11-26 15:06:35 +00:00
Walter van Niftrik
52b89206c0 SCI: Pull reverb default directly from control channel.
svn-id: r54499
2010-11-26 14:35:46 +00:00
Walter van Niftrik
3d38a383bb SCI: Only filter channels for early SCI0, as GM currently uses all channels.
svn-id: r54498
2010-11-26 14:35:28 +00:00
Matthew Hoops
21c6bbde5d MOHAWK: Fill in meanings of known resources
svn-id: r54497
2010-11-26 14:28:33 +00:00
Filippos Karapetis
5562f9e087 SCI: Added a define to turn off channel remapping (for debugging)
svn-id: r54496
2010-11-26 14:25:18 +00:00
Filippos Karapetis
d3b14e1445 SCI: Implemented FR #3101338: "King's Quest 6 Windows Mouse Icons"
Added an option to use the original Windows cursors in the Windows version of KQ6
Also, added an update on how the Mac cursors are handled (perhaps the handling is
the same)

svn-id: r54495
2010-11-26 12:37:24 +00:00
Filippos Karapetis
ce9f7c0df1 SCI: Fixed keyboard input when numlock is on, and cleaned up the way some special keys are translated
svn-id: r54493
2010-11-26 10:03:24 +00:00
Filippos Karapetis
1d4e452c78 SCI: Send the SCI0 reverb init after reading the reverb data
svn-id: r54492
2010-11-26 06:41:45 +00:00
Matthew Hoops
abe6baafb9 MOHAWK: Enable the drawImage debug command for all LB games
svn-id: r54491
2010-11-26 06:08:04 +00:00
Filippos Karapetis
e793d62c8d Fixed bug with r54485
svn-id: r54488
2010-11-26 00:10:51 +00:00
Filippos Karapetis
069309f88a SCI: set the reverb setting of the current song when a relevant event is fired from the MIDI stream
svn-id: r54485
2010-11-26 00:05:27 +00:00
Filippos Karapetis
af15ac6f6a SCI: Some reverb-related changes in the MIDI driver, based on a patch by waltervn
svn-id: r54484
2010-11-25 22:23:14 +00:00
Filippos Karapetis
3a8648c4db SCI: Initialize reverb in the music driver correctly. Based on a patch by waltervn
svn-id: r54483
2010-11-25 22:17:23 +00:00
Filippos Karapetis
11ac03b7ab SCI: Global reverb can't be 127. Some cleanup
svn-id: r54482
2010-11-25 22:16:22 +00:00
Filippos Karapetis
1cf26f67e0 SCI: Initialize global reverb correctly. Fixes bug #3118700 - "SCI KQ5: Assertion in midi.cpp" (regression from r54478)
svn-id: r54481
2010-11-25 22:14:38 +00:00
Filippos Karapetis
601494cad4 SCI: implemented reverb handling and related functionality
svn-id: r54478
2010-11-25 16:09:45 +00:00
Filippos Karapetis
16006c78f5 SCI: Fixed a bug in the show_instruments console command
svn-id: r54477
2010-11-25 15:59:30 +00:00
Filippos Karapetis
2c2f3a97e6 SCI: Added support for the alternate Windows MIDI soundtracks of the CD versions of EcoQuest, Jones, KQ5 and SQ4
svn-id: r54476
2010-11-25 14:22:09 +00:00
Filippos Karapetis
394daa5704 SCI: Added engine method isCD()
svn-id: r54475
2010-11-25 14:19:02 +00:00
Filippos Karapetis
29395974ca SCI: Remove the Windows versions of Freddy Pharkas. This one has an alternative sound track, but it's handled in a different manner
svn-id: r54474
2010-11-25 14:16:46 +00:00
Filippos Karapetis
d9f429716f SCI: Fixed compilation
svn-id: r54473
2010-11-25 13:01:45 +00:00
Filippos Karapetis
69da6a6dd6 SCI: added Windows entries for all games with alternate GM tracks
These are the CD versions of EcoQuest, Jones, KQ5, Pharkas and SQ4
Also, added AGDF_CD to all CD versions that have corresponding floppy versions

svn-id: r54472
2010-11-25 12:44:17 +00:00
Walter van Niftrik
8c4ebc434d SCI: Fix bug in MT-32 checksum computation. Thanks Sven for finding this.
svn-id: r54471
2010-11-25 11:19:46 +00:00
Max Horn
5ae718d148 MOHAWK: Add missing include, which prevented the CursorMan destructor from being called
svn-id: r54470
2010-11-25 11:18:20 +00:00
Matthew Hoops
07ea74d37b MOHAWK: Refactor cursor handling
Cursor handling has now been moved to a new CursorManager class (which is subclassed for Myst/Riven) from the GraphicsManager classes. This will be needed for Living Books which will have a class for Windows and Mac cursors (coming soon!).

svn-id: r54469
2010-11-25 04:49:11 +00:00
Matthew Hoops
4c733c4278 MOHAWK: Cleanup image surface handling
- Renamed ImageData to MohawkSurface
- Added offset x/y fields to MohawkSurface
- The image cache now stores MohawkSurface pointers
- Switched Living Books to 8bpp mode (it requires that in the end anyway)

svn-id: r54468
2010-11-25 02:59:56 +00:00
Filippos Karapetis
52898b6336 SCI: Fixed digital audio at the beginning of KQ5CD and removed a hack for the Windows version
svn-id: r54466
2010-11-25 02:21:07 +00:00
Filippos Karapetis
ff58eea2ce SCI: Set _useMT32Track correctly for KQ5 Windows, thus simplifying the code
svn-id: r54465
2010-11-25 01:31:03 +00:00
Filippos Karapetis
7508260954 SCI: Added support for the alternative GM tracks of the Windows version of KQ5CD (bug #3041239)
Note that the empty GM track for the Sierra logo makes the game hang, so the
MT-32 track is used, which sounds awful

svn-id: r54464
2010-11-25 01:19:45 +00:00
Filippos Karapetis
169c6be32b SCI: Fixed a bug in the script disassembler
svn-id: r54463
2010-11-24 21:32:34 +00:00
Matthew Hoops
f5b1b9fa75 MOHAWK: Change the unused version detection field to 'appName' for use with LB
svn-id: r54462
2010-11-24 21:12:21 +00:00
Filippos Karapetis
dcd1326970 SCI: Some renaming and added several TODOs concerning reverb
svn-id: r54461
2010-11-24 16:01:30 +00:00
Filippos Karapetis
1ebae78ff1 SCI/SOUND: Applied patch #3117577 - "SCI: MT-32 plays "warble" of notes when music resumes", with some slight modifications
This is only used by SCI for now, but it is probably correct to apply this for
all engines, thus an appropriate TODO has been added

svn-id: r54460
2010-11-24 15:12:43 +00:00
Filippos Karapetis
9493b9add5 SCI: Moved handling of special reverb value 127 outside of the MIDI driver
svn-id: r54459
2010-11-24 14:51:29 +00:00
Filippos Karapetis
c3cb4c92a8 SCI: Placed some selectors added in SCI1.1 in a separate table
svn-id: r54458
2010-11-24 14:38:08 +00:00
Filippos Karapetis
364d37b302 SCI: some changes to the way reverb is handled
- "Invalid" SCI reverb values (127) are properly handled now
- SCI kDoSound(reverb) sets the global reverb (renamed it accordingly)
- kDoSound(reverb) can also return the current reverb if no parameter is sent

svn-id: r54457
2010-11-24 14:21:31 +00:00
Filippos Karapetis
642d15e43f SCI: Added a getReverb() accessor to the SciMusic class
svn-id: r54456
2010-11-24 14:15:46 +00:00
Filippos Karapetis
7fc171e3bc SCI: Some slight changes to get the "find_callk" console command working in KQ5
- Ignore invalid object in KQ5 script 784
- Script 980 looks to be an unused leftover, as its object contain references to
classes placed in script 988, which is missing

svn-id: r54455
2010-11-24 11:57:11 +00:00
Filippos Karapetis
332a438ccf SCI: Added a TODO for the default reverb value
svn-id: r54454
2010-11-24 11:26:48 +00:00
Filippos Karapetis
fcd8a04c64 SCI: Read MT-32 reverb data correctly (patch #3117434)
svn-id: r54453
2010-11-24 11:19:27 +00:00
Thierry Crozat
f20da5f98c I18N: Add translation of the SCUMM help dialog.
svn-id: r54449
2010-11-23 22:47:20 +00:00
Filippos Karapetis
d66c43eb5e SCI: added a workaround for script bug #3116892 - "SQ4 German: crash when shooting with laser", by applying the one for the English version
svn-id: r54447
2010-11-23 22:42:03 +00:00
Max Horn
a914b97559 TINSEL: Fix support for file names with a trailing dot
When copying data files with 8.3 names from a CD, they sometimes end up
with a trailing dot, e.g. "INDEX." instead of "INDEX". Comon::File
supports this, but in r54392 Tinsel stopped using Common::File.

This commit also removes the useless SeekableSubReadStream wrapper
around the actual file stream.

svn-id: r54446
2010-11-23 22:33:26 +00:00
Max Horn
be822d8bc2 MOHAWK: Pass Common::Strings directly to SaveFileManager, instead of first converting to a C string
svn-id: r54444
2010-11-23 22:32:55 +00:00
Max Horn
121056c12f MOHAWK: Pass objs by const ref not by value
svn-id: r54443
2010-11-23 22:32:39 +00:00
Max Horn
830c39a687 SWORD2: Reduce dependencies on common/memstream.h
svn-id: r54442
2010-11-23 22:27:40 +00:00
Max Horn
12d5151ff4 COMMON: Remove default value for endianess in ReadStreamEndian subclasses
svn-id: r54441
2010-11-23 22:27:20 +00:00
Max Horn
b485d0ee49 TINSEL: Turn TinselFile into a SeekableReadStream
svn-id: r54439
2010-11-23 22:26:43 +00:00
Max Horn
c9fdaa7417 TINSEL: Restrict use of memstream.h & substream.h
svn-id: r54437
2010-11-23 22:26:09 +00:00
Max Horn
09ba53dcfb SCUMM: Use explicit XOR decoding code in BaseScummFile subclasses
This made it possible to turn some MemoryReadStream pointers into plain
SeekableReadStream pointers.

svn-id: r54435
2010-11-23 22:25:36 +00:00
Max Horn
54e0390752 SCUMM: Replace Common::File uses by SeekableReadStream and SearchMan
svn-id: r54434
2010-11-23 22:25:10 +00:00
Matthew Hoops
90cabfef38 MOHAWK: Find the small marble images by string; should fix German version
svn-id: r54431
2010-11-23 18:29:45 +00:00
Matthew Hoops
799757132f MOHAWK: Remove the no longer needed RLE8 hack
svn-id: r54430
2010-11-23 18:15:45 +00:00
Filippos Karapetis
d438b739cf SCI: Also send a sustain off on a notes off event (patch from bug #3116608)
svn-id: r54429
2010-11-23 16:03:30 +00:00
Filippos Karapetis
23bd8a1c26 SCI: Ignore polyphonic/channel aftertouch (0xa0 / 0xd0) in the MIDI driver, like in the Adlib driver. SSCI doesn't handle these, so we shouldn't handle them either
svn-id: r54428
2010-11-23 15:47:54 +00:00
Filippos Karapetis
c140e43a35 SCI: Added entries for the GOG versions of Phantasmagoria 1 and 2 (patch #3112884)
svn-id: r54427
2010-11-23 12:07:21 +00:00
Arnaud Boutonné
7711cc57d6 HUGO: Rewrite saveObjects() and restoreObjects()
This fixes (at least for me) save and restore. saveEvents() 
and restoreEvents() still have to be rewritten.

svn-id: r54422
2010-11-22 22:49:24 +00:00
Arnaud Boutonné
8bb43361cb HUGO: Suppress useless enums, cleanup
svn-id: r54421
2010-11-22 19:50:57 +00:00
Filippos Karapetis
fe17f26af8 SCI: Added support for the keypad +/- keys
svn-id: r54420
2010-11-22 18:39:06 +00:00
Matthew Hoops
26bf0e8176 MOHAWK: Fix a typo fail (thanks, fuzzie)
svn-id: r54419
2010-11-22 18:09:31 +00:00
Matthew Hoops
cb843daec0 MOHAWK: Have MohawkResource::open() return a bool for success/failure
svn-id: r54418
2010-11-22 18:07:33 +00:00
Matthew Hoops
9d4827b5e1 MOHAWK: Fix gspit dome from always opening
svn-id: r54417
2010-11-22 17:51:54 +00:00
Matthew Hoops
cc6c7e33bf MOHAWK: Switch slider bitmap ID's to matching via string; fixes some versions
svn-id: r54416
2010-11-22 17:50:30 +00:00
Filippos Karapetis
eba5c441b2 SCI: Fixed bug #3044050 - "SQ4FLOPPY: Crash while flying in Skate-o-Rama"
Fixed Object::locateVarSelector() for SCI0-SCI1 games, as it wasn't checking the
class for object variables

svn-id: r54415
2010-11-22 10:23:53 +00:00
Filippos Karapetis
d8afddac63 SCI: Patched the QFG3 character import screen the same way as with QFG2
This prevents random crashes and slow refreshing, same as with QFG2

svn-id: r54414
2010-11-22 00:20:00 +00:00
Filippos Karapetis
0b06a1fe7b SCI: Proper fix for the QFG2 character import screen crashes (bug #3037996)
Script 944 does constant reallocations whenever the selection changes,
which leads to all sorts of unpredictable crashes. Thanks to waltervn for
his help on this issue

svn-id: r54413
2010-11-21 23:43:14 +00:00
David Turner
a00668331c QUEEN: Correct uninitialised read in Queen Adlib driver found by Valgrind.
svn-id: r54410
2010-11-21 18:42:00 +00:00
Johannes Schickel
3d83667504 CRUISE: Slight formatting fix.
svn-id: r54409
2010-11-21 12:51:49 +00:00
David Turner
e48930c16e CRUISE: Fix Memory Accesses Errors and Leaks Reported By Valgrind
Most of these fixes are fairly simple, though the clamping of ArrayStates accesses in object.cpp _might_ cause regressions. None are obvious on basic playtest check, but the game will need a full playtest.

svn-id: r54408
2010-11-21 12:05:15 +00:00
Filippos Karapetis
8045c4f87a SCI: Fix for bug #3037996 - "QFG2: Crash during import dialog after time (import works)"
svn-id: r54407
2010-11-21 11:04:52 +00:00
Filippos Karapetis
788598a689 SCI: Fixed the "version" console command in SCI1.1 and earlier games
svn-id: r54406
2010-11-21 10:31:02 +00:00
Paul Gilbert
cb2a20cbd0 CRUISE: Bugfix for #3064846 - Raoul appearing in Book screen
svn-id: r54405
2010-11-21 05:31:13 +00:00
Filippos Karapetis
f2498b54ce SCI: Added 3 uninitialized temp fixes for the RAMA demo, which is now working
svn-id: r54404
2010-11-21 02:08:35 +00:00
Filippos Karapetis
57d9de00f8 SCI: Removed the correct subops from kString in late SCI2.1/SCI3 games (thanks to waltervn)
svn-id: r54403
2010-11-21 02:07:55 +00:00
Filippos Karapetis
ac7c488c7c SCI: kArray wasn't changed in late SCI2.1/SCI3 games (thanks to waltervn)
svn-id: r54402
2010-11-21 02:06:20 +00:00
Filippos Karapetis
97d31c6ac6 SCI: Added the kString/kArray type in the "version" console command
svn-id: r54401
2010-11-21 00:58:06 +00:00
Filippos Karapetis
ffcd6783c7 SCI: Removed incorrect pointer arithmetic support for SCI2 strings
There was never pointer arithmetic support in SCI2 and newer games

svn-id: r54400
2010-11-21 00:49:54 +00:00
Filippos Karapetis
cd69472be9 SCI: Adapted kArray/kString to use the new heuristic for late SCI2.1/SCI3 games, and updated their subops accordingly
svn-id: r54399
2010-11-21 00:47:56 +00:00
Filippos Karapetis
d275461958 SCI: Added a heuristic to detect the modified late SCI2.1/SCI3 kString/kArray kernel functions
svn-id: r54398
2010-11-21 00:44:04 +00:00
Matthew Hoops
5616bde4e7 MOHAWK: Fix Living Books v1 sound (courtesy of fuzzie)
svn-id: r54397
2010-11-21 00:02:25 +00:00
Matthew Hoops
0f2bcd2f9f MOHAWK: Cleanup resource handling
- Renamed getRawData() to getResource()
- Add a getResource() and hasResource() function for named resources
- Other minor formatting changes

svn-id: r54396
2010-11-20 23:53:14 +00:00
Filippos Karapetis
d886c037dd SCI: Fix ScummVM freezing during the credits scene in EcoQuest 1 (bug #3101846)
svn-id: r54395
2010-11-20 19:52:31 +00:00
Paul Gilbert
a2367d26f9 TINSEL: Preliminary functionality for reading BE data files
svn-id: r54392
2010-11-20 03:14:03 +00:00
Filippos Karapetis
b2ba35124c SCI: Fixed timer bug #3109139 - "SQ4: Crash after exiting Skate-o-Rama during chase"
svn-id: r54391
2010-11-20 00:52:05 +00:00
Filippos Karapetis
c8ef70ea1c SCI: Some minor fixes for Phantasmagoria 2 (which doesn't work at all, since it has some differences in its views)
svn-id: r54390
2010-11-20 00:20:05 +00:00
Arnaud Boutonné
e5177eebfd HUGO: Start using endianness-safe read/write functions
svn-id: r54389
2010-11-19 23:49:04 +00:00
Matthew Hoops
7fb352e38a MOHAWK: Implement an image cache system
This should greatly improve the performance in Myst (especially Myst ME, which uses the slow JPEG decoder). This should also slightly improve the Riven performance; the sliders now work a bit better.

svn-id: r54388
2010-11-19 21:25:36 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Willem Jan Palenstijn
a24d5ba2f4 SCI: Only compile kGetConfig for SCI32
svn-id: r54382
2010-11-19 14:19:02 +00:00
Lars Persson
3c7f9aa34a SCI : data field is only supported if building for SCI32
svn-id: r54379
2010-11-19 13:56:11 +00:00
Filippos Karapetis
5d53673e93 SCI: Also send system strings to kString(). This makes LSL7 continue into the actual game! :D
svn-id: r54377
2010-11-19 13:23:20 +00:00
Lars Persson
c7cf764890 SCI: Only handle seg_type_string if ENABLE_SCI32 is defined
svn-id: r54376
2010-11-19 13:03:31 +00:00
Lars Skovlund
5ecac66c6a Some subfunctions changed positions in SCI3 kString. WIP.
And with this, LSL7 starts up. Yeah, baby!

svn-id: r54374
2010-11-19 12:52:17 +00:00
Lars Skovlund
84d4a4a89f Implement a couple of NULL checks in kArray
svn-id: r54373
2010-11-19 12:49:46 +00:00
Lars Skovlund
1a6597ebc2 SCI3: Implement new opcode 0x4c.
svn-id: r54370
2010-11-19 12:47:47 +00:00
Lars Skovlund
fbf5a453c7 SCI: Implement the GetConfig call for LSL7
svn-id: r54369
2010-11-19 12:46:36 +00:00
Julien Templier
9e5b554dc3 LASTEXPRESS: Poll events when loading savegames to prevent freezing the application
svn-id: r54368
2010-11-19 10:55:56 +00:00
Julien Templier
2687c987eb LASTEXPRESS: Add missing queue reset in Entitites::resetSequences
svn-id: r54367
2010-11-19 10:55:38 +00:00
Julien Templier
2a6519ca2e LASTEXPRESS: Simplify current frame calculation in Animation::process
(per Max suggestion)

svn-id: r54366
2010-11-19 10:55:21 +00:00
Filippos Karapetis
c19e8377f9 SCI: Added pointer arithmetic support for SCI2 strings
svn-id: r54365
2010-11-19 10:28:43 +00:00
Filippos Karapetis
6ec8ec416b SCI: Added support for script -> string copying (used by late SCI2.1 and SCI3 games)
svn-id: r54364
2010-11-19 10:27:22 +00:00
Filippos Karapetis
763ddd2203 SCI: Fixed comment
svn-id: r54362
2010-11-19 08:19:14 +00:00
Filippos Karapetis
3b07056a47 SCI: Moved the Object class in a separate file
svn-id: r54361
2010-11-19 08:18:24 +00:00
Filippos Karapetis
c87ef6f307 SCI: Added KQ4 Atari ST version from bug report #3110941
svn-id: r54360
2010-11-19 07:43:47 +00:00
Matthew Hoops
769b460f0d MOHAWK: Implement another Riven demo external
xademoquit() is called from card 12 when clicking anywhere but the system requirements (which is why I hadn't noticed it earlier). I've also stubbed another demo function (xaexittomain()), called from an unused card's script for completeness.

svn-id: r54359
2010-11-19 03:52:06 +00:00
Max Horn
a0df86955f ALL: Push down deps on stream.h from .h to .cpp files
svn-id: r54358
2010-11-19 01:37:04 +00:00
Max Horn
5ea4b576c3 LASTEXPRESS: Include common/events.h instead of common/EventRecorder.h
svn-id: r54356
2010-11-19 00:49:16 +00:00
Max Horn
a72de47d5d COMMON: Cleanup EventRecorder
svn-id: r54355
2010-11-19 00:38:17 +00:00
Filippos Karapetis
34272e2529 SCI: Added a stub for a new subop in kString, and disabled trackOriginAndFindWorkaround() for SCI3 games for now
svn-id: r54352
2010-11-18 22:46:29 +00:00
Filippos Karapetis
4609f11137 SCI: Added species selector functionality for SCI3
svn-id: r54351
2010-11-18 22:27:56 +00:00
Filippos Karapetis
9e418e6eaf SCI: Removed SCI3 hacks in kClone/kDisposeClone
svn-id: r54350
2010-11-18 22:26:58 +00:00
Johannes Schickel
94d3d82f59 SCI: Slight formatting fix and use \t instead of a tab character in debugN.
svn-id: r54349
2010-11-18 21:45:31 +00:00
Lars Skovlund
c325d815d2 SCI: Fix debugger disassembly of property accesses in SCI3
svn-id: r54348
2010-11-18 21:41:13 +00:00
Lars Skovlund
f0fea21639 SCI3: Fix new opcode 0x4e
svn-id: r54347
2010-11-18 21:38:00 +00:00
Matthew Hoops
d94844f205 MOHAWK: Add support for Riven 24bpp images (not yet used)
svn-id: r54345
2010-11-18 20:40:48 +00:00
Max Horn
d6592aaba6 M4: Do not use Common::SubReadStream where ReadStream suffices
svn-id: r54342
2010-11-18 19:27:01 +00:00
Filippos Karapetis
49468fdfff SCI3: Added another previously unused opcode (0x27 / 0x4e)
svn-id: r54341
2010-11-18 19:20:30 +00:00
Filippos Karapetis
c2bdba2ea6 SCI2: Treat SCI2 raw arrays (type 3) as strings in kArray
SCI2 strings inherit from arrays, plus kArray and kString are almost the
same, so this is all possible. This is needed, as SCI scripts copy 
strings on arrays and then process them as such (e.g. in RAMA and LSL7)
However, we really need to merge SCI2 array types with the SCI2 string
types, and ultimately merge the code with the SCI1 array and string types.

svn-id: r54340
2010-11-18 19:18:11 +00:00
Matthew Hoops
411866ee18 MOHAWK: Cleanup bitmap surface and pack/draw function handling
svn-id: r54338
2010-11-18 19:06:38 +00:00
Lars Skovlund
487feb3843 Get rid of a const_cast.
svn-id: r54333
2010-11-18 17:38:56 +00:00
Johannes Schickel
b593b15c50 SCI: Slight formatting fix.
svn-id: r54330
2010-11-18 17:25:09 +00:00
Lars Skovlund
0001a6b74d SCI3: implement setInfoSelector() for SCI3, fixes infinite recursion
svn-id: r54328
2010-11-18 17:13:01 +00:00
Lars Skovlund
c5252071db SCI3: Add proper support for the calle instruction
svn-id: r54327
2010-11-18 17:04:00 +00:00
Lars Skovlund
1621e7d5c0 Fix operator precedence problem
svn-id: r54324
2010-11-18 16:58:25 +00:00
Max Horn
a008d14055 ENGINES: Do not use MemoryReadStream where (Seekable)ReadStream suffices; avoid using 'using'
svn-id: r54323
2010-11-18 16:38:03 +00:00
Matthew Hoops
ffc6ed643f MOHAWK: Remove unused drawRLE() function
svn-id: r54320
2010-11-18 13:48:49 +00:00
Matthew Hoops
48416a7f03 MOHAWK: Implement the old Mohawk bitmap format (thanks to fuzzie)
svn-id: r54319
2010-11-18 13:31:12 +00:00
Matthew Hoops
d971396572 MOHAWK: Cleanup Myst script handling
Scripts are now loaded from a central place and are properly freed at the correct time. This fixes a regression from r54152.

svn-id: r54309
2010-11-18 05:47:16 +00:00
Filippos Karapetis
34c18f20d8 SCI: Added hacks in kClone/kDisposeClone for SCI3
svn-id: r54307
2010-11-17 21:49:19 +00:00
Filippos Karapetis
bd844a8c92 SCI: Call lookupArray() after allocateArray() when duplicating arrays
This ensures that the pointer to the element that lookupArray() returned
won't be invalidated in case the array is reallocated because of
allocateArray() - same issue as in kClone()

svn-id: r54306
2010-11-17 21:47:05 +00:00
Filippos Karapetis
ddbda3eb15 SCI: Code formatting
svn-id: r54305
2010-11-17 20:50:24 +00:00
Filippos Karapetis
ba6de1bcdf SCI: Added sanity checks for SCI3 scripts bigger than 64KB
- Extended the "verify_scripts" console command for SCI3 scripts
- Added a check for such large scripts when scripts are loaded, with
an error for now, till a mechanism to support such scripts with a
16-bit addressing scheme is in place (e.g. overlaying, or splitting
scripts). Either way, such scripts should span over more than one segment

svn-id: r54304
2010-11-17 20:46:59 +00:00
Lars Skovlund
8a6efcac65 SCI3: Implement opcode to retrieve the info selector.
svn-id: r54303
2010-11-17 20:43:51 +00:00
Lars Skovlund
e551f3bf33 SCI3: Handle script exports correctly
svn-id: r54302
2010-11-17 20:37:13 +00:00
Lars Skovlund
5ab823b16a SCI3: relocate operand of the lofsa opcode
svn-id: r54301
2010-11-17 20:29:10 +00:00
Matthew Hoops
ecb42156ce MOHAWK: Cache the Myst screen buffer
This is needed for use with sliders. The screen is now updated fewer times as well.

svn-id: r54300
2010-11-17 19:58:19 +00:00
David Turner
84a753d840 CRUISE: Corrected uninit read of _polyStruct in ctp.cpp:49 detected by Valgrind.
This occurred during intro playback and was due to _polyStruct not being initialised to NULL during engine construction/initialisation.

svn-id: r54299
2010-11-17 19:29:07 +00:00
Filippos Karapetis
61e02f0570 SCI: Fixed the speed in the intro of PQ2, version 1.002.011 (bug #3102071)
In version 1.002.011, global 3, used for timing, is incorrectly initialized
to 0, whereas it should be 6 (like in other versions). Initializing it to
the correct value fixes the speed in the intro. This has been based on the
patch for that version by NewRisingSun(NRS) / Belzorash

svn-id: r54298
2010-11-17 18:46:29 +00:00
Matthew Hoops
4e445b9467 MOHAWK: Apply patch #2988976: "MYST: Fix drawing partial subimages"
svn-id: r54297
2010-11-17 18:22:22 +00:00
Lars Skovlund
e086ef0096 Adapt SCI property instructions (pToa etc.) to SCI3
svn-id: r54296
2010-11-17 17:21:02 +00:00
Filippos Karapetis
430df91076 SCI1.1 and newer games always ignore move count. The "version" command works now in SCI3
svn-id: r54295
2010-11-17 15:02:58 +00:00
Filippos Karapetis
e55a55a277 SCI: Remove key modifier (e.g. num lock) status for keyboard function keys. This fixes function key input (e.g. F3) when num lock is on
svn-id: r54294
2010-11-17 14:48:28 +00:00
Filippos Karapetis
47e137fd8e SCI: lofsa/lofss functionality for SCI3
- Updated detectLofsType() for SCI3
- Cleaned up op_lofsa and op_lofss and updated them for SCI3

svn-id: r54293
2010-11-17 14:28:32 +00:00
Filippos Karapetis
c003032b4c SCI: Allow SCI3 game scripts to run
SCI3 scripts do start up now, however they stop quite early, as there is still
missing functionality which prevents them from running fully. This will be useful
for debugging, though

svn-id: r54292
2010-11-17 14:08:13 +00:00
Filippos Karapetis
bb9b7c24f9 SCI: Added some SCI3 selector related information
- Added a TODO for the usage of the -info- selector in kClone and kDisposeClone in
SCI3 scripts, as it's no longer used in SCI3
- Added information about which of the selectors are missing in SCI3. There are
some more which are missing, but aren't used in SCI2-SCI3 anyway
- Some styling

svn-id: r54291
2010-11-17 14:03:14 +00:00
Max Horn
3d7f7b49fe SCI: Make class table size OB1 workaround slightly more readable
svn-id: r54290
2010-11-17 13:01:58 +00:00
Filippos Karapetis
58e4d9a97a SCI: Fixed the return values of Object::relocateSci3()
svn-id: r54289
2010-11-17 12:33:55 +00:00
Max Horn
ee4770ffb6 ENGINES: Change 'colour' to 'color'
Only changed this in engines where 'color' was/is already used
almost exclusively

svn-id: r54288
2010-11-17 12:22:08 +00:00
Max Horn
5ceb54d088 TINSEL: Get rid of some global variables
These were actually all "harmless" (i.e. where no obstructions
to RTL support). Still good to get rid of 'em!

svn-id: r54286
2010-11-17 12:13:23 +00:00
Max Horn
5a554e3dbe SCI: Change 'colour' to 'color'
All other instances already were spelled 'color' in the SCI
engine (and also most other parts of ScummVM)

svn-id: r54285
2010-11-17 12:13:03 +00:00
Filippos Karapetis
a702ad5123 SCI3: added a SCI3 implementation of findGameObject(), based on a patch by lskovlun
svn-id: r54284
2010-11-17 11:17:38 +00:00
Filippos Karapetis
b707d6e7dc SCI: More work on SCI3, based on a patch by lskovlun
- Added SCI3 equivalents for access to object selectors
- Added SCI3 implementation of object relocation
- Added SCI3 implementation of Script::initialiseClasses()

svn-id: r54283
2010-11-17 11:15:52 +00:00
Filippos Karapetis
59ad5085bc SCI: Some more work on SCI3, based on a patch by lskovlun
- Added a SCI3 implementation of Script::load()
- Added a SCI3 implementation of Script::initialiseClasses()
- Removed some duplicate code

svn-id: r54282
2010-11-17 09:28:04 +00:00
Filippos Karapetis
e4c967a301 SCI: Added the SCI3 equivalent of initialiseObjects(), from a patch by lskovlun
svn-id: r54281
2010-11-17 09:10:43 +00:00
Filippos Karapetis
f44b084deb SCI: Some restructuring. Added some SCI3 placeholders/stubs
svn-id: r54280
2010-11-17 08:53:02 +00:00
Filippos Karapetis
0470e47145 SCI: The heap was a separate resource in SCI1.1 - SCI2.1 games only. It was later
merged into the script files again in SCI3

svn-id: r54279
2010-11-17 08:30:08 +00:00
Filippos Karapetis
553d571c50 SCI: Specify that -1 means "all maps" when listing base36-encoded resources
svn-id: r54278
2010-11-17 08:18:56 +00:00
Filippos Karapetis
c36f072190 SCI: Updated dissectScript() to handle synonym blocks
svn-id: r54277
2010-11-17 08:10:36 +00:00
Filippos Karapetis
9d318497f7 SCI: Unified the functionality and parameters of the disasm and disasm_addr commands
svn-id: r54276
2010-11-17 08:05:11 +00:00
Filippos Karapetis
c2d9c1b06b SCI: Added the ability to display original script bytecode in the "disasm" console command
svn-id: r54275
2010-11-17 00:05:09 +00:00
Filippos Karapetis
f81b42dcaf SCI: Fix for bug #3110215 - "SQ4 German: endless flight on Estros"
svn-id: r54272
2010-11-16 22:36:06 +00:00
Filippos Karapetis
144ed3e22d TINSEL: Fixed compilation with MSVC
svn-id: r54271
2010-11-16 22:09:46 +00:00
Julien Templier
da90fa1405 LASTEXPRESS: Fix SequenceFrame leak in Entities code
- Add EntityCallData destructor to dispose of frames & Sequences
 - Properly dispose of frames in Entities::resetSequences()

svn-id: r54270
2010-11-16 14:06:59 +00:00
Max Horn
668adaa461 GUI: Rename gui/GuiManager.* to gui/gui-manager.*
svn-id: r54265
2010-11-16 10:19:01 +00:00
Max Horn
427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Max Horn
c734fc2b3e TINSEL: Remove unnecessary 'static'
svn-id: r54263
2010-11-16 09:54:11 +00:00
Max Horn
1dbf8d73d5 TINSEL: Mark all (?) global vars with a FIXME comment
Use of global vars is what prevents RTL from working in Tinsel (and
probably in other engines). More specifically, the fact that many
global vars are not explicitly inited when the engine is (re)launched.

svn-id: r54262
2010-11-16 09:53:55 +00:00
Max Horn
ada9c9af60 TINSEL: Removed unnecessary 'static'
svn-id: r54261
2010-11-16 09:53:08 +00:00
Max Horn
abe1959d36 COMMON: Simplify DECLARE_SINGLETON macro
This makes it possible to write
  DECLARE_SINGLETON(foo);
instead of
  DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.

svn-id: r54258
2010-11-16 08:23:13 +00:00
Julien Templier
396bec13f9 LASTEXPRESS: Use Common::StackLock instead of mutex lock/unlock in Sound class
svn-id: r54247
2010-11-15 15:48:39 +00:00
Julien Templier
7d9c43d22b LASTEXPRESS: Fix frame leak in Entities::processFrame()
When not keeping the previous frame, the current frame was overwritten.
We now delete it before assigning a new value.

svn-id: r54246
2010-11-15 15:48:20 +00:00
Julien Templier
a4d9d03601 LASTEXPRESS: Update Animation::process()
- Use Common::Rational to compute the current frame
 - Added check for _currentChunk != NULL
 - Add constructor to Chunk structure

svn-id: r54245
2010-11-15 15:48:08 +00:00
Matthew Hoops
dbb3e1dded LASTEXPRESS: Don't use NULL in arithmetic (silences a warning)
svn-id: r54244
2010-11-15 15:20:48 +00:00
Julien Templier
8664535029 LASTEXPRESS: Protect sound queue accesses with mutex
Sound entries were being streamed before the data was fully loaded
and queue addition/removal could happen while the sound timer was
going through the queue (reported by digitall).

svn-id: r54241
2010-11-15 12:48:54 +00:00
David Turner
69e42a0d4d SCI: Workaround for bug #3109299 "QFG1VGA: Crash when leaving area east of Antwerp"
Extended current workarounds to cover QFG1VGA.

svn-id: r54239
2010-11-15 06:17:35 +00:00
Thierry Crozat
2b33642d54 GUI: Fix GMM labels translation for SCUMM engine
In the SCUMM engine (and maybe other engines), the GMM Dialog is created
in the engine constructor and before the window resolution is updated (so it is
still using the resolution from the Launcher). Therefore if the global scaler is x2
but a SCUMM game overwrite it to use x1, it was not using the correct labels
when they had a different translation for the lowres context.

svn-id: r54237
2010-11-14 21:10:56 +00:00
Paul Gilbert
db24b2a014 LURE: Fix for Valgrind identified memory leaks
svn-id: r54236
2010-11-14 00:35:13 +00:00
Walter van Niftrik
ecaab84cb5 SCI: Fixup pathfinding start point when on polygon edge.
We now also fixup the start point when it's on the edge of an obstacle. If the
start point is also on the edge of the screen, the actor is now allowed to
walk through that obstacle to find his way to clear territory. This is based
on observation of SSCI behavior.

svn-id: r54230
2010-11-13 14:46:27 +00:00
Filippos Karapetis
325d93d5d8 HUGO: Fixed crash on exit when hugo.dat is not available
svn-id: r54228
2010-11-13 13:41:43 +00:00
Filippos Karapetis
f3ea2315fc SCI: Fixed script bug #3108012 - "Hoyle1: Crash when changing Deal Speed in Hearts"
svn-id: r54226
2010-11-13 13:34:10 +00:00
David Turner
6c78ca4876 HUGO: Close two minor memory leaks.
Destructor added to SoundHandler and added delete for _intro in engine destructor.

svn-id: r54225
2010-11-13 08:08:58 +00:00
Sylvain Dupont
db51fb3386 TOON: Fix free/malloc mismatch
svn-id: r54224
2010-11-13 02:59:46 +00:00
Sylvain Dupont
a373bd4a53 TOON: Fix more memory leaks
Mainly leaks in audio and animations

svn-id: r54223
2010-11-13 02:44:34 +00:00