Author Topic: SCI Companion V3 - alpha build notes/bugs/feature requests  (Read 459691 times)

0 Members and 1 Guest are viewing this topic.

Offline AGKorson

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1035 on: June 09, 2024, 03:23:01 AM »
Andrew, are you still using the FastColoredTextBox class for your C# editor?
Yeah, that's still the plan. I forked it and added code page support to it so it will load/save files in DOS code pages. But now I'm wondering if I don't need to do that- maybe I leave the source files with Windows-1252 encoding, and then only convert to DOS code page when compiling. I'm still not sure which way is the best.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1036 on: June 09, 2024, 04:11:33 AM »
I'd say leave the source files as Win-1252 so external tools can work with it.

...Though nowadays Unicode would be preferred, while some 32 characters in the middle don't match between Unicode and Win-1252, because the first 256 characters in Unicode match ISO-8859-1 instead. Oops.

(I found it was easier to write external tools of my own to handle SCI 1.1+ UTF-8 support than to convert SCI Companion. Go fig.)

Offline L@Zar0

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1037 on: January 16, 2025, 05:36:58 AM »
Sorry if this has been asked, I saw that you talk about codepages. Would it be possible to add codepage 850 to SCI Companion v3?

I say this because I think 850 is the multilingual old DOS codepage used for european countries like Spanish, Italy, France and German, and some characters like "?" (0xB5) (present in SQ5 for example, even here in the forums shows ?, not the unicode/win1252 char), are not correctly translated when exporting message file.

I want to try something with SCI Comp v3, and see if I can add that codepage, but I didn't want to modify the code.

You can see here a list of codepages:
https://www.aivosto.com/articles/charsets-codepages-dos.html

And here, 850 codepage:
https://www.aivosto.com/articles/charsets-codepages-dos.html#codepage850

Here is one of the character fonts, and you can see they match.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1038 on: January 16, 2025, 06:29:53 AM »
CP-850 is the DOS Latin-1 codepage, used in Western Europe. I, being Dutch and old know it well, and it'd be a nice little challenge to try and extend things to support European games as well as American ones. (And Japanese if you know how, it's a trick.)

Offline L@Zar0

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1039 on: January 16, 2025, 09:48:08 AM »
Ok, I will download source and try to do something. I'm from Spain, so, in my old DOS days I had to use also codepage 850. ;)

Maybe I will push a PR, if I remember how to do them and can reach some type of codepage 850 implementation. xD

Offline L@Zar0

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1040 on: January 16, 2025, 02:43:43 PM »
Mmm... using Codepage 850 in font editor...




But I'm having some issues yet in other places (like opening exclamation and question symbols not showing correctly in texts, but accents are ok):



I think that for the symbols exclamation and question, uses Codepage 437, but for the rest of symbols CP850 (at least in spanish). I don't know about other localized languages.

And here it is CP437 (after changing it in Settings, and reopening font tab, of course):

« Last Edit: January 16, 2025, 03:01:01 PM by L@Zar0 »

Offline L@Zar0

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1041 on: January 16, 2025, 06:16:28 PM »
Well, in any case, I have pushed a PR that adds Codepage 850 if you're interested (or add the code by yourself, now you have the needed changes).

The japanese/chinese characters uses a different encoding, and I don't think it will be as easy as add another language like could be Greek/Rusian or similars. I don't even know how we could achieve that giving that Kanji has thousands of logographics. Apart, the .fon files will be able to use all those characters?

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #1042 on: January 17, 2025, 03:52:26 AM »
Supporting Japanese in SCI Companion is a hack and a half that won't cover SQ4, but it will work on for example PQ2, because all of them except SQ4 use Shift-JIS. So what you wanna do is claim the game uses Windows 1252 which bypasses the code page translation, then use AppLocale or some such to make SCI Companion itself run in Shift-JIS. Because it was never a Unicode application and for most of us can be assumed to run on Win-1252.

And that means the encoding used in PQ2-JP can match SCI Companion's... by making SCI Companion match PQ2's instead.

As for the font data: the Japanese games run on a system that has such beautiful features as "an entire Shift-JIS kanji character set in ROM" and "can display higher-res fonts on top of low-res graphics". The actual SCI font data only contains some katakana in the upper moby.

And then there's my SCI1.1+ which has UTF-8 support, entirely inspired by the fact that in the font data, it says "number of characters" instead of "highest character number". So "256 characters" instead of "up to #255". It's a 16-bit number and Unicode at the time hadn't developed into the astral planes yet. But I just said SCI Companion is not Unicode aware, so how do you use it with SCI1.1+? That's the best part: you don't! I wrote a command line tool to handle message resources in UTF-8. The only thing SCI Companion knows is that the max amount of characters isn't 256.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.047 seconds with 23 queries.