Age | Commit message (Collapse) | Author |
|
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
|
|
SCI scripts can contain stale pointers, which are used later on. We now delete
the contents of hunk entries without invalidating the relevant pointers and let
the GC clear the references. Many thanks to waltervn and wjp for all their work
and help on this.
|
|
Stops flood of warnings in some Mac titles.
svn-id: r55849
|
|
svn-id: r55749
|
|
svn-id: r54925
|
|
simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
|
|
search"
Fixed some endianness issues in Amiga versions, thanks to wjp. Amiga
versions expect a BE VM, thus we adjust accordingly in the places
where memory is accessed directly (i.e. kStrAt, kMemory and all places
that set/get characters from memory)
svn-id: r54521
|
|
svn-id: r54174
|
|
- Enabled the SCI3 game entries for testing purposes
- The resource manager is initialized fully now (with a slight hack)
- Added a hack for the demo of Shivers 2 (which seemingly has no
scripts or vocabularies)
- The engine will stop before parsing any game scripts in SCI3 games,
and opens the console for resource manager-related functionality
svn-id: r54167
|
|
svn-id: r54037
|
|
This shouldn't be happening normally, but apparently it does, which would indicate
a potential issue with the object locking code
svn-id: r52703
|
|
System scripts (i.e. 0 and 900-999) are now protected and never destroyed during a
game
svn-id: r52702
|
|
svn-id: r52527
|
|
"fixes" bug #3037800
fixing warning in seg_manager
svn-id: r51576
|
|
conversation dialog with esc (doesn't affect gameplay in any manner)
svn-id: r51572
|