Inori / FuckGalEngine

My tools to crack galgame
822 stars 146 forks source link

IGPatch vertical font fix #41

Closed imKota closed 4 years ago

imKota commented 5 years ago

Hello, @Inori

BillStark001 commented 5 years ago

I had not modified the direction of the text, but IG's all displayments depend on scripts parsed by the engine. You may parse and modify the scripts using https://github.com/lennylxx/IG_tools. The repo doesn't directly provide a parser still it consists of the analysis of the format.

BillStark001 commented 5 years ago

Scripts are not only text, those hex codes within the text are controllers. btw. this h scene is exhilarating:D

BillStark001 commented 5 years ago

Yep, each 4-hex-code-group(maybe longer) is a control statement, e. g. 0822 0100 0000 0500 bgm04 and 0400 3000 [talks]. You can open several script files (in both horizontal and vertical text direction) in debug mode and compare them to find any differences. I believe the control statement of text direction switching is 04B6 0001. It appears in file as 00 B6 04 01 and appears pairly for the first time it switches the directon to vertical and the second time horizontal. I've tested my ideas on FLOWERS. You may delete those statements and the text will be horizontal.

BillStark001 commented 5 years ago

I'm sorry, I'm busying with university application....

BillStark001 commented 5 years ago

maybe the next April......

BillStark001 commented 5 years ago

Theoretically just open the file with a hex editor like 010 Editor, search 00 B6 04 01, 00 B6 04 00 and remove them. However, IG used a simple encoding after CureGirl. The encoding way is to minus the original bit from 255(0xFF) for each bit, so you should remove FF 49 FB FE and FF 49 FB FF.

BillStark001 commented 5 years ago

Well...what is the game's name? I'll try to fix it at my leisure.

BillStark001 commented 5 years ago

Seems like your charset in the apis are correct, but you're still editing the texts in Shift-JIS charset.

BillStark001 commented 5 years ago

The charsets of text file and dll should be the same, and since you've assigned the arguments to RUSSIAN_CHARSET, you'd better save in RUSSIAN_CHARSET(both utf8 is also ok, but it may be a little larger).

BillStark001 commented 5 years ago

wow, congratulations :D

Inori commented 5 years ago

The direction of the rendered font is controled by the @ char before font name.

Inori commented 5 years ago

Maybe you should have a look at this: https://github.com/Inori/FuckGalEngine/blob/master/InnocentGrey/IGKit/IGPatch/IGPatch.cpp#L109

Inori commented 5 years ago

well...I remember I just changed the country name and add a @ in front of the font name, then I got correct text rendering.