82837 Commits

Author SHA1 Message Date
Colin Snover
50cfb7ad46 SCI32: Fix size for dereferencing non-raw SCI32 arrays
The maxSize given when generating a SegmentRef is supposed to be
the maximum size of raw data that can be held inside the offset-
part of a reg_t, not the entire size including the segment.

This fixes a buffer overflow in "Inside the Chest", which still
does not work, but at least doesn't cause heap overflows anymore
with this change.
2017-09-23 20:37:51 -05:00
Paul Gilbert
d74e94950b TITANIC: DE: Merged German NPC script subclasses back in
There ended up not being enough custom German code in the scripts
to warrant having sub-classes that reimplemented entire methods
2017-09-23 21:18:25 -04:00
Paul Gilbert
e5cad39a58 TITANIC: DE: Updates for SuccUBusScript 2017-09-23 21:02:44 -04:00
Paul Gilbert
e9034ddffe TITANIC: DE: Added changes to MaitreDScript 2017-09-23 20:39:12 -04:00
Paul Gilbert
6f150abf15 TITANIC: DE: Added changes for LiftbotScript 2017-09-23 19:30:28 -04:00
Paul Gilbert
af71ec809b TITANIC: DE: Adding remaining DoorbotScript changes 2017-09-23 17:19:06 -04:00
Paul Gilbert
048bec6808 TITANIC: DE: Adding changes to DoorbotScript 2017-09-23 16:25:44 -04:00
Paul Gilbert
9e2d78446e TITANIC: DE: More BellbotScript changes 2017-09-22 22:31:42 -04:00
Paul Gilbert
5c6de7d2f2 TITANIC: DE: Adding new BellbotScript logic 2017-09-22 20:13:31 -04:00
Paul Gilbert
ab624c9cd3 DEVTOOLS: Added German Preresponse lists to create_titanic 2017-09-22 20:06:49 -04:00
Paul Gilbert
cd6927d39c TITANIC: DE: Added translations for BarbotScript::process 2017-09-22 07:41:55 -04:00
Bastien Bouclet
be67f0d8bf COMMON: Remove DisposeAfterUse default value from dynamic write memory streams
The default value was DisposeAfterUse::NO, which made it very easy to
accidentally leak memory by omitting to specify a value.
2017-09-22 07:06:21 +02:00
Bastien Bouclet
3eb82462e7 ALL: Specify the DisposeAfterUse constructor argument for dynamic memory write streams 2017-09-22 07:06:21 +02:00
Bastien Bouclet
1b3cc08b75 ZVISION: Fix leaking save / thumbnail MemoryWriteStreamDynamic buffers 2017-09-22 07:06:20 +02:00
Bastien Bouclet
ddac55699d SWORD25: Fix leaking the lua state MemoryWriteStreamDynamic buffer 2017-09-22 07:06:20 +02:00
Bastien Bouclet
9c2cfee4e5 SWORD25: Fix leaking the save thumbnail MemoryWriteStreamDynamic 2017-09-22 07:06:20 +02:00
Bastien Bouclet
c3bff7f25a SWORD1: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer 2017-09-22 07:06:20 +02:00
Bastien Bouclet
382df4a7c5 GNAP: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer 2017-09-22 07:06:20 +02:00
Bastien Bouclet
9facbdecda FULLPIPE: Fix leaking the save MemoryWriteStreamDynamic buffer 2017-09-22 07:06:20 +02:00
Bastien Bouclet
ab1243277a DM: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer 2017-09-22 07:06:20 +02:00
Bastien Bouclet
2832332e74 NETWORKING: Changed NetworkReadStream not to subclass MemoryReadWriteStream
Also fix the MemoryReadWriteStream managed buffer being leaked.
Fixes #9718.
2017-09-22 07:05:59 +02:00
Bastien Bouclet
bc531e3ebf XEEN: Change OutFile not to subclass MemoryWriteStreamDynamic
Also fix leaking the MemoryWriteStreamDynamic buffer storage
2017-09-22 07:05:59 +02:00
Bastien Bouclet
48bf24b41e XEEN: Change SavesManager to use a map of pointers to MemoryWriteStreamDynamic
Our implementation of HashMap does not allow value types without a
zero-argument constructor.
2017-09-22 07:05:58 +02:00
Colin Snover
194984de2f IMAGE: Remove unused end info structs from PNG code
Thanks to @dafioram for noticing the problem & sending an initial
patch, and to @wjp for noticing further that the PNG reader did not
even use the end info struct it created either.

Fixes Trac#10217. Closes gh-1028.
2017-09-21 20:43:04 -05:00
Paul Gilbert
8f6649cfb1 TITANIC: DE: Add miscellaneous missed sound translations 2017-09-21 20:27:18 -04:00
Paul Gilbert
9eb3e30fb2 TITANIC: DE: More sound translations 2017-09-21 20:06:35 -04:00
Bastien Bouclet
8547c89b86 VIDEO: Change QT edit list to a Common::Array
And fix an out of bounds acces when seeking to the end of a video.
Skipping samples is needed even when seeking through silent edits
because a silent stream is queued for those.

Fixes #10219.
2017-09-21 13:06:18 +02:00
Paul Gilbert
9127f5245f TITANIC: DE: Adding sound translations 2017-09-20 22:33:18 -04:00
Paul Gilbert
32735d59e8 TITANIC: DE: Adding sound translations 2017-09-20 20:53:12 -04:00
Willem Jan Palenstijn
7a58db8b92 Merge pull request #1024 from wjp/detection_searchman
Clean up use of SearchMan in fallback detection
2017-09-20 20:55:40 +02:00
Willem Jan Palenstijn
3108957812 CGE2: Clean up SearchMan after fallbackDetect 2017-09-20 20:53:14 +02:00
Willem Jan Palenstijn
ca82bf61e3 CGE: Clean up SearchMan after fallbackDetect 2017-09-20 20:53:14 +02:00
Willem Jan Palenstijn
6bea267385 SLUDGE: Skip SearchMan detour in fallback detection 2017-09-20 20:53:14 +02:00
Willem Jan Palenstijn
6a7d43288f DIRECTOR: Skip SearchMan detour in fallback detection 2017-09-20 20:53:14 +02:00
Colin Snover
1515bb31a6 SCI: Fix detection of end of audio map & entry size in SCI32
Torin RU map 38140 has an unusual terminator entry; instead of a
normal terminating entry of 11 FFs, its terminating entry is
03 FF FF FF FF C4 36 01 FF FF FF. So, two changes are made:

1. The end-of-map check is now the same as in SSCI1.1+ and only
   checks that the final byte of the Audio36 tuple is 0xFF,
   instead of the entire tuple;
2. The unneeded entry size heuristic has been turned off for
   all SCI32 games.

A quick check of the English versions of LB2CD, EQ1CD, SQ4CD, and
KQ6CD, as well as all English SCI32 games, indicates that this
approach seems to be working correctly.

Fixes Trac#10188.
2017-09-20 13:07:08 -05:00
Paul Gilbert
a7479b4f5b TITANIC: DE: Add translations for playGlobalSound calls 2017-09-20 06:43:10 -04:00
Paul Gilbert
7a184f0e7f TITANIC: DE: Add translations for loadSound calls 2017-09-20 06:28:34 -04:00
Bastien Bouclet
661487c2b5 MOHAWK: Riven: Move the water effect to its own class
Fixes the per frame scripts being leaked.
Fixes #10215.
2017-09-20 07:16:20 +02:00
Bastien Bouclet
56b744f5f1 MOHAWK: Riven: Plug memory leak when saving
Fixes #10216.
2017-09-20 07:12:09 +02:00
Paul Gilbert
37d0b401cb TITANIC: DE: Adding German translations 2017-09-19 22:50:39 -04:00
Paul Gilbert
00db751e7d TITANIC: DE: Sound changes for Bomb 2017-09-19 22:23:15 -04:00
Colin Snover
9fc24ed0b0 SCI32: Support RAMA's single sound effects volume
The original installer copied RESOURCE.SFX to the hard drive so
there was only one RESOURCE.SFX on CD 1. Instead of requiring
users to create duplicates, just use the single RESOURCE.SFX if it
exists.
2017-09-19 20:00:28 -05:00
Colin Snover
52d9d04919 SCI32: Fix inconsistent patch instruction comments
I missed these lines when going through things earlier.
2017-09-19 20:00:28 -05:00
Colin Snover
2dc042d540 NEWS: Extend SCI game versions to reflect SCI3 being supported 2017-09-19 19:54:30 -05:00
Colin Snover
6af5133061 SCI32: Put superclass address in r_acc for SCI3 super calls
This fixes a problem in Lighthouse 2.0a where the mini-sub would
fail to start playing the animation of the shipwreck when clicking
on the throttle.

In SSCI, in SCI3 only, r_acc was (inadvertently?) set to the
superclass object ID whenever a super call was made. This happened
because OP_super would call to get the superclass object ID, the
calling conventions of the compiler put this return value into EAX,
and then the PMachine message processing code put whatever was in
EAX into r_acc before each message was processed.

In the game code, there are a sequence of steps that look like
this:

* First, throttle::doVerb is called when throttle is clicked on;
* Which calls getRobot::doit to tell the shipwreck robot to start
  playing;
* Which calls wreckBot::init to reset the Robot for the animation;
* Which calls Hiliter::hotVerbs(0) to remove cursor hotspots;
* Which calls Hiliter::dispose to clean up since it is not used;
* Which causes Hiliter::verbList to get set to 0.
* Later, verbList is loaded into r_acc, and it is still 0;
* Then, Hiliter::dispose makes a super call to Obj::dispose;
* Then, Obj::dispose does nothing except call kDisposeClone,
  which does not mutate r_acc, so r_acc is still 0 from verbList;
* Then we return back through 5 calls to throttle::doVerb;
* Then throttle::doVerb checks that r_acc is non-zero, and if so,
  adds wreckBot to theDoits global, allowing the animation to
  occur.

In ScummVM, without setting r_acc in the super call, the non-zero
check failed and the wreckBot didn't get put into theDoits, so the
entire sequence fell apart. In SSCI, the non-zero check happened
to succeed because the Obj::dispose super call put the Obj class
into the accumulator. So now we do that too, and now Lighthouse
2.0a works here.

Earlier versions of SSCI used EAX for other things in between the
OP_super call and the message processing, so would set r_acc from
different data, so this change does not apply to those versions.
2017-09-19 19:54:30 -05:00
Colin Snover
682b8790fd SCI: Allow multi-step tracing with step-over in debugger 2017-09-19 19:54:30 -05:00
Colin Snover
d363234129 SCI32: Fix GfxFrameout::addPlane from causing possible leaks 2017-09-19 19:54:30 -05:00
Colin Snover
eba9526fdd SCI32: Remove never-read default values 2017-09-19 19:54:30 -05:00
Colin Snover
836f1bdf44 SCI32: Add audio dump debugger command 2017-09-19 19:54:29 -05:00
Colin Snover
301d0403cb SCI32: Don't warp the mouse twice when its position has been restricted 2017-09-19 19:54:29 -05:00