Commit graph

127 commits

Author SHA1 Message Date
Donovan Watteau
85265f68f5 SCUMM: DIG: Reindent a workaround and remove its ENABLE_SCUMM_7_8 ifdef
The workaround itself doesn't require any v7/v8-only feature, and
there's no much sense in saving a few bytes for such a small
workaround. Others Dig/FT/COMI workarounds don't use an ifdef for
this anyway.
2023-01-18 20:07:01 +01:00
Torbjörn Andersson
0e4169fdd3 SCUMM: Clarify Dig spider lair sound workaround
And since I have finally verified that it also happens with the original
interpreter, it is now an optional enhancement.
2023-01-17 07:41:20 +01:00
AndywinXp
5e869ae8a7 SCUMM: GUI (v3): Fix textSpeed script-based controls
The entirety of v3 games use script-based controls for textSpeed values, which were
broken by yet another 15 years old workaround which didn't take into account the fact
that boot-up is not the only moment that textSpeed is changed by the scripts, but is also
changed when sending the '<' '>' key commands.
2022-12-03 00:24:08 +01:00
AndywinXp
58fb91e1bd SCUMM: COMI: Fix mishandling of control characters
This fixes the appearence of the debug message "Machine rating is "
2022-09-14 22:27:31 +02:00
AndywinXp
457bcb67db SCUMM: GUI: Implement the majority of the v7 Main Menu 2022-09-08 19:10:42 +02:00
athrxx
319e50fc35 SCUMM: (LOOM/VGA Talkie) - improve verb handling
- get rid of weird hackery in o5_verbOps
- make sure the verbs are properly restored after loading a savegame
2022-08-10 15:27:23 +02:00
AndywinXp
85d3c5f5ac SCUMM: COMI: Implement remaining banners for demo 2022-08-06 13:33:56 +02:00
AndywinXp
fabaeb4b83 SCUMM: COMI: Implement original GUI 2022-08-06 13:33:56 +02:00
Donovan Watteau
27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Torbjörn Andersson
14983f01a4 SCUMM: Exclude Loom demos from recent fire animation enhancement
Not only do the demos use a different script number, they don't even
have the bug we're working around!
2022-06-15 07:23:39 +02:00
Torbjörn Andersson
c8a76a492a SCUMM: Make Loom intro fire animation run at constant speed
The fire animation is sped up along with the rest of the game while the
messenger nymph is flying. Slow it down to make it appear to run at
constant speed throughout the intro. This does not apply to the VGA
talkie version, because there the fire isn't animated.
2022-06-15 08:07:12 +03:00
AndywinXp
de93de1c67 SCUMM: Fix o6_freezeUnfreeze() for v7-8 (fix bug #13511)
FT, DIG and COMI interpreters explicitly ask for flag == 2 instead of flag >= 0x80.
This fixes a class of bugs in which some scripts which should have been paused
still manage to execute.
2022-05-28 22:10:41 +02:00
Torbjörn Andersson
6d8eba977d SCUMM: Adjust timings for Italian Sam & Max Floppy intro.
This version uses English speech, and doesn't need the workaround for
the fight animation speeds. But several lines still had to be re-timed.
2022-04-21 11:22:26 +02:00
Torbjörn Andersson
127976b510 SCUMM: Adjust timings for Italian Sam & Max intro. 2022-04-21 11:22:26 +02:00
Torbjörn Andersson
54fd5caac8 SCUMM: Adjust timings for German Sam & Max intro. (Bug #13378) 2022-04-21 11:22:26 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Torbjörn Andersson
0209d79652 SCUMM: Simplify Indy 3 Mac workarounds
I was confused when writing them. There shouldn't be any need to check
if the script is global when that's already implied by the script
number.
2021-08-09 10:06:26 +02:00
Torbjörn Andersson
1c352471bd SCUMM: Clear the credits between each text screen in Indy 3 Mac
I don't see anything in the script that would do it (well, there is one
but that may be just an accidental leftover from the DOS version), so
trigger on the end of each delay throughout the credits script.

Pretty? No, I guess not. But it's at the end of the game, so there
should be no risk of it messing things up.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson
5b2ca72a32 SCUMM: Fix leftover verbs when giving objects to other characters
It looks like the input script - or at least this particular input
script - expects to be called twice. Once to clear the verbs and once
for the recipient to accept/reject your offer. In the 256-color DOS
version, both of these are done during the same call.

I don't know if this applies to other input scripts as well, but I'm
limiting it to this one for now.
2021-06-30 14:59:55 +02:00
sluicebox
674ed112aa JANITORIAL: Update more old bug tracker numbers
I missed the six digit ones and a few others in:
93eeffc84d
2021-06-09 14:28:52 -06:00
Torbjörn Andersson
cdfe9b5b4c SCUMM: Add practice mode box for Mac Loom
Unlike the PC version, the practice mode box appears to be hard-coded in
the Mac version. The script that draws the box in the PC version just
sets variables in the Mac version. This implementation is based on
screenshots.

To keep things a bit saner, I've split out the Mac-specific drawing to
its own file.
2021-05-17 18:44:29 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Ben Castricum
34df7b9891 SCUMM: ZAKFM Add script bug workaround, fixes bug #5624
Due to poor translation of the v2 script to v5 an if statement jumps in the
middle of a cutscene causing a endCutscene() without a begin cutscene()

Previous "fixes" do improve the code, but do not fix this cutscene issue.

See also

https://bugs.scummvm.org/ticket/3099
https://bugs.scummvm.org/ticket/5624

and commits

1d40f78499
Fixes the mistranslation of getState08(465) into classOfIs(465,[0]) at 001A

0725be325f
Fixes several mistranslations of setClass
2020-12-25 23:14:36 +01:00
D G Turner
59b639ed4d SCUMM: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-23 11:56:16 +00:00
Colin Snover
4d3f05ae79 SCUMM: Fix array overflow writing var when no current script is set
This situation is triggered normally when _currentScript is 0xFF,
but it could potentially also happen if _currentScript is some
other number >= NUM_SCRIPT_SLOT, so the check is a bit more
conservative than it might appear to need to be.
2017-12-01 19:39:30 -06:00
Robert Crossfield
814d9b1153 SCUMM: Maniac V0: Correctly handle 'slanted' walk-boxes, Add new variables to save-games, Bump the SaveGame Version number, remove obsolete V0 code in V2 functions 2014-12-02 16:25:03 +11:00
Robert Crossfield
2dbd99d572 SCUMM: Maniac V0: Implement the original Walk Code (to fix some anim glitches), fix opcode to use _moving correctly (as V0 is different) 2014-11-28 22:24:45 +11:00
Kirben
aca10de1b5 SCUMM: Add support for quit script in HE90+ games. 2014-08-20 09:26:39 +10:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Torbjörn Andersson
ce79ff4f2e SCUMM: Change NUM_SCRIPT_LOCALS to NUM_SCRIPT_LOCAL
For consistency with NUM_SCRIPT_SLOT.
2013-05-01 07:47:56 +02:00
Torbjörn Andersson
f70087dc90 SCUMM: Fix out-of-bounds access in runScript() debug messages
I believe this fixes CID 1003954, 1003957, 1003958, 1003962 and
1003966.
2013-05-01 07:33:05 +02:00
Torbjörn Andersson
0638d85ada SCUMM: Cleanup
We only need to initialize 'args' in runInventoryScript() when we
are actually using them.
2013-04-30 22:46:36 +02:00
Torbjörn Andersson
2284aba719 SCUMM: Use correct array size when calling initializeLocals()
The initializeLocals() function assumes that it can copy 25
elements when being provided an array of values. But this array
was frequently a lot smaller than that. I've introduced a constant
for the number of locals (though VirtualMachineState has one more
for some reason), and fixed the array sizes in a number of places.

CID 1003951, 1003952, 1003953, 1003955, 1003956, 1003959, 1003960,
1003961, 1003963, 100394, 1003965
2013-04-30 22:26:51 +02:00
Torbjörn Andersson
69cdccd962 SCUMM: Handle double-clicks in Mac Loom (bug #3588164)
Unlike the EGA DOS version, it doesn't seem to be the scripts
that keep track of double-clicks. Instead, the engine sets a
variable to indicate them. Unlike the DOS version, we don't check
that the second click happens close enough on the screen to the
first one. We could, but it seemed needlessly complicated.
2012-12-15 00:35:00 +01:00
Travis Howell
dfa5405db8 SCUMM: Change the nest.number default to zero in stopScript and stopObjectScript too. 2012-05-31 19:01:07 +10:00
Travis Howell
de904c59c4 SCUMM: Fix global script 255 never been resumed by runScriptNested. Thanks to clone2727 for tracking down the problem in baseball2003. 2012-05-31 00:05:05 +10:00
Tobias Gunkel
9dd6105ce6 SCUMM: replace "c64" with "v0" when it applies to both C64 and AppleII v0 versions
In addition some routines (e.g. the gfx ones) that are even used in v1.
2012-02-11 08:30:08 +01:00
Tobias Gunkel
e14e4ab3b0 SCUMM: adjust to coding style-guide 2012-02-11 08:30:02 +01:00
Tobias Gunkel
434aaaf0c0 SCUMM: fix gcc compiler warnings 2012-02-11 08:30:00 +01:00
Tobias Gunkel
08e1e127e9 SCUMM: handle v0 distance check in checkPendingWalkAction() correctly 2012-02-11 08:29:43 +01:00
Robert Crossfield
f299fc295e SCUMM: Fix for V0 objects 2012-02-11 08:29:34 +01:00
Tobias Gunkel
e3f9a09d49 SCUMM: keep track of the number of nested script calls for a sentence
command in v0

If for instance an object necessary for the sentence command is not reachable or pickupable (try to use faucet (object 55) with jar with water in microwave (object 50), the pick-up script of the jar will tell the actor to pickup object 99 (jar not in microwave)) the actor will try to pick-up the jar infinitely.
This is fixed by counting the amount of nested scripts the sentence command has called (directly or indirectly) so far and aborts it if there have been too many.
2012-02-11 08:29:21 +01:00
Tobias Gunkel
fb68456541 SCUMM: complete handling of pending walkTo actions for sentence commands
in v0
2012-02-11 08:29:19 +01:00
Tobias Gunkel
1da715719c SCUMM: handle actor freeze in walkToActorOrObject() 2012-02-11 08:29:18 +01:00
Tobias Gunkel
2f1336cdf0 SCUMM: fix blank sentence line in v0 after cutscenes and remove unused parameter of resetSentence() 2012-02-11 08:29:03 +01:00
Tobias Gunkel
347035385e SCUMM: merge object v0 id and type into one object var 2012-02-11 08:28:49 +01:00
Tobias Gunkel
c138ef6709 SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectType 2012-02-11 08:28:46 +01:00
Tobias Gunkel
f2309998ff SCUMM: fix debugger for v0 2012-02-11 08:28:44 +01:00
Tobias Gunkel
e89dd623ef SCUMM: pop stack in v0 if command's object1 and 2 are the same
Otherwise the command will never be removed and the stack overflows
2012-02-11 08:28:35 +01:00