Age | Commit message (Collapse) | Author |
|
In SCI2/2.1, variable indexes are used along with a range encoded
in the interpreter executable to determine whether an object
variable is a view-related variable. Operands to aTop, sTop, ipToa,
dpToa, ipTos, and dpTos are byte offsets into an object, which
are divided by two to get the varindex to check against the
interpreter range.
In SCI3, objects in game scripts contain groups of 32 selectors,
and each group has a flag that says whether or not the selectors
in that group are view-related. Operands to aTop, sTop, ipToa,
dpToa, ipTos, and dpTos are selectors.
|
|
|
|
The variable count returned by Object::getVarCount is populated
by variable 1 in SCI1.1, so specially reading the variable
explicitly for that engine version is not necessary.
|
|
|
|
|
|
In SCI3, index-to-selector tables no longer exist in compiled
object data (instead, the SCI3 VM uses selectors directly and
object data contains a bit map of valid selectors). In ScummVM,
the table is generated by Object::initSelectorsSci3 for
compatibility with the design of the ScummVM SCI VM. For
consistency, _baseVars is converted to use a standard container,
which works for all SCI versions.
The table for SCI3 property offsets is also changed to use a
standard container instead of manually managing the memory with
malloc/free.
|
|
|
|
|
|
|
|
|
|
|
|
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
|
|
|
|
This is because objects may be loaded before their base objects,
which causes initBaseObject to fail for SCI0.
Script::initializeObjectsSci0 already did this, but
SegManager::saveLoadWithSerializer did not when calling
initBaseObject after loading a savegame.
|
|
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
|
|
The caller offset is never actually used inside the function
|
|
These are needed for future handling of large SCI3 script files
|
|
|
|
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
|
|
This may have to be undone if we ever want to start free'ing _baseVars again.
|
|
|
|
|
|
If an object defines more variables than its base class, some method
selectors may be hidden. This code tries to enumerate the affected
selectors. It may be useful for mass-scanning objects using
'find_callk Dummy'.
It's disabled by default currently since it does things to partially
uninitialized objects that I can't guarantee are 100% safe at this
point.
|
|
|
|
The cause for this bug turns out to be a corrupt object that as
a side effect accidentally bypasses its own corruption. See the
added comments for details.
Also add a warning that points out similarly corrupted objects.
|
|
svn-id: r55542
|
|
svn-id: r55539
|
|
svn-id: r55525
|
|
svn-id: r55026
|
|
svn-id: r55025
|
|
operations
have been commented out for now, as MSVC complains about heap corruption in SCI3 games
- Code formatting fixes
svn-id: r54991
|
|
the Object class, and it also plugs a leak.
svn-id: r54986
|
|
Fixed Object::locateVarSelector() for SCI0-SCI1 games, as it wasn't checking the
class for object variables
svn-id: r54415
|
|
svn-id: r54361
|