Commit Graph
3541 Commits
Author SHA1 Message Date
Willem Jan Palenstijn e880fd74ed SCI32: Fix warning 2016-08-26 18:57:43 +02:00
Willem Jan Palenstijn 5734400a37 SCI: Make kFileIORename use wrapped filenames
This fixes deleting savegames in Phantasmagoria 1.
2016-08-25 22:05:24 +02:00
Filippos Karapetis ed461fba65 SCI32: Add a workaround when starting a new game in Phantasmagoria
This workaround is needed when starting a new game from a chapter after
the first one
2016-08-25 21:56:23 +03:00
Filippos Karapetis 429759b481 SCI32: Also handle chase.dat in Phantasmagoria like phantsg.dir
This file is used during the chase sequence, and needs the same
read/write logic as phantsg.dir
2016-08-25 21:56:22 +03:00
Filippos Karapetis 25515c690e SCI32: Fix the signature of kDoAudioCritical, and add documentation
This is used in Phantasmagoria, chapter 3, nursery (room 14200),
during the "ghost lullaby" event. It is used to make the lullaby
sound exclusive, but it really doesn't make any major difference.

Also, the documentation has been adjusted to contain this
information. Finally, the documentation has been adjusted to use
80 columns
2016-08-25 17:02:21 +03:00
Filippos Karapetis 380902eb07 SCI32: Add workarounds for a bug in Torin, in an animation of Lycentia 2016-08-24 11:57:08 +03:00
Filippos Karapetis 14f163bad1 SCI32: Allow kListAt to reference an empty list
Happens in Torin when examining Di's locket in chapter 3
2016-08-23 14:26:59 +03:00
Filippos Karapetis d15660e70d SCI32: Add a workaround for an uninitialized variable in Torin 2016-08-23 14:06:39 +03:00
Filippos Karapetis 6929cc65f8 SCI32: Explicitly abord kEachElementDo when a game is being loaded
This is a better check than the one in commit 3d1f1a3a21
2016-08-23 13:08:37 +03:00
Filippos Karapetis 3d1f1a3a21 SCI32: Fix restoring games from Torin's game restore dialog
The list in kListEachElementDo may be invalidated after a
selector invocation
2016-08-23 11:36:38 +03:00
Filippos Karapetis cd00132d23 SCI32: Also handle game checks for "torinsg.cat" in Torin
This shows the "Open..." button when continuing a game
2016-08-23 11:36:37 +03:00
Filippos Karapetis f238ed18ec SCI: Fix compilation when SCI32 is not enabled 2016-08-23 01:48:06 +03:00
Filippos Karapetis a10c18fd8b SCI32: Add a workaround for kDoSoundPlay for GK1 Mac 2016-08-22 19:57:02 +03:00
Filippos Karapetis ba8d6f6c03 SCI32: Move the SCI32 Mac cursor handling code into GfxCursor32
This was left in the SCI16 code in commit 80d9182554
2016-08-22 19:56:06 +03:00
Filippos Karapetis 39307d1f4d SCI: Return the correct platform in kPlatform for Mac versions 2016-08-22 19:48:56 +03:00
Filippos Karapetis 88cffa3220 SCI32: Add stubs for the kPlayVMDSetPreload and kPaletteSetGamma calls
These were introduced in SCI3, and are used by RAMA. We don't preload
videos, so we don't really need kPlayVMDSetPreload, but
kPaletteSetGamma may need an implementation.

With these two stubs, the main menu of RAMA is working again
2016-08-22 19:04:26 +03:00
Filippos Karapetis 6b5e87683c SCI32: Reorder the SCI32 palette kernel call assignments 2016-08-22 18:52:20 +03:00
Colin Snover 7f23c91de9 SCI32: Fix limited data range comparison warning
On at least DC platform, the ShowStyleType enum is fit to a 4-bit
data size, so the 16-bit input value needs to be checked for
validity *before* it is cast to a 4-bit ShowStyleType.
2016-08-19 15:23:10 -05:00
Colin Snover dc093742b3 SCI32: Bug fixes to PQ:SWAT script bugs and kList calls 2016-08-19 15:23:10 -05:00
Colin Snover 0a4a2567a3 SCI32: Partially implement kCD 2016-08-19 15:23:10 -05:00
Colin Snover e55b774584 SCI32: Add kPlayVMDGetStatus kernel call
Used by Lighthouse.
2016-08-19 15:23:10 -05:00
Colin Snover 6708b58faf SCI: Remove references to SCI32 features from SCI16 video player 2016-08-19 15:23:10 -05:00
Colin Snover 4e1a9be816 SCI32: Remove CoordAdjuster32, at least for the moment
This may come back in the future to deduplicate some gfx code,
but SCI32 had two different inlined ways of doing coordinate
conversions with different rounding methods, so CoordAdjuster32
didn't get used when the graphics system was rewritten.

At the moment, SCI32 code uses the mulru/mulinc methods from
helper.h for scaling up/down coordinates.
2016-08-19 15:23:10 -05:00
Colin Snover eae6891404 SCI32: Fix kGlobalToLocal and kLocalToGlobal
Fixes (at least) the native SCI save dialogs.
2016-08-19 15:23:10 -05:00
Colin Snover 0f2748b15a SCI32: Implement kRobot 2016-08-19 14:08:22 -05:00
Colin Snover 7da359755d SCI32: Split kPlatform for SCI32 2016-08-19 13:57:40 -05:00
Colin Snover b1d53ca25d SCI32: Add kSetNowSeen variant for older SCI32 games
KQ7 2.00b, PQ:SWAT, Phant1, GK2, and Torin are all verified as
using the 'ignore' variant; SQ6 and QFG4CD are verified as using
the 'fail' variant. MGDX and Shivers could not be checked as they
have only Phar Lap Win16 executables, so took a guess based on
their release dates.
2016-08-19 13:57:40 -05:00
Colin Snover 79d9e0af68 SCI32: Address TODO in seg_manager.h 2016-08-19 13:57:40 -05:00
Colin Snover 6e2e862d8e SCI32: Implement kShakeScreen for SCI32 2016-08-19 13:57:40 -05:00
Colin Snover ff00e93c67 SCI32: Remove GfxScreen from SCI32 2016-08-19 13:57:40 -05:00
Colin Snover 80d9182554 SCI32: Implement SCI32 cursor support 2016-08-19 13:57:40 -05:00
Colin Snover 22c7be2c86 SCI: Fix sign comparison warning 2016-08-13 16:29:24 -05:00
Colin Snover 741ac22e17 SCI: Fix pointer invalidation caused by array storage moves
When objects are added to a SegmentObjTable, it may cause the
internal storage for the table to expand and move to a new
region of memory. When this happens, all pointers to objects held
by a SegmentObjTable of the same type would be invalidated, due
to an implementation detail that should not be exposed. To prevent
this, objects are now allocated separately on the heap, so even if
the table's storage moves due to insertions, the objects owned by
the table will not, so references remain valid for the lifetime of
the object.
2016-08-13 15:41:31 -05:00
Martin Kiewitz c270b30a79 SCI: Fix pseudo mouse in various SCI1 games like e.g. Larry5
Pseudo mouse was functionality in SCI1+ games, that allowed the
user to control the mouse via keyboard cursor keys.

This new class only worked, when a tiny difference inside
the keyboard driver happened on kMapKeyToDir calls. We previously
tried to enable this behavior depending on cursor type, but
this didn't work correctly (Larry 5 for example was not detected
as such, but had PseudoMouse support).
2016-08-13 14:58:07 +02:00
Colin Snover efaf7f20d6 SCI32: Fix crash when multiple nodes are deleted during kListEachElementDo
This happens in e.g. Phant1, when walking from dining, to
reception, to up the stairs.
2016-08-12 10:26:06 -05:00
Colin Snover ef2c44bf1f SCI32: Implement kShowMovie 2016-08-12 09:28:46 -05:00
Colin Snover 31f344079f SCI32: Temporarily revert kShowMovie due to buildbot failures
Revert "SCI32: Fix KQ7 1.51 video background"

This reverts commit c8affb54cc.

Revert "SCI32: Fix crash when kShowMovie is called but the video cannot be found"

This reverts commit 93b06f4a9e.

Revert "SCI32: Fix KQ7 1.51 basic video playback"

This reverts commit cdab24aa07.

Revert "SCI32: Additional Video32 documentation"

This reverts commit 4ff0924e57.

Revert "SCI32: Implement kShowMovie"

This reverts commit 13297c1929.
2016-08-11 21:43:57 -05:00
Colin Snover 13297c1929 SCI32: Implement kShowMovie 2016-08-11 20:50:33 -05:00
Filippos Karapetis 8f41fd07c5 Merge pull request #798 from wjp/torin_saving
SCI32: Support Torin's autosave system
2016-08-11 23:04:16 +03:00
Willem Jan Palenstijn 6d9ed09897 SCI32: Don't use autosave.cat in Torin 2016-08-11 19:29:34 +02:00
Martin Kiewitz 0f1fd5c955 SCI: Fix sq4 workaround room 391, fixes bug #7179
doCatalog::mode does not exist, the method is actually
doCatalog::changeState

This issue has been in there since the workaround was added
through commit 20b1d80d59
2016-08-09 23:18:39 +02:00
Colin Snover 6a7ddd8ba1 SCI32: Actually save and load remaps 2016-08-06 11:23:18 -05:00
Eugene Sandulenko 6f87a2b2e8 SCI: Fix warnings 2016-08-01 23:56:32 +03:00
Colin Snover d5d42d5066 SCI32: Implement bitmap save routine 2016-08-01 10:37:14 -05:00
Colin Snover 6d1f8e8c87 SCI32: Fix invalid memory access after BitmapTable is extended
When new bitmaps are added and the underlying Common::Array needs
to move to expand, this invalidates all pointers to bitmaps, which
makes it basically impossible to use the bitmap segment since you
never know if a reference is going to be invalidated due to an
array move.

To solve this, BitmapTable is changed to hold pointers to
SciBitmaps that are allocated separately on the heap instead, so
when those bitmaps are looked up, the resulting pointers are valid
for the lifetime of the bitmap, instead of the lifetime of the
Common::Array used internally by BitmapTable.
2016-08-01 10:37:14 -05:00
Colin Snover 2071196f42 SCI32: Add bitmap segment and remove GC option from hunk segment 2016-08-01 10:37:14 -05:00
Colin Snover 0f535e79f5 SCI32: Add 6-argument signature of kAddPicAt
This is used by Torin in room 50900.
2016-08-01 10:37:14 -05:00
Colin Snover 156c68fe58 SCI32: Implement plane transitions (kSetShowStyle and kSetScroll)
This commit implements all of the known plane transitions from
SCI2 through SCI2.1mid games. Because kSetShowStyle is always
called indirectly via the Styler game script, it is difficult to
find all the places where transitions are used. As such,
transitions that appeared to never be used have been added as
stubs which will trigger a game crash with a message to report
what was being done, so any missed transition types can be
identified quickly and then implemented.
2016-08-01 10:37:14 -05:00
Colin Snover 4a637d65c3 SCI32: Enable optional explicit memory management of hunk entries
Bitmaps in ScrollWindow and Robot code are managed by the kernel
and not by game scripts, although they must be able to be
referenced through a reg_t. To prevent incorrect GC of bitmaps
that are in use but not referenced by any game script, explicit
memory management of hunk entries can be enabled.
2016-08-01 10:37:14 -05:00
Willem Jan Palenstijn 401b34bf45 SCI32: Support Torin's autosave system
Torin has two sets of saves: autosave.### and torinsg.###, both with
their own slots and .cat file. The autosave system uses autosave.000
and autosave.001. It also checks the presence of autosave.cat to
determine if it should show the chapter selection menu on startup.
2016-07-29 21:09:32 +02:00