aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorColin Snover2017-07-14 17:05:18 -0500
committerColin Snover2017-07-15 20:10:38 -0500
commit051366a48a30e68efcfe9ebb584a3774ca357e1e (patch)
treed6a07abce85057d892f81390d24cfa7bf211801f /Makefile.common
parent2032ca8ca1bf932ffbd4d6c1b2337caa4d585787 (diff)
downloadscummvm-rg350-051366a48a30e68efcfe9ebb584a3774ca357e1e.tar.gz
scummvm-rg350-051366a48a30e68efcfe9ebb584a3774ca357e1e.tar.bz2
scummvm-rg350-051366a48a30e68efcfe9ebb584a3774ca357e1e.zip
SCI: Fix up Object::_baseMethod implementation
1. In SCI0/1, selectors and offsets in the method block are stored contiguously (all selectors, then all offsets), with a null separator between the two runs. All the later versions of SCI instead interleave selectors & offsets. Since these values are already being copied into a new array anyway, code for reading method selectors/offsets is now simplified by interleaving this data when it is written into _baseMethod for SCI0/1, so the same equation for retrieving method selectors/offsets can be used across all SCI versions. 2. In SCI1.1-2.1 branch, the method count was being copied into the first entry of the array, which meant that SCI1.1-2.1 had extra code for dealing with the fact that the first entry was not an entry. This has been fixed, and the extra code removed. 3. Data was being overread into _baseMethod in all games SCI0-2.1. (SCI0/1 had an extra magic value of 2, and SCI1.1-2.1 had an extra magic value of 3). Reviewing history, it's not clear why this happened, other than that it appears to have been introduced at 7b0760f1bc5c28abcede041a6e3930f84ff3d319. My best guess is that this was a confusion between byte count and record count, where the intent was to read an extra 2 bytes for the null separator in SCI0/1, but it actually read 2 records instead. (I do not have a guess on why SCI1.1 ended up with a 3.) This overreading has been removed.
Diffstat (limited to 'Makefile.common')
0 files changed, 0 insertions, 0 deletions