Age | Commit message (Collapse) | Author |
|
This is needed by Phant2 guest additions to find the correct
slider for the music volume, since the sliders have no unique name.
|
|
When a game deletes a script and then loads the same script again
before it has been fully deallocated,
SegManager::instantiateScript tries to reuse the same script
& locals segments, but it was failing to reuse the old locals
segment because Script::freeScript would unconditionally clear
the old locals SegmentId, which meant the old locals segment would
just leak.
This patch does not fix old save games which may contain orphaned
locals segments, but should prevent the problem from occurring
going forward. (It is possible to clean up these old save games,
but this is not a big leak so it doesn't seem worth the extra
effort to do so.)
|
|
See code comment in Object::init for more details.
Fixes Trac#9780.
|
|
This fixes a crash in the debugger when disassembling the class opcode
with a class from a script that hasn't yet been loaded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transparentColor -> skipColor
displace -> origin
scaledWidth -> xResolution
scaledHeight -> yResolution
|
|
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
|
|
When objects are added to a SegmentObjTable, it may cause the
internal storage for the table to expand and move to a new
region of memory. When this happens, all pointers to objects held
by a SegmentObjTable of the same type would be invalidated, due
to an implementation detail that should not be exposed. To prevent
this, objects are now allocated separately on the heap, so even if
the table's storage moves due to insertions, the objects owned by
the table will not, so references remain valid for the lifetime of
the object.
|
|
When new bitmaps are added and the underlying Common::Array needs
to move to expand, this invalidates all pointers to bitmaps, which
makes it basically impossible to use the bitmap segment since you
never know if a reference is going to be invalidated due to an
array move.
To solve this, BitmapTable is changed to hold pointers to
SciBitmaps that are allocated separately on the heap instead, so
when those bitmaps are looked up, the resulting pointers are valid
for the lifetime of the bitmap, instead of the lifetime of the
Common::Array used internally by BitmapTable.
|
|
|
|
Bitmaps in ScrollWindow and Robot code are managed by the kernel
and not by game scripts, although they must be able to be
referenced through a reg_t. To prevent incorrect GC of bitmaps
that are in use but not referenced by any game script, explicit
memory management of hunk entries can be enabled.
|
|
This makes code not use _table directly whenever possible. An exception is the
save game code which is not easy to adapt due to design deficiencies.
|
|
Fixes Mixed Up Mother Goose SCI1.1 crash when saving
And could potentially fix all sorts of other issues
Original SCI only zeroed out heap on init.
|
|
|
|
address
|
|
|
|
|
|
read error 2"
|
|
|
|
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
|
|
It's perfectly normal behavior to have locals with a smaller segment ID
than the ID of their respective script, e.g. when scripts are
uninstantiated and then instantiated again
|
|
When resetting the segment manager, sometimes the locals block for a
script is placed in a segment smaller than the script itself. This
shouldn't be happening, but it isn't fatal, however it should be resolved
in a proper manner
|
|
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
|
|
|
|
This reverts commit 577d7e41c9ca2c498dc85e41c373fbdca8d2ed41.
|
|
Merge the init() and load() Script methods and reset the script when
necessary
|
|
This is needed for upcoming changes to the Script class
|
|
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
|
|
|
|
|
|
It now returns a reference to the object list instead of copying it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Trying to delete a script marked as deleted should do nothing. Hoyle 3
tried to uninstantiate scripts more than once, and we incorrectly
decreased the reference count of associated scripts more than once,
thereby killing them. This properly fixes bug #3038837 (removed the
hack for it). Many many thanks to wjp for his help on this :)
|
|
|
|
|
|
This was visible in the password of LSL5 Amiga. Thanks to waltervn for
finding this
|