Opened 3 years ago

Closed 3 years ago

#12635 closed defect (fixed)

KYRA: Missing subtitle (also in original game)

Reported by: orgads Owned by: athrxx
Priority: normal Component: Engine: Kyra
Version: Keywords:
Cc: orgads Game: Kyrandia 1

Description (last modified by orgads)

Hi,

On Zanthia's lab during the cutscene, Brandon awakes and asks "Where am I?" etc.

After 4 sentences Brandon asks "Who are you?". The voice is played, but the subtitle doesn't appear.

I tried to debug this issue a bit, and noticed that on most texts there are several pushes, followed by o1_displayWSASequentialFrames between o1_customPrintTalkString and o1_restoreCustomPrintBackground, but this sentence has o1_customPrintTalkString immediately followed by o1_restoreCustomPrintBackground, and onlyl then o1_displayWSASequentialFrames.

Looks like the op order is swapped.

[0x00000982] EMCInterpreter::op_addSP([4/4])
[0x00000984] EMCInterpreter::op_push([15/15])
[0x00000986] EMCInterpreter::op_push([40/40])
[0x00000988] EMCInterpreter::op_push([184/184])
[0x0000098C] EMCInterpreter::op_push([10/10])
[0x0000098E] EMCInterpreter::op_push([6/6])
[0x00000990] EMCInterpreter::op_sysCall([52/52])
KyraEngine_LoK::o1_customPrintTalkString(000002965277c8a8) (6, 'Who are you?', 184, 40, 15)
[0x00000992] EMCInterpreter::op_addSP([5/5])
[0x00000994] EMCInterpreter::op_sysCall([53/53])
KyraEngine_LoK::o1_restoreCustomPrintBackground(000002965277c8a8) ()
[0x00000996] EMCInterpreter::op_push([2/2])
[0x00000998] EMCInterpreter::op_pushRetOrPos([1/1])
[0x0000099A] EMCInterpreter::op_jmp([930/930])
[0x00000744] EMCInterpreter::op_push([0/0])
[0x00000746] EMCInterpreter::op_pushBPAdd([1/1])
[0x00000748] EMCInterpreter::op_push([0/0])
[0x0000074A] EMCInterpreter::op_push([10/10])
[0x0000074C] EMCInterpreter::op_push([40/40])
[0x0000074E] EMCInterpreter::op_push([184/184])
[0x00000752] EMCInterpreter::op_push([20/20])
[0x00000754] EMCInterpreter::op_push([18/18])
[0x00000756] EMCInterpreter::op_sysCall([64/64])
KyraEngine_LoK::o1_displayWSASequentialFrames(000002965277c8a8) (18, 20, 184, 40, 10, 0, 2, 0)

Can you suggest a workaround or a way to patch this?

Attachments (1)

kyra1-cd-he.007 (15.8 KB ) - added by orgads 3 years ago.

Download all attachments as: .zip

Change History (6)

by orgads, 3 years ago

Attachment: kyra1-cd-he.007 added

comment:1 by orgads, 3 years ago

Description: modified (diff)

comment:2 by orgads, 3 years ago

This is from the original game: https://youtu.be/PQuBkU3SzxY?t=4013

comment:3 by athrxx, 3 years ago

Thanks for your report. This is interesting, it seems that this is a script bug that got patched in the original. I cannot reproduce it with my German talkie version. And the script is like this:

[0x00000990] EMCInterpreter::op_sysCall([52/52])
KyraEngine_LoK::o1_customPrintTalkString(000002059B478468) (6, 'Wer seid Ihr?', 184, 40, 15)
[0x00000992] EMCInterpreter::op_addSP([5/5])
[0x00000994] EMCInterpreter::op_push([2/2])
[0x00000996] EMCInterpreter::op_pushRetOrPos([1/1])
[0x00000998] EMCInterpreter::op_jmp([930/930])
[0x00000744] EMCInterpreter::op_push([0/0])
[0x00000746] EMCInterpreter::op_pushBPAdd([1/1])
[0x00000748] EMCInterpreter::op_push([0/0])
[0x0000074A] EMCInterpreter::op_push([10/10])
[0x0000074C] EMCInterpreter::op_push([40/40])
[0x0000074E] EMCInterpreter::op_push([184/184])
[0x00000752] EMCInterpreter::op_push([20/20])
[0x00000754] EMCInterpreter::op_push([18/18])
[0x00000756] EMCInterpreter::op_sysCall([64/64])
KyraEngine_LoK::o1_displayWSASequentialFrames(000002059B478468) (18, 20, 184, 40, 10, 0, 2, 0)
[0x00000758] EMCInterpreter::op_addSP([8/8])
[0x0000075A] EMCInterpreter::op_popRetOrPos([1/1])
[0x0000099A] EMCInterpreter::op_addSP([1/1])
[0x0000099C] EMCInterpreter::op_sysCall([53/53])
KyraEngine_LoK::o1_restoreCustomPrintBackground(000002059B478468) ()

So this has apparently been fixed in the script.
I'll see if I can reproduce the bug with another version.

From the fixed script it is pretty obvious what should happen: the o1_restoreCustomPrintBackground() has to happen after the call to o1_displayWSASequentialFrames().

comment:4 by athrxx, 3 years ago

Okay, now I also tested the Spanish fan translation (which is probably based on the same English version as your Hebrew one). And the bug is there...

I'll try to add some fix/workaround...

comment:5 by athrxx, 3 years ago

Owner: set to athrxx
Resolution: fixed
Status: newclosed

Okay, I have made a fix. I didn't really manage to do it in a way I actually like, but I guess we've had worse workarounds...

Note: See TracTickets for help on using tickets.