aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/object.cpp
AgeCommit message (Collapse)Author
2012-11-06SCUMM: Fix bug #3526089 - "SCUMM: ZAK Can't get objects in the bus on Mars"Filippos Karapetis
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 de0b5f76749add219a6b667d5d2d69fb8a86d959. Thanks to digitall for his bisecting work, which aided a lot in finding the actual issue for this bug
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-02-11SCUMM: cleanup and separation of objIsActor()/objToActor()/actorToObj() for ↵Tobias Gunkel
v0 and other engines
2012-02-11SCUMM: replace "c64" with "v0" when it applies to both C64 and AppleII v0 ↵Tobias Gunkel
versions In addition some routines (e.g. the gfx ones) that are even used in v1.
2012-02-11SCUMM: Fix actor ID handling in v0Tobias Gunkel
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-11SCUMM: merge object v0 id and type into one object varTobias Gunkel
2012-02-11SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectTypeTobias Gunkel
2012-02-11SCUMM: fix debugger for v0Tobias Gunkel
2012-02-11SCUMM: remove some NOTEs/TODOsTobias Gunkel
- 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-11SCUMM: fix a regression in v0Tobias Gunkel
Found by segra.
2012-02-11SCUMM: make START-button in mm c64 kid selection screen work againTobias Gunkel
2012-02-11SCUMM: use command stack and SentenceTab in mm c64Tobias Gunkel
- 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-11SCUMM: start handling object type and id correctly in mm c64Tobias Gunkel
- 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-11SCUMM: changed handling of _activeInventory/_activeActor to ↵Tobias Gunkel
_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()
2011-11-03SCUMM: Fix warningsEugene Sandulenko
2011-05-25ALL: behaviour -> behaviorMatthew Hoops
2011-05-13SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its ↵Max Horn
_resource member
2011-05-13SCUMM: Add a Resource class, refactor res code around itMax Horn
2011-05-13SCUMM: Get rid of the MemBlkHeader hackMax Horn
This uncovered at least one potentially serious bug in the inventory code, which still needs to be investigated and fixed.
2011-05-13SCUMM: Refactor how resource (types) are srepresentedMax Horn
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-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-12COMMON: Replace MKID_BE by MKTAGMax Horn
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.
2010-10-25SCUMM: Add patch #3093541 - MMC64: Actor Walk / Object Fix.Travis Howell
svn-id: r53806
2010-10-18SCUMM: Fix parts of bug #3087898 (SCUMM: Code analysis warnings)Max Horn
svn-id: r53567
2010-09-18JANITORIAL: Removed most punctuation at end of warning() and error()Torbjörn Andersson
Our warning() and error() functions always add an exclamation mark to the end of the message anyway. svn-id: r52791
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2009-10-23Fix object names in PCE version of Loom.Travis Howell
svn-id: r45346
2009-10-22Fix objects structure and object scripts in PCE version of Loom.Travis Howell
svn-id: r45335
2009-07-25Fixed GCC warnings.Torbjörn Andersson
svn-id: r42739
2009-07-25Add patch #2821100 - MM C64 Objects / Verb fixes, with minor clean up applied.Travis Howell
svn-id: r42737
2009-07-01Fixed some more warnings observed on buildbotMax Horn
svn-id: r42010
2009-05-31The error() and warning() functions add ! and newline automatically. (I didn'tTorbjörn Andersson
look at debug() and debugC(), since I'm really bored with this now. :-) svn-id: r41061
2009-03-20SCUMM: Split intern.h into multiple headersMax Horn
svn-id: r39567
2009-03-01Fix regression in AppleII/C64 versions of Maniac Mansion.Travis Howell
svn-id: r38999
2008-12-09SCUMM: Turned two former warnings into errors -- I never got reports on this ↵Max Horn
warnings, with some luck we'll never get reports on the errors, too. If we get them, I'll deal with them :) svn-id: r35292
2008-09-23Fix for bug #1917981: Game crash when finishing Indy3 demo. At the same ↵Max Horn
time, added a new paranoia check svn-id: r34635
2008-05-06Allow static and dynamic plugins to be used at the same timeJordi Vilalta Prat
svn-id: r31888
2008-03-19cleanupMax Horn
svn-id: r31192
2008-01-05Fixed regression that would cause ScummEngine_v80he to leak polygon slots at anTorbjörn Andersson
alarming rate. svn-id: r30249
2007-12-27Enable Windows version of early HE games by default, to match already ↵Travis Howell
enabled 3DO/DOS/Macintosh versions of early HE games. Adding only the minimum code required for HE70 games. svn-id: r30011
2007-09-19Merged common/stdafx.h into common/scummsys.h. All referencing files have ↵Nicola Mettifogo
been updated. svn-id: r28966
2007-09-11Adding various FIXME comments to bogus (non-self-explanatory) existing FIXME ↵Max Horn
comments; and some other related cleanup svn-id: r28890
2007-09-10Added some commentsMax Horn
svn-id: r28886
2007-09-08Some cleanup (yay for whomever had the brilliant idea to let SVN work over ↵Max Horn
HTTPS and hence through proxies&firewalls :) svn-id: r28877
2007-05-30Updated legal headers in source files, based on what Pidgin (the IM client ↵Max Horn
formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots svn-id: r27024
2007-03-10SCUMM: got rid of the _bompActorPalettePtr member var (which was only used ↵Max Horn
as a hidden param to drawBomp); turned drawBomp into a regular function (used to be a ScummEngine member method) svn-id: r26045
2007-03-03Fix level selection in PC Engine version of Loom.Travis Howell
svn-id: r25954
2007-03-03Allow PC Engine version of Loom to at least start up.Travis Howell
svn-id: r25951
2007-02-25Rename C64 engine class, since it is been used by Apple II and Commodore 64 ↵Travis Howell
versions now. svn-id: r25850
2007-02-15Introduced V12_X_SHIFT / V12_Y_SHIFTMax Horn
svn-id: r25611