Opened 15 years ago

Closed 15 years ago

Last modified 15 months ago

#8362 closed patch

Improved CJK / FM-TOWNS support & some documention

Reported by: SF/wonst719 Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Indiana Jones 3

Description

I've worked on improved CJK support. This patch fixes many bugs on CJK/FMT version.

- V3 Kanji versions (Indy3, LOOM) are working - String position is (almost) correct - Provides more accurate kanji calculation - Shadow color is correct - Fix combination of korean code and charset code - More...

...and some documention about FMT_FNT.ROM Because of many grammatical mistakes, I couldn't make patch of README file. :) Instead, I posted it in here.

-README-

* 3.6 FM-TOWNS game notes

'font ROM file' In order to play Japanese version game, you need FM- TOWNS' font rom file. It is used with UNZ (http://members.at.infoseek.co.jp/townsemu/), a famous FM-TOWNS emulator, and is usally named FMT_FNT.ROM. If you have a real FM-TOWNS machine, you can export rom file from the machine. Rename it to FMT_FNT.ROM, place at ScummVM directory. Otherwise, you can't play Japanese game properly. //Illegal method exists, too. but not mention it.

'crash' FM-TOWNS can mix 2 video modes at once, as if it were layers. for example, 320x240x256 color in first layer, and 640x480x16 color in second layer. Because of this interesting feature, many english games were easily ported to FN-TOWNS, in Japanese language. Ported SCUMM games also uses this feature. Unfortunately, ScummVM doesn't support mixing video modes yet. so Japanese fonts ard drawn scaled. This could make ScummVM crash. //CRASH: When ScummVM draws text in Verb area, Pixels drawn out of area make crashes. //Need to do more clipping... but I still don't know well about virtual screen architecture of ScummVM...

Ticket imported from: #1048283. Ticket imported from: patches/467.

Attachments (2)

cjk_v2.diff (17.1 KB ) - added by SF/wonst719 15 years ago.
Updated patch
cjkcode.h (1.3 KB ) - added by SF/wonst719 15 years ago.
CJK character code check…

Download all attachments as: .zip

Change History (8)

comment:1 by fingolfin, 15 years ago

First off, thanks for your efforts!

Now, some remarks on this patch: * Source comments should be in english * There is some code duplication, which looks like it could be avoided while at the same time making the code easier to understand. Like the checks for _language == Common::JA_JPN && ((c > 0x84 && c < 0x88 .... * cmi_pos_hack maybe could be removed by adding code to the charset renderer to fix the text position... ?

comment:2 by SF/wonst719, 15 years ago

Oh. Uncleaned comments. Sorry about that. :) You can erase all of them. ((c > 0x84 && c < 0x88 .. check is necessery, because FM- TOWNS games use invaild SJIS chars as space, so line break doesn't hurt structure of sentence. If you remove the check,
it could mess characters. cmi_pos_hack is almost same hack compared with original interpreter. Korean version of COMI includes updated(?) Interpreter which draws text into correct place. Comparing it with English version, I found the hack thing. ..So I don't have an idea how to fix it correctly.

comment:3 by fingolfin, 15 years ago

regarding ((c > 0x84 && c < 0x88... -> you misunderstood me. I am not suggesting to remove it, that wouldn't make sense. Rather, I am suggesting that it should be encapsulated into a method / function, to avoid code duplication (it occurs several times) and increase readability.

by SF/wonst719, 15 years ago

Attachment: cjk_v2.diff added

Updated patch

by SF/wonst719, 15 years ago

Attachment: cjkcode.h added

CJK character code check...

comment:4 by SF/wonst719, 15 years ago

Ah.... yes. Sorry again. I've updated the patch, which doesn't have non-English comments, and have encapsulated SJIS check function.

comment:5 by fingolfin, 15 years ago

Owner: set to fingolfin
Status: newclosed

comment:6 by digitall, 15 months ago

Component: Engine: SCUMM
Game: Indiana Jones 3
Note: See TracTickets for help on using tickets.