Commit Graph
4900 Commits
Author SHA1 Message Date
sluicebox b4a2c8d512 SCI: Add Betrayed Alliance uninit variable workaround
Ticket #15141
2024-05-27 19:54:13 -06:00
sluicebox 076ea03926 SCI: Fix KQ6 message when clicking on horse in castle
Fixes an inaccessible message due to the wrong verb

Thanks to @StuntmanSnake for discovering this
2024-05-21 16:26:01 -07:00
sluicebox 9b58b79ad1 SCI32: Use modified attenuation for QFG4 CD
Thanks to @tsoliman for discovering this obscure discrepancy.

Confirmed in disassembly. Also confirmed that MOTHERGOOSEHIRES uses
modified attenuation, and discovered that floppy QFG4 and PQ4 do not,
and that one version of SQ6 does and one does not.
2024-05-18 09:49:25 -07:00
sluicebox 02cd64b9c7 SCI: Remove unused SavegameDesc::virtualId 2024-05-13 09:04:07 -07:00
sluicebox d907c5d076 SCI: Fix lookupText error handling, documentation
SSCI's text lookup function handled invalid offsets by returning an
empty string. We have been treating this as a fatal error.

Zork Demo uses this to loop through texts with kGetFarText to test for
a matching string.
2024-04-15 18:23:47 -07:00
sluicebox 595d70889a SCI: Add Betrayed Alliance Book 2 Demo detection and workarounds 2024-04-14 12:02:58 -07:00
sluicebox 9e089d5093 SCI: Add SCI Tetris detection and workarounds 2024-04-14 10:03:11 -07:00
sluicebox 474ef22e24 SCI32: Fix QFG4 crash when throwing at rock pile
Fixes bug #14921
2024-03-28 09:21:21 -07:00
Matthew Jimenez 5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
sluicebox d80e830156 SCI: Fix SQ5 message talker when looking at Cliffy
Thanks to @CommanderProton for finding this!
2024-02-17 20:47:42 -05:00
sluicebox 5a12df7b4b SCI32: Fix LIGHTHOUSE uninit variable read on VMD playback
Fixes bug #14924
2024-02-05 22:33:26 -08:00
Иван Марчуков 073469293f SCI: Add cyrillic input support for text-based games 2024-01-22 08:50:52 +02:00
sluicebox f5aec9593b SCI: Fix HOYLE4 unexpected discard in Euchre
Fixes bug #14874

Thanks to @Karunamon for reporting this
2024-01-19 15:32:54 -07:00
sluicebox d2efce1c64 SCI: Fix LSL5 TPrint script patch
The patch altered the frame size of a call instruction, but I failed
to update the matching argument count on the stack.

This caused Print to receive an incorrect argc and crash the
gymnastics scene in room 920.

See: 4a40ac92ea

Fixes bug #14791

Thanks to @EricTSten for reporting this
2024-01-02 00:17:23 -08:00
Le Philousophe 45286ad131 SCI: Migrate engine to Path 2023-12-24 13:19:25 +01:00
sluicebox a26252fadf SCI: Fix PQ3 wrong ending 2023-12-21 13:19:42 -08:00
Walter Agazzi 237e6231dd SCI: Also show qfg2-agdi characters in import
This allows importing characters created by the AGDI remake of QFG2 with no
need to rename.
Fixes TRAC #14754
2023-12-16 15:55:24 +02:00
sluicebox 9a9a13605f SCI: Fix SQ1VGA buckazoid inventory crash
Big thank you to @codengine for discovering this script bug, performing
the script analysis, and developing the initial script patch.
2023-12-14 16:26:00 -08:00
sluicebox 6ee2a62779 SCI: Fix BRAIN2 art puzzle lockup
Fixes bug #14543
2023-12-12 21:55:06 -08:00
sluicebox b7522b2bb9 SCI: Fix BRAIN2 crash in robot maze
Fixes bug #14556

Thanks to @eriktorbjorn for finding this
2023-12-12 12:05:19 -08:00
sluicebox 8dac2204cd SCI: Clean up SegManager
Fewer casts, pointers, and parameters
2023-11-21 22:02:54 -08:00
sluicebox 5dbffb3402 SCI: Remove redundant test from run_vm
The same code occurs a few lines earlier
2023-11-17 15:59:08 -08:00
sluicebox c6bf55f1fc SCI: Update header guards 2023-11-14 16:40:53 -08:00
sluicebox 44436a91f2 SCI: Remove SciCallOrigin from error messages
`errorString` now adds this context (and more) to `error` messages
2023-11-14 16:06:45 -08:00
sluicebox c59521f979 SCI32: Fix PHANT1 crash when leaving Harriet in the barn
Thanks to speedrunner @hitmarty for discovering this.

Thanks to @deckarep for the recent `errorString` feature that
helped diagnose this script bug from a screenshot.
2023-11-13 12:59:36 -08:00
sluicebox 3e339b0097 SCI: Update errorString
- Fixes stack overflow when `error` is called from kernel function
- Includes most recent pc when `error` is called from kernel function
- Handles script procedures in addition to object methods
- Uses target name to identify game to log variant/fallback info
- Condenses errorString to a single-line header
2023-11-09 14:50:58 -08:00
sluicebox cfa1ad6de2 SCI: Fix errorString version query 2023-11-08 01:09:59 -07:00
sluicebox 5cc1ac3a98 SCI: Initialize EngineState::_segMan
Destructor deletes a potentially uninitialized pointer
2023-11-07 20:47:30 -07:00
sluicebox 26ba48aba7 SCI: Make parameter const ref 2023-11-07 16:07:10 -08:00
sluicebox bf0e734377 SCI: Add getCurrentCallOrigin error check
Coverity CID 1363393
2023-11-07 16:07:10 -08:00
sluicebox e397f36be2 SCI: Remove redundant checks 2023-11-03 20:53:50 -07:00
sluicebox 7da3c93c14 SCI: Remove unused variable from kDoBresen 2023-11-03 15:12:42 -07:00
sluicebox cd319125ef SCI: More const ref parameters 2023-11-03 15:12:41 -07:00
sluicebox c241f21baa SCI: Reduce scope of variables 2023-11-03 15:12:40 -07:00
sluicebox 6bffed45b3 SCI: Remove redundant checks. PVS-Studio V547 2023-10-31 14:20:26 -07:00
sluicebox 2801803b5f SCI: Remove redundant checks. PVS-Studio V547, V560, V654 2023-10-29 15:42:12 -07:00
sluicebox 97528ed81f SCI: Fix SJIS error detection. PVS-Studio V547 2023-10-29 15:42:11 -07:00
Kaloyan Chehlarski a75be8de57 Revert "SCI: Fix uninitialized variable warnings"
This reverts commit b9fb4e22ec.
2023-10-28 16:38:50 +03:00
Kaloyan Chehlarski b9fb4e22ec SCI: Fix uninitialized variable warnings 2023-10-28 16:19:35 +03:00
sluicebox 25a7fc6ab1 SCI: Don't create PRN file in ECO2
Ticket #14640
2023-10-05 13:46:00 -07:00
sluicebox 0ff2062cfa SCI: Update flag debugger for ECO1 floppy 1.1 2023-10-05 13:46:00 -07:00
Ralph Caraveo eeddc6fce2 SCI: Fix crash in Island of Dr. Brain microscope puzzle - bug 14546
When clicking "buy clue" in the microscope puzzle, the game could crash with a division by zero in
cartesian:buyClue, depending on the initialization of the puzzle itself. Because the initialization is
random and non-deterministic, this crash would only occur very rarely
2023-09-30 12:41:28 +03:00
sluicebox 2a9439182a SCI32: Fix QFG4 crash on empty import dialog
QFG4 attempts to copy from a null array/string, and this had no effect
in the original interpreter. Now we behave the same.

Update kFileIOOpen to handle the script's subsequent attempt to open a
nameless file.

Fixes bug #14646
2023-09-26 11:31:54 -07:00
Eugene Sandulenko 755086d5f4 SCI: Shut several "unused variable" warnings 2023-09-19 14:50:09 +02:00
sluicebox 3faf0d163b SCI: Fix kMessage crash when message stack is empty
Fixes a crash due to an assertion failure that appeared in Google Play
Console. This would occur if a script somehow called kMessage to get
the next message from the stack before calling kMessage to initialize.

We don't know what game caused this, but I have confirmed that this was
not a fatal error in the original interpreter. I then tested this with
a custom script that calls kMessage in the wrong order.

Now our behavior matches the original and we log a warning.

Fixes bug #14613
2023-09-18 16:16:45 -07:00
sluicebox d2b85bf473 SCI32: Update HOYLE5 Solitaire workarounds for Mac 2023-09-17 15:34:21 -07:00
sluicebox 0de0beb15f SCI32: Update kDoSoundMac32 for HOYLE5 Solitaire 2023-09-17 15:34:20 -07:00
sluicebox 49da510f80 SCI32: Fix PHANT1 dragon passage lockup
Fixes bug #14568

Thanks to @DustyShinigami for reporting this
2023-09-17 15:34:19 -07:00
Ralph Caraveo 9ed43c6fa5 SCI: Tweak dissassembly for push opcodes
Tweak in scriptdebug.cpp disassembler logic because the new logging wasn't quite working how it was expected.

- These opcodes weren't showing up with their selectors in all scenarios
- Improve output formatting
2023-09-12 13:56:01 +03:00
Ralph Caraveo f2c2453b80 SCI: Improve debugger disassembly selector name context
Show additional selector name context when push0, push1, push2 opcodes are used.

Possible matching selector names are always shown for the debugger disassembly when a `pushi` opcode is encountered. This is great as it gives additional context when push is used for call/send related invocations.

It would be nice to additionally show *possible* matching `selector` methods/properties when `push0`, `push1` or `push2` is encountered because selector names start at 0 so the dissassembly never shows selectors 0 through 2 inclusive.
2023-08-28 23:15:20 +03:00