Opened 8 months ago

Closed 8 months ago

#13154 closed defect (fixed)

SCI: Police Quest 2 (PC-98) help box rendering error

Reported by: einstein95 Owned by: sluicebox
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: Game: Police Quest 2

Description (last modified by einstein95)

When showing the Japanese text in the help box, the newlines in the text are being rendered using Japanese glyphs (ie ¥n)

How it looks in ScummVM:
Help box in ScummVM

How it looks in a PC-98 emulator (unknown if the text being blue is related):
Help box in a PC-98 emulator

Attachments (2)

0000.png (9.3 KB ) - added by einstein95 8 months ago.
Help box in a PC-98 emulator
image-20211211-153016.png (14.2 KB ) - added by einstein95 8 months ago.
Help box in ScummVM

Download all attachments as: .zip

Change History (6)

by einstein95, 8 months ago

Attachment: 0000.png added

Help box in a PC-98 emulator

by einstein95, 8 months ago

Attachment: image-20211211-153016.png added

Help box in ScummVM

comment:1 by einstein95, 8 months ago

Description: modified (diff)

comment:2 by darksoul42, 8 months ago

Chiming in for clarification after sluicebox brought this to me as a Japanese reader, this is a problem with the handling of an explicit newline in the text -> \n, which gets rendered in the top image as ¥n (yen mark, n) because on Japanese environments the yen symbol takes over the backslash glyph for this ASCII code.

For instance, here, where it says "動詞¥n look 見る¥n"
The proper output would be : "動詞
look 見る"

So it really is merely a scanning issue when dealing with escapable characters in a SCI text string.

comment:3 by sluicebox, 8 months ago

Thanks darksoul42 for the (desperately needed) regional expertise!

I see what's going wrong, and why our existing code is working in most places but not here.

In 2014, support was added for \n and \r in PQ2's Japanese strings: 8ffd8793ed1f50872c572c6886a5e9100e8312e4

The comments explain that it's handling the newlines in a different place than where Sierra did, because it's cleaner. The ScummVM code handles them when splitting multi-language and returning the Japanese results. The problem is that this assumes that all code paths that display Japanese text use this function, but they don't. PQ2's scripts have their own built-in functionality for extracting the Japanese text from multi-language strings, and when that gets used, our code doesn't, and so the escaped Japanese newline characters go unhandled. The Japanese help menu is one of those scripts.

Now that I know the history this all makes sense. We should have a fix in the near future.

comment:4 by sluicebox, 8 months ago

Owner: set to sluicebox
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.