diff options
author | Paul Gilbert | 2019-07-27 19:57:37 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-07-27 19:57:37 -0700 |
commit | f515394e78f92093f7d8df52eba9742e657e57e1 (patch) | |
tree | 910b4333c7302c297bc56b56029f7be8c77b2784 /engines/glk | |
parent | 3457d3155e61a43ee8f2e8b1479b123439953d53 (diff) | |
download | scummvm-rg350-f515394e78f92093f7d8df52eba9742e657e57e1.tar.gz scummvm-rg350-f515394e78f92093f7d8df52eba9742e657e57e1.tar.bz2 scummvm-rg350-f515394e78f92093f7d8df52eba9742e657e57e1.zip |
GLK: FROTZ: Fix reading placeholder rects from Blorb files
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/frotz/pics.cpp | 8 | ||||
-rw-r--r-- | engines/glk/picture.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/glk/frotz/pics.cpp b/engines/glk/frotz/pics.cpp index a3df86a53c..84ee050ae7 100644 --- a/engines/glk/frotz/pics.cpp +++ b/engines/glk/frotz/pics.cpp @@ -156,10 +156,10 @@ Common::SeekableReadStream *Pics::createReadStreamForMember(const Common::String dest = decoder.decode(*src, e._flags, *_palette, kMCGA, e._width, e._height); delete src; } else { - byte *rect = (byte *)malloc(2 * sizeof(uint16)); - WRITE_LE_UINT16(rect, e._width); - WRITE_LE_UINT16(rect + 2, e._height); - dest = new Common::MemoryReadStream(rect, 2 * sizeof(uint16), DisposeAfterUse::YES); + byte *rect = (byte *)malloc(2 * sizeof(uint32)); + WRITE_BE_UINT32(rect, e._width); + WRITE_BE_UINT32(rect + 4, e._height); + dest = new Common::MemoryReadStream(rect, 2 * sizeof(uint32), DisposeAfterUse::YES); } f.close(); diff --git a/engines/glk/picture.cpp b/engines/glk/picture.cpp index 306444449c..a87f7f7b81 100644 --- a/engines/glk/picture.cpp +++ b/engines/glk/picture.cpp @@ -135,8 +135,8 @@ Picture *Pictures::load(uint32 id) { palCount = raw.getPaletteColorCount(); transColor = raw.getTransparentColor(); } else if (f.open(Common::String::format("pic%u.rect", id))) { - rectImg.w = f.readUint16LE(); - rectImg.h = f.readUint16LE(); + rectImg.w = f.readUint32BE(); + rectImg.h = f.readUint32BE(); img = &rectImg; } else { // No such picture |