Age | Commit message (Collapse) | Author |
|
|
|
|
|
With this bug, whenever a string was trimmed from the right, the last
character was always cut off, even if it wasn't whitespace. This was
apparent in the RAMA demo, which parses a text file for its scenes,
and each line is trimmed
|
|
This bug existed in SSCI and was pulled in carelessly during
initial implementation of SciArray. Closer examination of SCI3
reveals that this only happened to work in SSCI because it would
always allocate on the first resize, and would always allocate 25
extra elements per allocation.
|
|
|
|
|
|
|
|
|
|
KQ7 1.51 writes int16s from the save game catalogue into a Str
object, then retrieves byte 0 from the string and compares it to
-1. This happens to work out because (1) characters were treated
as signed in SCI2.1early and earlier, and (2) int16s in the save
game catalogue were little-endian.
In SCI2.1mid and later, this trick no longer works because
characters are treated as unsigned and get zero-extended instead.
Fixes Trac#9632.
|
|
transparentColor -> skipColor
displace -> origin
scaledWidth -> xResolution
scaledHeight -> yResolution
|
|
Memory references and integers in SSCI are both 16-bit numbers,
so game scripts frequently (incorrectly) use an IntArray instead
of an IDArray for holding references. Since references in ScummVM
are 32-bit reg_ts, IntArray entries must be large enough to hold
reg_ts in order to be compatible with game scripts that store
references in integer arrays.
The alternative solution is to find and patch all incorrect use of
IntArray across all games. This is possible, but a bit risky from
a save game stability perspective, since incorrect IntArray usage
is sometimes not apparent until well after the array is
instantiated (like GK1's global interview array).
This change invalidates existing SCI32 save games.
|
|
|
|
|
|
Used by Torin room 40300 to perform pathfinding by bitmap.
|
|
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.
|
|
This happens in e.g. Phant1, when walking from dining, to
reception, to up the stairs.
|
|
|
|
|
|
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 allows to store pointers and fundamental types in a SegmentObjTable.
|
|
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.
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
This was due to a missing destructor in the HunkTable.
Thanks to wjp for this patch.
|
|
|
|
|
|
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.
|
|
simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
|
|
svn-id: r54361
|
|
svn-id: r54351
|
|
svn-id: r54333
|
|
svn-id: r54328
|
|
- Added SCI3 equivalents for access to object selectors
- Added SCI3 implementation of object relocation
- Added SCI3 implementation of Script::initialiseClasses()
svn-id: r54283
|
|
- Maintain the state of the string heap space in saved games
- Merged SegManager::reconstructScripts() inside SegManager::saveLoadWithSerializer()
- Disabled a now unnecessary script patch for the cipher puzzle in Castle of Dr. Brain, and performed some cleanup for another disabled patch
- Removed direct access to the _baseObj variable of objects
svn-id: r54133
|
|
This command can be used to find the object methods (including their
corresponding objects and owner scripts) that call a specific kernel
call. This shall aid us track all the spots where a particular kernel
function is called from, therefore it'll be a bit easier to find
examples where unimplemented kernel functions are called
svn-id: r53646
|
|
and fixing possible crash & typo
svn-id: r52565
|
|
svn-id: r52562
|
|
svn-id: r52544
|
|
svn-id: r51687
|
|
a lot has changed since then, we're still not stable, and this helps clean up the code, thus we're still in a position to drop support for old saved games
svn-id: r50738
|
|
svn-id: r50440
|
|
svn-id: r50430
|
|
This means a little bit more overhead but makes the code much more readable
and understandable.
svn-id: r50429
|