Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
|
|
v0 and other engines
|
|
versions
In addition some routines (e.g. the gfx ones) that are even used in v1.
|
|
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().
|
|
|
|
|
|
|
|
- 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.
|
|
Found by segra.
|
|
|
|
- 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
|
|
- 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
|
|
_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()
|
|
|
|
|
|
_resource member
|
|
|
|
This uncovered at least one potentially serious bug in the inventory
code, which still needs to be investigated and fixed.
|
|
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.
|
|
|
|
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.
|
|
svn-id: r53806
|
|
svn-id: r53567
|
|
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.
svn-id: r52791
|
|
svn-id: r47541
|
|
svn-id: r45346
|
|
svn-id: r45335
|
|
svn-id: r42739
|
|
svn-id: r42737
|
|
svn-id: r42010
|
|
look at debug() and debugC(), since I'm really bored with this now. :-)
svn-id: r41061
|
|
svn-id: r39567
|
|
svn-id: r38999
|
|
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
|
|
time, added a new paranoia check
svn-id: r34635
|
|
svn-id: r31888
|
|
svn-id: r31192
|
|
alarming rate.
svn-id: r30249
|
|
enabled 3DO/DOS/Macintosh versions of early HE games. Adding only the minimum code required for HE70 games.
svn-id: r30011
|
|
been updated.
svn-id: r28966
|
|
comments; and some other related cleanup
svn-id: r28890
|
|
svn-id: r28886
|