Commit graph

98 commits

Author SHA1 Message Date
AndywinXp
2c9d7fd2ee SCUMM: COMI: Change how blastObject rects are restored for v8
This fixes the last remaining graphical glitches pertaining the original GUI
2022-08-06 13:33:56 +02:00
AndywinXp
ced78b19d5 SCUMM: COMI: Fix some more text/GUI rendering glitches 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
AndywinXp
c108dc2646 SCUMM: Fix o5_faceActor() implementation for v4 and below
Fixes #5312.
Verified from the disasms of MANIAC v2, INDY3 v3 and LOOM v4.
2022-07-27 15:03:36 +02:00
Donovan Watteau
80dd45ee62 SCUMM: Keep the security door closed by default in Maniac Mansion NES
There was no copy protection on NES, since it was on a cartridge.
One just needs to open the security door like a regular door, with its
dramatic sound effect.

This also lets one close the door again, like in the original game.
2022-05-21 17:14:29 +03:00
Torbjörn Andersson
195238f8c5 SCUMM: Fix Full Throttle drawing glitch (bug #13419)
The drawObject() function would always mask out the last three bits of
the object height. This is correct for many versions of SCUMM, but not
for SCUMM v7-v8. In Full Throttle, it caused a glitch when drawing the
open doors to the Corley Motors building late in the game.

So far, this is the only glitch known to have been caused by this. Maybe
the developers generally adjusted the height of their objects out of
habit when creating the games?
2022-05-03 07:36:42 +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
Andrea Boscarino
d6912058c7 SCUMM: Fix findObject(x,y) for DIG and COMI 2021-08-04 17:19:50 +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
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
athrxx
4a7b720a31 SCUMM: whitespace 2020-10-24 17:58:29 +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
56d2bf77ba SCUMM: Ensure pointer returned by getResourceAddress() is usable
In some cases the pointer returned is used directly without further
error checking.
As most instances already assert() in this case this commit simply
adds asserts where missing and deemed appropriate.
2018-06-01 17:08:39 +00:00
Colin Snover
5cd2c9a387 SCUMM: Fix possible return of garbage values 2017-12-01 19:22:52 -06:00
Ben Castricum
13f810f57f SCUMM: Ignore SetOwnerOf call in specific case, fixes bug #6802 2016-08-30 09:06:43 +02:00
Robert Crossfield
67071b42bc SCUMM: Maniac V0: Implement 'simulator' for CPU lag (as the original engine occasionally ran at less than 60Hz). Fix call to 'getClosestPtOnBox', whcih was being passed X * V12_X_MULTIPLIER and Y * V12_Y_MULTIPLIER, but the box coordinates, where not 2016-07-19 20:39:58 +10:00
Kirben
472e325bc4 SCUMM: Fix regression in updated Russian version of Freddi Fish 1. 2014-09-10 23:05:29 +10:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Johannes Schickel
c22d914054 SCUMM: Do not set Surface::pixels directly anymore. 2013-08-03 04:14:07 +02:00
Filippos Karapetis
023f6f10c7 SCUMM: Fix bug #3526089 - "SCUMM: ZAK Can't get objects in the bus on Mars"
This fixes a regression in V1/V2 games when no actor direction
is set (like the Shuttle Bus scene in Zak V2). The regression
was caused by commit de0b5f7674.
Thanks to digitall for his bisecting work, which aided a lot in
finding the actual issue for this bug
2012-11-06 14:18:44 +02: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
Tobias Gunkel
4922055063 SCUMM: cleanup and separation of objIsActor()/objToActor()/actorToObj() for v0 and other engines 2012-02-11 08:36:27 +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
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
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
621017ce65 SCUMM: remove some NOTEs/TODOs
- o5_breakHere() seems to be still needed. For example edna does not manage to walk up the ladder if this is not enabled.
- numLocalObjects seems to be big enough so that < instead of <= can be used. The original interpreter only uses the local ids 0 .. 44 whereas scummvm has _numLocalObjects set to 200.
2012-02-11 08:28:40 +01:00
Tobias Gunkel
df07d2db29 SCUMM: fix a regression in v0
Found by segra.
2012-02-11 08:28:30 +01:00
Tobias Gunkel
c16ef940a1 SCUMM: make START-button in mm c64 kid selection screen work again 2012-02-11 08:28:24 +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
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
Eugene Sandulenko
0f711c4a2e SCUMM: Fix warnings 2011-11-03 01:34:53 +00:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Max Horn
9ec64a66fe SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its _resource member 2011-05-13 14:48:01 +02:00
Max Horn
c02420df43 SCUMM: Add a Resource class, refactor res code around it 2011-05-13 11:47:13 +02:00
Max Horn
75b9deb185 SCUMM: Get rid of the MemBlkHeader hack
This uncovered at least one potentially serious bug in the inventory
code, which still needs to be investigated and fixed.
2011-05-13 11:47:10 +02:00
Max Horn
45e65d7ea0 SCUMM: Refactor how resource (types) are srepresented
Previously, we had a couple of arrays of size N (where N = number of
resource types), one for each attribute of a resource type (such as as
the number of resources of that type.

Now, we have one array of size N, whose elements are a record
aggregating all the attributes of each resource type.
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
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02: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
3b21db1618 SCUMM: Fix parts of bug #3087898 (SCUMM: Code analysis warnings)
svn-id: r53567
2010-10-18 16:00:07 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Travis Howell
8bb99f4571 Fix object names in PCE version of Loom.
svn-id: r45346
2009-10-23 12:50:51 +00:00
Travis Howell
4350f7b8c0 Fix objects structure and object scripts in PCE version of Loom.
svn-id: r45335
2009-10-22 11:33:05 +00:00
Torbjörn Andersson
b92477f6ab Fixed GCC warnings.
svn-id: r42739
2009-07-25 06:55:28 +00:00
Travis Howell
c02ad3b7bf Add patch #2821100 - MM C64 Objects / Verb fixes, with minor clean up applied.
svn-id: r42737
2009-07-25 06:27:41 +00:00