diff options
author | Max Horn | 2003-05-01 14:35:21 +0000 |
---|---|---|
committer | Max Horn | 2003-05-01 14:35:21 +0000 |
commit | 99254eedc8899556dfd2cfbe7381093164d1e303 (patch) | |
tree | bf3a353ec91f67e8cbbe700ba32c1e3baf59e759 /scumm | |
parent | d9caf96ef90ec2397df294775f7b71e7efa255d3 (diff) | |
download | scummvm-rg350-99254eedc8899556dfd2cfbe7381093164d1e303.tar.gz scummvm-rg350-99254eedc8899556dfd2cfbe7381093164d1e303.tar.bz2 scummvm-rg350-99254eedc8899556dfd2cfbe7381093164d1e303.zip |
khalek, your patch didn't handle Indy (the original cause for my patch). This oneshould work better.
svn-id: r7251
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/resource.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index c884b3a910..4a9cf874ce 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -560,12 +560,16 @@ void Scumm::ensureResourceLoaded(int type, int i) { // FIXME - TODO: This check used to be "i==0". However, that causes // problems when using this function to ensure charset 0 is loaded. + // This is done for many games, e.g. Zak256 or Indy3 (EGA and VGA). + // For now we restrict the check to anything which is not a charset. // Question: Why was this check like that in the first place? - // Answer: costumes with an index of zero in the newer games at least - // TODO: determine after what version this behaviour changes... - if ((_gameId == GID_ZAK256) && (i < 0)) - return; - else if (i == 0) + // Answer: costumes with an index of zero in the newer games at least. + // TODO: determine why the heck anything would try to load a costume + // with id 0. Is that "normal", or is it caused by yet another bug in + // our code base? After all we also have to add special cases for many + // of our script opcodes that check for the (invalid) actor 0... so + // maybe both issues are related... + if (type != rtCharset && i == 0) return; if (i <= res.num[type]) |