diff options
author | David Corrales | 2007-06-23 18:51:33 +0000 |
---|---|---|
committer | David Corrales | 2007-06-23 18:51:33 +0000 |
commit | cacd7a28fd51d960947de88abbf30c487e66529d (patch) | |
tree | f3baa59853bfb307e452b86b9d93c4737b1fa6ab /engines/agi/view.cpp | |
parent | 0ac96302fe9c04df79cb01a77d19535b45fe2db0 (diff) | |
parent | 90c2210dae8c91fa8babc6b05564e15c9d445d18 (diff) | |
download | scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.gz scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.bz2 scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.zip |
Merged the FSNode branch with trunk r27031:27680
svn-id: r27681
Diffstat (limited to 'engines/agi/view.cpp')
-rw-r--r-- | engines/agi/view.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/engines/agi/view.cpp b/engines/agi/view.cpp index f80e4b6447..48e3ca5e3f 100644 --- a/engines/agi/view.cpp +++ b/engines/agi/view.cpp @@ -151,6 +151,7 @@ int AgiEngine::decodeView(int n) { assert(v != NULL); + _game.views[n].agi256_2 = (READ_LE_UINT16(v) == 0xf00f); // Detect AGI256-2 views by their header bytes _game.views[n].descr = READ_LE_UINT16(v + 3) ? (char *)(v + READ_LE_UINT16(v + 3)) : (char *)(v + 3); /* if no loops exist, return! */ @@ -187,9 +188,18 @@ int AgiEngine::decodeView(int n) { vc->width = *(v + cofs); vc->height = *(v + cofs + 1); - vc->transparency = *(v + cofs + 2) & 0xf; - vc->mirrorLoop = (*(v + cofs + 2) >> 4) & 0x7; - vc->mirror = (*(v + cofs + 2) >> 7) & 0x1; + + if (!_game.views[n].agi256_2) { + vc->transparency = *(v + cofs + 2) & 0xf; + vc->mirrorLoop = (*(v + cofs + 2) >> 4) & 0x7; + vc->mirror = (*(v + cofs + 2) >> 7) & 0x1; + } else { + // Mirroring is disabled for AGI256-2 views because + // AGI256-2 uses whole 8 bits for the transparency variable. + vc->transparency = *(v + cofs + 2); + vc->mirrorLoop = 0; + vc->mirror = 0; + } /* skip over width/height/trans|mirror data */ cofs += 3; |