7 | | I have a dirty workaround: https://github.com/scummvm/scummvm/compare/master...yarolig:scummvm:carnage-hand-workaround |
| 7 | I had a dirty workaround: |
| 8 | {{{ |
| 9 | diff --git a/engines/mm/shared/xeen/sprites.cpp b/engines/mm/shared/xeen/sprites.cpp |
| 10 | index 97fa01aa11b..ce5c377fc3c 100644 |
| 11 | --- a/engines/mm/shared/xeen/sprites.cpp |
| 12 | +++ b/engines/mm/shared/xeen/sprites.cpp |
| 13 | @@ -213,6 +213,12 @@ void SpriteDrawer::draw(XSurface &dest, uint16 offset, const Common::Point &pt, |
| 14 | _destBottom = (byte *)dest.getBasePtr(clipRect.right, clipRect.bottom - 1); |
| 15 | _pitch = dest.pitch; |
| 16 | |
| 17 | + // WORKAROUND for carnage hand |
| 18 | + if (_filesize == 5526) { |
| 19 | + if (offset > _filesize || offset == 86 || offset == 3584) |
| 20 | + return; |
| 21 | + } |
| 22 | + |
| 23 | // Get cell header |
| 24 | Common::MemoryReadStream f(_data, _filesize); |
| 25 | f.seek(offset); |
| 26 | }}} |
| 27 | |
| 28 | And now it less dirty: |
| 29 | {{{ |
| 30 | diff --git a/engines/mm/shared/xeen/sprites.cpp b/engines/mm/shared/xeen/sprites.cpp |
| 31 | index 97fa01aa11b..859818ddb66 100644 |
| 32 | --- a/engines/mm/shared/xeen/sprites.cpp |
| 33 | +++ b/engines/mm/shared/xeen/sprites.cpp |
| 34 | @@ -80,7 +80,7 @@ SpriteResource &SpriteResource::operator=(const SpriteResource &src) { |
| 35 | void SpriteResource::load(const Common::String &filename) { |
| 36 | _filename = filename; |
| 37 | Common::File f; |
| 38 | - if (f.open(filename)) { |
| 39 | + if (g_engine->getGameID() == GType_MightAndMagic1 && f.open(filename)) { |
| 40 | load(f); |
| 41 | } else { |
| 42 | File f2(filename); |
| 43 | }}} |
| 44 | |
| 45 | I'm posting a pull request if you are ok with that https://github.com/scummvm/scummvm/pull/5084 |