Commit graph

88 commits

Author SHA1 Message Date
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
Tobias Gunkel
e33d41035c SCUMM: scumm_vars 14 to 16 are not handled specially in v0
Reading the manuscript will be fixed by this.
2012-02-11 08:29:47 +01:00
Tobias Gunkel
96f8fc6ca9 SCUMM: Fix actor ID handling in v0
Some object functions allow actor IDs and object IDs as parameters. They are easily distinguishable in engines > 0 as actor IDs are < _numActors and object IDs are bigger. In v0 this is not the case as there are objects with IDs like 3 and 5 (e.g. the hamster). So object ID handling was unified for v0 and the other engines by introducing objIsActor(), objToActor() and ActorToObj().
2012-02-11 08:29:13 +01:00
Tobias Gunkel
0bae642453 SCUMM: 2nd try to fix dungeon door timing
Shorten the timer delay does not work as escaping with a second kid is not possible too. Instead decrease engine speed during script execution.
2012-02-11 08:28:54 +01:00
Tobias Gunkel
4519e56e5c SCUMM: shorten delay for dungeon door closing action
Escaping with only one kid should not be possible anymore.
2012-02-11 08:28:52 +01:00
Tobias Gunkel
de0b5f7674 SCUMM: use command stack and SentenceTab in mm c64
- MM C64 uses command stack (SentenceTab, doSentence()) now
- _cmdObject... added for current SentenceTab. The _active... variables are only used to build a sentence in the inventory but never by a script.
-> many routines are not needed anymore and are removed
2012-02-11 08:28:22 +01:00
Tobias Gunkel
1c32000a00 SCUMM: start handling object type and id correctly in mm c64
- removed complicated and unnecessary _v0ObjectIndex, _v0ObjectInInventory, _v0ObjectFlag vars
- started to merge object id and type into one object value (type<<8|id)
- verb preposition ids do not dependent on language -> remove from VerbSettings

Note:
- objects with type=0 are foreground objects. They have a state, an owner and a bg overlay image.
- objects with type=1 are bg objects. They do not have a state or owner and are already contained in the bg image. The do not have an entry in objectState/OwnerTable
2012-02-11 08:28:14 +01:00
Tobias Gunkel
a709a42319 SCUMM: fix ScummEngine_v0::o_stopCurrentScript() 2012-02-11 08:02:34 +01:00
Tobias Gunkel
a79f224c23 SCUMM: changed handling of _activeInventory/_activeActor to _activeObject(2)/_activeObject(2)Type
Note: the transition is not completed yet. The code compiles but is probably not runnable as not every occurrence of _activeInventory has been properly replaced.
The usage of _v0ObjectIndex and _v0ObjectInInventory should be revised too and both variables should be replaced by another mechanism (maybe by using a single variable "obj = (type << 8) | id").

- moved v0 only vars _activeInventory, _activeObject, _activeVerb from  ScummEngine_v2 to ScummEngine_v0
- removed _activeActor, _activeInvExecute, _activeObject2Inv and _activeInventory. They are handled by _activeObject/_activeObjectType and _activeObject2/_activeObject2Type now.
- removed _activeObject(2)Index as they only bloat the code without any benefit (?)
- merge prep-name tables from ScummEngine_v2::drawPreposition() and ScummEngine_v0::drawSentenceWord() by introducing ScummEngine_v2::drawPreposition()
- rename ObjectData.flags -> obj_type (quick-fix only, needs review! Maybe obj_nr and obj_type can be merged into one var: obj_nr = (obj_type << 8) | obj_nr)
- o_unknown2 is negation of o_ifActiveObject (o_ifNotEqualActiveObject2)
- renamed o_ifActiveObject -> o_ifEqualActiveObject2 as it acts only on _activeObject2
- renamed ScummEngine_v0::drawSentenceWord() -> ScummEngine_v0::getObjectName()
2012-02-11 08:02:32 +01:00
Travis Howell
0ceeee8148 SCUMM: Add script number differences in SCUMM V0, for two work arounds in Maniac Mansion. 2012-01-29 17:07:38 +11:00
Max Horn
649f8e0a84 SCUMM: Rename ResTypes->ResType, introduce ResId typedef, change code to use both 2011-05-13 14:02:53 +02:00
Max Horn
b37463fe59 SCUMM: Move class ResourceManager to its own header 2011-05-13 11:47:08 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
2c00aed172 SCUMM: Avoid hiding overloaded virtual method
svn-id: r55809
2011-02-07 17:53:34 +00:00
Max Horn
31d2d2af4c SCUMM: Workaround for bug #1447058, a race condition in the game scripts
svn-id: r54730
2010-12-02 00:27:46 +00:00
Travis Howell
4f0cc6a435 SCUMM: Add patch #3093541 - MMC64: Actor Walk / Object Fix.
svn-id: r53806
2010-10-25 08:03:55 +00:00
Max Horn
8a5705132d SCUMM: More finely differentiate opcode tables between v3, v4 and v5
This has been tested and verified as much as I can, but has a small
risk of leading to (easily fixable) regressions.

svn-id: r52130
2010-08-16 19:58:01 +00:00
Max Horn
93375526c0 SCUMM: Convert some code to use Common::String
svn-id: r48957
2010-05-05 20:43:22 +00:00
Travis Howell
4cc2d06b15 Fix bug #2687801 - ZAK: Cannot pickup Ladder on Mars Youth Hostel.
svn-id: r40899
2009-05-26 01:25:44 +00:00