Opened 19 years ago

Closed 19 years ago

Last modified 6 years ago

#8458 closed patch (fixed)

Possible Kyra fix

Reported by: eriktorbjorn Owned by: cyxx
Priority: normal Component: Engine: Kyra
Version: Keywords:
Cc: Game: Kyrandia 1

Description

Lately, the Kyrandia 1 intro has been crashing for me in drawShape() because assert(shapeData) failed.

This is because when seq_setPanPages() is called to create the hand shapes, the 'data' pointer points to the following data in my copy of the game:

03 00 10 00 00 00 59 0a 00 00 44 14 00 00 3a 1e

"03 00" is the number of shapes. The offset is read by READ_LE_UINT16(data + 2 + shape * 2), so the offsets are "10 00", "00 00", and "59 0a". And that's the problem: The second offset is 0, so that pointer will be NULL.

Now, it looks to me as if the offsets are actually 32-bit quantities, i.e. the offsets are "10 00 00 00", "59 0a 00 00" and "44 14 00 00", in which case the attached patch should fix it. But I don't know if that's really true even for my version of Kyrandia 1, let alone any other version.

Ticket imported from: #1280643. Ticket imported from: patches/563.

Attachments (1)

kyra.diff (533 bytes ) - added by eriktorbjorn 19 years ago.
Patch against a September 2 CVS snapshot

Download all attachments as: .zip

Change History (5)

by eriktorbjorn, 19 years ago

Attachment: kyra.diff added

Patch against a September 2 CVS snapshot

comment:1 by eriktorbjorn, 19 years ago

Owner: set to cyxx

comment:2 by cyxx, 19 years ago

I just verified, in my talkie version the writing.cps file has 32 bits for each offset (or maybe 2 extra bytes for something else...). So, I suppose it's just another difference in the datafiles between cdrom and floppy versions (until now, I only tested my code on the latter).

I just committed some code to handle that in CVS, Kallak hands should be displayed now.

comment:3 by cyxx, 19 years ago

Resolution: fixed
Status: newclosed

comment:4 by digitall, 6 years ago

Component: Engine: Kyra
Game: Kyrandia 1
Note: See TracTickets for help on using tickets.