News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Hungarian translation of Stunts

Started by GTAManRCR, March 08, 2021, 09:41:55 AM

Previous topic - Next topic

Cas

Stunts fonts, by looking at the files inside, very clearly support 256 characters, but only use a bunch for basic ASCII. It seems to me that it's perfectly possible to add composite characters that can later be used in the translation to properly display diacritics. The game code doesn't have to do anything different to handle the extra characters, so it should work. There are, however, a few bytes in the font header that I don't fully understand, but none of them seems to be anything sensitive such as file length, number of characters in the font, etc.

There are three font files coming with Stunts: FONTDEF is the font used for the text in menus and dialog boxes; FONTN is used for the scoreboard text and the car specs in the showroom; finally, FONTLED contains the digits used in the replay menu panel. The first two include all basic letters, numbers and punctuation, whereas the latter only provides numbers. Nevertheless, all of them have 256 slots.

Format description:
The file format begins with a header that's about 40 bytes long (not sure exactly what the length is, because I just made a quick look, but I can easily find out), I don't know what these bytes do, but most are zero. After that, comes the index region, measuring 512 bytes. Each word there is a zero-based pointer relative to the beginning of the file to the position of the corresponding character from 0 to 255 in code-point. The code points are typically unordered and if read in sequence, they would not coincide with the ASCII ordering, so following the indexes is important. On the other hand, there isn't any space between the contents. Pointers to unused code points have a zero (they point to the beginning of the file, but it's understood they're supposed to be null). Data appears to begin right after the index list. FONTDEF and FONTN have their character data start with a byte that indicates the individual character width in pixels. This doesn't happen with FONTLED. I guess there can be one of the bytes in the header telling how this should be handled, but having only three fonts, we can consider this an individual characteristic and leave the headers alone. If character width is larger than 8, two bytes follow containing the pixel values (on or off) in its bits. Read as a words, pixel positions grow to the left. If the width is up to 8, only one byte is issued per row and one could assume more bytes would be issued if the width were longer than 16, but there aren't any characters that wide. Height appears to be always 8, surely specified in the header. The character widths only contain the glyphs themselves with no spacing, so maybe spacing is also specified in the header.
Earth is my country. Science is my religion.

Daniel3D

Then there is still not enough room in the uppercase characters to add accents, but in the lower case it should be possible. They need the full upper 7 pixels or all 8 in some cases.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

The good thing is that Stunts adjusts menus to the height of fonts. I have even tried it with a 16 pixel high font. So a taller font can be used easily.
Earth is my country. Science is my religion.

GTAManRCR

#18
Now it has accent support too. If you understand this language, the read the README.TXT (OLVASSEL in Hungarian). If not, then use some translator software
Some screenshots
Hejj bicska, bicska, bicska csantavéri kisbicska!

Cas

Earth is my country. Science is my religion.

GTAManRCR

Hejj bicska, bicska, bicska csantavéri kisbicska!