Commit graph

106 commits

Author SHA1 Message Date
Torbjörn Andersson
35e8e66d33 SCUMM: Remove inconsistent whitespace 2024-12-02 20:07:28 +01:00
AndywinXp
55832ef885 SCUMM: Relabel v2 object states
This has been bugging me for a while...
Note that ifNotStateCommon and ifStateCommon have
been semantically inverted until now. I also fixed their
naming now to reflect what they are actually doing.
2024-09-20 23:08:51 +02:00
Hubert Maier
370064f93f JANITORIAL: SCUMM: Fix typos 2024-09-16 01:55:26 +03:00
Donovan Watteau
7f6aa593a8 SCUMM: MM (NES): Fix sound effect when starting a new game (Trac#2536)
We should play the "Pickum item" sound when starting a new game, but until
now, only the "crickets" sound was played in ScummVM.

Using triggerSound() instead of addSoundToQueue() to deal with this sound
effect fixes this, and AndywinXp confirmed from 6502 disasm that "whatever
is called through startSound is executed immediately", and "there doesn't
seem to be a sound queue."

Thanks a lot again, Andy! :)
2024-09-01 14:21:13 +02:00
Donovan Watteau
c7c4eafa49 SCUMM: Add TODO comments for some Enhancements / original interpreter behaviors to explore 2024-08-29 22:12:10 +02:00
Donovan Watteau
b21a5e6c69 SCUMM: Add some TODOs for some original bugs to investigate with the original interpreters 2024-08-29 22:02:45 +02:00
AndywinXp
0f87863c7b SCUMM: MANIAC/ZAK (C64): Make screen layout pixel-perfect
This closes and fixes #11971:
"SCUMM: MANIAC/ZAK C64: GUI & dialog text are incorrectly
positioned on screen, and cursor is improperly layered"

The ticket also mentions improperly layered cursor:
"the pointer cursors pass *behind* the various character sprites
on screen", but there's really nothing we can do about it,
our cursor handling is way too different to function like the original
(and anyway, it looks like a severe C64 hardware limitation quirk...)
2024-08-11 00:09:33 +02:00
AndywinXp
d78ec57ef5 SCUMM: MANIAC (NES): Improve inventory handling accuracy
The inventory is now scrollable starting from three objects,
and it is filled in inverse order (last object grabbed is the first
displayed).
2024-08-10 13:00:31 +02:00
Donovan Watteau
edc3d61cc2 SCUMM: JANITORIAL: Rename _enableEnhancements to enhancementEnabled in comments 2024-08-02 21:35:53 +02:00
athrxx
55ec2b4227 SCUMM: (MM) - fix bug no. 15278
("MANIAC: Sentence line empty at start")
2024-07-24 18:53:10 +02:00
athrxx
769fa3c878 SCUMM: (MM) - fix another v1/v2 diff 2024-07-24 18:53:05 +02:00
athrxx
84a0bff281 SCUMM: fix Coverity warnings 2024-05-20 15:32:19 +02:00
AndywinXp
8fe0f93630 SCUMM: Rename CHARSET_1() to displayDialog()
We are now using a name which respects the coding
guidelines and also reflects how the actual function was
named.
2024-04-28 19:59:30 +02:00
AndywinXp
8461f25218 SCUMM: Rename enhancementClassActive to enhancementEnabled 2023-11-08 11:46:06 +01:00
AndywinXp
d5fa7aeb90 SCUMM: Mark all enhancements with their respective classes 2023-11-08 11:46:06 +01:00
AndywinXp
f4455e773e SCUMM: Relabel part of the general sound code
Albeit not 100% necessary for rewriting the HE sound engine,
I decided to make this change in order to:
- Give proper meaning to magic numbers and variables
  which were given temporary names 20 years ago;
- Avoid going insane when making comparison with HE code
  and ours, when rewriting the sound code.
2023-08-18 22:20:45 +02:00
Walter Agazzi
72d2edcc1b SCUMM: Fix condition in italian MANIAC v2 workaround 2023-02-28 12:33:11 +01:00
AndywinXp
a9abd083d9 SCUMM: MANIAC (ITA): Fix bug #14198
This is an original bug and it has been fixed as an enhancement.
2023-02-26 18:47:22 +01:00
AndywinXp
13e7c9d4d9 SCUMM: Implement basic support for v0-3 GUI 2022-11-28 23:21:45 +01:00
Torbjörn Andersson
3d6fb5b608 SCUMM: Work around typo in Syd's biography in DOS Maniac Mansion (v1)
In the English version, Syd's biography says that he's "tring" to start
his own new-wave band. Other versions I've seen (in person or on YouTube)
have either fixed the typo, or (in the case of the NES version)
completely rewritten the text. Fix this, and mark it as an enhancement.
2022-08-25 01:18:07 +03:00
eientei
d47127aa90 SCUMM: Simplify bug #4556 workaround; comment fixes 2022-08-17 21:47:29 +02:00
Donovan Watteau
4ec06a2bf6 SCUMM: Unify WORKAROUND usage and complete/tweak some of them 2022-08-07 17:24:27 +02:00
athrxx
97fbe867cb SCUMM: (MMv1/ZAKv1) - add support for CGA, CGA Composite and Hercules modes
This does not improve anything about these modes for v2 and v3, except:
- brighter CGA colors
- v2 will also get the more accurate Hercules mouse cursor

I will do improve v2/v3 as separate tasks. v3 seems to be mostly fine, anyway, except for the actors (we dither them just like the backgrounds, but that looks different in DOSBox).
2022-07-10 01:04:38 +02:00
Torbjörn Andersson
4c06e04a87
SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says
According to the manual, you can execute commands by clicking on the
sentence line. But this doesn't work with the v1 or v2 DOS versions,
even though it works with the C64 demo. This is because the verb script
doesn't for this, so we have to do that ourselves. This is loosely based
on how Zak McKracken does it.
2022-06-18 21:58:30 +03:00
Donovan Watteau
77228509eb SCUMM: Fix hanging Maniac Mansion cutscene with the French version (Trac#13473)
The lab cutscene where Purple Tentacle is bullying Sandy would hang
when Dr Fred is done talking, in the official French version.

This appears to be related to this VAR_CHARCOUNT check in script no. 155:

[0085] (14) print(9,"{{Dr Fred's reaction line, shorter in French}}");
[00DA] (80) breakHere();
[00DB] (44) unless (VAR_CHARCOUNT > 90) goto 00DA;

Usually, French sentences are a bit longer than English sentences, but
in this case, it's shorter, but yet the script didn't adjust the 90
value, so it would indefinitely loop, causing the scene to hang (until
the player presses the Esc key) and Sandy's reaction to be lost.

So we just pad this string with extra spaces if its length looks too
short for the default VAR_CHARCOUNT check.  This should also remain
harmless if the string *is* long enough, or if a translation did fix
the VAR_CHARCOUNT check.

Still, we only restrict this workaround to the French version for now,
since we're not aware of a similar problem with other translations.
2022-05-18 21:57:19 +03:00
ShaharAriel
404071df0e SCUMM: Add zak and MM Hebrew preposition
The English chars here are reference in font to Hebrew chars
2022-05-15 16:26:04 +03: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
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
Orgad Shaneh
c8fc484c37 SCUMM: Fix X-range of selection for Hebrew on scumm<7
curRect.left is assigned in the script, and it is not modified. right is
assigned with the screen width - original left.

This results in bad highlighting of the verbs all over the line width,
instead of being limited to the actual string.

Due to that, sometimes the selection range of the up/down arrows overlaps
with some of the verbs, and then these verbs cannot be selected.

Solve by storing the original left value, and using it as initial x
position for the string (the actual right-to-left manipulation is done in
drawString()), and modify the value of curRect.left to match the string
that was actually drawn.

This bug is similar to the one that was fixed in 58e921eb87, but the
solution that was done there for v7 and v8 cannot work here, because the
string logic is much more complicated.
2021-04-26 21:26:41 +03:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02: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
Adrian Frühwirth
c7f3416daa JANITORIAL: Remove trailing whitespace 2018-05-20 23:40:20 +02:00
Eugene Sandulenko
085332a3dc Merge pull request #902 from segrax/Fix_4556
SCUMM: Fix bug #4556 (Maniac: Purple Tentacle appears in Lab after being chased out)
2017-02-21 23:33:17 +01:00
Robert Crossfield
56caa6f0a7 SCUMM: Cleanup Maniac Mansion workarounds 2017-02-14 19:26:11 +11:00
Robert Crossfield
9e07738b52 SCUMM: Fix bug #4112. If you enter the lab while Dr. Fred has the power off, the power won't be turned back on as the script is killed 2017-02-14 18:28:58 +11:00
Robert Crossfield
165a1bb070 SCUMM: Fix bug #4556 (Maniac C64/V1/V2: Purple Tentacle appears in Lab Entry after being chased out) 2017-02-13 17:51:00 +11:00
Eugene Sandulenko
e5ebc903ea Merge pull request #877 from segrax/Fix_2285
SCUMM: Fix bug #2285 (ZAK C64/V1/V2 Caponians dont disguise after using crystal)
2017-01-13 23:15:35 +01:00
Robert Crossfield
a3ca4412fa SCUMM: Fix bug #2285 (ZAK C64/V1/V2 Caponians don't disguise after using blue crystal) 2016-12-28 09:23:54 +11:00
Robert Crossfield
485f26e4d6 SCUMM: Fix bug #4515 (Dr. Fred facing wrong way in lab cutscene) 2016-12-27 10:21:09 +11:00
Eugene Sandulenko
556d65713b SCUMM: Add support for Russian MM 2016-01-10 09:21:03 +01:00
Robert Crossfield
daefdc315b SCUMM: Fix bug #2034 - MANIAC V2: Early Collision with Green Tentacle 2014-11-23 08:24:39 +11:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Willem Jan Palenstijn
3f5aaa0ca5 SCUMM: Clean up resetSentence 2012-02-13 20:26:43 +01: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
984c2a05e4 SCUMM: replace o_beginOverride() with o2_beginOverride()
In contrast to the comment in o_beginOverride() VAR(VAR_OVERRIDE) is not set in the disassembly. In addition the cutscene stack-pointer is always 0 as this feature is not used in v0. This makes o_beginOverride() work the same way o2_beginOverride() and so it is not needed anymore.

Note that fetchScriptWord() was changed to ScummEngine::fetchScriptWord() in o2_beginOverride() as ScummEngine_v0::fetchScriptWord() only fetches a byte.
As we need two bytes here we have to use ScummEngine::fetchScriptWord().
2012-02-11 08:29:52 +01:00
Tobias Gunkel
d4ddd2ca84 SCUMM: introduce constants for _userState for cleaner and easier to understand code 2012-02-11 08:29:51 +01:00